data/full_repos/permissive/524553217/src/cpu.v
1: b"%Error: data/full_repos/permissive/524553217/src/cpu.v:39: Cannot find file containing module: 'or2to1_1bit'\n    or2to1_1bit _jumpsw(branch_e, jump_e, jumpmux_e);  \n    ^~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/524553217/src,data/full_repos/permissive/524553217/or2to1_1bit\n             data/full_repos/permissive/524553217/src,data/full_repos/permissive/524553217/or2to1_1bit.v\n             data/full_repos/permissive/524553217/src,data/full_repos/permissive/524553217/or2to1_1bit.sv\n             or2to1_1bit\n             or2to1_1bit.v\n             or2to1_1bit.sv\n             obj_dir/or2to1_1bit\n             obj_dir/or2to1_1bit.v\n             obj_dir/or2to1_1bit.sv\n%Error: data/full_repos/permissive/524553217/src/cpu.v:40: Cannot find file containing module: 'mux2to1_32'\n    mux2to1_32 _jumpmux(jumpmux_e, next_pc, alu_out, pc_in);  \n    ^~~~~~~~~~\n%Error: data/full_repos/permissive/524553217/src/cpu.v:41: Cannot find file containing module: 'adder_32'\n    adder_32 _pcadd(32'd4, pc_out, next_pc);  \n    ^~~~~~~~\n%Error: data/full_repos/permissive/524553217/src/cpu.v:42: Cannot find file containing module: 'program_counter'\n    program_counter _pc(pc_in, reset, clk, pc_out);  \n    ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/524553217/src/cpu.v:44: Cannot find file containing module: 'decoder_core'\n    decoder_core _dc(op_code, rd_e, rd, rs1_e, rs1, rs2_e, rs2, imm_e, imm, pc_e, jump_e, full_inst);\n    ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/524553217/src/cpu.v:45: Cannot find file containing module: 'register'\n    register _re(rd_e, rd, rd_v, rs1_e, rs1, rs2_e, rs2, clk, rs1_v, rs2_v);\n    ^~~~~~~~\n%Error: data/full_repos/permissive/524553217/src/cpu.v:47: Cannot find file containing module: 'mux2to1_32'\n    mux2to1_32 _pcsw(pc_e, rs1_v, pc_out, value_1);  \n    ^~~~~~~~~~\n%Error: data/full_repos/permissive/524553217/src/cpu.v:48: Cannot find file containing module: 'mux2to1_32'\n    mux2to1_32 _immsw(imm_e, rs2_v, imm, value_2);  \n    ^~~~~~~~~~\n%Error: data/full_repos/permissive/524553217/src/cpu.v:50: Cannot find file containing module: 'alu'\n    alu _alu(full_inst, value_1, value_2, alu_out);\n    ^~~\n%Error: data/full_repos/permissive/524553217/src/cpu.v:51: Cannot find file containing module: 'branch'\n    branch _branch(full_inst[9:0], rs1_v, rs2_v, branch_e);\n    ^~~~~~\n%Error: data/full_repos/permissive/524553217/src/cpu.v:53: Cannot find file containing module: 'mux4to1_32'\n    mux4to1_32 _rdsw({1'b0, jump_e}, alu_out, next_pc, 32'b0, 32'b0, rd_v);  \n    ^~~~~~~~~~\n%Error: Exiting due to 11 error(s)\n"
module cpu(
        input clk,
        input reset,
        input [31:0] op_code,
        output reg [31:0] im_addr
    );

    wire branch_e, jump_e, jumpmux_e;
    wire [31:0] pc_in, pc_out, next_pc;
    wire rd_e, rs1_e, rs2_e, imm_e, pc_e;
    wire [4:0] rd, rs1, rs2;
    wire [16:0] full_inst;
    wire [31:0] rd_v, rs1_v, rs2_v, imm;
    wire [31:0] value_1, value_2;
    wire [31:0] alu_out;

    or2to1_1bit _jumpsw(branch_e, jump_e, jumpmux_e);
    mux2to1_32 _jumpmux(jumpmux_e, next_pc, alu_out, pc_in);
    adder_32 _pcadd(32'd4, pc_out, next_pc);
    program_counter _pc(pc_in, reset, clk, pc_out);

    decoder_core _dc(op_code, rd_e, rd, rs1_e, rs1, rs2_e, rs2, imm_e, imm, pc_e, jump_e, full_inst);
    register _re(rd_e, rd, rd_v, rs1_e, rs1, rs2_e, rs2, clk, rs1_v, rs2_v);

    mux2to1_32 _pcsw(pc_e, rs1_v, pc_out, value_1);
    mux2to1_32 _immsw(imm_e, rs2_v, imm, value_2);

    alu _alu(full_inst, value_1, value_2, alu_out);
    branch _branch(full_inst[9:0], rs1_v, rs2_v, branch_e);

    mux4to1_32 _rdsw({1'b0, jump_e}, alu_out, next_pc, 32'b0, 32'b0, rd_v);

    always @(posedge clk) begin
        im_addr <= pc_out;
    end

endmodule
module cpu(
        input clk,
        input reset,
        input [31:0] op_code,
        output reg [31:0] im_addr
    );


    wire branch_e, jump_e, jumpmux_e;
    wire [31:0] pc_in, pc_out, next_pc;
    wire rd_e, rs1_e, rs2_e, imm_e, pc_e;
    wire [4:0] rd, rs1, rs2;
    wire [16:0] full_inst;
    wire [31:0] rd_v, rs1_v, rs2_v, imm;
    wire [31:0] value_1, value_2;
    wire [31:0] alu_out;

    or2to1_1bit _jumpsw(branch_e, jump_e, jumpmux_e);
    mux2to1_32 _jumpmux(jumpmux_e, next_pc, alu_out, pc_in);
    adder_32 _pcadd(32'd4, pc_out, next_pc);
    program_counter _pc(pc_in, reset, clk, pc_out);

    decoder_core _dc(op_code, rd_e, rd, rs1_e, rs1, rs2_e, rs2, imm_e, imm, pc_e, jump_e, full_inst);
    register _re(rd_e, rd, rd_v, rs1_e, rs1, rs2_e, rs2, clk, rs1_v, rs2_v);

    mux2to1_32 _pcsw(pc_e, rs1_v, pc_out, value_1);
    mux2to1_32 _immsw(imm_e, rs2_v, imm, value_2);

    alu _alu(full_inst, value_1, value_2, alu_out);
    branch _branch(full_inst[9:0], rs1_v, rs2_v, branch_e);

    mux4to1_32 _rdsw({1'b0, jump_e}, alu_out, next_pc, 32'b0, 32'b0, rd_v);

    always @(posedge clk) begin
        im_addr <= pc_out;
    end

endmodule