Line 3... |
Line 3... |
#### ORPSoCv2 Testbenches Makefile ####
|
#### ORPSoCv2 Testbenches Makefile ####
|
#### ####
|
#### ####
|
#### Description ####
|
#### Description ####
|
#### ORPSoCv2 Testbenches Makefile, containing rules for ####
|
#### ORPSoCv2 Testbenches Makefile, containing rules for ####
|
#### configuring and running different tests on the current ####
|
#### configuring and running different tests on the current ####
|
#### ORPSoC design. ####
|
#### ORPSoC(v2) design. ####
|
#### ####
|
#### ####
|
#### To Do: ####
|
#### To Do: ####
|
#### - Verilator tests ####
|
#### * Arrange verilator make rules so that the whole thing ####
|
|
#### isn't recompiled when a single SystemC module is ####
|
|
#### updated. ####
|
|
#### * Test if each software test file gets made properly ####
|
|
#### * Expand software test-suite (uClibc, ecos tests, LTP?) ####
|
#### ####
|
#### ####
|
#### Author(s): ####
|
#### Author(s): ####
|
#### - jb, jb@orsoc.se ####
|
#### - jb, jb@orsoc.se ####
|
#### ####
|
#### ####
|
#### ####
|
#### ####
|
Line 53... |
Line 57... |
# make vlt-tests
|
# make vlt-tests
|
#
|
#
|
# Run all the software tests in the RTL model which has been
|
# Run all the software tests in the RTL model which has been
|
# converted into a cycle-accurate SystemC model with Verilator.
|
# converted into a cycle-accurate SystemC model with Verilator.
|
#
|
#
|
|
# make sim-tests
|
|
#
|
|
# Run all the software tests in the architectural simulator
|
|
#
|
|
|
# Simulation results:
|
# Simulation results:
|
#
|
#
|
# The results and output of the event-driven simulations are in the
|
# The results and output of the event-driven simulations are in the
|
# results path, in parallel to the simulation run and bin paths.
|
# results path, in parallel to the simulation run and bin paths.
|
Line 72... |
Line 80... |
#
|
#
|
# It is possible to enable printf to the console via the UART when
|
# It is possible to enable printf to the console via the UART when
|
# running the event-driven simulators. To do this define UART_PRINTF=1
|
# running the event-driven simulators. To do this define UART_PRINTF=1
|
# when calling make. The SystemC cycle-acccurate model uses this by
|
# when calling make. The SystemC cycle-acccurate model uses this by
|
# default.
|
# default.
|
|
# Also note when switching between runs with and without UART printf
|
|
# enabled, run a clean-sw so the library files are recompiled when
|
|
# the tests are run - this is not done automatically.
|
|
|
# VCDs:
|
# VCDs:
|
#
|
#
|
# VCD (value change dumps, usable in a waveform viewer, such as gtkwave
|
# VCD (value change dumps, usable in a waveform viewer, such as gtkwave
|
# to inspect the internals of the system graphically) files can be
|
# to inspect the internals of the system graphically) files can be
|
Line 86... |
Line 97... |
# and a dump file will be created in the simulation results directory,
|
# and a dump file will be created in the simulation results directory,
|
# and named according to the test run which generated it. This is
|
# and named according to the test run which generated it. This is
|
# possible for both event-driven and cycle-accurate simulations.
|
# possible for both event-driven and cycle-accurate simulations.
|
# However the cycle-accurate
|
# However the cycle-accurate
|
|
|
# The rtl simulations can also be run with Cadences NCSim by using
|
# NO_SIM_LOGGING:
|
# rtl-nc-tests in the place of rtl-tests.
|
#
|
|
# It is possible to speed up the event-driven simulation slightly by
|
|
# disabling log output of the processor's state to files by defining
|
|
# NO_SIM_LOGGING, eg:
|
|
#
|
|
# make rtl-tests TESTS=except-icdc NO_SIM_LOGGING=1
|
|
#
|
|
|
# It is possible to speed up the simulation slightly by disabling
|
# Cleaning:
|
# log output of the processor's state to files by defining
|
# A simple "make clean" cleans everything - software and all temporary
|
# NO_SIM_LOGGING, eg. make rtl-tests TESTS=except-icdc NO_SIM_LOGGING=1
|
# simulation files and directories. To clean just the software run:
|
|
#
|
|
# make clean-sw
|
|
#
|
|
# and to clean just the temporary simulation files (including VCDs,
|
|
# results logs - everything under, and including, sim/results/, run
|
|
#
|
|
# make clean-sim
|
|
#
|
|
|
|
# Note:
|
|
#
|
|
# The way each of the test loops is written is probably a bit overly complex
|
|
# but this is to save maintaining and calling other files to get this done.
|
|
#
|
|
|
# Name of the directory we're currently in
|
# Name of the directory we're currently in
|
CUR_DIR=$(shell pwd)
|
CUR_DIR=$(shell pwd)
|
|
|
# The root path of the whole project
|
# The root path of the whole project
|
Line 499... |
Line 529... |
|
|
################################################################################
|
################################################################################
|
# Cleaning rules
|
# Cleaning rules
|
################################################################################
|
################################################################################
|
|
|
|
clean: clean-sw clean-sim
|
|
|
clean-sw:
|
clean-sw:
|
@for TEST in $(TESTS); do \
|
@for TEST in $(TESTS); do \
|
echo "Current test: $$TEST"; \
|
echo "Current test: $$TEST"; \
|
CURRENT_TEST_SW_DIR=$(SW_DIR)/`echo $$TEST | cut -d "-" -f 1`; \
|
CURRENT_TEST_SW_DIR=$(SW_DIR)/`echo $$TEST | cut -d "-" -f 1`; \
|
echo "Current test sw directory: " $$CURRENT_TEST_SW_DIR; \
|
echo "Current test sw directory: " $$CURRENT_TEST_SW_DIR; \
|