From 1fc00d41c2931ea9f1044dbd4066be2b16d36079 Mon Sep 17 00:00:00 2001 From: Noah Boorstin Date: Mon, 8 Mar 2021 19:26:26 +0000 Subject: [PATCH] busybear: load mem files from verilog instead of .do --- wally-pipelined/regression/wally-busybear.do | 9 --------- wally-pipelined/testbench/testbench-busybear.sv | 8 ++++++++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/wally-pipelined/regression/wally-busybear.do b/wally-pipelined/regression/wally-busybear.do index 271b8237a..7e0fd66b1 100644 --- a/wally-pipelined/regression/wally-busybear.do +++ b/wally-pipelined/regression/wally-busybear.do @@ -42,15 +42,6 @@ switch $argc { 1 {mem load -infile ../config/$1/BTBPredictor.txt -format bin testbench_busybear/dut/hart/ifu/bpred/TargetPredictor/memory/memory} } -mem load -startaddress 0 -endaddress 2047 -filltype value -fillradix hex -filldata 0 /testbench_busybear/dut/uncore/bootdtim/RAM -mem load -startaddress 512 -i "/courses/e190ax/busybear_boot/bootmem.txt" -format hex /testbench_busybear/dut/uncore/bootdtim/RAM -mem load -startaddress 0 -endaddress 2047 -filltype value -fillradix hex -filldata 0 /testbench_busybear/dut/imem/bootram -mem load -startaddress 512 -i "/courses/e190ax/busybear_boot/bootmem.txt" -format hex /testbench_busybear/dut/imem/bootram -mem load -startaddress 268435456 -endaddress 285212671 -filltype value -fillradix hex -filldata 0 /testbench_busybear/dut/uncore/dtim/RAM -mem load -startaddress 268435456 -i "/courses/e190ax/busybear_boot/ram.txt" -format hex /testbench_busybear/dut/uncore/dtim/RAM -mem load -startaddress 268435456 -endaddress 285212671 -filltype value -fillradix hex -filldata 0 /testbench_busybear/dut/imem/RAM -mem load -startaddress 268435456 -i "/courses/e190ax/busybear_boot/ram.txt" -format hex /testbench_busybear/dut/imem/RAM - view wave diff --git a/wally-pipelined/testbench/testbench-busybear.sv b/wally-pipelined/testbench/testbench-busybear.sv index e6ba95a13..ba554e533 100644 --- a/wally-pipelined/testbench/testbench-busybear.sv +++ b/wally-pipelined/testbench/testbench-busybear.sv @@ -95,6 +95,14 @@ module testbench_busybear(); end end + // initial loading of memories + initial begin + $readmemh("/courses/e190ax/busybear_boot/bootmem.txt", dut.uncore.bootdtim.RAM, 'h1000 >> 3); + $readmemh("/courses/e190ax/busybear_boot/ram.txt", dut.uncore.dtim.RAM); + $readmemh("/courses/e190ax/busybear_boot/bootmem.txt", dut.imem.bootram, 'h1000 >> 3); + $readmemh("/courses/e190ax/busybear_boot/ram.txt", dut.imem.RAM); + end + integer warningCount = 0; //logic[63:0] adrTranslation[4:0];