From 623d9feeaba3a222e1ba1552418d971a30e78772 Mon Sep 17 00:00:00 2001 From: Noah Boorstin Date: Thu, 28 Jan 2021 16:13:10 -0500 Subject: [PATCH 1/6] more misaligned read fixing I'm getting fairly concerned about this, I feel like this should only work if the memory ignores the lower 3 or 4 bits of the adr --- wally-pipelined/regression/wally-busybear.do | 1 + 1 file changed, 1 insertion(+) diff --git a/wally-pipelined/regression/wally-busybear.do b/wally-pipelined/regression/wally-busybear.do index ab1cfac3..cd739993 100644 --- a/wally-pipelined/regression/wally-busybear.do +++ b/wally-pipelined/regression/wally-busybear.do @@ -54,6 +54,7 @@ add wave -hex /testbench_busybear/MemRWM[0] add wave -hex /testbench_busybear/MemRWM[1] add wave -hex /testbench_busybear/ByteMaskM add wave -hex /testbench_busybear/WriteDataM +add wave -hex /testbench_busybear/ReadDataM add wave -hex /testbench_busybear/DataAdrM add wave -hex /testbench_busybear/dut/ieu/dp/regf/rf[1] add wave -hex /testbench_busybear/dut/ieu/dp/regf/rf[2] From 91e9defd0a157f98ba8b3e4b46b0c94d7a5bfb0d Mon Sep 17 00:00:00 2001 From: Noah Boorstin Date: Thu, 28 Jan 2021 16:26:15 -0500 Subject: [PATCH 2/6] more of the same fixes --- wally-pipelined/regression/wally-busybear.do | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wally-pipelined/regression/wally-busybear.do b/wally-pipelined/regression/wally-busybear.do index cd739993..cd028285 100644 --- a/wally-pipelined/regression/wally-busybear.do +++ b/wally-pipelined/regression/wally-busybear.do @@ -131,6 +131,6 @@ add wave /testbench_busybear/InstrWName #set DefaultRadix hexadecimal # #-- Run the Simulation -run 3850 +run 5240 #run -all ##quit From 287cf4e5a6766d07e6f2f7d0132074b9e18ced14 Mon Sep 17 00:00:00 2001 From: Noah Boorstin Date: Thu, 28 Jan 2021 16:35:12 -0500 Subject: [PATCH 3/6] oops forgot to add C.BEQZ, C.BNEZ checks to busybear testbench --- wally-pipelined/testbench/testbench-busybear.sv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wally-pipelined/testbench/testbench-busybear.sv b/wally-pipelined/testbench/testbench-busybear.sv index 07b48d37..0482c3c2 100644 --- a/wally-pipelined/testbench/testbench-busybear.sv +++ b/wally-pipelined/testbench/testbench-busybear.sv @@ -180,6 +180,8 @@ module testbench_busybear(); 16'bXXXXXXXXX1101111, // JAL 16'bXXXXXXXXX1100111, // JALR 16'bXXXXXXXXX1100011, // B + 16'b110XXXXXXXXXXX01, // C.BEQZ + 16'b111XXXXXXXXXXX01, // C.BNEZ 16'b101XXXXXXXXXXX01: // C.J speculative = 1; 16'b1001000000000010: // C.EBREAK: From beb93e25088145ee3b4d5e52d9be072ef2141343 Mon Sep 17 00:00:00 2001 From: Noah Boorstin Date: Thu, 28 Jan 2021 16:41:37 -0500 Subject: [PATCH 4/6] busybear: add more test instructions currently testing first 1k instrs --- wally-pipelined/regression/wally-busybear.do | 2 +- wally-pipelined/testbench/testbench-busybear.sv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wally-pipelined/regression/wally-busybear.do b/wally-pipelined/regression/wally-busybear.do index cd028285..bca0eaab 100644 --- a/wally-pipelined/regression/wally-busybear.do +++ b/wally-pipelined/regression/wally-busybear.do @@ -131,6 +131,6 @@ add wave /testbench_busybear/InstrWName #set DefaultRadix hexadecimal # #-- Run the Simulation -run 5240 +run 8690 #run -all ##quit diff --git a/wally-pipelined/testbench/testbench-busybear.sv b/wally-pipelined/testbench/testbench-busybear.sv index 0482c3c2..edc82ac6 100644 --- a/wally-pipelined/testbench/testbench-busybear.sv +++ b/wally-pipelined/testbench/testbench-busybear.sv @@ -171,7 +171,7 @@ module testbench_busybear(); // then expected PC value scan_file_PC = $fscanf(data_file_PC, "%x\n", pcExpected); if (instrs < 10 || (instrs < 100 && instrs % 10 == 0) || - (instrs < 1000 && instrs % 50 == 0) || instrs > 205) begin + (instrs < 1000 && instrs % 50 == 0) || instrs > 700) begin $display("loaded %0d instructions", instrs); end instrs += 1; From 4f84bd3c8f7a76c4fced6cb9dcebd0af423009fb Mon Sep 17 00:00:00 2001 From: Noah Boorstin Date: Thu, 28 Jan 2021 19:35:09 -0500 Subject: [PATCH 5/6] busybear: fix misaligned writing checking --- wally-pipelined/regression/wally-busybear.do | 2 +- wally-pipelined/testbench/testbench-busybear.sv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wally-pipelined/regression/wally-busybear.do b/wally-pipelined/regression/wally-busybear.do index bca0eaab..93c6951a 100644 --- a/wally-pipelined/regression/wally-busybear.do +++ b/wally-pipelined/regression/wally-busybear.do @@ -131,6 +131,6 @@ add wave /testbench_busybear/InstrWName #set DefaultRadix hexadecimal # #-- Run the Simulation -run 8690 +run 12422 #run -all ##quit diff --git a/wally-pipelined/testbench/testbench-busybear.sv b/wally-pipelined/testbench/testbench-busybear.sv index edc82ac6..89248e25 100644 --- a/wally-pipelined/testbench/testbench-busybear.sv +++ b/wally-pipelined/testbench/testbench-busybear.sv @@ -171,7 +171,7 @@ module testbench_busybear(); // then expected PC value scan_file_PC = $fscanf(data_file_PC, "%x\n", pcExpected); if (instrs < 10 || (instrs < 100 && instrs % 10 == 0) || - (instrs < 1000 && instrs % 50 == 0) || instrs > 700) begin + (instrs < 1000 && instrs % 50 == 0)) begin $display("loaded %0d instructions", instrs); end instrs += 1; From 619dec149094bee18e1915a41708f51435274b94 Mon Sep 17 00:00:00 2001 From: Noah Boorstin Date: Thu, 28 Jan 2021 19:44:58 -0500 Subject: [PATCH 6/6] busybear: simulate first 10k instructions I know we need to add CSR checking sometime soon Also I'm a bit sketpical this is all working properly, and that no new bugs were uncovered from 1k instrs to 10k instrs --- wally-pipelined/regression/wally-busybear.do | 2 +- wally-pipelined/testbench/testbench-busybear.sv | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wally-pipelined/regression/wally-busybear.do b/wally-pipelined/regression/wally-busybear.do index 93c6951a..b9b173bd 100644 --- a/wally-pipelined/regression/wally-busybear.do +++ b/wally-pipelined/regression/wally-busybear.do @@ -131,6 +131,6 @@ add wave /testbench_busybear/InstrWName #set DefaultRadix hexadecimal # #-- Run the Simulation -run 12422 +run 129812 #run -all ##quit diff --git a/wally-pipelined/testbench/testbench-busybear.sv b/wally-pipelined/testbench/testbench-busybear.sv index 89248e25..0cfcc0da 100644 --- a/wally-pipelined/testbench/testbench-busybear.sv +++ b/wally-pipelined/testbench/testbench-busybear.sv @@ -170,8 +170,8 @@ module testbench_busybear(); scan_file_PC = $fscanf(data_file_PC, "%x\n", InstrF); // then expected PC value scan_file_PC = $fscanf(data_file_PC, "%x\n", pcExpected); - if (instrs < 10 || (instrs < 100 && instrs % 10 == 0) || - (instrs < 1000 && instrs % 50 == 0)) begin + if (instrs <= 10 || (instrs <= 100 && instrs % 10 == 0) || + (instrs <= 1000 && instrs % 100 == 0) || (instrs <= 10000 && instrs % 1000 == 0)) begin $display("loaded %0d instructions", instrs); end instrs += 1;