From f3a300ce5927cad9ecf02821b3be007f9d2af22b Mon Sep 17 00:00:00 2001 From: dianshi Date: Wed, 19 Jan 2022 22:00:08 +0000 Subject: Add instruction memory --- instrmem/v0.1/test_instr_memory.v | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 instrmem/v0.1/test_instr_memory.v (limited to 'instrmem/v0.1/test_instr_memory.v') diff --git a/instrmem/v0.1/test_instr_memory.v b/instrmem/v0.1/test_instr_memory.v new file mode 100644 index 0000000..cc6f0b7 --- /dev/null +++ b/instrmem/v0.1/test_instr_memory.v @@ -0,0 +1,33 @@ +`timescale 1ns/1ps + +module test_instr_memory; + +reg [15:0]pc; +reg [15:0]instruction; +integer i; + +instr_memory uut( + .pc(pc), + .instruction(instruction) +); + +initial begin + $display("Start testing instruction memory"); + $dumpfile("test_instr_memory.vcd"); + $dumpvars(0,test_instr_memory); + + for (i=0;i<=30;i=i+2) + begin + pc = i; + #10; + end + +end + +initial begin + $monitor("At time=%t",$time); +end + +endmodule + + -- cgit v1.2.3