[make] Add CS Register testbench targets

New targets to build and run the testbench.
Minor cleanup for parallel make runs.
This commit is contained in:
Tobias Wölfel 2019-11-26 09:23:03 +01:00 committed by Tobias Woelfel
parent 845c9aa38c
commit e5ee5fa81a

View file

@ -7,7 +7,8 @@ help:
@echo "or how to set-up the different environments."
# Use a parallel run (make -j N) for a faster build
build-all: build-riscv-compliance build-simple-system build-arty
build-all: build-riscv-compliance build-simple-system build-arty \
build-csr-test
# RISC-V compliance
@ -31,13 +32,13 @@ sw-simple-hello: $(simple-system-program)
.PHONY: $(simple-system-program)
$(simple-system-program):
make -C examples/sw/simple_system/hello_test
cd examples/sw/simple_system/hello_test && $(MAKE)
Vibex_simple_system = \
build/lowrisc_ibex_ibex_simple_system_0/sim-verilator/Vibex_simple_system
$(Vibex_simple_system):
@echo "$@ not found"
@echo "Run \"make build-simple-system\" to created the dependency"
@echo "Run \"make build-simple-system\" to create the dependency"
@false
run-simple-system: sw-simple-hello | $(Vibex_simple_system)
@ -54,7 +55,7 @@ sw-led: $(arty-sw-program)
.PHONY: $(arty-sw-program)
$(arty-sw-program):
make -C examples/sw/led
cd examples/sw/led && $(MAKE)
build-arty: sw-led
fusesoc --cores-root=. run --target=synth --setup --build \
@ -69,3 +70,24 @@ program-arty:
.PHONY: lint-core-tracing
lint-core-tracing:
fusesoc --cores-root . run --target=lint lowrisc:ibex:ibex_core_tracing
# CS Registers testbench
# Use the following targets:
# - "build-csr-test"
# - "run-csr-test"
.PHONY: build-cs-registers
build-csr-test:
fusesoc --cores-root=. run --target=sim --setup --build \
--tool=verilator lowrisc:ibex:tb_cs_registers
Vtb_cs_registers = \
build/lowrisc_ibex_tb_cs_registers_0/sim-verilator/Vtb_cs_registers
$(Vtb_cs_registers):
@echo "$@ not found"
@echo "Run \"make build-csr-test\" to create the dependency"
@false
.PHONY: run-cs-registers
run-csr-test: | $(Vtb_cs_registers)
fusesoc --cores-root=. run --target=sim --run \
--tool=verilator lowrisc:ibex:tb_cs_registers