Skip to content

Commit

Permalink
[MK]: Add make targets to build/clean the entire chimera SoC (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lore0599 authored Nov 26, 2024
1 parent 233863c commit ba901e9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,21 @@ are not empty.


To install the required python packages into your environment and setup dependencies, you can run
```
``` shell
pip install -r requirements.txt

bender checkout

```
If you have all needed dependencies and you want to build the entire Chimera SoC, both RTL and SW, just run

``` shell
make chim-all
```
If you want to build the system step by step, all the necessary make targets are listed below:

To build Cheshire and Snitch run
``` shell
make chs-hw-init
make snitch-hw-init
```
Expand Down
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 ba901e9

Please sign in to comment.