forked from Github_Repos/cvw
Merge branch 'main' of github.com:ross144/cvw
This commit is contained in:
commit
e3a971ce38
1
.gitignore
vendored
1
.gitignore
vendored
@ -89,6 +89,7 @@ tests/custom/*/*/*.elf
|
|||||||
tests/custom/*/*/*.map
|
tests/custom/*/*/*.map
|
||||||
tests/custom/*/*/*.memfile
|
tests/custom/*/*/*.memfile
|
||||||
tests/custom/crt0/*.a
|
tests/custom/crt0/*.a
|
||||||
|
tests/custom/*/*.elf*
|
||||||
sim/sd_model.log
|
sim/sd_model.log
|
||||||
fpga/src/sdc/*
|
fpga/src/sdc/*
|
||||||
fpga/src/sdc.tar.gz
|
fpga/src/sdc.tar.gz
|
||||||
|
@ -22,7 +22,7 @@ PORT_CFLAGS = -g -mabi=$(ABI) -march=$(ARCH) -static -falign-functions=16 \
|
|||||||
all: $(work_dir)/coremark.bare.riscv.elf.memfile
|
all: $(work_dir)/coremark.bare.riscv.elf.memfile
|
||||||
|
|
||||||
run:
|
run:
|
||||||
(cd ../../sim && (time vsim -c -do "do wally-pipelined-batch.do rv$(XLEN)gc coremark" 2>&1 | tee $(work_dir)/coremark.sim.log))
|
(cd ../../sim && (time vsim -c -do "do wally-batch.do rv$(XLEN)gc coremark" 2>&1 | tee $(work_dir)/coremark.sim.log))
|
||||||
cd ../benchmarks/coremark/
|
cd ../benchmarks/coremark/
|
||||||
# KMG: added post processing script to give out branch miss proportion along with other stats to the coremark test
|
# KMG: added post processing script to give out branch miss proportion along with other stats to the coremark test
|
||||||
python3 coremark-postprocess.py
|
python3 coremark-postprocess.py
|
||||||
|
@ -34,7 +34,7 @@ sim: modelsim_build_memfile modelsim_run speed
|
|||||||
|
|
||||||
# launches modelsim to simulate tests on wally
|
# launches modelsim to simulate tests on wally
|
||||||
modelsim_run:
|
modelsim_run:
|
||||||
(cd ../../sim/ && vsim -c -do "do wally-pipelined-batch.do rv32gc embench")
|
(cd ../../sim/ && vsim -c -do "do wally-batch.do rv32gc embench")
|
||||||
cd ../../benchmarks/embench/
|
cd ../../benchmarks/embench/
|
||||||
|
|
||||||
# builds the objdump based on the compiled c elf files
|
# builds the objdump based on the compiled c elf files
|
||||||
|
@ -135,9 +135,6 @@
|
|||||||
`define DIVBLEN ($clog2(`DIVb+1)-1)
|
`define DIVBLEN ($clog2(`DIVb+1)-1)
|
||||||
`define DIVa (`DIVb+1-`XLEN) // used for idiv on fpu
|
`define DIVa (`DIVb+1-`XLEN) // used for idiv on fpu
|
||||||
|
|
||||||
// Memory synthesis configuration
|
|
||||||
`define USE_SRAM 0
|
|
||||||
|
|
||||||
// Disable spurious Verilator warnings
|
// Disable spurious Verilator warnings
|
||||||
|
|
||||||
/* verilator lint_off STMTDLY */
|
/* verilator lint_off STMTDLY */
|
||||||
|
@ -36,7 +36,7 @@ pushd sim
|
|||||||
IMPERAS_TOOLS=$(pwd)/imperas.ic \
|
IMPERAS_TOOLS=$(pwd)/imperas.ic \
|
||||||
OTHERFLAGS="+TRACE2LOG_ENABLE=1 VERBOSE=1" \
|
OTHERFLAGS="+TRACE2LOG_ENABLE=1 VERBOSE=1" \
|
||||||
TESTDIR=${WALLY}/external/ImperasDV-HMC/tests/riscof/work/riscv-arch-test/rv64i_m/F/src/fadd_b1-01.S \
|
TESTDIR=${WALLY}/external/ImperasDV-HMC/tests/riscof/work/riscv-arch-test/rv64i_m/F/src/fadd_b1-01.S \
|
||||||
vsim -c -do "do wally-pipelined-imperas.do rv64gc"
|
vsim -c -do "do wally-imperas.do rv64gc"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# notes
|
# notes
|
||||||
@ -50,7 +50,7 @@ popd
|
|||||||
IMPERAS_TOOLS=$(pwd)/imperas.ic \
|
IMPERAS_TOOLS=$(pwd)/imperas.ic \
|
||||||
OTHERFLAGS="+TRACE2LOG_ENABLE=1 VERBOSE=1" \
|
OTHERFLAGS="+TRACE2LOG_ENABLE=1 VERBOSE=1" \
|
||||||
TESTDIR=../../tests/riscof_lee/work/riscv-arch-test/rv64i_m/F/src/fadd_b1-01.S \
|
TESTDIR=../../tests/riscof_lee/work/riscv-arch-test/rv64i_m/F/src/fadd_b1-01.S \
|
||||||
vsim -c -do "do wally-pipelined-imperas.do rv64gc"
|
vsim -c -do "do wally-imperas.do rv64gc"
|
||||||
|
|
||||||
|
|
||||||
# getting library issue.
|
# getting library issue.
|
||||||
|
@ -22,7 +22,7 @@ def main():
|
|||||||
break
|
break
|
||||||
checkpoint = checkpointList[0]
|
checkpoint = checkpointList[0]
|
||||||
logFile = logDir+"checkpoint"+str(checkpoint)+".log"
|
logFile = logDir+"checkpoint"+str(checkpoint)+".log"
|
||||||
runCommand="{\nvsim -c <<!\ndo wally-pipelined-batch.do buildroot buildroot /opt/riscv 0 "+str(checkpoint+1)+" "+str(checkpoint)+"\n!\n} | tee "+logFile
|
runCommand="{\nvsim -c <<!\ndo wally-batch.do buildroot buildroot /opt/riscv 0 "+str(checkpoint+1)+" "+str(checkpoint)+"\n!\n} | tee "+logFile
|
||||||
print(runCommand)
|
print(runCommand)
|
||||||
os.system(runCommand)
|
os.system(runCommand)
|
||||||
try:
|
try:
|
||||||
|
@ -50,18 +50,18 @@ def getBuildrootTC(boot):
|
|||||||
MAX_EXPECTED = 246000000 # *** TODO: replace this with a search for the login prompt.
|
MAX_EXPECTED = 246000000 # *** TODO: replace this with a search for the login prompt.
|
||||||
if boot:
|
if boot:
|
||||||
name="buildrootboot"
|
name="buildrootboot"
|
||||||
BRcmd="vsim > {} -c <<!\ndo wally-pipelined.do buildroot buildroot-no-trace $RISCV 0 1 0\n!"
|
BRcmd="vsim > {} -c <<!\ndo wally.do buildroot buildroot-no-trace $RISCV 0 1 0\n!"
|
||||||
BRgrepstr="WallyHostname login:"
|
BRgrepstr="WallyHostname login:"
|
||||||
else:
|
else:
|
||||||
name="buildroot"
|
name="buildroot"
|
||||||
BRcmd="vsim > {} -c <<!\ndo wally-pipelined-batch.do buildroot buildroot $RISCV "+str(INSTR_LIMIT)+" 1 0\n!"
|
BRcmd="vsim > {} -c <<!\ndo wally-batch.do buildroot buildroot $RISCV "+str(INSTR_LIMIT)+" 1 0\n!"
|
||||||
BRgrepstr=str(INSTR_LIMIT)+" instructions"
|
BRgrepstr=str(INSTR_LIMIT)+" instructions"
|
||||||
return TestCase(name,variant="rv64gc",cmd=BRcmd,grepstr=BRgrepstr)
|
return TestCase(name,variant="rv64gc",cmd=BRcmd,grepstr=BRgrepstr)
|
||||||
|
|
||||||
tc = TestCase(
|
tc = TestCase(
|
||||||
name="buildroot-checkpoint",
|
name="buildroot-checkpoint",
|
||||||
variant="rv64gc",
|
variant="rv64gc",
|
||||||
cmd="vsim > {} -c <<!\ndo wally-pipelined-batch.do buildroot buildroot-checkpoint $RISCV 400100000 400000001 400000000\n!", # *** will this work with rv64gc rather than buildroot config?
|
cmd="vsim > {} -c <<!\ndo wally-batch.do buildroot buildroot-checkpoint $RISCV 400100000 400000001 400000000\n!", # *** will this work with rv64gc rather than buildroot config?
|
||||||
grepstr="400100000 instructions")
|
grepstr="400100000 instructions")
|
||||||
configs.append(tc)
|
configs.append(tc)
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ for test in tests64gc:
|
|||||||
tc = TestCase(
|
tc = TestCase(
|
||||||
name=test,
|
name=test,
|
||||||
variant="rv64gc",
|
variant="rv64gc",
|
||||||
cmd="vsim > {} -c <<!\ndo wally-pipelined-batch.do rv64gc "+test+"\n!",
|
cmd="vsim > {} -c <<!\ndo wally-batch.do rv64gc "+test+"\n!",
|
||||||
grepstr="All tests ran without failures")
|
grepstr="All tests ran without failures")
|
||||||
configs.append(tc)
|
configs.append(tc)
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ for test in tests64i:
|
|||||||
tc = TestCase(
|
tc = TestCase(
|
||||||
name=test,
|
name=test,
|
||||||
variant="rv64i",
|
variant="rv64i",
|
||||||
cmd="vsim > {} -c <<!\ndo wally-pipelined-batch.do rv64i "+test+"\n!",
|
cmd="vsim > {} -c <<!\ndo wally-batch.do rv64i "+test+"\n!",
|
||||||
grepstr="All tests ran without failures")
|
grepstr="All tests ran without failures")
|
||||||
configs.append(tc)
|
configs.append(tc)
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ for test in tests32gc:
|
|||||||
tc = TestCase(
|
tc = TestCase(
|
||||||
name=test,
|
name=test,
|
||||||
variant="rv32gc",
|
variant="rv32gc",
|
||||||
cmd="vsim > {} -c <<!\ndo wally-pipelined-batch.do rv32gc "+test+"\n!",
|
cmd="vsim > {} -c <<!\ndo wally-batch.do rv32gc "+test+"\n!",
|
||||||
grepstr="All tests ran without failures")
|
grepstr="All tests ran without failures")
|
||||||
configs.append(tc)
|
configs.append(tc)
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ for test in tests32imc:
|
|||||||
tc = TestCase(
|
tc = TestCase(
|
||||||
name=test,
|
name=test,
|
||||||
variant="rv32imc",
|
variant="rv32imc",
|
||||||
cmd="vsim > {} -c <<!\ndo wally-pipelined-batch.do rv32imc "+test+"\n!",
|
cmd="vsim > {} -c <<!\ndo wally-batch.do rv32imc "+test+"\n!",
|
||||||
grepstr="All tests ran without failures")
|
grepstr="All tests ran without failures")
|
||||||
configs.append(tc)
|
configs.append(tc)
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ for test in tests32i:
|
|||||||
tc = TestCase(
|
tc = TestCase(
|
||||||
name=test,
|
name=test,
|
||||||
variant="rv32i",
|
variant="rv32i",
|
||||||
cmd="vsim > {} -c <<!\ndo wally-pipelined-batch.do rv32i "+test+"\n!",
|
cmd="vsim > {} -c <<!\ndo wally-batch.do rv32i "+test+"\n!",
|
||||||
grepstr="All tests ran without failures")
|
grepstr="All tests ran without failures")
|
||||||
configs.append(tc)
|
configs.append(tc)
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ for test in tests32e:
|
|||||||
tc = TestCase(
|
tc = TestCase(
|
||||||
name=test,
|
name=test,
|
||||||
variant="rv32e",
|
variant="rv32e",
|
||||||
cmd="vsim > {} -c <<!\ndo wally-pipelined-batch.do rv32e "+test+"\n!",
|
cmd="vsim > {} -c <<!\ndo wally-batch.do rv32e "+test+"\n!",
|
||||||
grepstr="All tests ran without failures")
|
grepstr="All tests ran without failures")
|
||||||
configs.append(tc)
|
configs.append(tc)
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ for test in ahbTests:
|
|||||||
tc = TestCase(
|
tc = TestCase(
|
||||||
name="ram_latency_" + test[0] + "_burst_en_" + test[1],
|
name="ram_latency_" + test[0] + "_burst_en_" + test[1],
|
||||||
variant="ahb",
|
variant="ahb",
|
||||||
cmd="vsim > {} -c <<!\ndo wally-pipelined-batch.do rv64gc ahb "+test[0]+" "+test[1]+"\n!",
|
cmd="vsim > {} -c <<!\ndo wally-batch.do rv64gc ahb "+test[0]+" "+test[1]+"\n!",
|
||||||
grepstr="All tests ran without failures")
|
grepstr="All tests ran without failures")
|
||||||
configs.append(tc)
|
configs.append(tc)
|
||||||
|
|
||||||
|
@ -17,6 +17,6 @@ for t in $ALL; do
|
|||||||
echo "Running test ${TESTDIR} -> ${OUTDIR} :: ${OUTLOG}"
|
echo "Running test ${TESTDIR} -> ${OUTDIR} :: ${OUTLOG}"
|
||||||
|
|
||||||
mkdir -p ${OUTDIR}
|
mkdir -p ${OUTDIR}
|
||||||
vsim -c -do "do wally-pipelined-imperas.do rv64gc"
|
vsim -c -do "do wally-imperas.do rv64gc"
|
||||||
mv transcript ${OUTLOG}
|
mv transcript ${OUTLOG}
|
||||||
done
|
done
|
||||||
|
@ -30,4 +30,4 @@ echo "INSTR_LIMIT = ${INSTR_LIMIT}"
|
|||||||
echo "INSTR_WAVEON = ${INSTR_WAVEON}"
|
echo "INSTR_WAVEON = ${INSTR_WAVEON}"
|
||||||
echo "CHECKPOINT = ${CHECKPOINT}"
|
echo "CHECKPOINT = ${CHECKPOINT}"
|
||||||
|
|
||||||
vsim -do "do ./wally-pipelined.do buildroot buildroot $RISCV $INSTR_LIMIT $INSTR_WAVEON $CHECKPOINT"
|
vsim -do "do ./wally.do buildroot buildroot $RISCV $INSTR_LIMIT $INSTR_WAVEON $CHECKPOINT"
|
||||||
|
@ -32,5 +32,5 @@ echo "CHECKPOINT = ${CHECKPOINT}"
|
|||||||
|
|
||||||
# *** change config from buildroot to rv64gc
|
# *** change config from buildroot to rv64gc
|
||||||
vsim -c <<!
|
vsim -c <<!
|
||||||
do wally-pipelined-batch.do buildroot buildroot-no-trace $RISCV $INSTR_LIMIT $INSTR_WAVEON $CHECKPOINT
|
do wally-batch.do buildroot buildroot-no-trace $RISCV $INSTR_LIMIT $INSTR_WAVEON $CHECKPOINT
|
||||||
!
|
!
|
||||||
|
@ -30,5 +30,3 @@ IMPERAS_TOOLS=$(pwd)/imperas.ic \
|
|||||||
OTHERFLAGS="+TRACE2LOG_ENABLE=1 VERBOSE=1" \
|
OTHERFLAGS="+TRACE2LOG_ENABLE=1 VERBOSE=1" \
|
||||||
TESTDIR=${WALLY}/tests/riscof/work/wally-riscv-arch-test/rv64i_m/privilege/src/Lee.S/ \
|
TESTDIR=${WALLY}/tests/riscof/work/wally-riscv-arch-test/rv64i_m/privilege/src/Lee.S/ \
|
||||||
vsim -do "do wally-pipelined-imperas.do rv64gc"
|
vsim -do "do wally-pipelined-imperas.do rv64gc"
|
||||||
|
|
||||||
#TESTDIR=${WALLY}/tests/riscof/work/wally-riscv-arch-test/rv64i_m/privilege/src/FCVT-S-L-RTZ-01.S/ \
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
vsim -do "do wally-pipelined.do rv64gc arch64d"
|
vsim -do "do wally.do rv64gc arch64d"
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
vsim -c -do "do wally-pipelined-batch.do rv32gc wally32priv"
|
vsim -c -do "do wally-batch.do rv32gc wally32priv"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# wally-pipelined.do
|
# testfloat.do
|
||||||
#
|
#
|
||||||
# Modification by Oklahoma State University & Harvey Mudd College
|
# Modification by Oklahoma State University & Harvey Mudd College
|
||||||
# Use with Testbench
|
# Use with Testbench
|
||||||
@ -7,14 +7,7 @@
|
|||||||
#
|
#
|
||||||
# Takes 1:10 to run RV64IC tests using gui
|
# Takes 1:10 to run RV64IC tests using gui
|
||||||
|
|
||||||
# run with vsim -do "do wally-pipelined.do rv64ic riscvarchtest-64m"
|
# run with vsim -do "do wally.do rv64ic riscvarchtest-64m"
|
||||||
|
|
||||||
# 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
|
|
||||||
# or, to run from a shell, type the following at the shell prompt:
|
|
||||||
# vsim -do wally-pipelined.do -c
|
|
||||||
# (omit the "-c" to see the GUI while running from the shell)
|
|
||||||
|
|
||||||
onbreak {resume}
|
onbreak {resume}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# wally-pipelined-batch.do
|
# wally-batch.do
|
||||||
|
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||||
#
|
#
|
||||||
# Modification by Oklahoma State University & Harvey Mudd College
|
# Modification by Oklahoma State University & Harvey Mudd College
|
||||||
# Use with Testbench
|
# Use with Testbench
|
||||||
@ -7,14 +8,14 @@
|
|||||||
#
|
#
|
||||||
# Takes 1:10 to run RV64IC tests using gui
|
# Takes 1:10 to run RV64IC tests using gui
|
||||||
|
|
||||||
# Usage: do wally-pipelined-batch.do <config> <testcases>
|
# Usage: do wally-batch.do <config> <testcases>
|
||||||
# Example: do wally-pipelined-batch.do rv32imc imperas-32i
|
# Example: do wally-batch.do rv32imc imperas-32i
|
||||||
|
|
||||||
# Use this wally-pipelined-batch.do file to run this example.
|
# Use this wally-batch.do file to run this example.
|
||||||
# Either bring up ModelSim and type the following at the "ModelSim>" prompt:
|
# Either bring up ModelSim and type the following at the "ModelSim>" prompt:
|
||||||
# do wally-pipelined-batch.do
|
# do wally-batch.do
|
||||||
# or, to run from a shell, type the following at the shell prompt:
|
# or, to run from a shell, type the following at the shell prompt:
|
||||||
# vsim -do wally-pipelined-batch.do -c
|
# vsim -do wally-batch.do -c
|
||||||
# (omit the "-c" to see the GUI while running from the shell)
|
# (omit the "-c" to see the GUI while running from the shell)
|
||||||
|
|
||||||
onbreak {resume}
|
onbreak {resume}
|
||||||
@ -91,9 +92,9 @@ if {$2 eq "buildroot" || $2 eq "buildroot-checkpoint"} {
|
|||||||
# power off -r /dut/core/*
|
# power off -r /dut/core/*
|
||||||
}
|
}
|
||||||
|
|
||||||
#coverage report -file wally-pipelined-coverage.txt
|
#coverage report -file wally-coverage.txt
|
||||||
# These aren't doing anything helpful
|
# These aren't doing anything helpful
|
||||||
#coverage report -memory
|
#coverage report -memory
|
||||||
#profile report -calltree -file wally-pipelined-calltree.rpt -cutoff 2
|
#profile report -calltree -file wally-calltree.rpt -cutoff 2
|
||||||
#power report -all -bsaif power.saif
|
#power report -all -bsaif power.saif
|
||||||
quit
|
quit
|
@ -1,4 +1,5 @@
|
|||||||
# wally-pipelined.do
|
# wally.do
|
||||||
|
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||||
#
|
#
|
||||||
# Modification by Oklahoma State University & Harvey Mudd College
|
# Modification by Oklahoma State University & Harvey Mudd College
|
||||||
# Use with Testbench
|
# Use with Testbench
|
||||||
@ -7,15 +8,6 @@
|
|||||||
#
|
#
|
||||||
# Takes 1:10 to run RV64IC tests using gui
|
# Takes 1:10 to run RV64IC tests using gui
|
||||||
|
|
||||||
# run with vsim -do "do wally-pipelined.do rv64ic riscvarchtest-64m"
|
|
||||||
|
|
||||||
# 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
|
|
||||||
# or, to run from a shell, type the following at the shell prompt:
|
|
||||||
# vsim -do wally-pipelined.do -c
|
|
||||||
# (omit the "-c" to see the GUI while running from the shell)
|
|
||||||
|
|
||||||
onbreak {resume}
|
onbreak {resume}
|
||||||
|
|
||||||
# create library
|
# create library
|
@ -1,4 +1,5 @@
|
|||||||
# wally-pipelined.do
|
# wally.do
|
||||||
|
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||||
#
|
#
|
||||||
# Modification by Oklahoma State University & Harvey Mudd College
|
# Modification by Oklahoma State University & Harvey Mudd College
|
||||||
# Use with Testbench
|
# Use with Testbench
|
||||||
@ -7,15 +8,6 @@
|
|||||||
#
|
#
|
||||||
# Takes 1:10 to run RV64IC tests using gui
|
# Takes 1:10 to run RV64IC tests using gui
|
||||||
|
|
||||||
# run with vsim -do "do wally-pipelined.do rv64ic riscvarchtest-64m"
|
|
||||||
|
|
||||||
# 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
|
|
||||||
# or, to run from a shell, type the following at the shell prompt:
|
|
||||||
# vsim -do wally-pipelined.do -c
|
|
||||||
# (omit the "-c" to see the GUI while running from the shell)
|
|
||||||
|
|
||||||
onbreak {resume}
|
onbreak {resume}
|
||||||
|
|
||||||
# create library
|
# create library
|
@ -1,4 +1,5 @@
|
|||||||
# wally-pipelined.do
|
# wally.do
|
||||||
|
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||||
#
|
#
|
||||||
# Modification by Oklahoma State University & Harvey Mudd College
|
# Modification by Oklahoma State University & Harvey Mudd College
|
||||||
# Use with Testbench
|
# Use with Testbench
|
||||||
@ -11,9 +12,9 @@
|
|||||||
|
|
||||||
# Use this wally-pipelined.do file to run this example.
|
# Use this wally-pipelined.do file to run this example.
|
||||||
# Either bring up ModelSim and type the following at the "ModelSim>" prompt:
|
# Either bring up ModelSim and type the following at the "ModelSim>" prompt:
|
||||||
# do wally-pipelined.do
|
# do wally.do
|
||||||
# or, to run from a shell, type the following at the shell prompt:
|
# or, to run from a shell, type the following at the shell prompt:
|
||||||
# vsim -do wally-pipelined.do -c
|
# vsim -do wally.do -c
|
||||||
# (omit the "-c" to see the GUI while running from the shell)
|
# (omit the "-c" to see the GUI while running from the shell)
|
||||||
|
|
||||||
onbreak {resume}
|
onbreak {resume}
|
@ -116,7 +116,7 @@ module buscachefsm #(
|
|||||||
assign CaptureEn = (CurrState == DATA_PHASE & BusRW[1]) | (CurrState == CACHE_FETCH & HREADY);
|
assign CaptureEn = (CurrState == DATA_PHASE & BusRW[1]) | (CurrState == CACHE_FETCH & HREADY);
|
||||||
assign CacheAccess = CurrState == CACHE_FETCH | CurrState == CACHE_WRITEBACK;
|
assign CacheAccess = CurrState == CACHE_FETCH | CurrState == CACHE_WRITEBACK;
|
||||||
|
|
||||||
assign BusStall = (CurrState == ADR_PHASE & (|BusRW | |CacheBusRW)) |
|
assign BusStall = (CurrState == ADR_PHASE & ((|BusRW) | (|CacheBusRW))) |
|
||||||
//(CurrState == DATA_PHASE & ~BusRW[0]) | // *** replace the next line with this. Fails uart test but i think it's a test problem not a hardware problem.
|
//(CurrState == DATA_PHASE & ~BusRW[0]) | // *** replace the next line with this. Fails uart test but i think it's a test problem not a hardware problem.
|
||||||
(CurrState == DATA_PHASE) |
|
(CurrState == DATA_PHASE) |
|
||||||
(CurrState == CACHE_FETCH & ~HREADY) |
|
(CurrState == CACHE_FETCH & ~HREADY) |
|
||||||
@ -124,7 +124,7 @@ module buscachefsm #(
|
|||||||
assign BusCommitted = CurrState != ADR_PHASE;
|
assign BusCommitted = CurrState != ADR_PHASE;
|
||||||
|
|
||||||
// AHB bus interface
|
// AHB bus interface
|
||||||
assign HTRANS = (CurrState == ADR_PHASE & HREADY & (|BusRW | |CacheBusRW) & ~Flush) |
|
assign HTRANS = (CurrState == ADR_PHASE & HREADY & ((|BusRW) | (|CacheBusRW)) & ~Flush) |
|
||||||
(CacheAccess & FinalBeatCount & |CacheBusRW & HREADY) ? AHB_NONSEQ : // if we have a pipelined request
|
(CacheAccess & FinalBeatCount & |CacheBusRW & HREADY) ? AHB_NONSEQ : // if we have a pipelined request
|
||||||
(CacheAccess & |BeatCount) ? (`BURST_EN ? AHB_SEQ : AHB_NONSEQ) : AHB_IDLE;
|
(CacheAccess & |BeatCount) ? (`BURST_EN ? AHB_SEQ : AHB_NONSEQ) : AHB_IDLE;
|
||||||
|
|
||||||
|
@ -56,7 +56,6 @@ module unpackinput (
|
|||||||
assign ExpMax = &In[`FLEN-2:`NF]; // is the exponent all 1's
|
assign ExpMax = &In[`FLEN-2:`NF]; // is the exponent all 1's
|
||||||
|
|
||||||
end else if (`FPSIZES == 2) begin // if there are 2 floating point formats supported
|
end else if (`FPSIZES == 2) begin // if there are 2 floating point formats supported
|
||||||
//***need better names for these constants
|
|
||||||
// largest format | smaller format
|
// largest format | smaller format
|
||||||
//----------------------------------
|
//----------------------------------
|
||||||
// `FLEN | `LEN1 length of floating point number
|
// `FLEN | `LEN1 length of floating point number
|
||||||
@ -104,7 +103,6 @@ module unpackinput (
|
|||||||
|
|
||||||
end else if (`FPSIZES == 3) begin // three floating point precsions supported
|
end else if (`FPSIZES == 3) begin // three floating point precsions supported
|
||||||
|
|
||||||
//***need better names for these constants
|
|
||||||
// largest format | larger format | smallest format
|
// largest format | larger format | smallest format
|
||||||
//---------------------------------------------------
|
//---------------------------------------------------
|
||||||
// `FLEN | `LEN1 | `LEN2 length of floating point number
|
// `FLEN | `LEN1 | `LEN2 length of floating point number
|
||||||
@ -196,7 +194,7 @@ module unpackinput (
|
|||||||
// Check NaN boxing
|
// Check NaN boxing
|
||||||
always_comb
|
always_comb
|
||||||
case (Fmt)
|
case (Fmt)
|
||||||
2'b11: BadNaNBox = 0;
|
2'b11: BadNaNBox = 0;
|
||||||
2'b01: BadNaNBox = ~&In[`Q_LEN-1:`D_LEN];
|
2'b01: BadNaNBox = ~&In[`Q_LEN-1:`D_LEN];
|
||||||
2'b00: BadNaNBox = ~&In[`Q_LEN-1:`S_LEN];
|
2'b00: BadNaNBox = ~&In[`Q_LEN-1:`S_LEN];
|
||||||
2'b10: BadNaNBox = ~&In[`Q_LEN-1:`H_LEN];
|
2'b10: BadNaNBox = ~&In[`Q_LEN-1:`H_LEN];
|
||||||
|
@ -6,8 +6,8 @@ NAME := synth
|
|||||||
|
|
||||||
# defaults
|
# defaults
|
||||||
export DESIGN ?= wallypipelinedcore
|
export DESIGN ?= wallypipelinedcore
|
||||||
export FREQ ?= 3000
|
export FREQ ?= 10000
|
||||||
export CONFIG ?= rv32e
|
export CONFIG ?= rv64gc
|
||||||
export MOD ?= orig
|
export MOD ?= orig
|
||||||
# title to add a note in the synth's directory name
|
# title to add a note in the synth's directory name
|
||||||
TITLE =
|
TITLE =
|
||||||
@ -20,7 +20,7 @@ export MAXCORES ?= 1
|
|||||||
# The output netlist is hard to interpret, but significantly better PPA
|
# The output netlist is hard to interpret, but significantly better PPA
|
||||||
export MAXOPT ?= 0
|
export MAXOPT ?= 0
|
||||||
export DRIVE ?= FLOP
|
export DRIVE ?= FLOP
|
||||||
export USESRAM ?= 0
|
export USESRAM ?= 1
|
||||||
|
|
||||||
time := $(shell date +%F-%H-%M)
|
time := $(shell date +%F-%H-%M)
|
||||||
hash := $(shell git rev-parse --short HEAD)
|
hash := $(shell git rev-parse --short HEAD)
|
||||||
@ -55,25 +55,35 @@ $(CONFIG):
|
|||||||
cp -r $(OLDCONFIGDIR)/shared/*.vh $(CONFIGDIR)
|
cp -r $(OLDCONFIGDIR)/shared/*.vh $(CONFIGDIR)
|
||||||
cp -r $(OLDCONFIGDIR)/$(CONFIG)/* $(CONFIGDIR)
|
cp -r $(OLDCONFIGDIR)/$(CONFIG)/* $(CONFIGDIR)
|
||||||
|
|
||||||
|
# adjust DTIM and IROM to reasonable values depending on config
|
||||||
|
ifneq ($(filter $(CONFIG), $(DIRS32)),)
|
||||||
|
sed -i "s/DTIM_RANGE.*/DTIM_RANGE 34\'h01FF/g" $(CONFIGDIR)/wally-config.vh
|
||||||
|
sed -i "s/IROM_RANGE.*/IROM_RANGE 34\'h01FF/g" $(CONFIGDIR)/wally-config.vh
|
||||||
|
else ifneq ($(filter $(CONFIG), $(DIRS64)),)
|
||||||
|
sed -i "s/DTIM_RANGE.*/DTIM_RANGE 56\'h01FF/g" $(CONFIGDIR)/wally-config.vh
|
||||||
|
sed -i "s/IROM_RANGE.*/IROM_RANGE 56\'h01FF/g" $(CONFIGDIR)/wally-config.vh
|
||||||
|
else
|
||||||
|
$(info $(CONFIG) does not exist in $(DIRS32) or $(DIRS64))
|
||||||
|
@echo "Config not in list, RAM_RANGE will be unmodified"
|
||||||
|
endif
|
||||||
|
|
||||||
|
# if USESRAM = 1, set that in the config file, otherwise reduce sizes
|
||||||
ifeq ($(USESRAM), 1)
|
ifeq ($(USESRAM), 1)
|
||||||
sed -i 's/USE_SRAM.*/USE_SRAM 1/g' $(CONFIGDIR)/wally-shared.vh
|
sed -i 's/USE_SRAM.*/USE_SRAM 1/g' $(CONFIGDIR)/wally-config.vh
|
||||||
else
|
else
|
||||||
sed -i 's/WAYSIZEINBYTES.*/WAYSIZEINBYTES 512/g' $(CONFIGDIR)/wally-config.vh
|
sed -i 's/WAYSIZEINBYTES.*/WAYSIZEINBYTES 512/g' $(CONFIGDIR)/wally-config.vh
|
||||||
sed -i 's/NUMWAYS.*/NUMWAYS 1/g' $(CONFIGDIR)/wally-config.vh
|
sed -i 's/NUMWAYS.*/NUMWAYS 1/g' $(CONFIGDIR)/wally-config.vh
|
||||||
sed -i 's/BPRED_SIZE.*/BPRED_SIZE 5/g' $(CONFIGDIR)/wally-config.vh
|
sed -i 's/BPRED_SIZE.*/BPRED_SIZE 5/g' $(CONFIGDIR)/wally-config.vh
|
||||||
|
ifneq ($(filter $(CONFIG), $(DIRS32)),)
|
||||||
ifneq ($(filter $(CONFIG), $(DIRS32)),)
|
sed -i "s/BOOTROM_RANGE.*/BOOTROM_RANGE 34\'h01FF/g" $(CONFIGDIR)/wally-config.vh
|
||||||
sed -i "s/DTIM_RANGE.*/DTIM_RANGE 34\'h01FF/g" $(CONFIGDIR)/wally-config.vh
|
sed -i "s/UNCORE_RAM_RANGE.*/UNCORE_RAM_RANGE 34\'h01FF/g" $(CONFIGDIR)/wally-config.vh
|
||||||
sed -i "s/IROM_RANGE.*/IROM_RANGE 34\'h01FF/g" $(CONFIGDIR)/wally-config.vh
|
else ifneq ($(filter $(CONFIG), $(DIRS64)),)
|
||||||
else ifneq ($(filter $(CONFIG), $(DIRS64)),)
|
sed -i "s/BOOTROM_RANGE.*/BOOTROM_RANGE 56\'h01FF/g" $(CONFIGDIR)/wally-config.vh
|
||||||
sed -i "s/DTIM_RANGE.*/DTIM_RANGE 56\'h01FF/g" $(CONFIGDIR)/wally-config.vh
|
sed -i "s/UNCORE_RAM_RANGE.*/UNCORE_RAM_RANGE 56\'h01FF/g" $(CONFIGDIR)/wally-config.vh
|
||||||
sed -i "s/IROM_RANGE.*/IROM_RANGE 56\'h01FF/g" $(CONFIGDIR)/wally-config.vh
|
endif
|
||||||
else
|
|
||||||
$(info $(CONFIG) does not exist in $(DIRS32) or $(DIRS64))
|
|
||||||
@echo "Config not in list, RAM_RANGE will be unmodified"
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# adjust config if synthesizing with any modifications
|
||||||
ifeq ($(MOD), FPUoff)
|
ifeq ($(MOD), FPUoff)
|
||||||
# turn off FPU
|
# turn off FPU
|
||||||
sed -i 's/1 *<< *3/0 << 3/' $(CONFIGDIR)/wally-config.vh
|
sed -i 's/1 *<< *3/0 << 3/' $(CONFIGDIR)/wally-config.vh
|
||||||
|
@ -9,22 +9,18 @@
|
|||||||
//
|
//
|
||||||
// Copyright (C) 2021 Harvey Mudd College & Oklahoma State University
|
// Copyright (C) 2021 Harvey Mudd College & Oklahoma State University
|
||||||
//
|
//
|
||||||
// MIT LICENSE
|
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
|
||||||
// software and associated documentation files (the "Software"), to deal in the Software
|
|
||||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
|
||||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
|
||||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
//
|
//
|
||||||
// The above copyright notice and this permission notice shall be included in all copies or
|
// Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file
|
||||||
// substantial portions of the Software.
|
// except in compliance with the License, or, at your option, the Apache License version 2.0. You
|
||||||
|
// may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
// https://solderpad.org/licenses/SHL-2.1/
|
||||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
//
|
||||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
// Unless required by applicable law or agreed to in writing, any work distributed under the
|
||||||
// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
// License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
// either express or implied. See the License for the specific language governing permissions
|
||||||
// OR OTHER DEALINGS IN THE SOFTWARE.
|
// and limitations under the License.
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
`include "wally-config.vh"
|
`include "wally-config.vh"
|
||||||
`include "tests-fp.vh"
|
`include "tests-fp.vh"
|
||||||
|
@ -10,20 +10,19 @@
|
|||||||
//
|
//
|
||||||
// Copyright (C) 2021 Harvey Mudd College & Oklahoma State University
|
// Copyright (C) 2021 Harvey Mudd College & Oklahoma State University
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
|
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||||
// files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
|
|
||||||
// modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
|
|
||||||
// is furnished to do so, subject to the following conditions:
|
|
||||||
//
|
//
|
||||||
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
// Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file
|
||||||
|
// except in compliance with the License, or, at your option, the Apache License version 2.0. You
|
||||||
|
// may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
// https://solderpad.org/licenses/SHL-2.1/
|
||||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
//
|
||||||
// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
|
// Unless required by applicable law or agreed to in writing, any work distributed under the
|
||||||
// OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
|
// either express or implied. See the License for the specific language governing permissions
|
||||||
// When letting Wally go for it, let wally make own interrupts
|
// and limitations under the License.
|
||||||
///////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
`include "wally-config.vh"
|
`include "wally-config.vh"
|
||||||
|
|
||||||
|
@ -11,22 +11,18 @@
|
|||||||
//
|
//
|
||||||
// Copyright (C) 2021 Harvey Mudd College & Oklahoma State University
|
// Copyright (C) 2021 Harvey Mudd College & Oklahoma State University
|
||||||
//
|
//
|
||||||
// MIT LICENSE
|
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
|
||||||
// software and associated documentation files (the "Software"), to deal in the Software
|
|
||||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
|
||||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
|
||||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
//
|
//
|
||||||
// The above copyright notice and this permission notice shall be included in all copies or
|
// Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file
|
||||||
// substantial portions of the Software.
|
// except in compliance with the License, or, at your option, the Apache License version 2.0. You
|
||||||
|
// may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
// https://solderpad.org/licenses/SHL-2.1/
|
||||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
//
|
||||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
// Unless required by applicable law or agreed to in writing, any work distributed under the
|
||||||
// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
// License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
// either express or implied. See the License for the specific language governing permissions
|
||||||
// OR OTHER DEALINGS IN THE SOFTWARE.
|
// and limitations under the License.
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
`include "wally-config.vh"
|
`include "wally-config.vh"
|
||||||
|
@ -11,22 +11,18 @@
|
|||||||
//
|
//
|
||||||
// Copyright (C) 2021 Harvey Mudd College & Oklahoma State University
|
// Copyright (C) 2021 Harvey Mudd College & Oklahoma State University
|
||||||
//
|
//
|
||||||
// MIT LICENSE
|
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
|
||||||
// software and associated documentation files (the "Software"), to deal in the Software
|
|
||||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
|
||||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
|
||||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
//
|
//
|
||||||
// The above copyright notice and this permission notice shall be included in all copies or
|
// Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file
|
||||||
// substantial portions of the Software.
|
// except in compliance with the License, or, at your option, the Apache License version 2.0. You
|
||||||
|
// may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
// https://solderpad.org/licenses/SHL-2.1/
|
||||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
//
|
||||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
// Unless required by applicable law or agreed to in writing, any work distributed under the
|
||||||
// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
// License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
// either express or implied. See the License for the specific language governing permissions
|
||||||
// OR OTHER DEALINGS IN THE SOFTWARE.
|
// and limitations under the License.
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
`include "wally-config.vh"
|
`include "wally-config.vh"
|
||||||
|
@ -1,3 +1,29 @@
|
|||||||
|
///////////////////////////////////////////
|
||||||
|
// tests0fo.vh
|
||||||
|
//
|
||||||
|
// Written: Katherine Parry 2022
|
||||||
|
// Modified:
|
||||||
|
//
|
||||||
|
// Purpose: List of floating-point tests to apply
|
||||||
|
//
|
||||||
|
// A component of the Wally configurable RISC-V project.
|
||||||
|
//
|
||||||
|
// Copyright (C) 2021-3 Harvey Mudd College & Oklahoma State University
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||||
|
//
|
||||||
|
// Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file
|
||||||
|
// except in compliance with the License, or, at your option, the Apache License version 2.0. You
|
||||||
|
// may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// https://solderpad.org/licenses/SHL-2.1/
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, any work distributed under the
|
||||||
|
// License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
|
// either express or implied. See the License for the specific language governing permissions
|
||||||
|
// and limitations under the License.
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
`define PATH "../../tests/fp/vectors/"
|
`define PATH "../../tests/fp/vectors/"
|
||||||
`define ADD_OPCTRL 3'b110
|
`define ADD_OPCTRL 3'b110
|
||||||
`define MUL_OPCTRL 3'b100
|
`define MUL_OPCTRL 3'b100
|
||||||
|
@ -10,18 +10,19 @@
|
|||||||
//
|
//
|
||||||
// Copyright (C) 2021 Harvey Mudd College & Oklahoma State University
|
// Copyright (C) 2021 Harvey Mudd College & Oklahoma State University
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
|
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||||
// files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
|
|
||||||
// modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
|
|
||||||
// is furnished to do so, subject to the following conditions:
|
|
||||||
//
|
//
|
||||||
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
// Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file
|
||||||
|
// except in compliance with the License, or, at your option, the Apache License version 2.0. You
|
||||||
|
// may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
// https://solderpad.org/licenses/SHL-2.1/
|
||||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
//
|
||||||
// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
|
// Unless required by applicable law or agreed to in writing, any work distributed under the
|
||||||
// OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
///////////////////////////////////////////
|
// either express or implied. See the License for the specific language governing permissions
|
||||||
|
// and limitations under the License.
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
`define IMPERASTEST "0"
|
`define IMPERASTEST "0"
|
||||||
`define RISCVARCHTEST "1"
|
`define RISCVARCHTEST "1"
|
||||||
@ -1883,6 +1884,7 @@ string imperas32f[] = '{
|
|||||||
|
|
||||||
string custom[] = '{
|
string custom[] = '{
|
||||||
`CUSTOM,
|
`CUSTOM,
|
||||||
|
"debug",
|
||||||
"simple",
|
"simple",
|
||||||
"cacheTest"
|
"cacheTest"
|
||||||
};
|
};
|
||||||
|
27
tests/custom/debug/Makefile
Normal file
27
tests/custom/debug/Makefile
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||||
|
|
||||||
|
TARGET = debug
|
||||||
|
|
||||||
|
$(TARGET).elf.memfile:$(TARGET).elf $(TARGET).elf.objdump.addr
|
||||||
|
riscv64-unknown-elf-elf2hex --bit-width $(if $(findstring rv64,$*),64,32) --input $< --output $@
|
||||||
|
|
||||||
|
$(TARGET).elf.objdump.addr: $(TARGET).elf.objdump
|
||||||
|
extractFunctionRadix.sh $<
|
||||||
|
|
||||||
|
$(TARGET).elf.objdump: $(TARGET).elf
|
||||||
|
riscv64-unknown-elf-objdump -D $(TARGET).elf > $(TARGET).elf.objdump
|
||||||
|
|
||||||
|
$(TARGET).elf: $(TARGET).S Makefile
|
||||||
|
riscv64-unknown-elf-gcc -g -o $(TARGET).elf -march=rv64gc -mabi=lp64 -mcmodel=medany \
|
||||||
|
-nostartfiles -T$(WALLY)/examples/link/link.ld $(TARGET).S
|
||||||
|
|
||||||
|
sim:
|
||||||
|
spike --isa=rv64gc +signature=$(TARGET).signature.output +signature-granularity=8 $(TARGET).elf
|
||||||
|
diff --ignore-case $(TARGET).signature.output $(TARGET).reference_output || exit
|
||||||
|
echo "Signature matches! Success!"
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(TARGET).elf $(TARGET).elf.*
|
||||||
|
|
||||||
|
|
||||||
|
|
57
tests/custom/debug/debug.S
Normal file
57
tests/custom/debug/debug.S
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
// debug.S
|
||||||
|
// David_Harris@hmc.edu 4 February 2023
|
||||||
|
// Small code snippets for the purpose of debugging issues
|
||||||
|
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||||
|
|
||||||
|
.global rvtest_entry_point
|
||||||
|
rvtest_entry_point:
|
||||||
|
|
||||||
|
# openhwgroup/cvw Issue #55
|
||||||
|
la a6, begin_signature
|
||||||
|
la a7, rvtest_data
|
||||||
|
fadd.d ft0, ft1, ft2
|
||||||
|
fld f4, 0(a7)
|
||||||
|
fld f9, 8(a7)
|
||||||
|
# li x1, 0x7ff0000000000001
|
||||||
|
# sd x1, 0(a6)
|
||||||
|
# fmv.w.x f4, x1
|
||||||
|
# li x1, 0x7ff8000000000000
|
||||||
|
# fmv.w.x f9, x1
|
||||||
|
fsgnjx.s f12,f9,f4 # expected f 0xffffffff7fc00000
|
||||||
|
fsd f12, 0(a6)
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# HTIF and signature
|
||||||
|
#########################
|
||||||
|
|
||||||
|
write_tohost:
|
||||||
|
la t1, tohost
|
||||||
|
li t0, 1 # 1 for success, 3 for failure
|
||||||
|
sd t0, 0(t1) # send success code
|
||||||
|
|
||||||
|
self_loop:
|
||||||
|
j self_loop # wait
|
||||||
|
|
||||||
|
.align 6
|
||||||
|
.section .tohost
|
||||||
|
tohost: # write to HTIF
|
||||||
|
.dword 0
|
||||||
|
fromhost:
|
||||||
|
.dword 0
|
||||||
|
|
||||||
|
.align 6
|
||||||
|
.data
|
||||||
|
|
||||||
|
rvtest_data:
|
||||||
|
.dword 0x7ff0000000000001
|
||||||
|
.dword 0x7ff8000000000000
|
||||||
|
|
||||||
|
.EQU XLEN,64
|
||||||
|
begin_signature:
|
||||||
|
.fill 2*(XLEN/32),4,0xdeadbeef #
|
||||||
|
end_signature:
|
||||||
|
|
||||||
|
# Initialize stack with room for 512 bytes
|
||||||
|
.bss
|
||||||
|
.space 512
|
||||||
|
topofstack:
|
Loading…
Reference in New Issue
Block a user