Skip to content

Commit

Permalink
make: Add make variable for Bender RTL flags
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsc96 committed Nov 14, 2024
1 parent 420e46b commit 5d9cef6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cheshire.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ CXX_PATH := $(shell which $(CXX))

VLOG_ARGS ?= -suppress 2583 -suppress 13314 -timescale 1ns/1ps

# Common Bender flags for Cheshire RTL
CHS_BENDER_RTL_FLAGS ?= -t rtl -t cva6 -t cv64a6_imafdcsclic_sv39

# Define used paths (prefixed to avoid name conflicts)
CHS_ROOT ?= $(shell $(BENDER) path cheshire)
CHS_REG_DIR := $(shell $(BENDER) path register_interface)
Expand Down Expand Up @@ -143,7 +146,7 @@ CHS_BOOTROM_ALL += $(CHS_ROOT)/hw/bootrom/cheshire_bootrom.sv $(CHS_ROOT)/hw/boo
##############

$(CHS_ROOT)/target/sim/vsim/compile.cheshire_soc.tcl: $(CHS_ROOT)/Bender.yml
$(BENDER) script vsim -t sim -t cv64a6_imafdcsclic_sv39 -t test -t cva6 -t rtl --vlog-arg="$(VLOG_ARGS)" > $@
$(BENDER) script vsim -t sim -t test $(CHS_BENDER_RTL_FLAGS) --vlog-arg="$(VLOG_ARGS)" > $@
echo 'vlog "$(realpath $(CHS_ROOT))/target/sim/src/elfloader.cpp" -ccflags "-std=c++11" -cpppath "$(CXX_PATH)"' >> $@

.PRECIOUS: $(CHS_ROOT)/target/sim/models
Expand Down
2 changes: 1 addition & 1 deletion target/xilinx/xilinx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ CHS_XILINX_IPS_genesys2 := clkwiz vio mig7s
CHS_XILINX_IPS_vcu128 := clkwiz vio ddr4

$(CHS_XILINX_DIR)/scripts/add_sources.%.tcl: $(CHS_ROOT)/Bender.yml
$(BENDER) script vivado -t fpga -t cv64a6_imafdcsclic_sv39 -t cva6 -t $* > $@
$(BENDER) script vivado -t fpga -t $* $(CHS_BENDER_RTL_FLAGS) > $@

define chs_xilinx_bit_rule
$$(CHS_XILINX_DIR)/out/%.$(1).bit: \
Expand Down

0 comments on commit 5d9cef6

Please sign in to comment.