data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v
[Errno 2] No such file or directory: 'preprocess.output'
1: b"%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:40: Cannot find file containing module: 'reset_conditioner_1'\n  reset_conditioner_1 reset_cond (\n  ^~~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog,data/full_repos/permissive/209997170/reset_conditioner_1\n             data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog,data/full_repos/permissive/209997170/reset_conditioner_1.v\n             data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog,data/full_repos/permissive/209997170/reset_conditioner_1.sv\n             reset_conditioner_1\n             reset_conditioner_1.v\n             reset_conditioner_1.sv\n             obj_dir/reset_conditioner_1\n             obj_dir/reset_conditioner_1.v\n             obj_dir/reset_conditioner_1.sv\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:47: Cannot find file containing module: 'button_conditioner_2'\n  button_conditioner_2 io_button_left_button_conditioner (\n  ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:54: Cannot find file containing module: 'button_conditioner_2'\n  button_conditioner_2 io_button_right_button_conditioner (\n  ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:61: Cannot find file containing module: 'button_conditioner_2'\n  button_conditioner_2 io_button_centre_button_conditioner (\n  ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:68: Cannot find file containing module: 'button_conditioner_2'\n  button_conditioner_2 io_button_up_button_conditioner (\n  ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:75: Cannot find file containing module: 'button_conditioner_2'\n  button_conditioner_2 io_button_down_button_conditioner (\n  ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:82: Cannot find file containing module: 'button_conditioner_2'\n  button_conditioner_2 button_up_conditioner (\n  ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:89: Cannot find file containing module: 'button_conditioner_2'\n  button_conditioner_2 button_down_conditioner (\n  ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:96: Cannot find file containing module: 'button_conditioner_2'\n  button_conditioner_2 button_left_conditioner (\n  ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:103: Cannot find file containing module: 'button_conditioner_2'\n  button_conditioner_2 button_right_conditioner (\n  ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:110: Cannot find file containing module: 'button_conditioner_2'\n  button_conditioner_2 button_stage_left_conditioner (\n  ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:117: Cannot find file containing module: 'button_conditioner_2'\n  button_conditioner_2 button_stage_right_conditioner (\n  ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:124: Cannot find file containing module: 'edge_detector_13'\n  edge_detector_13 io_button_up_edge_detector (\n  ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:131: Cannot find file containing module: 'edge_detector_13'\n  edge_detector_13 io_button_down_edge_detector (\n  ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:138: Cannot find file containing module: 'edge_detector_13'\n  edge_detector_13 io_button_left_edge_detector (\n  ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:145: Cannot find file containing module: 'edge_detector_13'\n  edge_detector_13 io_button_right_edge_detector (\n  ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:152: Cannot find file containing module: 'edge_detector_13'\n  edge_detector_13 io_button_centre_edge_detector (\n  ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:159: Cannot find file containing module: 'edge_detector_13'\n  edge_detector_13 button_up_edge_detector (\n  ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:166: Cannot find file containing module: 'edge_detector_13'\n  edge_detector_13 button_down_edge_detector (\n  ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:173: Cannot find file containing module: 'edge_detector_13'\n  edge_detector_13 button_left_edge_detector (\n  ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:180: Cannot find file containing module: 'edge_detector_13'\n  edge_detector_13 button_right_edge_detector (\n  ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:187: Cannot find file containing module: 'edge_detector_13'\n  edge_detector_13 button_stage_left_edge_detector (\n  ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:194: Cannot find file containing module: 'edge_detector_13'\n  edge_detector_13 button_stage_right_edge_detector (\n  ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:214: Cannot find file containing module: 'game_24'\n  game_24 game (\n  ^~~~~~~\n%Error: data/full_repos/permissive/209997170/bloxorz/work/planAhead/bloxorz/bloxorz.srcs/sources_1/imports/verilog/mojo_top_0.v:239: Cannot find file containing module: 'ledprocess_25'\n  ledprocess_25 led_grid (\n  ^~~~~~~~~~~~~\n%Error: Exiting due to 25 error(s)\n"
module mojo_top_0 (
    input clk,
    input rst_n,
    output reg [7:0] led,
    input cclk,
    output reg spi_miso,
    input spi_ss,
    input spi_mosi,
    input spi_sck,
    output reg [3:0] spi_channel,
    input avr_tx,
    output reg avr_rx,
    input avr_rx_busy,
    output reg [23:0] io_led,
    output reg [7:0] io_seg,
    output reg [3:0] io_sel,
    input [4:0] io_button,
    input [23:0] io_dip,
    output reg outled,
    input button_up,
    input button_down,
    input button_left,
    input button_right,
    input button_stage_left,
    input button_stage_right
  );
  
  
  
  reg rst;
  
  wire [1-1:0] M_reset_cond_out;
  reg [1-1:0] M_reset_cond_in;
  reset_conditioner_1 reset_cond (
    .clk(clk),
    .in(M_reset_cond_in),
    .out(M_reset_cond_out)
  );
  wire [1-1:0] M_io_button_left_button_conditioner_out;
  reg [1-1:0] M_io_button_left_button_conditioner_in;
  button_conditioner_2 io_button_left_button_conditioner (
    .clk(clk),
    .in(M_io_button_left_button_conditioner_in),
    .out(M_io_button_left_button_conditioner_out)
  );
  wire [1-1:0] M_io_button_right_button_conditioner_out;
  reg [1-1:0] M_io_button_right_button_conditioner_in;
  button_conditioner_2 io_button_right_button_conditioner (
    .clk(clk),
    .in(M_io_button_right_button_conditioner_in),
    .out(M_io_button_right_button_conditioner_out)
  );
  wire [1-1:0] M_io_button_centre_button_conditioner_out;
  reg [1-1:0] M_io_button_centre_button_conditioner_in;
  button_conditioner_2 io_button_centre_button_conditioner (
    .clk(clk),
    .in(M_io_button_centre_button_conditioner_in),
    .out(M_io_button_centre_button_conditioner_out)
  );
  wire [1-1:0] M_io_button_up_button_conditioner_out;
  reg [1-1:0] M_io_button_up_button_conditioner_in;
  button_conditioner_2 io_button_up_button_conditioner (
    .clk(clk),
    .in(M_io_button_up_button_conditioner_in),
    .out(M_io_button_up_button_conditioner_out)
  );
  wire [1-1:0] M_io_button_down_button_conditioner_out;
  reg [1-1:0] M_io_button_down_button_conditioner_in;
  button_conditioner_2 io_button_down_button_conditioner (
    .clk(clk),
    .in(M_io_button_down_button_conditioner_in),
    .out(M_io_button_down_button_conditioner_out)
  );
  wire [1-1:0] M_button_up_conditioner_out;
  reg [1-1:0] M_button_up_conditioner_in;
  button_conditioner_2 button_up_conditioner (
    .clk(clk),
    .in(M_button_up_conditioner_in),
    .out(M_button_up_conditioner_out)
  );
  wire [1-1:0] M_button_down_conditioner_out;
  reg [1-1:0] M_button_down_conditioner_in;
  button_conditioner_2 button_down_conditioner (
    .clk(clk),
    .in(M_button_down_conditioner_in),
    .out(M_button_down_conditioner_out)
  );
  wire [1-1:0] M_button_left_conditioner_out;
  reg [1-1:0] M_button_left_conditioner_in;
  button_conditioner_2 button_left_conditioner (
    .clk(clk),
    .in(M_button_left_conditioner_in),
    .out(M_button_left_conditioner_out)
  );
  wire [1-1:0] M_button_right_conditioner_out;
  reg [1-1:0] M_button_right_conditioner_in;
  button_conditioner_2 button_right_conditioner (
    .clk(clk),
    .in(M_button_right_conditioner_in),
    .out(M_button_right_conditioner_out)
  );
  wire [1-1:0] M_button_stage_left_conditioner_out;
  reg [1-1:0] M_button_stage_left_conditioner_in;
  button_conditioner_2 button_stage_left_conditioner (
    .clk(clk),
    .in(M_button_stage_left_conditioner_in),
    .out(M_button_stage_left_conditioner_out)
  );
  wire [1-1:0] M_button_stage_right_conditioner_out;
  reg [1-1:0] M_button_stage_right_conditioner_in;
  button_conditioner_2 button_stage_right_conditioner (
    .clk(clk),
    .in(M_button_stage_right_conditioner_in),
    .out(M_button_stage_right_conditioner_out)
  );
  wire [1-1:0] M_io_button_up_edge_detector_out;
  reg [1-1:0] M_io_button_up_edge_detector_in;
  edge_detector_13 io_button_up_edge_detector (
    .clk(clk),
    .in(M_io_button_up_edge_detector_in),
    .out(M_io_button_up_edge_detector_out)
  );
  wire [1-1:0] M_io_button_down_edge_detector_out;
  reg [1-1:0] M_io_button_down_edge_detector_in;
  edge_detector_13 io_button_down_edge_detector (
    .clk(clk),
    .in(M_io_button_down_edge_detector_in),
    .out(M_io_button_down_edge_detector_out)
  );
  wire [1-1:0] M_io_button_left_edge_detector_out;
  reg [1-1:0] M_io_button_left_edge_detector_in;
  edge_detector_13 io_button_left_edge_detector (
    .clk(clk),
    .in(M_io_button_left_edge_detector_in),
    .out(M_io_button_left_edge_detector_out)
  );
  wire [1-1:0] M_io_button_right_edge_detector_out;
  reg [1-1:0] M_io_button_right_edge_detector_in;
  edge_detector_13 io_button_right_edge_detector (
    .clk(clk),
    .in(M_io_button_right_edge_detector_in),
    .out(M_io_button_right_edge_detector_out)
  );
  wire [1-1:0] M_io_button_centre_edge_detector_out;
  reg [1-1:0] M_io_button_centre_edge_detector_in;
  edge_detector_13 io_button_centre_edge_detector (
    .clk(clk),
    .in(M_io_button_centre_edge_detector_in),
    .out(M_io_button_centre_edge_detector_out)
  );
  wire [1-1:0] M_button_up_edge_detector_out;
  reg [1-1:0] M_button_up_edge_detector_in;
  edge_detector_13 button_up_edge_detector (
    .clk(clk),
    .in(M_button_up_edge_detector_in),
    .out(M_button_up_edge_detector_out)
  );
  wire [1-1:0] M_button_down_edge_detector_out;
  reg [1-1:0] M_button_down_edge_detector_in;
  edge_detector_13 button_down_edge_detector (
    .clk(clk),
    .in(M_button_down_edge_detector_in),
    .out(M_button_down_edge_detector_out)
  );
  wire [1-1:0] M_button_left_edge_detector_out;
  reg [1-1:0] M_button_left_edge_detector_in;
  edge_detector_13 button_left_edge_detector (
    .clk(clk),
    .in(M_button_left_edge_detector_in),
    .out(M_button_left_edge_detector_out)
  );
  wire [1-1:0] M_button_right_edge_detector_out;
  reg [1-1:0] M_button_right_edge_detector_in;
  edge_detector_13 button_right_edge_detector (
    .clk(clk),
    .in(M_button_right_edge_detector_in),
    .out(M_button_right_edge_detector_out)
  );
  wire [1-1:0] M_button_stage_left_edge_detector_out;
  reg [1-1:0] M_button_stage_left_edge_detector_in;
  edge_detector_13 button_stage_left_edge_detector (
    .clk(clk),
    .in(M_button_stage_left_edge_detector_in),
    .out(M_button_stage_left_edge_detector_out)
  );
  wire [1-1:0] M_button_stage_right_edge_detector_out;
  reg [1-1:0] M_button_stage_right_edge_detector_in;
  edge_detector_13 button_stage_right_edge_detector (
    .clk(clk),
    .in(M_button_stage_right_edge_detector_in),
    .out(M_button_stage_right_edge_detector_out)
  );
  wire [256-1:0] M_game_map_out;
  wire [16-1:0] M_game_player_position_out;
  wire [8-1:0] M_game_win_position_out;
  wire [1-1:0] M_game_win_bool_out;
  wire [1-1:0] M_game_loss_bool_out;
  wire [1-1:0] M_game_portrait_orientation_out;
  wire [1-1:0] M_game_horizontal_orientation_out;
  wire [1-1:0] M_game_vertical_orientation_out;
  wire [2-1:0] M_game_map_index;
  reg [1-1:0] M_game_button_up;
  reg [1-1:0] M_game_button_down;
  reg [1-1:0] M_game_button_left;
  reg [1-1:0] M_game_button_right;
  reg [1-1:0] M_game_button_stage_left;
  reg [1-1:0] M_game_button_stage_right;
  game_24 game (
    .clk(clk),
    .rst(rst),
    .button_up(M_game_button_up),
    .button_down(M_game_button_down),
    .button_left(M_game_button_left),
    .button_right(M_game_button_right),
    .button_stage_left(M_game_button_stage_left),
    .button_stage_right(M_game_button_stage_right),
    .map_out(M_game_map_out),
    .player_position_out(M_game_player_position_out),
    .win_position_out(M_game_win_position_out),
    .win_bool_out(M_game_win_bool_out),
    .loss_bool_out(M_game_loss_bool_out),
    .portrait_orientation_out(M_game_portrait_orientation_out),
    .horizontal_orientation_out(M_game_horizontal_orientation_out),
    .vertical_orientation_out(M_game_vertical_orientation_out),
    .map_index(M_game_map_index)
  );
  wire [8-1:0] M_led_grid_pixel;
  wire [1-1:0] M_led_grid_led;
  reg [256-1:0] M_led_grid_map;
  reg [8-1:0] M_led_grid_win_pos;
  reg [16-1:0] M_led_grid_player_pos;
  reg [1-1:0] M_led_grid_update;
  ledprocess_25 led_grid (
    .clk(clk),
    .rst(rst),
    .map(M_led_grid_map),
    .win_pos(M_led_grid_win_pos),
    .player_pos(M_led_grid_player_pos),
    .update(M_led_grid_update),
    .pixel(M_led_grid_pixel),
    .led(M_led_grid_led)
  );
  
  always @* begin
    M_reset_cond_in = ~rst_n;
    rst = M_reset_cond_out;
    led = 8'h00;
    spi_miso = 1'bz;
    spi_channel = 4'bzzzz;
    avr_rx = 1'bz;
    io_led = 24'h000000;
    io_seg = 8'hff;
    io_sel = 4'hf;
    M_io_button_up_button_conditioner_in = io_button[0+0-:1];
    M_io_button_up_edge_detector_in = M_io_button_up_button_conditioner_out;
    M_io_button_centre_button_conditioner_in = io_button[1+0-:1];
    M_io_button_centre_edge_detector_in = M_io_button_centre_button_conditioner_out;
    M_io_button_down_button_conditioner_in = io_button[2+0-:1];
    M_io_button_down_edge_detector_in = M_io_button_down_button_conditioner_out;
    M_io_button_left_button_conditioner_in = io_button[3+0-:1];
    M_io_button_left_edge_detector_in = M_io_button_left_button_conditioner_out;
    M_io_button_right_button_conditioner_in = io_button[4+0-:1];
    M_io_button_right_edge_detector_in = M_io_button_right_button_conditioner_out;
    M_button_up_conditioner_in = button_up;
    M_button_up_edge_detector_in = M_button_up_conditioner_out;
    M_button_down_conditioner_in = button_down;
    M_button_down_edge_detector_in = M_button_down_conditioner_out;
    M_button_left_conditioner_in = button_left;
    M_button_left_edge_detector_in = M_button_left_conditioner_out;
    M_button_right_conditioner_in = button_right;
    M_button_right_edge_detector_in = M_button_right_conditioner_out;
    M_button_stage_left_conditioner_in = button_stage_left;
    M_button_stage_left_edge_detector_in = M_button_stage_left_conditioner_out;
    M_button_stage_right_conditioner_in = button_stage_right;
    M_button_stage_right_edge_detector_in = M_button_stage_right_conditioner_out;
    M_game_button_stage_left = M_button_stage_left_edge_detector_out;
    M_game_button_stage_right = M_button_stage_right_edge_detector_out;
    
    case (io_dip[0+0+0-:1])
      1'h0: begin
        M_game_button_up = M_button_up_edge_detector_out;
        M_game_button_down = M_button_down_edge_detector_out;
        M_game_button_left = M_button_left_edge_detector_out;
        M_game_button_right = M_button_right_edge_detector_out;
      end
      1'h1: begin
        M_game_button_up = M_io_button_up_edge_detector_out;
        M_game_button_down = M_io_button_down_edge_detector_out;
        M_game_button_left = M_io_button_left_edge_detector_out;
        M_game_button_right = M_io_button_right_edge_detector_out;
      end
      default: begin
        M_game_button_up = M_button_up_edge_detector_out;
        M_game_button_down = M_button_down_edge_detector_out;
        M_game_button_left = M_button_left_edge_detector_out;
        M_game_button_right = M_button_right_edge_detector_out;
      end
    endcase
    
    case (io_dip[0+1+0-:1])
      1'h0: begin
        io_led[8+7-:8] = M_game_player_position_out[8+7-:8];
        io_led[0+7-:8] = M_game_player_position_out[0+7-:8];
        io_led[16+7+0-:1] = M_game_portrait_orientation_out;
        io_led[16+6+0-:1] = M_game_horizontal_orientation_out;
        io_led[16+5+0-:1] = M_game_vertical_orientation_out;
        io_led[16+4+0-:1] = M_game_win_bool_out;
        io_led[16+3+0-:1] = M_game_loss_bool_out;
        io_led[16+1+1-:2] = M_game_map_index;
      end
      1'h1: begin
        io_led[16+2+0-:1] = M_game_map_out[(8'hff - M_game_player_position_out[8+7-:8])*1+0-:1];
        io_led[16+1+0-:1] = M_game_map_out[(8'hff - M_game_player_position_out[0+7-:8])*1+0-:1];
      end
      default: begin
        io_led[8+7-:8] = M_game_player_position_out[8+7-:8];
        io_led[0+7-:8] = M_game_player_position_out[0+7-:8];
        io_led[16+7+0-:1] = M_game_portrait_orientation_out;
        io_led[16+6+0-:1] = M_game_horizontal_orientation_out;
        io_led[16+5+0-:1] = M_game_vertical_orientation_out;
        io_led[16+4+0-:1] = M_game_win_bool_out;
        io_led[16+3+0-:1] = M_game_loss_bool_out;
        io_led[16+1+1-:2] = M_game_map_index;
      end
    endcase
    M_led_grid_update = 1'h1;
    M_led_grid_win_pos = M_game_win_position_out;
    M_led_grid_player_pos = M_game_player_position_out;
    M_led_grid_map = M_game_map_out;
    outled = M_led_grid_led;
  end
endmodule
module mojo_top_0 (
    input clk,
    input rst_n,
    output reg [7:0] led,
    input cclk,
    output reg spi_miso,
    input spi_ss,
    input spi_mosi,
    input spi_sck,
    output reg [3:0] spi_channel,
    input avr_tx,
    output reg avr_rx,
    input avr_rx_busy,
    output reg [23:0] io_led,
    output reg [7:0] io_seg,
    output reg [3:0] io_sel,
    input [4:0] io_button,
    input [23:0] io_dip,
    output reg outled,
    input button_up,
    input button_down,
    input button_left,
    input button_right,
    input button_stage_left,
    input button_stage_right
  );

  
  
  
  reg rst;
  
  wire [1-1:0] M_reset_cond_out;
  reg [1-1:0] M_reset_cond_in;
  reset_conditioner_1 reset_cond (
    .clk(clk),
    .in(M_reset_cond_in),
    .out(M_reset_cond_out)
  );
  wire [1-1:0] M_io_button_left_button_conditioner_out;
  reg [1-1:0] M_io_button_left_button_conditioner_in;
  button_conditioner_2 io_button_left_button_conditioner (
    .clk(clk),
    .in(M_io_button_left_button_conditioner_in),
    .out(M_io_button_left_button_conditioner_out)
  );
  wire [1-1:0] M_io_button_right_button_conditioner_out;
  reg [1-1:0] M_io_button_right_button_conditioner_in;
  button_conditioner_2 io_button_right_button_conditioner (
    .clk(clk),
    .in(M_io_button_right_button_conditioner_in),
    .out(M_io_button_right_button_conditioner_out)
  );
  wire [1-1:0] M_io_button_centre_button_conditioner_out;
  reg [1-1:0] M_io_button_centre_button_conditioner_in;
  button_conditioner_2 io_button_centre_button_conditioner (
    .clk(clk),
    .in(M_io_button_centre_button_conditioner_in),
    .out(M_io_button_centre_button_conditioner_out)
  );
  wire [1-1:0] M_io_button_up_button_conditioner_out;
  reg [1-1:0] M_io_button_up_button_conditioner_in;
  button_conditioner_2 io_button_up_button_conditioner (
    .clk(clk),
    .in(M_io_button_up_button_conditioner_in),
    .out(M_io_button_up_button_conditioner_out)
  );
  wire [1-1:0] M_io_button_down_button_conditioner_out;
  reg [1-1:0] M_io_button_down_button_conditioner_in;
  button_conditioner_2 io_button_down_button_conditioner (
    .clk(clk),
    .in(M_io_button_down_button_conditioner_in),
    .out(M_io_button_down_button_conditioner_out)
  );
  wire [1-1:0] M_button_up_conditioner_out;
  reg [1-1:0] M_button_up_conditioner_in;
  button_conditioner_2 button_up_conditioner (
    .clk(clk),
    .in(M_button_up_conditioner_in),
    .out(M_button_up_conditioner_out)
  );
  wire [1-1:0] M_button_down_conditioner_out;
  reg [1-1:0] M_button_down_conditioner_in;
  button_conditioner_2 button_down_conditioner (
    .clk(clk),
    .in(M_button_down_conditioner_in),
    .out(M_button_down_conditioner_out)
  );
  wire [1-1:0] M_button_left_conditioner_out;
  reg [1-1:0] M_button_left_conditioner_in;
  button_conditioner_2 button_left_conditioner (
    .clk(clk),
    .in(M_button_left_conditioner_in),
    .out(M_button_left_conditioner_out)
  );
  wire [1-1:0] M_button_right_conditioner_out;
  reg [1-1:0] M_button_right_conditioner_in;
  button_conditioner_2 button_right_conditioner (
    .clk(clk),
    .in(M_button_right_conditioner_in),
    .out(M_button_right_conditioner_out)
  );
  wire [1-1:0] M_button_stage_left_conditioner_out;
  reg [1-1:0] M_button_stage_left_conditioner_in;
  button_conditioner_2 button_stage_left_conditioner (
    .clk(clk),
    .in(M_button_stage_left_conditioner_in),
    .out(M_button_stage_left_conditioner_out)
  );
  wire [1-1:0] M_button_stage_right_conditioner_out;
  reg [1-1:0] M_button_stage_right_conditioner_in;
  button_conditioner_2 button_stage_right_conditioner (
    .clk(clk),
    .in(M_button_stage_right_conditioner_in),
    .out(M_button_stage_right_conditioner_out)
  );
  wire [1-1:0] M_io_button_up_edge_detector_out;
  reg [1-1:0] M_io_button_up_edge_detector_in;
  edge_detector_13 io_button_up_edge_detector (
    .clk(clk),
    .in(M_io_button_up_edge_detector_in),
    .out(M_io_button_up_edge_detector_out)
  );
  wire [1-1:0] M_io_button_down_edge_detector_out;
  reg [1-1:0] M_io_button_down_edge_detector_in;
  edge_detector_13 io_button_down_edge_detector (
    .clk(clk),
    .in(M_io_button_down_edge_detector_in),
    .out(M_io_button_down_edge_detector_out)
  );
  wire [1-1:0] M_io_button_left_edge_detector_out;
  reg [1-1:0] M_io_button_left_edge_detector_in;
  edge_detector_13 io_button_left_edge_detector (
    .clk(clk),
    .in(M_io_button_left_edge_detector_in),
    .out(M_io_button_left_edge_detector_out)
  );
  wire [1-1:0] M_io_button_right_edge_detector_out;
  reg [1-1:0] M_io_button_right_edge_detector_in;
  edge_detector_13 io_button_right_edge_detector (
    .clk(clk),
    .in(M_io_button_right_edge_detector_in),
    .out(M_io_button_right_edge_detector_out)
  );
  wire [1-1:0] M_io_button_centre_edge_detector_out;
  reg [1-1:0] M_io_button_centre_edge_detector_in;
  edge_detector_13 io_button_centre_edge_detector (
    .clk(clk),
    .in(M_io_button_centre_edge_detector_in),
    .out(M_io_button_centre_edge_detector_out)
  );
  wire [1-1:0] M_button_up_edge_detector_out;
  reg [1-1:0] M_button_up_edge_detector_in;
  edge_detector_13 button_up_edge_detector (
    .clk(clk),
    .in(M_button_up_edge_detector_in),
    .out(M_button_up_edge_detector_out)
  );
  wire [1-1:0] M_button_down_edge_detector_out;
  reg [1-1:0] M_button_down_edge_detector_in;
  edge_detector_13 button_down_edge_detector (
    .clk(clk),
    .in(M_button_down_edge_detector_in),
    .out(M_button_down_edge_detector_out)
  );
  wire [1-1:0] M_button_left_edge_detector_out;
  reg [1-1:0] M_button_left_edge_detector_in;
  edge_detector_13 button_left_edge_detector (
    .clk(clk),
    .in(M_button_left_edge_detector_in),
    .out(M_button_left_edge_detector_out)
  );
  wire [1-1:0] M_button_right_edge_detector_out;
  reg [1-1:0] M_button_right_edge_detector_in;
  edge_detector_13 button_right_edge_detector (
    .clk(clk),
    .in(M_button_right_edge_detector_in),
    .out(M_button_right_edge_detector_out)
  );
  wire [1-1:0] M_button_stage_left_edge_detector_out;
  reg [1-1:0] M_button_stage_left_edge_detector_in;
  edge_detector_13 button_stage_left_edge_detector (
    .clk(clk),
    .in(M_button_stage_left_edge_detector_in),
    .out(M_button_stage_left_edge_detector_out)
  );
  wire [1-1:0] M_button_stage_right_edge_detector_out;
  reg [1-1:0] M_button_stage_right_edge_detector_in;
  edge_detector_13 button_stage_right_edge_detector (
    .clk(clk),
    .in(M_button_stage_right_edge_detector_in),
    .out(M_button_stage_right_edge_detector_out)
  );
  wire [256-1:0] M_game_map_out;
  wire [16-1:0] M_game_player_position_out;
  wire [8-1:0] M_game_win_position_out;
  wire [1-1:0] M_game_win_bool_out;
  wire [1-1:0] M_game_loss_bool_out;
  wire [1-1:0] M_game_portrait_orientation_out;
  wire [1-1:0] M_game_horizontal_orientation_out;
  wire [1-1:0] M_game_vertical_orientation_out;
  wire [2-1:0] M_game_map_index;
  reg [1-1:0] M_game_button_up;
  reg [1-1:0] M_game_button_down;
  reg [1-1:0] M_game_button_left;
  reg [1-1:0] M_game_button_right;
  reg [1-1:0] M_game_button_stage_left;
  reg [1-1:0] M_game_button_stage_right;
  game_24 game (
    .clk(clk),
    .rst(rst),
    .button_up(M_game_button_up),
    .button_down(M_game_button_down),
    .button_left(M_game_button_left),
    .button_right(M_game_button_right),
    .button_stage_left(M_game_button_stage_left),
    .button_stage_right(M_game_button_stage_right),
    .map_out(M_game_map_out),
    .player_position_out(M_game_player_position_out),
    .win_position_out(M_game_win_position_out),
    .win_bool_out(M_game_win_bool_out),
    .loss_bool_out(M_game_loss_bool_out),
    .portrait_orientation_out(M_game_portrait_orientation_out),
    .horizontal_orientation_out(M_game_horizontal_orientation_out),
    .vertical_orientation_out(M_game_vertical_orientation_out),
    .map_index(M_game_map_index)
  );
  wire [8-1:0] M_led_grid_pixel;
  wire [1-1:0] M_led_grid_led;
  reg [256-1:0] M_led_grid_map;
  reg [8-1:0] M_led_grid_win_pos;
  reg [16-1:0] M_led_grid_player_pos;
  reg [1-1:0] M_led_grid_update;
  ledprocess_25 led_grid (
    .clk(clk),
    .rst(rst),
    .map(M_led_grid_map),
    .win_pos(M_led_grid_win_pos),
    .player_pos(M_led_grid_player_pos),
    .update(M_led_grid_update),
    .pixel(M_led_grid_pixel),
    .led(M_led_grid_led)
  );
  
  always @* begin
    M_reset_cond_in = ~rst_n;
    rst = M_reset_cond_out;
    led = 8'h00;
    spi_miso = 1'bz;
    spi_channel = 4'bzzzz;
    avr_rx = 1'bz;
    io_led = 24'h000000;
    io_seg = 8'hff;
    io_sel = 4'hf;
    M_io_button_up_button_conditioner_in = io_button[0+0-:1];
    M_io_button_up_edge_detector_in = M_io_button_up_button_conditioner_out;
    M_io_button_centre_button_conditioner_in = io_button[1+0-:1];
    M_io_button_centre_edge_detector_in = M_io_button_centre_button_conditioner_out;
    M_io_button_down_button_conditioner_in = io_button[2+0-:1];
    M_io_button_down_edge_detector_in = M_io_button_down_button_conditioner_out;
    M_io_button_left_button_conditioner_in = io_button[3+0-:1];
    M_io_button_left_edge_detector_in = M_io_button_left_button_conditioner_out;
    M_io_button_right_button_conditioner_in = io_button[4+0-:1];
    M_io_button_right_edge_detector_in = M_io_button_right_button_conditioner_out;
    M_button_up_conditioner_in = button_up;
    M_button_up_edge_detector_in = M_button_up_conditioner_out;
    M_button_down_conditioner_in = button_down;
    M_button_down_edge_detector_in = M_button_down_conditioner_out;
    M_button_left_conditioner_in = button_left;
    M_button_left_edge_detector_in = M_button_left_conditioner_out;
    M_button_right_conditioner_in = button_right;
    M_button_right_edge_detector_in = M_button_right_conditioner_out;
    M_button_stage_left_conditioner_in = button_stage_left;
    M_button_stage_left_edge_detector_in = M_button_stage_left_conditioner_out;
    M_button_stage_right_conditioner_in = button_stage_right;
    M_button_stage_right_edge_detector_in = M_button_stage_right_conditioner_out;
    M_game_button_stage_left = M_button_stage_left_edge_detector_out;
    M_game_button_stage_right = M_button_stage_right_edge_detector_out;
    
    case (io_dip[0+0+0-:1])
      1'h0: begin
        M_game_button_up = M_button_up_edge_detector_out;
        M_game_button_down = M_button_down_edge_detector_out;
        M_game_button_left = M_button_left_edge_detector_out;
        M_game_button_right = M_button_right_edge_detector_out;
      end
      1'h1: begin
        M_game_button_up = M_io_button_up_edge_detector_out;
        M_game_button_down = M_io_button_down_edge_detector_out;
        M_game_button_left = M_io_button_left_edge_detector_out;
        M_game_button_right = M_io_button_right_edge_detector_out;
      end
      default: begin
        M_game_button_up = M_button_up_edge_detector_out;
        M_game_button_down = M_button_down_edge_detector_out;
        M_game_button_left = M_button_left_edge_detector_out;
        M_game_button_right = M_button_right_edge_detector_out;
      end
    endcase
    
    case (io_dip[0+1+0-:1])
      1'h0: begin
        io_led[8+7-:8] = M_game_player_position_out[8+7-:8];
        io_led[0+7-:8] = M_game_player_position_out[0+7-:8];
        io_led[16+7+0-:1] = M_game_portrait_orientation_out;
        io_led[16+6+0-:1] = M_game_horizontal_orientation_out;
        io_led[16+5+0-:1] = M_game_vertical_orientation_out;
        io_led[16+4+0-:1] = M_game_win_bool_out;
        io_led[16+3+0-:1] = M_game_loss_bool_out;
        io_led[16+1+1-:2] = M_game_map_index;
      end
      1'h1: begin
        io_led[16+2+0-:1] = M_game_map_out[(8'hff - M_game_player_position_out[8+7-:8])*1+0-:1];
        io_led[16+1+0-:1] = M_game_map_out[(8'hff - M_game_player_position_out[0+7-:8])*1+0-:1];
      end
      default: begin
        io_led[8+7-:8] = M_game_player_position_out[8+7-:8];
        io_led[0+7-:8] = M_game_player_position_out[0+7-:8];
        io_led[16+7+0-:1] = M_game_portrait_orientation_out;
        io_led[16+6+0-:1] = M_game_horizontal_orientation_out;
        io_led[16+5+0-:1] = M_game_vertical_orientation_out;
        io_led[16+4+0-:1] = M_game_win_bool_out;
        io_led[16+3+0-:1] = M_game_loss_bool_out;
        io_led[16+1+1-:2] = M_game_map_index;
      end
    endcase
    M_led_grid_update = 1'h1;
    M_led_grid_win_pos = M_game_win_position_out;
    M_led_grid_player_pos = M_game_player_position_out;
    M_led_grid_map = M_game_map_out;
    outled = M_led_grid_led;
  end
endmodule