Skip to content

Commit

Permalink
[MK]: Add make targets to build/clean the entire chimera SoC
Browse files Browse the repository at this point in the history
  • Loading branch information
Lore0599 committed Nov 20, 2024
1 parent 233863c commit cdf5f5a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 14 additions & 1 deletion chimera.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ CLINTCORES = 46
PLICCORES = 92
PLIC_NUM_INTRS = 92


.PHONY: update_plic
update_plic: $(CHS_ROOT)/hw/rv_plic.cfg.hjson
sed -i 's/src: .*/src: $(PLIC_NUM_INTRS),/' $<
Expand Down Expand Up @@ -78,10 +79,22 @@ chim-nonfree-init:
-include $(CHIM_ROOT)/bender.mk

# Necessary to build libchimera.a for bootrom.elf
# TODO: Here the make chim-sw cannot work properly FIND SOLUTION !!!!!
-include $(CHIM_ROOT)/sw/sw.mk

# Include subdir Makefiles
-include $(CHIM_ROOT)/utils/utils.mk
# Include target makefiles
-include $(CHIM_ROOT)/target/sim/sim.mk

#################################
# Phonies for the entire system #
#################################

CHIM_ALL += chs-hw-init snitch-hw-init chim-sw chim-bootrom-init chs-sim-all chim-sim
CHIM_CLEAN += chim-sw-clean chim-sim-clean

.PHONY: chim-all
chim-all: $(CHIM_ALL)

.PHONY: chim-clean
chim-clean: $(CHIM_CLEAN)
2 changes: 2 additions & 0 deletions target/sim/sim.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ $(CHIM_SIM_DIR)/models/s27ks0641/s27ks0641.sv:
HYP_USER_PRELOAD ?= 0
HYP0_PRELOAD_MEM_FILE ?= ""


CHIM_VLOG_ARGS += -suppress 2583 -suppress 13314
CHIM_VLOG_ARGS += +define+HYP_USER_PRELOAD="$(HYP_USER_PRELOAD)"
CHIM_VLOG_ARGS += +define+HYP0_PRELOAD_MEM_FILE=\"$(HYP0_PRELOAD_MEM_FILE)\"
# this path should be kept relative to the vsim directory to avoid CI issues:
Expand Down

0 comments on commit cdf5f5a

Please sign in to comment.