show instruction assembly in waveform

This commit is contained in:
Noah Boorstin 2021-01-26 12:34:12 -05:00
parent 91dcffa26f
commit 91564c7ab1
2 changed files with 6 additions and 2 deletions

View File

@ -40,6 +40,7 @@ view wave
add wave /testbench_busybear/clk
add wave /testbench_busybear/reset
add wave -divider
add wave -hex /testbench_busybear/PCtext
add wave -hex /testbench_busybear/pcExpected
add wave -hex /testbench_busybear/dut/dp/PCF
add wave -hex /testbench_busybear/dut/dp/InstrF
@ -129,6 +130,6 @@ add wave /testbench_busybear/InstrWName
#set DefaultRadix hexadecimal
#
#-- Run the Simulation
run 800
run 900
#run -all
##quit

View File

@ -126,6 +126,7 @@ module testbench_busybear();
end
logic [63:0] lastInstrF, lastPC, lastPC2;
string PCtext, PCtext2;
integer instrs;
initial begin
instrs = 0;
@ -140,6 +141,8 @@ module testbench_busybear();
else begin
//if (~speculative) begin
// first read instruction
scan_file_PC = $fscanf(data_file_PC, "%s %s\n", PCtext, PCtext2);
PCtext = {PCtext, " ", PCtext2};
scan_file_PC = $fscanf(data_file_PC, "%x\n", InstrF);
// then expected PC value
scan_file_PC = $fscanf(data_file_PC, "%x\n", pcExpected);