Skip to content

Commit

Permalink
Move testbench to test/backend
Browse files Browse the repository at this point in the history
  • Loading branch information
RootCubed committed Jul 1, 2024
1 parent 9fd01cc commit c6d6a3c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions idma.mk
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,8 @@ IDMA_VLT_ARGS := --cc \
IDMA_VLT_TOP ?=
IDMA_VLT_PARAMS ?=

IDMA_VLT_TEST_DIR := $(IDMA_ROOT)/test/backend

.PRECIOUS: $(IDMA_VLT_DIR)/%_elab.log

$(IDMA_VLT_DIR)/%_elab.log: $(IDMA_PICKLE_DIR)/sources.json
Expand All @@ -399,9 +401,8 @@ $(IDMA_VLT_DIR)/%_elab.log: $(IDMA_PICKLE_DIR)/sources.json
rm -f $(IDMA_VLT_DIR)/$(IDMA_VLT_TOP).sv.pre
cd $(IDMA_VLT_DIR); $(VERILATOR) $(IDMA_VLT_ARGS) $(IDMA_VLT_PARAMS) -Mdir obj_$* $(IDMA_VLT_TOP).sv --top-module $(IDMA_VLT_TOP) 2> $*_elab.log

$(IDMA_VLT_DIR)/idma.f: Bender.yml
mkdir -p $(IDMA_VLT_DIR)
$(BENDER) script verilator -t rtl -t idma_simulation -t snitch_cluster -t verilator -t verilator_test -DSYNTHESIS -DVERILATOR > $@
$(IDMA_VLT_TEST_DIR)/idma.f: Bender.yml
$(BENDER) script verilator -t rtl -t idma_simulation -t snitch_cluster -t verilator -t verilator_test > $@

idma_verilator_clean:
rm -rf $(IDMA_VLT_DIR)
Expand Down Expand Up @@ -486,6 +487,6 @@ idma_pickle_all: $(IDMA_PICKLE_ALL)

idma_hw_all: $(IDMA_FULL_RTL) $(IDMA_INCLUDE_ALL) $(IDMA_FULL_TB) $(IDMA_HJSON_ALL) $(IDMA_WAVE_ALL)

idma_sim_all: $(IDMA_VCS_DIR)/compile.sh $(IDMA_VSIM_DIR)/compile.tcl $(IDMA_VLT_DIR)/idma.f
idma_sim_all: $(IDMA_VCS_DIR)/compile.sh $(IDMA_VSIM_DIR)/compile.tcl $(IDMA_VLT_TEST_DIR)/idma.f

idma_all: idma_hw_all idma_sim_all idma_doc_all idma_pickle_all
4 changes: 1 addition & 3 deletions target/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
doc
morty
sim/verilator/*
!sim/verilator/driver.cpp
!sim/verilator/idma.sh
sim/verilator
3 changes: 3 additions & 0 deletions test/backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
obj_dir
*.f
*.vcd
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion test/backend/tb_idma_backend.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
`include "obi/typedef.svh"
`endif

`include "memory_types.svh"
`include "idma/typedef.svh"

`ifndef BACKEND_NAME
Expand Down

0 comments on commit c6d6a3c

Please sign in to comment.