Skip to content

co-simulation with dromajo

Eclipse Webmaster requested to merge github/fork/masc-ucsc/dromajo-cosim into master

Created by: kabylkas

Hi 👋

If short, with this change you can run co-simulation with the following:

make verilate DROMAJO=1
make run-dromajo-verilator BIN=/path/to/bin

As we had been discussing via email, this patch implements dromajo co-simulation flow that is depicted in the figure below. image

  1. Load the binary of interest into Dromajo.
  2. Run Dromajo stand alone and let a couple of instructions to complete.
  3. Dump the checkpoint. This is the whole architectural state of the reference model. Dromajo dumps the main and boot memories. In addition, it generates a boot code. If you were to run that code it will restore the whole architectural state. This means that you can bring any two or more cores into complete synced architectural state by running this piece of code.
  4. Load the checkpoint into the RTL memory and the instance of Dromajo in RTL. Dromajo gets linked to a simulator as a shared library. RTL communicates to Dromajo through set of DPI calls.
  5. Run the RTL simulation and perform co-simulation.

Please let me know if you want me to remove/add/change anything.

(P.S. Sorry, I have completed this a while back but barely had time to clean it up for the pull request.)

Merge request reports

Loading