data/full_repos/permissive/209997170/Full Adder Tester/work/planAhead/Full Adder Tester/Full Adder Tester.srcs/sources_1/imports/verilog/eight_fsm_8.v
 line:29: before: "="
1: b'%Error: Cannot find file containing module: Adder\n        ... Looked in:\n             data/full_repos/permissive/209997170/Full/Adder\n             data/full_repos/permissive/209997170/Full/Adder.v\n             data/full_repos/permissive/209997170/Full/Adder.sv\n             Adder\n             Adder.v\n             Adder.sv\n             obj_dir/Adder\n             obj_dir/Adder.v\n             obj_dir/Adder.sv\n%Error: Cannot find file containing module: Tester/work/planAhead/Full\n%Error: Cannot find file containing module: Tester/Full\n%Error: Cannot find file containing module: Tester.srcs/sources_1/imports/verilog,data/full_repos/permissive/209997170\n%Error: Cannot find file containing module: data/full_repos/permissive/209997170/Full\n%Error: Cannot find file containing module: Tester.srcs/sources_1/imports/verilog/eight_fsm_8.v\n%Error: Exiting due to 6 error(s)\n'
module eight_tester_8 (
    input clk,
    input rst,
    output reg a,
    output reg b,
    output reg cin,
    input s_circuit,
    input carry_circuit,
    input mode_dip,
    input test_dip,
    input io_button_left,
    input io_button_right,
    input io_button_centre,
    input s_dip,
    input carry_dip,
    output reg [7:0] led_expected,
    output reg [7:0] led_result,
    output reg [7:0] led_test
  );
  
  
  
  reg [26:0] M_counter_d, M_counter_q = 1'h0;
  localparam ONE_state = 4'd0;
  localparam TWO_state = 4'd1;
  localparam THREE_state = 4'd2;
  localparam FOUR_state = 4'd3;
  localparam FIVE_state = 4'd4;
  localparam SIX_state = 4'd5;
  localparam SEVEN_state = 4'd6;
  localparam EIGHT_state = 4'd7;
  localparam PASS_state = 4'd8;
  
  reg [3:0] M_state_d, M_state_q = ONE_state;
  localparam AUTO_mode = 1'd0;
  localparam MANUAL_mode = 1'd1;
  
  reg M_mode_d, M_mode_q = AUTO_mode;
  localparam CIRCUIT_test = 1'd0;
  localparam DIP_test = 1'd1;
  
  reg M_test_d, M_test_q = CIRCUIT_test;
  reg [0:0] M_s_d, M_s_q = 1'h0;
  reg [0:0] M_carry_d, M_carry_q = 1'h0;
  
  always @* begin
    M_test_d = M_test_q;
    M_state_d = M_state_q;
    M_mode_d = M_mode_q;
    M_s_d = M_s_q;
    M_counter_d = M_counter_q;
    M_carry_d = M_carry_q;
    
    M_counter_d = M_counter_q + 1'h1;
    led_test = 1'h0;
    led_result = 1'h0;
    led_expected = 1'h0;
    led_test = 1'h0;
    a = 1'h0;
    b = 1'h0;
    cin = 1'h0;
    M_s_d = s_circuit;
    M_carry_d = carry_circuit;
    
    case (mode_dip)
      1'h0: begin
        M_mode_d = AUTO_mode;
      end
      1'h1: begin
        M_mode_d = MANUAL_mode;
      end
    endcase
    
    case (test_dip)
      1'h0: begin
        M_test_d = CIRCUIT_test;
      end
      1'h1: begin
        M_test_d = DIP_test;
      end
    endcase
    
    case (M_test_q)
      DIP_test: begin
        M_s_d = s_dip;
        M_carry_d = carry_dip;
      end
      CIRCUIT_test: begin
        M_s_d = s_circuit;
        M_carry_d = carry_circuit;
      end
    endcase
    
    case (M_mode_q)
      AUTO_mode: begin
        
        case (M_state_q)
          ONE_state: begin
            led_expected = 8'h00;
            led_test = 8'h80;
            a = 1'h0;
            b = 1'h0;
            cin = 1'h0;
            if (M_s_q == 1'h0 && M_carry_q == 1'h0) begin
              led_result = 8'h80;
              if (M_counter_q[26+0-:1] == 1'h1) begin
                M_state_d = TWO_state;
              end
            end
          end
          TWO_state: begin
            led_expected = 8'h30;
            led_test = 8'h40;
            a = 1'h0;
            b = 1'h0;
            cin = 1'h1;
            if (M_s_q == 1'h1 && M_carry_q == 1'h0) begin
              led_result = 8'hc0;
              if (M_counter_q[26+0-:1] == 1'h0) begin
                M_state_d = THREE_state;
              end
            end
          end
          THREE_state: begin
            led_expected = 8'h50;
            led_test = 8'h20;
            a = 1'h0;
            b = 1'h1;
            cin = 1'h0;
            if (M_s_q == 1'h1 && M_carry_q == 1'h0) begin
              led_result = 8'he0;
              if (M_counter_q[26+0-:1] == 1'h1) begin
                M_state_d = FOUR_state;
              end
            end
          end
          FOUR_state: begin
            led_expected = 8'h68;
            led_test = 8'h10;
            a = 1'h0;
            b = 1'h1;
            cin = 1'h1;
            if (M_s_q == 1'h0 && M_carry_q == 1'h1) begin
              led_result = 8'hf0;
              if (M_counter_q[26+0-:1] == 1'h0) begin
                M_state_d = FIVE_state;
              end
            end
          end
          FIVE_state: begin
            led_expected = 8'h90;
            led_test = 8'h08;
            a = 1'h1;
            b = 1'h0;
            cin = 1'h0;
            if (M_s_q == 1'h1 && M_carry_q == 1'h0) begin
              led_result = 8'hf8;
              if (M_counter_q[26+0-:1] == 1'h1) begin
                M_state_d = SIX_state;
              end
            end
          end
          SIX_state: begin
            led_expected = 8'ha8;
            led_test = 8'h04;
            a = 1'h1;
            b = 1'h0;
            cin = 1'h1;
            if (M_s_q == 1'h0 && M_carry_q == 1'h1) begin
              led_result = 8'hfc;
              if (M_counter_q[26+0-:1] == 1'h0) begin
                M_state_d = SEVEN_state;
              end
            end
          end
          SEVEN_state: begin
            led_expected = 8'hc8;
            led_test = 8'h02;
            a = 1'h1;
            b = 1'h1;
            cin = 1'h0;
            if (M_s_q == 1'h0 && M_carry_q == 1'h1) begin
              led_result = 8'hfe;
              if (M_counter_q[26+0-:1] == 1'h1) begin
                M_state_d = EIGHT_state;
              end
            end
          end
          EIGHT_state: begin
            led_expected = 8'hf8;
            led_test = 8'h01;
            a = 1'h1;
            b = 1'h1;
            cin = 1'h1;
            if (M_s_q == 1'h1 && M_carry_q == 1'h1) begin
              led_result = 8'hff;
              if (M_counter_q[26+0-:1] == 1'h0) begin
                M_state_d = PASS_state;
              end
            end
          end
          PASS_state: begin
            led_expected = 8'hff;
            led_test = 8'hff;
            led_result = 8'hff;
          end
        endcase
      end
      MANUAL_mode: begin
        
        case (M_state_q)
          ONE_state: begin
            led_expected = 8'h00;
            led_test = 8'h80;
            a = 1'h0;
            b = 1'h0;
            cin = 1'h0;
            if (M_s_q == 1'h0 && M_carry_q == 1'h0) begin
              led_result = 8'h80;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = TWO_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = EIGHT_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
          TWO_state: begin
            led_expected = 8'h30;
            led_test = 8'h40;
            a = 1'h0;
            b = 1'h0;
            cin = 1'h1;
            if (M_s_q == 1'h1 && M_carry_q == 1'h0) begin
              led_result = 8'hc0;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = THREE_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = ONE_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
          THREE_state: begin
            led_expected = 8'h50;
            led_test = 8'h20;
            a = 1'h0;
            b = 1'h1;
            cin = 1'h0;
            if (M_s_q == 1'h1 && M_carry_q == 1'h0) begin
              led_result = 8'he0;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = FOUR_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = TWO_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
          FOUR_state: begin
            led_expected = 8'h68;
            led_test = 8'h10;
            a = 1'h0;
            b = 1'h1;
            cin = 1'h1;
            if (M_s_q == 1'h0 && M_carry_q == 1'h1) begin
              led_result = 8'hf0;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = FIVE_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = THREE_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
          FIVE_state: begin
            led_expected = 8'h90;
            led_test = 8'h08;
            a = 1'h1;
            b = 1'h0;
            cin = 1'h0;
            if (M_s_q == 1'h1 && M_carry_q == 1'h0) begin
              led_result = 8'hf8;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = SIX_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = FOUR_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
          SIX_state: begin
            led_expected = 8'ha8;
            led_test = 8'h04;
            a = 1'h1;
            b = 1'h0;
            cin = 1'h1;
            if (M_s_q == 1'h0 && M_carry_q == 1'h1) begin
              led_result = 8'hfc;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = SEVEN_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = FIVE_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
          SEVEN_state: begin
            led_expected = 8'hc8;
            led_test = 8'h02;
            a = 1'h1;
            b = 1'h1;
            cin = 1'h0;
            if (M_s_q == 1'h0 && M_carry_q == 1'h1) begin
              led_result = 8'hfe;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = EIGHT_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = SIX_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
          EIGHT_state: begin
            led_expected = 8'hf8;
            led_test = 8'h01;
            a = 1'h1;
            b = 1'h1;
            cin = 1'h1;
            if (M_s_q == 1'h1 && M_carry_q == 1'h1) begin
              led_result = 8'hff;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = ONE_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = SEVEN_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
        endcase
      end
    endcase
  end
  
  always @(posedge clk) begin
    if (rst == 1'b1) begin
      M_counter_q <= 1'h0;
      M_s_q <= 1'h0;
      M_carry_q <= 1'h0;
      M_state_q <= 1'h0;
      M_mode_q <= 1'h0;
      M_test_q <= 1'h0;
    end else begin
      M_counter_q <= M_counter_d;
      M_s_q <= M_s_d;
      M_carry_q <= M_carry_d;
      M_state_q <= M_state_d;
      M_mode_q <= M_mode_d;
      M_test_q <= M_test_d;
    end
  end
  
endmodule
module eight_tester_8 (
    input clk,
    input rst,
    output reg a,
    output reg b,
    output reg cin,
    input s_circuit,
    input carry_circuit,
    input mode_dip,
    input test_dip,
    input io_button_left,
    input io_button_right,
    input io_button_centre,
    input s_dip,
    input carry_dip,
    output reg [7:0] led_expected,
    output reg [7:0] led_result,
    output reg [7:0] led_test
  );

  
  
  
  reg [26:0] M_counter_d, M_counter_q = 1'h0;
  localparam ONE_state = 4'd0;
  localparam TWO_state = 4'd1;
  localparam THREE_state = 4'd2;
  localparam FOUR_state = 4'd3;
  localparam FIVE_state = 4'd4;
  localparam SIX_state = 4'd5;
  localparam SEVEN_state = 4'd6;
  localparam EIGHT_state = 4'd7;
  localparam PASS_state = 4'd8;
  
  reg [3:0] M_state_d, M_state_q = ONE_state;
  localparam AUTO_mode = 1'd0;
  localparam MANUAL_mode = 1'd1;
  
  reg M_mode_d, M_mode_q = AUTO_mode;
  localparam CIRCUIT_test = 1'd0;
  localparam DIP_test = 1'd1;
  
  reg M_test_d, M_test_q = CIRCUIT_test;
  reg [0:0] M_s_d, M_s_q = 1'h0;
  reg [0:0] M_carry_d, M_carry_q = 1'h0;
  
  always @* begin
    M_test_d = M_test_q;
    M_state_d = M_state_q;
    M_mode_d = M_mode_q;
    M_s_d = M_s_q;
    M_counter_d = M_counter_q;
    M_carry_d = M_carry_q;
    
    M_counter_d = M_counter_q + 1'h1;
    led_test = 1'h0;
    led_result = 1'h0;
    led_expected = 1'h0;
    led_test = 1'h0;
    a = 1'h0;
    b = 1'h0;
    cin = 1'h0;
    M_s_d = s_circuit;
    M_carry_d = carry_circuit;
    
    case (mode_dip)
      1'h0: begin
        M_mode_d = AUTO_mode;
      end
      1'h1: begin
        M_mode_d = MANUAL_mode;
      end
    endcase
    
    case (test_dip)
      1'h0: begin
        M_test_d = CIRCUIT_test;
      end
      1'h1: begin
        M_test_d = DIP_test;
      end
    endcase
    
    case (M_test_q)
      DIP_test: begin
        M_s_d = s_dip;
        M_carry_d = carry_dip;
      end
      CIRCUIT_test: begin
        M_s_d = s_circuit;
        M_carry_d = carry_circuit;
      end
    endcase
    
    case (M_mode_q)
      AUTO_mode: begin
        
        case (M_state_q)
          ONE_state: begin
            led_expected = 8'h00;
            led_test = 8'h80;
            a = 1'h0;
            b = 1'h0;
            cin = 1'h0;
            if (M_s_q == 1'h0 && M_carry_q == 1'h0) begin
              led_result = 8'h80;
              if (M_counter_q[26+0-:1] == 1'h1) begin
                M_state_d = TWO_state;
              end
            end
          end
          TWO_state: begin
            led_expected = 8'h30;
            led_test = 8'h40;
            a = 1'h0;
            b = 1'h0;
            cin = 1'h1;
            if (M_s_q == 1'h1 && M_carry_q == 1'h0) begin
              led_result = 8'hc0;
              if (M_counter_q[26+0-:1] == 1'h0) begin
                M_state_d = THREE_state;
              end
            end
          end
          THREE_state: begin
            led_expected = 8'h50;
            led_test = 8'h20;
            a = 1'h0;
            b = 1'h1;
            cin = 1'h0;
            if (M_s_q == 1'h1 && M_carry_q == 1'h0) begin
              led_result = 8'he0;
              if (M_counter_q[26+0-:1] == 1'h1) begin
                M_state_d = FOUR_state;
              end
            end
          end
          FOUR_state: begin
            led_expected = 8'h68;
            led_test = 8'h10;
            a = 1'h0;
            b = 1'h1;
            cin = 1'h1;
            if (M_s_q == 1'h0 && M_carry_q == 1'h1) begin
              led_result = 8'hf0;
              if (M_counter_q[26+0-:1] == 1'h0) begin
                M_state_d = FIVE_state;
              end
            end
          end
          FIVE_state: begin
            led_expected = 8'h90;
            led_test = 8'h08;
            a = 1'h1;
            b = 1'h0;
            cin = 1'h0;
            if (M_s_q == 1'h1 && M_carry_q == 1'h0) begin
              led_result = 8'hf8;
              if (M_counter_q[26+0-:1] == 1'h1) begin
                M_state_d = SIX_state;
              end
            end
          end
          SIX_state: begin
            led_expected = 8'ha8;
            led_test = 8'h04;
            a = 1'h1;
            b = 1'h0;
            cin = 1'h1;
            if (M_s_q == 1'h0 && M_carry_q == 1'h1) begin
              led_result = 8'hfc;
              if (M_counter_q[26+0-:1] == 1'h0) begin
                M_state_d = SEVEN_state;
              end
            end
          end
          SEVEN_state: begin
            led_expected = 8'hc8;
            led_test = 8'h02;
            a = 1'h1;
            b = 1'h1;
            cin = 1'h0;
            if (M_s_q == 1'h0 && M_carry_q == 1'h1) begin
              led_result = 8'hfe;
              if (M_counter_q[26+0-:1] == 1'h1) begin
                M_state_d = EIGHT_state;
              end
            end
          end
          EIGHT_state: begin
            led_expected = 8'hf8;
            led_test = 8'h01;
            a = 1'h1;
            b = 1'h1;
            cin = 1'h1;
            if (M_s_q == 1'h1 && M_carry_q == 1'h1) begin
              led_result = 8'hff;
              if (M_counter_q[26+0-:1] == 1'h0) begin
                M_state_d = PASS_state;
              end
            end
          end
          PASS_state: begin
            led_expected = 8'hff;
            led_test = 8'hff;
            led_result = 8'hff;
          end
        endcase
      end
      MANUAL_mode: begin
        
        case (M_state_q)
          ONE_state: begin
            led_expected = 8'h00;
            led_test = 8'h80;
            a = 1'h0;
            b = 1'h0;
            cin = 1'h0;
            if (M_s_q == 1'h0 && M_carry_q == 1'h0) begin
              led_result = 8'h80;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = TWO_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = EIGHT_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
          TWO_state: begin
            led_expected = 8'h30;
            led_test = 8'h40;
            a = 1'h0;
            b = 1'h0;
            cin = 1'h1;
            if (M_s_q == 1'h1 && M_carry_q == 1'h0) begin
              led_result = 8'hc0;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = THREE_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = ONE_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
          THREE_state: begin
            led_expected = 8'h50;
            led_test = 8'h20;
            a = 1'h0;
            b = 1'h1;
            cin = 1'h0;
            if (M_s_q == 1'h1 && M_carry_q == 1'h0) begin
              led_result = 8'he0;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = FOUR_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = TWO_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
          FOUR_state: begin
            led_expected = 8'h68;
            led_test = 8'h10;
            a = 1'h0;
            b = 1'h1;
            cin = 1'h1;
            if (M_s_q == 1'h0 && M_carry_q == 1'h1) begin
              led_result = 8'hf0;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = FIVE_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = THREE_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
          FIVE_state: begin
            led_expected = 8'h90;
            led_test = 8'h08;
            a = 1'h1;
            b = 1'h0;
            cin = 1'h0;
            if (M_s_q == 1'h1 && M_carry_q == 1'h0) begin
              led_result = 8'hf8;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = SIX_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = FOUR_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
          SIX_state: begin
            led_expected = 8'ha8;
            led_test = 8'h04;
            a = 1'h1;
            b = 1'h0;
            cin = 1'h1;
            if (M_s_q == 1'h0 && M_carry_q == 1'h1) begin
              led_result = 8'hfc;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = SEVEN_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = FIVE_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
          SEVEN_state: begin
            led_expected = 8'hc8;
            led_test = 8'h02;
            a = 1'h1;
            b = 1'h1;
            cin = 1'h0;
            if (M_s_q == 1'h0 && M_carry_q == 1'h1) begin
              led_result = 8'hfe;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = EIGHT_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = SIX_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
          EIGHT_state: begin
            led_expected = 8'hf8;
            led_test = 8'h01;
            a = 1'h1;
            b = 1'h1;
            cin = 1'h1;
            if (M_s_q == 1'h1 && M_carry_q == 1'h1) begin
              led_result = 8'hff;
            end
            if (io_button_right == 1'h1) begin
              M_state_d = ONE_state;
            end else begin
              if (io_button_left == 1'h1) begin
                M_state_d = SEVEN_state;
              end else begin
                if (io_button_centre == 1'h1) begin
                  M_state_d = ONE_state;
                end
              end
            end
          end
        endcase
      end
    endcase
  end
  
  always @(posedge clk) begin
    if (rst == 1'b1) begin
      M_counter_q <= 1'h0;
      M_s_q <= 1'h0;
      M_carry_q <= 1'h0;
      M_state_q <= 1'h0;
      M_mode_q <= 1'h0;
      M_test_q <= 1'h0;
    end else begin
      M_counter_q <= M_counter_d;
      M_s_q <= M_s_d;
      M_carry_q <= M_carry_d;
      M_state_q <= M_state_d;
      M_mode_q <= M_mode_d;
      M_test_q <= M_test_d;
    end
  end
  
endmodule