-
Notifications
You must be signed in to change notification settings - Fork 679
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1438 from ucb-bar/tcdtm
ELF-based-loadmem | architectural restartable checkpoints
- Loading branch information
Showing
31 changed files
with
615 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.. _checkpointing: | ||
|
||
Architectural Checkpoints | ||
========================= | ||
|
||
Chipyard supports generating architectural checkpoints using Spike. | ||
These checkpoints contain a snapshot of the architectural state of a RISC-V SoC at some point in the execution of a program. | ||
The checkpoints include the contents of cacheable memory, core architectural registers, and core CSRs. | ||
RTL simulations of SoCs can resume execution from checkpoints after restoring the architectural state. | ||
|
||
.. note:: | ||
Currently, only checkpoints of single-core systems are supported | ||
|
||
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 -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`` | ||
|
||
.. code:: | ||
scripts/generate-ckpt.sh -b tests/hello.riscv -i 1000 | ||
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. | ||
|
||
.. code:: | ||
cd sims/vcs | ||
make CONFIG=dmiRocketConfig run-binary LOADARCH=../../hello.riscv.0x80000000.1000.loadarch | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.