Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add torture run options to makefile #992

Merged
merged 10 commits into from
Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ include $(base_dir)/generators/cva6/cva6.mk
include $(base_dir)/generators/tracegen/tracegen.mk
include $(base_dir)/generators/nvdla/nvdla.mk
include $(base_dir)/tools/dromajo/dromajo.mk
include $(base_dir)/tools/torture.mk

jerryz123 marked this conversation as resolved.
Show resolved Hide resolved
#########################################################################################
# Prerequisite lists
Expand Down
16 changes: 14 additions & 2 deletions docs/Advanced-Concepts/Debugging-RTL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,20 @@ Torture tests
The RISC-V torture utility generates random RISC-V assembly streams, compiles them,
runs them on both the Spike functional model and the SW simulator, and verifies
identical program behavior. The torture utility can also be configured to run
continuously for stress-testing. The torture utility exists within the ``utilities``
directory.
continuously for stress-testing. The torture utility exists within the ``tools``
directory. To run torture test, run make in the simulation direcotry:
jerryz123 marked this conversation as resolved.
Show resolved Hide resolved

.. code-block:: shell

make CONFIG=CustomConfig torture

To run overnight test (repeated random tests), run

.. code-block:: shell

make CONFIG=CustomConfig TORTURE_ONIGHT_OPTIONS=<overnight options> torture-overnight

You can find the overnight options in `overnight/src/main/scala/main.scala` in the torture repo.

Firesim Debugging
---------------------------
Expand Down
2 changes: 1 addition & 1 deletion toolchains/esp-tools/riscv-isa-sim
Submodule riscv-isa-sim updated 213 files
2 changes: 1 addition & 1 deletion toolchains/riscv-tools/riscv-isa-sim
2 changes: 1 addition & 1 deletion tools/torture
18 changes: 18 additions & 0 deletions tools/torture.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
HELP_COMMANDS += \
" torture = run torture on the RTL testbench" \
" torture-overnight = run torture overnight tests (set OPTIONS to pass test options)"
jerryz123 marked this conversation as resolved.
Show resolved Hide resolved

#########################################################################################
# run torture rules
#########################################################################################
.PHONY: torture torture-overnight

torture: $(output_dir) $(sim)
$(MAKE) -C $(base_dir)/tools/torture/output clean
$(MAKE) -C $(base_dir)/tools/torture R_SIM=$(sim) gen rtest
cp -r $(base_dir)/tools/torture/output $(output_dir)/torture
rm $(output_dir)/torture/Makefile

TORTURE_ONIGHT_OPTIONS :=
torture-overnight: $(output_dir) $(sim)
$(MAKE) -C $(base_dir)/tools/torture R_SIM=$(sim) OPTIONS="$(TORTURE_ONIGHT_OPTIONS)" rnight