Skip to content

[earlgrey/verilator] Integrate padring into chiplevel#30428

Open
glaserf wants to merge 2 commits into
lowRISC:masterfrom
glaserf:verilator-padring
Open

[earlgrey/verilator] Integrate padring into chiplevel#30428
glaserf wants to merge 2 commits into
lowRISC:masterfrom
glaserf:verilator-padring

Conversation

@glaserf

@glaserf glaserf commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

This PR is the first step towards auto-generating the Verilator chiplevels. These are currently all written by hand, which makes handling them during top/chiplevel restructuring like in #30076 a tedious and error-prone task.

The main challenge here is that Verilator uses a dummy padring, which does not contain any actual pads. Instead, the tb uses DPI modules to directly drive the various cio_* signals.

The strategy to achieve the above is therefore as follows:

  1. Create Verilator-specific dummy padring(s), which the chiplevel then instantiates for the Verilator target (to be created in a follow-up PR, see below).
  2. Connect to said padring through hierarchical module references (XMR) directly from the Verilator tb. This allows us to avoid a huge port list/map from said padring to the chiplevel boundary, which would inflate the shared chiplevel template greatly.
  3. Create the Verilator target within the various top_<name>.hjson files, which takes care of any target-specific pinout of the "logic" toplevels (which now coincide with power domains).
  4. Profit - delete the manually maintained Verilator chiplevels. Let topgen handle any updates, and auto-generate chip_<name>_verilator.sv.

This PR implements steps 1) and 2) for earlgrey.

@glaserf glaserf force-pushed the verilator-padring branch 2 times, most recently from f0e9113 to 873c9c4 Compare June 24, 2026 15:28
@glaserf glaserf marked this pull request as ready for review June 24, 2026 15:30
@glaserf glaserf requested a review from a team as a code owner June 24, 2026 15:30
@glaserf glaserf requested review from marnovandermaas and rswarbrick and removed request for a team and marnovandermaas June 24, 2026 15:30
glaserf added 2 commits June 25, 2026 13:02
Signed-off-by: Florian Glaser <glaserf@lowrisc.org>
This commit moves the dummy padring for Verilator from the testbench to
the chiplevel, and replaces the connections to/from the DPI modules with
hierarchical module references (XMRs).

Signed-off-by: Florian Glaser <glaserf@lowrisc.org>
@glaserf glaserf force-pushed the verilator-padring branch from 873c9c4 to 1c00795 Compare June 25, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant