chipsalliance / chipsalliance/dromajo

Issue Running Ariane Co-Simulation Tutorial: Bootram File Loading Problem

Open
#89 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
244
Forks
69
PR merge metrics
No merged PRs in 30d

Description

Hi,
I hope this isn't too much of a beginner's question, but I ran into a problem while following the Ariane co-simulation tutorial.

I rolled all the repositories back to the December 2019 versions, when the tutorial was made: dromajo, ariane, verilator, etc. I was able to compile the project successfully, but I couldn't get it to run.

In step 4 of the tutorial, there's a patch to add a bootram file to the Ariane core, which looks like this:
```
// sync with dromajo
if ($value$plusargs("checkpoint=%s", f_name)) begin
hex_file = $fopen({f_name,".bootram.hex"}, "r");
while (!$feof(hex_file)) begin
num_bytes = $fscanf(hex_file, "%d %h\n", address, value);
$display("%d %h", address, value);
mem[address] = value;
end
$display("Done syncing RAM with dromajo...\n");
end else begin
$display("Dromajo error: provide path to a checkpoint.\n");
end
end
```
I couldn't load the file for two reasons:

1. There are no .bootram.hex files generated—dromajo only produces .bootram files when saving a checkpoint.
2. The .bootram files appear to be binary, but (if I'm understanding SystemVerilog correctly) $fscanf seems to only support reading text files.
Could you clarify if there's a step missing in the tutorial or if any additional modifications are needed to process the .bootram files correctly?

Thank you for your help!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with step 4 of the Ariane co-simulation tutorial and the shown bootram-loading patch. Compare the .bootram files produced by dromajo checkpoints with the SystemVerilog $fscanf-based loader; the issue is resolved when the tutorial documents or provides a working way to load the checkpoint memory file.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.