Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alex96295 committed Jan 24, 2024
1 parent 3b410c6 commit 64e1339
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,22 @@ make car-all
and then run a [simulation](https://pulp-platform.github.io/carfield/tg/sim) with Questasim by
typing:

```
```tcl
cd target/sim/vsim
make car-vsim-sim-build
cd target/sim/vsim && car-vsim-sim-run CHS_BINARY=../../../sw/tests/bare-metal/hostd/helloworld.car.l2.elf
make car-vsim-sim-run CHS_BINARY=../../../sw/tests/bare-metal/hostd/helloworld.car.l2.elf
```

---

To display the main *Make* build targets and their usage, from the root repository type:

```
```tcl
make help
```

The Make files are autodocumented.

## License

Unless specified otherwise in the respective file headers, all code checked into this repository is
Expand Down
24 changes: 21 additions & 3 deletions docs/tg/sim.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,35 @@ an example with `Serial Link` passive preload of a baremetal program `helloworld
executed on the *host domain* (Cheshire, i.e., `X=CHS`):

```tcl
# Initialize Carfield
make car-init-all
# Enter Questasim folder
cd target/sim/vsim
# Compile the design
make car-vsim-sim-build
# Preload `helloworld.car.l2.elf` in passive bootmode through serial link, then start the simulation
cd target/sim/vsim && make car-vsim-sim-run CHS_BOOTMODE=0 CHS_PRELMODE=1 CHS_BINARY=../../../sw/tests/bare-metal/hostd/helloworld.car.l2.elf
make car-vsim-sim-run CHS_BOOTMODE=0 CHS_PRELMODE=1 CHS_BINARY=../../../sw/tests/bare-metal/hostd/helloworld.car.l2.elf
```

The design needs to be recompiled only when hardware is changed.

To clean simulation builds, from the `vsim` folder run

```tcl
make car-vsim-sim-clean
```

To display general help for each *Make* target, type

```tcl
make help
```

### Debugging

Per default, Questasim compilation is performance-optimised, and GUI and simulation logging are
disabled. To enable full visibility, logging, and the Questa GUI, set `DEBUG=1` when executing the
steps above.
disabled. To enable full visibility, logging, and the Questa GUI, set `DEBUG=1` when launching the
simulation.

0 comments on commit 64e1339

Please sign in to comment.