busybear: ret is only 1 word

This commit is contained in:
Noah Boorstin 2021-01-28 14:47:40 -05:00
parent 0befdfacec
commit a4bac85ece
2 changed files with 6 additions and 3 deletions

View File

@ -130,6 +130,6 @@ add wave /testbench_busybear/InstrWName
#set DefaultRadix hexadecimal
#
#-- Run the Simulation
run 2630
run 2640
#run -all
##quit

View File

@ -158,8 +158,11 @@ module testbench_busybear();
$stop;
end
// 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, "%s\n", PCtext);
if (PCtext != "ret") begin
scan_file_PC = $fscanf(data_file_PC, "%s\n", PCtext2);
PCtext = {PCtext, " ", PCtext2};
end
scan_file_PC = $fscanf(data_file_PC, "%x\n", InstrF);
// then expected PC value
scan_file_PC = $fscanf(data_file_PC, "%x\n", pcExpected);