data/full_repos/permissive/479997390/src/IF.v
1: b"%Error: data/full_repos/permissive/479997390/src/IF.v:18: Cannot find file containing module: 'NextPC'\n  NextPC U_NEXTPC (\n  ^~~~~~\n        ... Looked in:\n             data/full_repos/permissive/479997390/src,data/full_repos/permissive/479997390/NextPC\n             data/full_repos/permissive/479997390/src,data/full_repos/permissive/479997390/NextPC.v\n             data/full_repos/permissive/479997390/src,data/full_repos/permissive/479997390/NextPC.sv\n             NextPC\n             NextPC.v\n             NextPC.sv\n             obj_dir/NextPC\n             obj_dir/NextPC.v\n             obj_dir/NextPC.sv\n%Error: data/full_repos/permissive/479997390/src/IF.v:28: Cannot find file containing module: 'PC'\n  PC U_PC (\n  ^~\n%Error: data/full_repos/permissive/479997390/src/IF.v:35: Cannot find file containing module: 'InstrMem_4k'\n  InstrMem_4k U_IM4K(\n  ^~~~~~~~~~~\n%Error: Exiting due to 3 error(s)\n"
module IF (
  clk, rst, 
  Branch, NPCCtrl, Imm32, PCNew, NPCIn,
  PCWriteEnable,
  NPCOut, Instr
);
  input clk, rst;
  input Branch;
  input [1:0] NPCCtrl;
  input [31:0] Imm32, PCNew, NPCIn;
  input PCWriteEnable;
  output [31:0] NPCOut, Instr;

  wire [31:0] PC, NextPC;

  assign NPCOut = PC + 4;

  NextPC U_NEXTPC (
    .Branch(Branch),
    .NPCCtrl(NPCCtrl),
    .NPC(NPCIn),
    .PC(PC),
    .Imm(Imm32),
    .JumpAddr(PCNew),
    .Result(NextPC)
  );

  PC U_PC (
    .clk(clk), .rst(rst),
    .WriteEnable(PCWriteEnable),
    .NextPC(NextPC),
    .PC(PC)
  );

  InstrMem_4k U_IM4K(
    .InstrAddr(PC[11:2]),
    .InstrOut(Instr)
  );

endmodule
module IF (
  clk, rst, 
  Branch, NPCCtrl, Imm32, PCNew, NPCIn,
  PCWriteEnable,
  NPCOut, Instr
);

  input clk, rst;
  input Branch;
  input [1:0] NPCCtrl;
  input [31:0] Imm32, PCNew, NPCIn;
  input PCWriteEnable;
  output [31:0] NPCOut, Instr;

  wire [31:0] PC, NextPC;

  assign NPCOut = PC + 4;

  NextPC U_NEXTPC (
    .Branch(Branch),
    .NPCCtrl(NPCCtrl),
    .NPC(NPCIn),
    .PC(PC),
    .Imm(Imm32),
    .JumpAddr(PCNew),
    .Result(NextPC)
  );

  PC U_PC (
    .clk(clk), .rst(rst),
    .WriteEnable(PCWriteEnable),
    .NextPC(NextPC),
    .PC(PC)
  );

  InstrMem_4k U_IM4K(
    .InstrAddr(PC[11:2]),
    .InstrOut(Instr)
  );

endmodule