summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nandgame/instruction_decode_tb.v37
1 files changed, 37 insertions, 0 deletions
diff --git a/nandgame/instruction_decode_tb.v b/nandgame/instruction_decode_tb.v
new file mode 100644
index 0000000..e68d63b
--- /dev/null
+++ b/nandgame/instruction_decode_tb.v
@@ -0,0 +1,37 @@
+`timescale 1us/1us
+
+module instruction_decode_tb;
+
+logic [15:0] INS, RES;
+logic dst_A, dst_D, dst_pA;
+logic [15:0] data_A, data_D, data_pA;
+logic do_jump;
+
+instruction_decode uut (
+ .instruction(INS),
+ .dst_a(dst_A),
+ .dst_d(dst_D),
+ .dst_pa(dst_pA),
+ .A_i(data_A),
+ .D_i(data_D),
+ .pA_i(data_pA),
+ .RES(RES),
+ .do_jump(do_jump)
+);
+
+string filename;
+initial begin
+`ifdef DUMP_FILE_NAME
+ filename=`DUMP_FILE_NAME;
+`else
+ filename="instruction_decode.lxt2";
+`endif
+ $dumpfile(filename); $dumpvars();
+end
+
+initial begin
+ #10
+ $finish();
+end
+
+endmodule