From e49b8a787f72daa3d08e278a9c32663c16531827 Mon Sep 17 00:00:00 2001 From: uvok Date: Fri, 2 Jan 2026 14:28:49 +0100 Subject: prepare instruction decode tb --- nandgame/instruction_decode_tb.v | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 nandgame/instruction_decode_tb.v (limited to 'nandgame/instruction_decode_tb.v') 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 -- cgit v1.2.3