Skip to content

Memory rework: remove the private L1 alias and use all physical memory - #120

Draft
luca24balboni wants to merge 1 commit into
lb/Collectives-Parametrize-Magiav4-HCIfrom
lb/Collectives-Parametrize-Magiav4-HCI-Mem
Draft

luca24balboni wants to merge 1 commit into
lb/Collectives-Parametrize-Magiav4-HCIfrom
lb/Collectives-Parametrize-Magiav4-HCI-Mem

Conversation

@luca24balboni

@luca24balboni luca24balboni commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

This PR reworks the memory map of the tile so that every byte of physical memory has exactly one address, and lays out the program contiguously in L2.

Address map

Before, scratch and stacks were an alias over the bottom of tile 0's window, and the tile peripherals covered the first 14 KiB of the L1, which therefore had no usable address.

  • Tile peripherals move to fixed offsets from 0xA000_0000, outside the tile windows; resizing or removing one unit no longer moves the others.
  • The private part of the L1 (TileCfg.L1.PrivBytes) gets its own view at 0xA010_0000, the same address in every tile.
  • The global part stays in the tile window, at k * 0x0010_0000 + PrivBytes. The window stays 1 MiB, so a tile can instantiate a smaller L1.

Memory sizes

  • L1: 1 MiB (32 banks x 8192 words), of which 128 KiB private and 896 KiB global.
  • Control-core I$: 2 KiB, 4 ways. PULP cluster I$ (4 KiB shared) and Spatz I$ (2 KiB) unchanged.

Software layout

  • L2 is contiguous from 0xC000_0000: code (32 KiB), exit codes, then the program data.
  • Stacks are packed at the top of the private L1; the scratch takes the rest.
  • Linker scripts, crt0, magia_tile_utils.h, the testbench VIPs and s19tomem.py follow the new addresses.

Docs

New memory map and software layout figures, and address tables in the README.

@luca24balboni luca24balboni self-assigned this Oct 26, 2026
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize-Magiav4-HCI-Mem branch 5 times, most recently from f8955a3 to 06b0854 Compare November 2, 2026 15:20
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize-Magiav4-HCI branch from 6ec7f6c to fc4872e Compare November 4, 2026 11:16
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize-Magiav4-HCI-Mem branch from 85b9e87 to a80974e Compare November 4, 2026 11:16
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize-Magiav4-HCI branch from fc4872e to bf4f4ec Compare November 9, 2026 11:47
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize-Magiav4-HCI-Mem branch 2 times, most recently from 47fd92b to 76fa5fb Compare November 9, 2026 15:00
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize-Magiav4-HCI branch from bf4f4ec to 37bc98f Compare November 9, 2026 15:01
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize-Magiav4-HCI-Mem branch from 76fa5fb to 920e1ab Compare November 9, 2026 16:31
@yvantor

yvantor commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

@luca24balboni is this tracked with an issue?

@luca24balboni

luca24balboni commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

No, it comes from a discussion on the group, but there are no issues on this on the Dashboard, I'm opening it

@luca24balboni luca24balboni linked an issue Nov 12, 2026 that may be closed by this pull request
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize-Magiav4-HCI branch from 842213e to 54fb751 Compare November 12, 2026 10:29
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize-Magiav4-HCI-Mem branch 2 times, most recently from 4ba1b76 to 5a4268c Compare November 12, 2026 14:56
@luca24balboni
luca24balboni force-pushed the lb/Collectives-Parametrize-Magiav4-HCI-Mem branch from 5a4268c to 11d64ec Compare November 12, 2026 18:58

This branch has not been deployed

No deployments
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.

Peripheral control address range overlaps L1 memory banks

2 participants