-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shuffle around RTL simulation and unittest makefrags
- Loading branch information
1 parent
a1abbc1
commit 80137ec
Showing
8 changed files
with
441 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# VCS RTL Simulation Makefrag | ||
# | ||
# This makefrag stores common recipes for building RTL simulators with VCS | ||
# | ||
# Compulsory variables: | ||
# All those described Makefrag-verilator | ||
# vcs_wrapper_v: An additional verilog wrapper around the DUT not used in verilator | ||
# CLOCK_PERIOD: Self explanatory | ||
# TB := The top level module on which the stop and printf conditions are defined | ||
# | ||
|
||
VCS ?= vcs -full64 | ||
override VCS_FLAGS := -quiet -timescale=1ns/1ps +v2k +rad +vcs+initreg+random +vcs+lic+wait \ | ||
-notice -line +lint=all,noVCDE,noONGS,noUI -quiet -debug_pp +no_notifier -cpp $(CXX) \ | ||
-Mdir=$(GEN_DIR)/$(DESIGN)-debug.csrc \ | ||
+vc+list \ | ||
-CFLAGS "$(CXXFLAGS) $(CFLAGS) -DVCS -I$(VCS_HOME)/include" \ | ||
-LDFLAGS "$(LDFLAGS)" \ | ||
-sverilog \ | ||
+define+CLOCK_PERIOD=$(CLOCK_PERIOD) \ | ||
+define+RANDOMIZE_MEM_INIT \ | ||
+define+RANDOMIZE_REG_INIT \ | ||
+define+RANDOMIZE_GARBAGE_ASSIGN \ | ||
+define+RANDOMIZE_INVALID_ASSIGN \ | ||
+define+STOP_COND=!$(TB).reset \ | ||
+define+PRINTF_COND=!$(TB).reset \ | ||
$(VCS_FLAGS) | ||
|
||
vcs_v := $(emul_v) $(vcs_wrapper_v) | ||
|
||
$(OUT_DIR)/$(DESIGN): $(vcs_v) $(emul_cc) $(emul_h) | ||
mkdir -p $(OUT_DIR) | ||
rm -rf $(GEN_DIR)/$(DESIGN).csrc | ||
rm -rf $(OUT_DIR)/$(DESIGN).daidir | ||
$(VCS) $(VCS_FLAGS) \ | ||
-o $@ $(vcs_v) $(emul_cc) | ||
|
||
$(OUT_DIR)/$(DESIGN)-debug: $(vcs_v) $(emul_cc) $(emul_h) | ||
mkdir -p $(OUT_DIR) | ||
rm -rf $(GEN_DIR)/$(DESIGN)-debug.csrc | ||
rm -rf $(OUT_DIR)/$(DESIGN)-debug.daidir | ||
$(VCS) $(VCS_FLAGS) +define+DEBUG \ | ||
-o $@ $(vcs_v) $(emul_cc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.