cvw/sim/sim-testfloat-verilator
2024-04-03 17:09:19 -07:00

28 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/bash
# sim-testfloat-verilator
# David_Harris@hmc.edu 3 April 2024
# Run Testfloat simulations with Verilator
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
# cvtint - test integer conversion unit (fcvtint)
# cvtfp - test floating-point conversion unit (fcvtfp)
# cmp - test comparison unit's LT, LE, EQ opperations (fcmp)
# add - test addition
# fma - test fma
# mul - test mult with fma
# sub - test subtraction
# div - test division
# sqrt - test square root
# all - test everything
#vsim -c -do "do testfloat.do fdqh_ieee_rv64gc $1"
verilator -GTEST="\"all\"" -GTEST_SIZE="\"all\"" --timescale "1ns/1ns" --timing --binary --top-module testbenchfp "-I../config/shared" "-I../config/deriv/fdqh_ieee_rv64gc" ../src/cvw.sv ../testbench/testbench-fp.sv ../src/fpu/*.sv ../src/fpu/*/*.sv ../src/generic/*.sv ../src/generic/flop/*.sv --relative-includes
#vlog +incdir+../config/deriv/$1 +incdir+../config/$1 +incdir+../config/shared ../src/cvw.sv ../testbench/testbench-fp.sv ../src/fpu/*.sv ../src/fpu/*/*.sv ../src/generic/*.sv ../src/generic/flop/*.sv -suppress 2583,7063,8607,2697
# Change TEST_SIZE to only test certain FP width
# values are QP, DP, SP, HP or all for all tests
#vsim -voptargs=+acc work.testbenchfp -GTEST=$2 -GTEST_SIZE="all"