Skip to content

[top,dv] Add a chip register model and the TileLink crossbar smoke test - #826

Merged
martin-velay merged 2 commits into
lowRISC:mainfrom
martin-velay:tl_xbar_smoke
Nov 26, 2026
Merged

martin-velay merged 2 commits into
lowRISC:mainfrom
martin-velay:tl_xbar_smoke

Conversation

@martin-velay

Copy link
Copy Markdown
Contributor

Closes #658.

Adds a chip register model to the top-level testbench, and a test that reaches one register in every xbar_peri device from the AXI driver that replaces CVA6.

  • top_chip_reg_block has one block per xbar_peri device at the base address from tl_peri_pkg, built the way topgen builds the chip model of an OpenTitan top. In the axi_driver_to_cva6_bridge build mode its frontdoor goes through the CVA6 AXI agent's register layer, and each block's backdoor is rooted at the device's instance in top_chip_system.
  • tl_xbar_smoke reads each register's reset value, writes its complement, reads it through the backdoor, reads it back, then restores the reset value and reads it again. The backdoor read catches a write that lands in another device with a register of the same shape at the same offset, which the frontdoor reads alone miss. The test is in the smoke regression.

The issue counts 13 peripherals. xbar_peri has 12 devices, since KMAC has no TL-UL register interface in this top.

Tested with Xcelium. The smoke regression passes apart from the two rom_ctrl_smoke tests that #820 restores, and the first commit alone passes axi_driver_smoke and uart_smoke. tl_xbar_smoke fails when xbar_peri decodes the pwrmgr address to the timer, and when the UART and I2C ports are swapped in top_chip_system.

@tchilikov-semify tchilikov-semify left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks Martin

Comment thread hw/top_chip/dv/env/top_chip_dv_env.sv Resolved
Mocha's top has no topgen description, so nothing generates a chip
register model for it. Build one in the shape topgen gives an OpenTitan
chip model: one block per xbar_peri device, from the package ralgen
generates for that device, at the base address tl_peri_pkg gives it,
with its backdoor rooted at the device's instance in top_chip_system.

In the axi_driver_to_cva6_bridge build mode the environment runs the
CVA6 AXI agent's register layer and connects the model to it, so
csr_utils_pkg accesses reach the devices along the path a CVA6 load or
store takes. The base vseq resets the model's mirror when it resets the
chip.

Signed-off-by: Martin Velay <mvelay@lowrisc.org>
With the AXI driver in place of CVA6, reach one register in each of the
12 xbar_peri devices through the chip register model: read the reset
value, write its complement, read the register through the backdoor of
the device's instance, read it back, then write the reset value back
and read it again. rom_ctrl has nothing writable, so its DIGEST_0 is
read through both paths and must be non-zero.

The backdoor read catches a write that lands in a device with a register
of the same shape at the same offset, which the frontdoor reads miss.

Signed-off-by: Martin Velay <mvelay@lowrisc.org>
@martin-velay
martin-velay added this pull request to the merge queue Nov 26, 2026
Merged via the queue into lowRISC:main with commit cefbe07 Nov 26, 2026
6 checks passed
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.

TileLink crossbar DV - Top-level smoke test

2 participants