Skip to content

Commit

Permalink
Sim: Create makefile target to run vsim simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
sermazz committed Sep 25, 2024
1 parent 063dccb commit a41aaa7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@ To rebuild the snitch bootrom:
## Simulation

```
cd target/sim/vsim
vsim
source setup.chimera_soc.tcl
source compile.tcl
source start.chimera_soc.tcl
make chim-sim-run
```

## CXX Formatting
Expand Down
19 changes: 19 additions & 0 deletions target/sim/sim.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@ chim_sim_mk=1

CHIM_SIM_DIR ?= $(CHIM_ROOT)/target/sim

# Simulation parameters
SELCFG ?= 0
# BOOTMODE ?=
# PRELMODE ?=
BINARY ?= $(CHIM_SW_DIR)/tests/testCluster.memisl.elf
# IMAGE ?=

# Run vsim simulation
.PHONY: car-vsim-sim-run
chim-sim-run: chim-sim
cd $(CHIM_SIM_DIR)/vsim && \
vsim -do " \
set SELCFG $(SELCFG); \
set BINARY $(BINARY); \
source $(CHIM_SIM_DIR)/vsim/compile.tcl; \
source $(CHIM_SIM_DIR)/vsim/start.chimera_soc.tcl; \
run -all; \
exit"

# Init vsim compilation
.PHONY: chim-sim
chim-sim: chim-hyperram-model $(CHIM_SIM_DIR)/vsim/compile.tcl
Expand Down
8 changes: 0 additions & 8 deletions target/sim/vsim/setup.chimera_soc.tcl

This file was deleted.

0 comments on commit a41aaa7

Please sign in to comment.