You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* vip: Various fixes for VCS, bump AXI
* cheshire_pkg: Replace parameter by variables inside function
* vcs: Add first version of vcs scripts
* ci: Add vcs to CI
* sim: Some cleanup
* docs: Document simulation using VCS
* Bender.yml: Update to newest AXI version
* make: Use Bender flags variable for VCS compile script
---------
Co-authored-by: Paul Scheffler <paulsc@iis.ee.ethz.ch>
Copy file name to clipboardExpand all lines: docs/tg/sim.md
+23-3Lines changed: 23 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ This page describes how to simulate Cheshire to *execute baremetal programs*. Pl
5
5
We currently provide working setups for:
6
6
7
7
- Questa Advanced Simulator (QuestaSim) `>= 2022.3`
8
+
- VCS `>= 2024.09`
8
9
9
10
We plan on supporting more simulators in the future. If your situation requires it, simulating Cheshire on other setups should be straightforward.
10
11
@@ -21,21 +22,21 @@ We provide a SystemVerilog testbench for `cheshire_soc` running baremetal progra
21
22
22
23
Preloading boot modes expect an ELF executable to be passed through `BINARY`, while autonomous boot modes expect a disk image (GPT formatted or raw code) to be passed through `IMAGE`. For more information on how to build software for Cheshire and its boot process, see [Software Stack](../um/sw.md).
23
24
24
-
The `SELCFG`environment variable selects the Cheshire configuration used in simulations. Possible configurations are specified in the `tb_cheshire_pkg` package. If not set or set to `0`, the default configuration is selected.
25
+
The `SELCFG` variable selects the Cheshire configuration used in simulations. Possible configurations are specified in the `tb_cheshire_pkg` package. If not set or set to `0`, the default configuration is selected.
The `USE_DRAMSYS`environment variable controls whether simulations are linked against and use DRAMSys for DRAM simulation. Note that before starting a simulation using DRAMSys, it must be built with `make chs-dramsys-all` first.
33
+
The `USE_DRAMSYS` variable controls whether simulations are linked against and use DRAMSys for DRAM simulation. Note that before starting a simulation using DRAMSys, it must be built with `make chs-dramsys-all` first.
33
34
34
35
For simulation of Cheshire in other designs, we provide the module `cheshire_vip` encapsulating all verification IPs and their interfaces. For details, see [Verifying Cheshire In-System](integr.md#verifying-cheshire-in-system).
35
36
36
37
## QuestaSim
37
38
38
-
After building Cheshire, start QuestaSim in `target/sim/vsim` and run:
39
+
Variables are read from QuestaSim's Tcl environment. After building Cheshire, start QuestaSim in `target/sim/vsim` and run:
39
40
40
41
```tcl
41
42
# Preload `helloworld.spm.elf` through serial link
@@ -52,3 +53,22 @@ run -all
52
53
```
53
54
54
55
The design needs to be recompiled only when hardware is changed. The simulation can be restarted by re-sourcing `start.cheshire_soc.tcl`, allowing binary (or image) and load method changes beforehand.
56
+
57
+
## VCS
58
+
59
+
Variables are read from your shell environment. After building Cheshire, start a POSIX-compliant shell in `target/sim/vcs` and run:
60
+
61
+
```sh
62
+
# Preload `helloworld.spm.elf` through serial link
The design needs to be recompiled only when hardware is changed. The simulation can be run repeatedly using `start.cheshire_soc.sh`, allowing binary (or image) and load method changes beforehand.
0 commit comments