Skip to content

idma: Streamline TCDM connection, enable multi-channel operation - #330

Open
gbellocchi wants to merge 66 commits into
pulp-platform:developfrom
gbellocchi:gb/idma_tcdm_multich_develop
Open

idma: Streamline TCDM connection, enable multi-channel operation#330
gbellocchi wants to merge 66 commits into
pulp-platform:developfrom
gbellocchi:gb/idma_tcdm_multich_develop

Conversation

@gbellocchi

@gbellocchi gbellocchi commented Aug 4, 2026

Copy link
Copy Markdown

Description

This PR updates the iDMA integration within the Snitch cluster, as shown in Figures 1 and 2.
It is a refreshed version of PR #238 , which had fallen behind the main snitch cluster branch due to being open for a long period, and a continuation of PR #322.

New features include:

  • The wide SoC port directly connects to the TCDM subsystem, allowing external data access while DMA transfers run.
  • The wide DMA XBAR has been simplified.
  • The DMA uses the OBI protocol to connect to the TCDM subsystem.
  • Arbitration between the channels, the superbanks, and the SoC port happens now in TCDM, increasing flexibility and throughput. With minimal changes, it is possible to have multiple DMA cores in the cluster.
  • Add DMINIT support in Snitch cluster.
  • Add support for OBI events and performance counters.
  • Add L1-to-L1 and TLS tests to investigate TCDM deadlock.
  • Support iDMA after common-cells-v2 update.

Tasks

I have collected the tasks and reviewer comments/suggestions of PR #88:

  • Apply modifications of PR idma: Streamline TCDM connection, enable multi-channel operation #238 to the most recent version of the snitch_cluster.
  • Merge the corresponding idma branch into devel (PR #88).
  • Update custom_instructions.md.
  • Cut wide_in by default.
  • Fix failing Snitch CI tests.
  • Test iDMA after common-cells-v2 update.
  • Fix linting issues.
  • Fix Spyglass violation in common_cells.
  • Fix Spyglass violation in idma.
  • Check for (performance) regressions.
  • Check TCDM interconnect area utilization.
snitch_cluster_idma_pr_pre

Figure 1: Old integration of `idma`. The wide AXI4 XBAR interconnect is used for: (i) DMA interfaces to TCDM and SoC; (ii) NoC wide in/out; (iii) I$; (iv) Zero memory; and (v) BootROM.
snitch_cluster_idma_pr_post

Figure 2: New integration of `idma`. The wide AXI4 XBAR interconnect is simplified: (i) DMA interfaces to TCDM via OBI and wide AXI4 requests are transmitted to other clusters via the AXI4 XBAR (NoC wide out); (ii) Remove AXI4 TCDM port and directly interface the NoC wide inputs of external DMAs to the TCDM subsystem (bypassing the XBAR); (iii) Remove zero memory as the iDMA now supports memset initialization of TCDM.

gbellocchi and others added 30 commits June 2, 2026 23:12
* `axi_zero_mem` is removed because the idma can now initialize the memory to a desired value.
* Modify the wide cluster xbar address map based on the removal of the zero memory and the new idma-tcdm integration.
* Update the cluster and dma enums in the `snitch_pkg`.
The wide `soc_in_axi_req` is directly interfaced with the tcdm subsystem and bypasses the wide axi cluster xbar.
* `snitch_cluster`: Add memory and obi typedefs.
* `snitch_cluster`: Add obi-to-tcdm protocol conversion for dma requests toward the tcdm subsystem.
* `snitch_cluster`: Update interface of `snitch_cc` instance.
* `snitch_cc`: Instantiate `idma` with obi interfaces.
idma: Fix dminit opcode encoding and add TCDM tests
* Avoid the flattening of arrays in the tcdm dma interconnect.
* Fix deadlock in tcdm-to-tcdm idma transfers, which originates from the absence of p_valid for write transactions.

* Add write pipeline shift register (mirroring id_pipeline) for tracking whether an in-flight slot is a write.
* Add GUI version of `vsim` among the `run.py` simulators.

* Add `wave-file` argument to specify a corresponding wave file to automatically source when launching the `vsim-gui` simulator.

* Add support for wave argument in the generated `snitch_cluster.vsim.gui` script.
* Tie off the `obi_dma_req_o` when no DMA is instantiated in the `snitch_cc`.
* Tie off undriven signals to avoid having undefined behaviors.

* Add documentation for the obi-to-tcdm bridge.
* hw: Update hw configuration files and templates.

* hw: Remove commented lines in `snitch_cluster.sv` for address remapping after zeromem removal.

* sw: Update experiment json configuration files.
* Remove hardcoded reference to DM core as core 8.

* Update dma wait api.
* Map arrays to l1 in order to test l1-to-l1 dma transfers. To this end, use `snrt_l1_alloc()` to initialize `src` and `dst` arrays.

* Extend the range of traffic sizes to trigger the l1-to-l1 deadlock experienced with other kernels (exp).
* This test assesses proper tls initialization at runtime (sanity check) and modification at application-time (core isolation).
* This test concerns the traffic patterns used in `snrt_init_tls` at runtime.

* Parameters are currently tuned on the specific case of the `exp` kernel.
Fix failing tests originating from missing `register_interface` declaration after this was dropped in `idma`.
DiyouS and others added 21 commits August 5, 2026 11:26
Co-authored-by: Luca Colagrande <luca.colagrande3@gmail.com>
Co-authored-by: Gamze Islamoglu <gislamoglu@iis.ee.ethz.ch>
* Fix `snitch_ssr` failing tests originating from missing `register_interface` declaration after this was dropped in `idma`.
* Remove `ZeroMemory` parameters.

* WIP: The cluster address space still temporarily comprises the `ZeroMemory` addresses.
The current version of the IP does not expose a test port at its interface.
The new `idma` integration interfaces the wide cluster input interface directly to the TCDM subsystem. Thus, it is no longer required to expose a dedicated port on the wide AXI4 cluster XBAR.

This fix hence removes the hardcoded wide master port (1+...) in the definition of the `NrWideMasters` parameter.
Add a dedicated `xdma_mask` function that calculates a per-core bitmask of which cores enable the `Xdma` ISA extension.
`obi_to_tcdm` was invoking the `AMONone` parameter from the `reqrsp_pkg`, while this was moved to `snitch_pkg`.
Fix SYNTH_89 warning in spyglass into the `snitch_cluster` and concerning the definition of `enabled_dma_addr_rule`.
This is solved similarly to what previously done for `enabled_dma_xbar_rule` in a previous commit.
Since PR pulp-platform#328 excludes the tracer when DEBUG is not defined, then the tests fail. So, the experiments are now built with `DEBUG=ON` so the tracer is built and performance reports are generated.
Fix Spyglass error by breaking comb-loop in `idma`.
* This was initially removed when the `idma` RW interfaces was modified, since it was breaking performance counter tests.

* Fix miscellaneous linting errors.
Cut combinational loop between OBI interface and `idma` by substituing handshake-based flow control with credit-based. This solution substitutes the previously proposed one in the `idma` backend, which was more invasive as it affected all `idma` versions. To this end, the latter was also reverted to an older version.
Waive 'W123' and 'W287a' spyglass violations, which should be handled into `idma`.
DanielKellerM added a commit to pulp-platform/gwaihir that referenced this pull request Aug 12, 2026
Bender.yml iDMA -> __deploy__14dcdf1__devel: devel with common_cells v2
(iDMA #99) on top of the MX compute and the single-sourced compute_op
encoding, matching main's common_cells v2 base. The MX tests and compute
helpers move to the per-tile macro idiom of the reshaped heterogeneous-tile
address map (GW_L2_SPM_*(i), 4 KiB DMA window); the backend instantiation
drops testmode_i (cc-v2 iDMA removed the test-mode ports); snitch_cluster is
pinned to dk/idma070 (DanielKellerM fork), which threads the obi/init type
parameters iDMA 0.7.0 added to idma_inst64_top - an interim shim converging
with pulp-platform/snitch_cluster#330, to be dropped when it merges.
* Fix spyglass violation in `cc_stream_fifo_optimal_wrap`.
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.

4 participants