lowRISC / lowRISC/opentitan

[top] "rom" interface of "rv_dm" is not a memory in top_earlgrey.hjson

Open
#14,345 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Earlgrey-PROD Candidate TOP:earlgrey
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

Noticed this while working on #14336 and discussed offline with @tjaychen. Currently, the entry for rv_dm [here](https://github.com/lowRISC/opentitan/blob/1447b4853447dffbc0193b5aab27d96012f950ff/hw/top_earlgrey/data/top_earlgrey.hjson#L572) looks like this:

```
{ name: "rv_dm",
type: "rv_dm",
clock_srcs: {clk_i: "main"},
clock_group: "infra",
reset_connections: {rst_ni: "lc"},
param_decl: {
IdcodeValue: "jtag_id_pkg::JTAG_IDCODE",
}
// Note that this module also contains a bus host.
base_addrs: {rom: "0x00010000", regs: "0x41200000"}
},
```
which doesn't create a memory.

As a result, it is not included in the return value of `TopGenC::memories()` and required a minor workaround in #14336.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open hw/top_earlgrey/data/top_earlgrey.hjson and inspect the rv_dm entry's base_addrs alongside the logic used by TopGenC::memories(). Confirm the corrected representation causes the rom interface to appear in TopGenC::memories(), without needing the workaround noted in #14336.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.