Skip to content

Split the tile into a parametrized isle + NI/router, compliant with Ollivander - #109

Merged
AlessandroNadalini merged 9 commits into
mainfrom
lb/Collectives-Parametrize
Nov 9, 2026
Merged

AlessandroNadalini merged 9 commits into
mainfrom
lb/Collectives-Parametrize

Conversation

@luca24balboni

@luca24balboni luca24balboni commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Ollivander needs to integrate MAGIA's compute part without the tile's NoC interface and router. So this PR splits the tile into a reusable island, magia_isle, and makes it configurable through TileCfg.
It also makes the tile address map consistent with the NoC, turns every unmapped access into an error, and extends the Verilator flow to the standalone tile and CV32E40X.

magia_isle:
The isle holds the control core, L1, iDMA, RedMulE, Spatz CC, PULP cluster, the Event Unit and FractalSync.
It exposes narrow and wide AXI ports towards the outside, FractalSync ports, and the control-core Event Unit interrupt, for an external controller.
magia_tile is now NoC interface + router + magia_isle.

Parametrization:
The isle and the mesh are configured through TileCfg: RedMulE, Spatz CC and PULP cluster can each be turned on or off and sized per tile.
This makes heterogeneous meshes possible.
MAGIA_TILE_PERIPH_BASE and MAGIA_TILE_WINDOW_BASE let an integrator move the peripheral window and the tile windows.

Unified control port:
All control registers sit behind a single OBI crossbar port and are split by the new ctrl_demux: RedMulE, iDMA, FractalSync, Spatz, cluster, collectives.
Disabled units have no port: their range, and every hole in the control window, gets an OBI error from an obi_err_sbr.
OBI compliance: the iDMA and FractalSync control slaves now return rvalid one cycle after gnt, so no obi_cut is needed.

Address map:
L2 moves to 0xC000_0000, as in the NoC SAM, and 0xB000_0000 + tile window is an explicit collectives region (only with EnCollective).
The tile AXI crossbar has no default port anymore: anything outside tile windows, own L1, collectives, L2 and Spatz bootrom gets a DECERR.
Traffic from the NoC cannot go back into the NoC, so a wrong address no longer loops between a tile and the NoC or lands on L2 slice 0.
Region bounds are exclusive, as addr_decode expects: stack at 0x1_0000, L1 at 0x2_0000 up to the end of the 1 MiB window.

Error reporting:
In simulation, an OBI error from ctrl_demux or an AXI DECERR stops the test with a $fatal, instead of hanging or passing silently.

FractalSync:
It's selected at build time with make fsync=1/0 (MAGIA_FSYNC define).

Event Unit:
CV32E40X fix: the core issued the next load while a blocking Event Unit wait was still pending
The busy and error events are removed, only the done events need to wake the core.
event_unit_flex is bumped to lb/eu-two-outstanding, Spatz is bumped too.

Verilator:
mesh_dv=0 builds the standalone tile (magia_tile_tb, flat), next to the hierarchical mesh.
CV32E40X is supported, with its own build directory and RVFI trace.
Assertions are on by default; Ctrl-C and +STOP_AT close the FST.
run_regression.py and tests.yml run the tile tests and CV32E40X on Verilator too.
The tile testbench has a real reset edge, as 2-state simulators need.

Misc
All assertions are wrapped in ifndef SYNTHESIS.
Lint cleanup of the tile RTL: widths, case defaults, undriven fields, dead parameters.
The PULP and Spatz flat binaries include .bss, so crt0 no longer clears the code linked after it.

@luca24balboni luca24balboni self-assigned this Sep 30, 2026
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize branch 3 times, most recently from 8867a18 to 9c28052 Compare October 7, 2026 13:50
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize branch from 17f7ea3 to 03d4c29 Compare October 19, 2026 15:22
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize branch from 03d4c29 to 6ccf1f6 Compare October 19, 2026 15:27
@luca24balboni
luca24balboni marked this pull request as ready for review October 19, 2026 16:50
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize branch from 1ac1dc7 to e4ceda9 Compare October 19, 2026 17:12
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize branch from 7241a49 to a9864d3 Compare October 21, 2026 08:29
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize branch from a9864d3 to c1603e3 Compare October 21, 2026 08:59
Comment thread hw/mesh/magia.sv Resolved
Comment thread hw/tile/converters/obi2hwpe_ctrl.sv Resolved
Comment thread hw/tile/core_data_demux.sv Resolved
Comment thread hw/tile/core_data_demux.sv Resolved
Comment thread hw/tile/core_data_demux.sv Resolved
Comment thread hw/tile/core_data_demux.sv Resolved
Comment thread hw/tile/core_data_demux.sv Resolved
Comment thread hw/tile/core_data_demux.sv Resolved
Comment thread hw/tile/core_data_demux.sv Resolved
Comment thread hw/tile/ctrl_demux.sv Resolved
Comment thread hw/tile/magia_cluster_wrap.sv Resolved
Comment thread hw/tile/magia_cluster_wrap.sv Resolved
Comment thread hw/tile/magia_cluster_wrap.sv Resolved
Comment thread hw/tile/magia_cluster_wrap.sv Resolved
Comment thread hw/tile/magia_cluster_wrap.sv Resolved
Comment thread hw/tile/magia_isle.sv Resolved
Comment thread hw/tile/magia_isle.sv Resolved
Comment thread hw/tile/magia_isle.sv Resolved
Comment thread hw/tile/obi_demux_addr.sv Resolved
Comment thread hw/tile/spatz_cc_wrapper.sv Resolved
Comment thread spatz/README.md Resolved

@FrancescoConti FrancescoConti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ciao @luca24balboni generally good, there are some small fixes to make mostly for cleanup (e.g., non-idiomatic always_ff and some wrong license headers: maybe generated by an AI with an hangover? 🤣)

@luca24balboni

Copy link
Copy Markdown
Contributor Author

Ciao @FrancescoConti , thanks! Yeah, the headers were all messed up, AI (my bad) kept copy-pasting the same mistake everywhere. Now HW is under SolderPad and SW under Apache without mixtures. Fixed them all. Then I went through all your comments and fixed the same stuff wherever else it showed up. The few parameter types left really change per instance.

@yvantor yvantor 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.

Is it normal that this PR (the only one which is currently ready for review) has 129 files changes? Does it need a rebase or something?

@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize branch from 6142f3d to e8ab964 Compare November 4, 2026 11:16
@AlessandroNadalini

Copy link
Copy Markdown
Member

Is it normal that this PR (the only one which is currently ready for review) has 129 files changes? Does it need a rebase or something?

The PR is huge but many files changed to fix the headers

@yvantor

yvantor commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Is it normal that this PR (the only one which is currently ready for review) has 129 files changes? Does it need a rebase or something?

The PR is huge but many files changed to fix the headers

Indeed my point (that I already discussed with Luca) was to split in two PRs (one for the code and one for the header). In general we need a more systematic approach (annoying because it takes more effort and time, but is cleaner and easier to spot potential issues).

@FrancescoConti

Copy link
Copy Markdown
Member

I agree... atomic changes are to be preferred.

@AlessandroNadalini

Copy link
Copy Markdown
Member

Is it normal that this PR (the only one which is currently ready for review) has 129 files changes? Does it need a rebase or something?

The PR is huge but many files changed to fix the headers

Indeed my point (that I already discussed with Luca) was to split in two PRs (one for the code and one for the header). In general we need a more systematic approach (annoying because it takes more effort and time, but is cleaner and easier to spot potential issues).

I totally agree. So, should we (re-)convert this PR to draft?

@yvantor

yvantor commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Is it normal that this PR (the only one which is currently ready for review) has 129 files changes? Does it need a rebase or something?

The PR is huge but many files changed to fix the headers

Indeed my point (that I already discussed with Luca) was to split in two PRs (one for the code and one for the header). In general we need a more systematic approach (annoying because it takes more effort and time, but is cleaner and easier to spot potential issues).

I totally agree. So, should we (re-)convert this PR to draft?

No I would not be this drastic, I think this one can be closed since it was kept on hold for long enough. Let's try to keep it in mind for the future (I will try to be more active on the PRs review for the project)

@AlessandroNadalini
AlessandroNadalini merged commit 232363a into main Nov 9, 2026
1 of 2 checks passed
@AlessandroNadalini
AlessandroNadalini deleted the lb/Collectives-Parametrize branch November 9, 2026 16:39
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