data/full_repos/permissive/486812922/src/mips.v
1: b'%Error: data/full_repos/permissive/486812922/src/mips.v:2: Cannot find include file: ctrl_encode_def.v\n`include "ctrl_encode_def.v"  \n         ^~~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/486812922/src,data/full_repos/permissive/486812922/ctrl_encode_def.v\n             data/full_repos/permissive/486812922/src,data/full_repos/permissive/486812922/ctrl_encode_def.v.v\n             data/full_repos/permissive/486812922/src,data/full_repos/permissive/486812922/ctrl_encode_def.v.sv\n             ctrl_encode_def.v\n             ctrl_encode_def.v.v\n             ctrl_encode_def.v.sv\n             obj_dir/ctrl_encode_def.v\n             obj_dir/ctrl_encode_def.v.v\n             obj_dir/ctrl_encode_def.v.sv\n%Error: Exiting due to 1 error(s)\n'
module mips(clk, reset);

input clk;

input reset;


wire [31: 0] PC;

wire [31: 0] NPC;

wire [31: 0] Instr;

wire [31: 0] gpr_read1;

wire [31: 0] gpr_read2;

wire [31: 0] mem_read;

wire [31: 0] Imme32;

wire [31: 0] ALU_A, A;

wire [31: 0] ALU_B, B;

wire [31: 0] alu_output;

wire [4: 0] waddr;

wire [31: 0] inputdata;

wire [2: 0] NPCOp;

wire [1: 0]EXTOp;

wire ASel;

wire BSel;
wire [4: 0] ALUOp, ALU_ALUOp;

wire Zero;

wire [2: 0]WDSel;

wire RFWr;

wire DMWr;

wire [1: 0]GPRSel;

wire [5: 0] OP;
wire [4: 0] RS;
wire [4: 0] RT;
wire [4: 0] RD;
wire [4: 0] Shamt;
wire [5: 0] Funct;

wire [15: 0] Imme16;

wire [25: 0] Addr26;
wire nop;
assign OP = Instr[31: 26];
assign RS = Instr[25: 21];
assign RT = Instr[20: 16];
assign RD = Instr[15: 11];
assign Shamt = Instr[10: 6];
assign Funct = Instr[5: 0];
assign Imme16 = Instr[15: 0];
assign Addr26 = Instr[25: 0];
assign nop = (Instr == 32'b0);


pc mips_pc(
       .NPC(NPC),
       .Clk(clk),
       .Reset(reset),
       .PC(PC)
   );

npc mips_npc(
        .PC(PC),
        .NPCOp(NPCOp),
        .IMM(Addr26),
        .RS(gpr_read1),
        .NPC(NPC)
    );

im_4k mips_im_4k(
          .addr(PC[11: 2]),
          .dout(Instr)
      );

ctrl mips_ctrl(
         .opcode(OP),
         .funct(Funct),
         .rt(RT),
         .nop(nop),
         .Zero(Zero),
         .RFWr(RFWr),
         .DMWr(DMWr),
         .ALUOp(ALUOp),
         .NPCOp(NPCOp),
         .BSel(BSel),
         .EXTOp(EXTOp),
         .ASel(ASel),
         .GPRSel(GPRSel),
         .WDSel(WDSel)
     );

gpr mips_gpr(
        .clk(clk),
        .reset(reset),
        .we(RFWr),
        .addr1(RS),
        .addr2(RT),
        .addr3(waddr),
        .inputdata(inputdata),
        .RD1(gpr_read1),
        .RD2(gpr_read2)
    );

dm_4k mips_dm_4k(
          .addr(alu_output[11: 2]),
          .din(gpr_read2),
          .DMWr(DMWr),
          .clk(clk),
          .dout(mem_read)
      );


mux4 MUX_RPR_WD(
         .d0(alu_output),
         .d1(32'b0),
         .d2(PC + 4),
         .d3(mem_read),
         .s(WDSel),
         .y(inputdata)
     );

mux4 MUX_GPR_WA(
         .d0(RD),
         .d1(RT),
         .d2(5'd31),
         .d3(5'd0),
         .s({GPRSel}),
         .y(waddr)
     );

mux2 MUX_ALU_A(
         .d0(gpr_read1),
         .d1({27'd0, Shamt}),
         .s(ASel),
         .y(A)
     );
mux2 MUX_ALU_B(
         .d0(gpr_read2),
         .d1(Imme32),
         .s(BSel),
         .y(B)
     );

Extend EXTEND(
           .Imm16(Imme16),
           .EXTOp(EXTOp),
           .Imm32(Imme32)
       );

alu_p mips_alu_32_p(
          .A_i(A),
          .B_i(B),
          .ALUOp_i(ALUOp),
          .A_o(ALU_A),
          .B_o(ALU_B),
          .ALUOp_o(ALU_ALUOp)
      );
alu_32 mips_alu_32(
           .A(ALU_A),
           .B(ALU_B),
           .ALUOp(ALU_ALUOp),
           .C(alu_output),
           .Zero(Zero)
       );
endmodule
module mips(clk, reset);


input clk;

input reset;


wire [31: 0] PC;

wire [31: 0] NPC;

wire [31: 0] Instr;

wire [31: 0] gpr_read1;

wire [31: 0] gpr_read2;

wire [31: 0] mem_read;

wire [31: 0] Imme32;

wire [31: 0] ALU_A, A;

wire [31: 0] ALU_B, B;

wire [31: 0] alu_output;

wire [4: 0] waddr;

wire [31: 0] inputdata;

wire [2: 0] NPCOp;

wire [1: 0]EXTOp;

wire ASel;

wire BSel;
wire [4: 0] ALUOp, ALU_ALUOp;

wire Zero;

wire [2: 0]WDSel;

wire RFWr;

wire DMWr;

wire [1: 0]GPRSel;

wire [5: 0] OP;
wire [4: 0] RS;
wire [4: 0] RT;
wire [4: 0] RD;
wire [4: 0] Shamt;
wire [5: 0] Funct;

wire [15: 0] Imme16;

wire [25: 0] Addr26;
wire nop;
assign OP = Instr[31: 26];
assign RS = Instr[25: 21];
assign RT = Instr[20: 16];
assign RD = Instr[15: 11];
assign Shamt = Instr[10: 6];
assign Funct = Instr[5: 0];
assign Imme16 = Instr[15: 0];
assign Addr26 = Instr[25: 0];
assign nop = (Instr == 32'b0);


pc mips_pc(
       .NPC(NPC),
       .Clk(clk),
       .Reset(reset),
       .PC(PC)
   );

npc mips_npc(
        .PC(PC),
        .NPCOp(NPCOp),
        .IMM(Addr26),
        .RS(gpr_read1),
        .NPC(NPC)
    );

im_4k mips_im_4k(
          .addr(PC[11: 2]),
          .dout(Instr)
      );

ctrl mips_ctrl(
         .opcode(OP),
         .funct(Funct),
         .rt(RT),
         .nop(nop),
         .Zero(Zero),
         .RFWr(RFWr),
         .DMWr(DMWr),
         .ALUOp(ALUOp),
         .NPCOp(NPCOp),
         .BSel(BSel),
         .EXTOp(EXTOp),
         .ASel(ASel),
         .GPRSel(GPRSel),
         .WDSel(WDSel)
     );

gpr mips_gpr(
        .clk(clk),
        .reset(reset),
        .we(RFWr),
        .addr1(RS),
        .addr2(RT),
        .addr3(waddr),
        .inputdata(inputdata),
        .RD1(gpr_read1),
        .RD2(gpr_read2)
    );

dm_4k mips_dm_4k(
          .addr(alu_output[11: 2]),
          .din(gpr_read2),
          .DMWr(DMWr),
          .clk(clk),
          .dout(mem_read)
      );


mux4 MUX_RPR_WD(
         .d0(alu_output),
         .d1(32'b0),
         .d2(PC + 4),
         .d3(mem_read),
         .s(WDSel),
         .y(inputdata)
     );

mux4 MUX_GPR_WA(
         .d0(RD),
         .d1(RT),
         .d2(5'd31),
         .d3(5'd0),
         .s({GPRSel}),
         .y(waddr)
     );

mux2 MUX_ALU_A(
         .d0(gpr_read1),
         .d1({27'd0, Shamt}),
         .s(ASel),
         .y(A)
     );
mux2 MUX_ALU_B(
         .d0(gpr_read2),
         .d1(Imme32),
         .s(BSel),
         .y(B)
     );

Extend EXTEND(
           .Imm16(Imme16),
           .EXTOp(EXTOp),
           .Imm32(Imme32)
       );

alu_p mips_alu_32_p(
          .A_i(A),
          .B_i(B),
          .ALUOp_i(ALUOp),
          .A_o(ALU_A),
          .B_o(ALU_B),
          .ALUOp_o(ALU_ALUOp)
      );
alu_32 mips_alu_32(
           .A(ALU_A),
           .B(ALU_B),
           .ALUOp(ALU_ALUOp),
           .C(alu_output),
           .Zero(Zero)
       );
endmodule