Skip to content

Commit

Permalink
Bump docs
Browse files Browse the repository at this point in the history
  • Loading branch information
abejgonzalez committed Jun 26, 2024
1 parent 893b65c commit d1687a1
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions docs/Advanced-Concepts/Architectural-Checkpoints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ RTL simulations of SoCs can resume execution from checkpoints after restoring th
Generating Checkpoints
------------------------

``scripts/generate-ckpt.sh`` is a script that runs spike with the right commands to generate an architectural checkpoint
``scripts/generate-ckpt.sh`` is a script that runs Spike with the right commands to generate an architectural checkpoint
``scripts/generate-ckpt.sh -h`` lists options for checkpoint generation.

Example: run the ``hello.riscv`` binary for 1000 instructions before generating a checkpoint.
This should produce a directory named ``hello.riscv.0x80000000.1000.loadarch``
This should produce a directory named ``hello.riscv.<number>.loadarch``

.. code::
Expand All @@ -29,10 +29,20 @@ Loading Checkpoints in RTL Simulation
--------------------------------------

Checkpoints can be loaded in RTL simulations with the ``LOADARCH`` flag.
The target config **MUST** use dmi-based bringup (as opposed to the default TSI-based bringup), and support fast ``LOADMEM``.
The target config should also match the architectural configuration of however spike was configured when generating the checkpoint.
The target config **MUST** use DMI-based bringup (as opposed to the default TSI-based bringup), and support fast ``LOADMEM``.
The target config should also match the architectural configuration of however Spike was configured when generating the checkpoint.

.. code::
cd sims/vcs
make CONFIG=dmiRocketConfig run-binary LOADARCH=../../hello.riscv.0x80000000.1000.loadarch
make CONFIG=dmiRocketConfig run-binary LOADARCH=../../hello.riscv.<number>.loadarch
Checkpointing Linux Binaries
----------------------------

Checkpoints can be used to run Linux binaries with the following caveats:
the binary must only use the HTIF console (i.e. the Rocket Chip Blocks UART can't be used),
and it must be built without a block device (built with an initramfs)(i.e. the IceBlk block device can't be used).
Additionally, by default Spike has a default UART device that is used during most Linux boot's.
This can be bypassed by creating a DTS without a serial device then passing it to the ``generate-ckpt.sh`` script
(you can copy the DTS of the design you want to checkpoint into - located in Chipyards ``sims/<simulator>/generated-src/`` - and modify it to pass to the checkpointing script).

0 comments on commit d1687a1

Please sign in to comment.