data/full_repos/permissive/468066752/rtl/InstructionMemory.sv
data/verilator_xmls/a8ca19b9-f16a-4e40-a2fe-2e64d6dc9d6f.xml
module InstructionMemory #(
    parameter int    IMSIZE=1024,
    parameter        INIT_F="im.hex"
) (
    input  logic clk,
    input  logic [31:0] address,
    output logic [31:0] instruction
);

  logic [31:0] mem[0:IMSIZE-1];

  initial begin
    if (INIT_F != 0) begin
      $display("Creating instruction memory from init file '%s'.", INIT_F);
      $readmemh(INIT_F, mem);
    end
    else begin
      $display("Memory is not initialized");
    end
  end

  always_comb begin
    instruction = mem[address >> 2];
  end

endmodule
module InstructionMemory #(
    parameter int    IMSIZE=1024,
    parameter        INIT_F="im.hex"
) (
    input  logic clk,
    input  logic [31:0] address,
    output logic [31:0] instruction
);


  logic [31:0] mem[0:IMSIZE-1];

  initial begin
    if (INIT_F != 0) begin
      $display("Creating instruction memory from init file '%s'.", INIT_F);
      $readmemh(INIT_F, mem);
    end
    else begin
      $display("Memory is not initialized");
    end
  end

  always_comb begin
    instruction = mem[address >> 2];
  end

endmodule