RVSCC/rtl/instr_memory_if.sv
Mario1159 4785dd29de
Some checks failed
Verilate / verilate (push) Failing after 51s
Add Git LFS
2023-06-06 14:22:41 +00:00

19 lines
406 B
Systemverilog
Executable File

`include "timescale.sv"
import rv32i_defs::*;
interface instr_memory_if #(
parameter int NUM_INSTR = 32
);
localparam int AddrSize = $clog2(NUM_INSTR) * 4;
logic [AddrSize-1:0] addr;
logic [InstructionSize-1:0] instr;
modport mem(input addr, output instr);
modport datapath(input instr, output addr);
function static void next_instr();
addr = addr + 'd4;
endfunction
endinterface