-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
124 additions
and
104 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 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 |
---|---|---|
|
@@ -55,7 +55,7 @@ chs-clean-deps: | |
###################### | ||
|
||
CHS_NONFREE_REMOTE ?= [email protected]:pulp-restricted/cheshire-nonfree.git | ||
CHS_NONFREE_COMMIT ?= e702b4ce754c3b7c9a864a2ce8e2d2fa013056ea | ||
CHS_NONFREE_COMMIT ?= 65f089e9218084e872009cf1c557965914cacf05 | ||
|
||
chs-nonfree-init: | ||
git clone $(CHS_NONFREE_REMOTE) $(CHS_ROOT)/nonfree | ||
|
@@ -158,3 +158,4 @@ chs-sim-all: $(CHS_ROOT)/target/sim/vsim/compile.cheshire_soc.tcl | |
############# | ||
|
||
include $(CHS_ROOT)/target/xilinx/xilinx.mk | ||
include $(CHS_XIL_DIR)/sim/simulate.mk |
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 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 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 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 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 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 |
---|---|---|
|
@@ -4,11 +4,13 @@ | |
# | ||
# Cyril Koenig <[email protected]> | ||
|
||
CHS_XIL_SIM_DIR ?= $(CHS_XIL_DIR)/sim | ||
|
||
XILINX_SIMLIB_PATH ?= ~/xlib_questa-2022.3_vivado-2022.1 | ||
SIMULATOR_PATH ?= /usr/pack/questa-2022.3-bt/questasim/bin | ||
GCC_PATH ?= /usr/pack/questa-2022.3-bt/questasim/gcc-7.4.0-linux_x86_64/bin | ||
|
||
ip-sim-scripts := $(addsuffix /questa/compile.do, $(addprefix sim/ips/, $(ips-names))) | ||
ip-sim-scripts := $(addsuffix /questa/compile.do, $(addprefix $(CHS_XIL_SIM_DIR)/ips/, $(ips-names))) | ||
|
||
# Pre-generated/modified example projects (contain the simulation top level) | ||
ifeq ($(BOARD),vcu128) | ||
|
@@ -18,37 +20,37 @@ ifeq ($(BOARD),genesys2) | |
ip-example-projects := xlnx_mig_7_ddr3_ex | ||
endif | ||
|
||
ip-example-sim-scripts := $(addsuffix /questa/compile.do, $(addprefix sim/ips/, $(ip-example-projects))) | ||
ip-example-sim-scripts := $(addsuffix /questa/compile.do, $(addprefix $(CHS_XIL_SIM_DIR)/ips/, $(ip-example-projects))) | ||
|
||
VIVADOENV_SIM := $(VIVADOENV) \ | ||
XILINX_SIMLIB_PATH=$(XILINX_SIMLIB_PATH) \ | ||
SIMULATOR_PATH=$(SIMULATOR_PATH) \ | ||
GCC_PATH=$(GCC_PATH) \ | ||
VIVADO_PROJECT=../${PROJECT}.xpr | ||
VIVADO_PROJECT=$(CHS_XIL_DIR)/${PROJECT}.xpr | ||
VLOG_ARGS := -suppress 2583 -suppress 13314 | ||
|
||
# Fetch example projects at IIS (containing SRAM behavioral models) | ||
sim/ips/%_ex/questa/compile.do: | ||
tar -xvf /usr/scratch2/wuerzburg/cykoenig/export/$*_ex.tar -C sim/ips | ||
$(CHS_XIL_SIM_DIR)/ips/%_ex/questa/compile.do: | ||
tar -xvf /usr/scratch2/wuerzburg/cykoenig/export/$*_ex.tar -C $(CHS_XIL_SIM_DIR)/ips | ||
|
||
# Generate simulation libraries | ||
$(XILINX_SIMLIB_PATH)/modelsim.ini: | ||
cd sim && $(VIVADOENV_SIM) vitis-2022.1 vivado -nojournal -mode batch -source setup_simulation.tcl -tclargs "compile_simlib" | ||
cd $(CHS_XIL_SIM_DIR) && $(VIVADOENV_SIM) vitis-2022.1 vivado -nojournal -mode batch -source setup_simulation.tcl -tclargs "compile_simlib" | ||
|
||
# | ||
sim/ips/%/questa/compile.do: | ||
cd sim && $(VIVADOENV_SIM) $(VIVADO) -nojournal -mode batch -source setup_simulation.tcl -tclargs "export_simulation" | ||
$(CHS_XIL_SIM_DIR)/ips/%/questa/compile.do: | ||
cd $(CHS_XIL_SIM_DIR) && $(VIVADOENV_SIM) $(VIVADO) -nojournal -mode batch -source setup_simulation.tcl -tclargs "export_simulation" | ||
|
||
scripts/add_sources_vsim.tcl: | ||
$(BENDER) script vsim -t sim -t test -t fpga -t cv64a6_imafdcsclic_sv39 -t cva6 $(bender-targets) --vlog-arg="$(VLOG_ARGS)" > $@ | ||
$(CHS_XIL_DIR)/scripts/add_sources_vsim.tcl: | ||
$(BENDER) script vsim -t sim -t test $(xilinx_targs) --vlog-arg="$(VLOG_ARGS)" > $@ | ||
|
||
sim: ${PROJECT}.xpr $(XILINX_SIMLIB_PATH)/modelsim.ini $(ip-example-sim-scripts) $(ip-sim-scripts) scripts/add_sources_vsim.tcl | ||
mkdir -p sim/questa_lib | ||
cp $(XILINX_SIMLIB_PATH)/modelsim.ini sim | ||
chmod +w sim/modelsim.ini | ||
cd sim && questa-2022.3 vsim -work work -do "run_simulation.tcl" | ||
chs-xil-sim: $(CHS_XIL_DIR)/${PROJECT}.xpr $(XILINX_SIMLIB_PATH)/modelsim.ini $(ip-example-sim-scripts) $(ip-sim-scripts) $(CHS_XIL_DIR)/scripts/add_sources_vsim.tcl | ||
mkdir -p $(CHS_XIL_SIM_DIR)/questa_lib | ||
cp $(XILINX_SIMLIB_PATH)/modelsim.ini $(CHS_XIL_SIM_DIR) | ||
chmod +w $(CHS_XIL_SIM_DIR)/modelsim.ini | ||
cd $(CHS_XIL_SIM_DIR) && questa-2022.3 vsim -work work -do "run_simulation.tcl" | ||
|
||
clean-sim: | ||
rm -rf sim/*.log sim/questa_lib sim/work sim/transcript sim/vsim.wlf scripts/vsim_cheshire.tcl sim/.Xil sim/modelsim.ini | ||
chs-xil-clean-sim: | ||
cd $(CHS_XIL_DIR) && rm -rf sim/*.log sim/questa_lib sim/work sim/transcript sim/vsim.wlf scripts/vsim_cheshire.tcl sim/.Xil sim/modelsim.ini | ||
|
||
.PHONY: clean-sim sim |
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.