chipsalliance / dromajo

RISC-V RV64GC emulator designed for RTL co-simulation
Apache License 2.0
210 stars 63 forks source link

adding support for saving checkpoint in ELF format #39

Closed nitinjaincse closed 3 years ago

nitinjaincse commented 3 years ago

This is work-in-progress. I will appreciate your feedback. The ELF checkpoint support comprises:

  1. creating elf checkpoint When "dromajo --save " is run, the elf file name -elf is created. Bootrom and Mainram are added to ELF .text and .data section respectively.
  2. loading the elf checkpoint using keyword "loadelf" dromajo --loadelf --maxinsns=2000000 boot.cfg
  3. During loading the elf file, riscv_cpu_deserialize reads the ELF sections and copies the respective data into the physical memory range
  4. Using ELFIO C++ headers library for creating sections, and reading when using loadelf keyword
renau commented 3 years ago

Interesting patch but still not there.