mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Merge branch 'main' of github.com:davidharrishmc/riscv-wally into main
This commit is contained in:
commit
e44a265b9e
@ -27,9 +27,9 @@ def test_config(config, print_res=True):
|
|||||||
cmd = "echo 'quit' | vsim -do wally-busybear.do -c >" + logname
|
cmd = "echo 'quit' | vsim -do wally-busybear.do -c >" + logname
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
# check for success. grep returns 0 if found, 1 if not found
|
# check for success. grep returns 0 if found, 1 if not found
|
||||||
passed = search_log_for_text("no more .* to read", logname)
|
passed = search_log_for_text("# loaded 100000 instructions", logname)
|
||||||
else:
|
else:
|
||||||
cmd = "vsim -c >" + logname +" <<!\ndo wally-pipelined-batch-parallel.do ../config/" + config + " " + config + "\n!\n"
|
cmd = "vsim -c >" + logname +" <<!\ndo wally-pipelined-batch.do ../config/" + config + " " + config + "\n!\n"
|
||||||
print(cmd)
|
print(cmd)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
# check for success. grep returns 0 if found, 1 if not found
|
# check for success. grep returns 0 if found, 1 if not found
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
# wally-pipelined-batch.do
|
|
||||||
#
|
|
||||||
# Modification by Oklahoma State University & Harvey Mudd College
|
|
||||||
# Use with Testbench
|
|
||||||
# James Stine, 2008; David Harris 2021
|
|
||||||
# Go Cowboys!!!!!!
|
|
||||||
#
|
|
||||||
# Takes 1:10 to run RV64IC tests using gui
|
|
||||||
# 11 seconds to run batch mode
|
|
||||||
|
|
||||||
# Use this wally-pipelined.do file to run this example.
|
|
||||||
# Either bring up ModelSim and type the following at the "ModelSim>" prompt:
|
|
||||||
# do wally-pipelined.do ../config/rv64ic
|
|
||||||
# or, to run from a shell, type the following at the shell prompt:
|
|
||||||
# vsim -c -do wally-pipelined.do ../config/rv64ic
|
|
||||||
# (omit the "-c" to see the GUI while running from the shell)
|
|
||||||
|
|
||||||
onbreak {resume}
|
|
||||||
|
|
||||||
# create library
|
|
||||||
if [file exists work$2] {
|
|
||||||
vdel -lib work$2 -all
|
|
||||||
}
|
|
||||||
vlib work$2
|
|
||||||
|
|
||||||
# compile source files
|
|
||||||
# suppress spurious warnngs about
|
|
||||||
# "Extra checking for conflicts with always_comb done at vopt time"
|
|
||||||
# because vsim will run vopt
|
|
||||||
vlog +incdir+$1 ../testbench/testbench-imperas.sv ../testbench/function_radix.sv ../src/*/*.sv -suppress 2583
|
|
||||||
|
|
||||||
# start and run simulation
|
|
||||||
# remove +acc flag for faster sim during regressions if there is no need to access internal signals
|
|
||||||
vopt work.testbench -o workopt
|
|
||||||
vsim workopt
|
|
||||||
|
|
||||||
run -all
|
|
||||||
quit
|
|
@ -17,10 +17,10 @@
|
|||||||
onbreak {resume}
|
onbreak {resume}
|
||||||
|
|
||||||
# create library
|
# create library
|
||||||
if [file exists work] {
|
if [file exists work_$2] {
|
||||||
vdel -all
|
vdel -lib work_$2 -all
|
||||||
}
|
}
|
||||||
vlib work
|
vlib work_$2
|
||||||
|
|
||||||
# compile source files
|
# compile source files
|
||||||
# suppress spurious warnngs about
|
# suppress spurious warnngs about
|
||||||
@ -28,15 +28,16 @@ vlib work
|
|||||||
# because vsim will run vopt
|
# because vsim will run vopt
|
||||||
|
|
||||||
# default to config/rv64ic, but allow this to be overridden at the command line. For example:
|
# default to config/rv64ic, but allow this to be overridden at the command line. For example:
|
||||||
# do wally-pipelined-batch.do ../config/rv32ic
|
# do wally-pipelined-batch.do ../config/rv32ic rv32ic
|
||||||
switch $argc {
|
switch $argc {
|
||||||
0 {vlog +incdir+../config/rv64ic ../testbench/testbench-imperas.sv ../src/*/*.sv -suppress 2583}
|
0 {vlog +incdir+../config/rv64ic ../testbench/testbench-imperas.sv ../src/*/*.sv -suppress 2583}
|
||||||
1 {vlog +incdir+$1 ../testbench/testbench-imperas.sv ../src/*/*.sv -suppress 2583}
|
1 {vlog +incdir+$1 ../testbench/testbench-imperas.sv ../src/*/*.sv -suppress 2583}
|
||||||
|
2 {vlog -work work_$2 +incdir+$1 ../testbench/testbench-imperas.sv ../src/*/*.sv -suppress 2583}
|
||||||
}
|
}
|
||||||
# start and run simulation
|
# start and run simulation
|
||||||
# remove +acc flag for faster sim during regressions if there is no need to access internal signals
|
# remove +acc flag for faster sim during regressions if there is no need to access internal signals
|
||||||
vopt work.testbench -o workopt
|
vopt work_$2.testbench -work work_$2 -o workopt_$2
|
||||||
vsim workopt
|
vsim -lib work_$2 workopt_$2
|
||||||
|
|
||||||
run -all
|
run -all
|
||||||
quit
|
quit
|
||||||
|
Loading…
Reference in New Issue
Block a user