Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ELF-based-loadmem | architectural restartable checkpoints #1438

Merged
merged 46 commits into from
May 8, 2023
Merged

Conversation

jerryz123
Copy link
Contributor

@jerryz123 jerryz123 commented Apr 12, 2023

Misc:

  • Fixes DMI-based SpikeTile bringup
  • Switches to 2 memory channels in default config (this improves coverage of example configs)
  • Fixes multi-channel DRAM model to not mmap more memory than needed

Loadmem:

  • Loadmem now uses ELF files and fesvr's elfloader to perform memory initialization, instead of reading giant hex files. Generating giant plaintext hex files for large memory configs is slow and storage-intensive.
  • legacy -hex targets are kept around, but are aliases of setting LOADMEM=1
  • LOADMEM=1 is now the preferred way to use loadmem

Architectural checkpointing:

  • Checkpoints can be generated from spike using scripts/generate-ckpt.sh
  • Checkpoints can be reloaded into dmi-based configs with some flags

Ex: Run hello.riscv in spike for 100 cycles, generate checkpoint, then reload in dmiRocketConfig

cd sims/vcs
../../scripts/generate-ckpt.sh -b ../../tests/hello.riscv -c 100
make CONFIG=dmiRocketConfig run-binary LOADARCH=hello.riscv.0x80000000.100.loadarch

Related PRs / Issues:

Type of change:

  • Bug fix
  • New feature
  • Other enhancement

Impact:

  • RTL change
  • Software change (RISC-V software)
  • Build system change
  • Other

Contributor Checklist:

  • Did you set main as the base branch?
  • Is this PR's title suitable for inclusion in the changelog and have you added a changelog:<topic> label?
  • Did you state the type-of-change/impact?
  • Did you delete any extraneous prints/debugging code?
  • Did you mark the PR with a changelog: label?
  • (If applicable) Did you update the conda .conda-lock.yml file if you updated the conda requirements file?
  • (If applicable) Did you add documentation for the feature?
  • (If applicable) Did you add a test demonstrating the PR?
  • (If applicable) Did you mark the PR as Please Backport?

.github/scripts/run-tests.sh Outdated Show resolved Hide resolved
common.mk Show resolved Hide resolved
docs/Simulation/Software-RTL-Simulation.rst Outdated Show resolved Hide resolved
docs/Simulation/Software-RTL-Simulation.rst Show resolved Hide resolved
generators/chipyard/src/main/resources/csrc/cospike_dtm.h Outdated Show resolved Hide resolved
scripts/generate-ckpt.sh Outdated Show resolved Hide resolved
scripts/generate-ckpt.sh Outdated Show resolved Hide resolved
scripts/generate-ckpt.sh Show resolved Hide resolved
scripts/generate-ckpt.sh Outdated Show resolved Hide resolved
scripts/generate-ckpt.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@abejgonzalez abejgonzalez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, LGTM

scripts/generate-ckpt.sh Outdated Show resolved Hide resolved
.github/scripts/run-tests.sh Outdated Show resolved Hide resolved
@jerryz123
Copy link
Contributor Author

As @tianrui-wei pointed out, cospike memory contents should be initialized to match SimDRAM. This necessitated fixing the SimDRAM multi-channel duplication bug as well.

Copy link
Member

@tianrui-wei tianrui-wei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for fixing dramsim related issues

@jerryz123 jerryz123 marked this pull request as ready for review May 7, 2023 22:57
@jerryz123 jerryz123 merged commit c4bc627 into main May 8, 2023
@jerryz123 jerryz123 deleted the tcdtm branch May 8, 2023 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants