Skip to content

Fix Snitch Cache Configuration, Update Memory Map, and Improve Simulation Support#82

Open
Xeratec wants to merge 5 commits intopulp-platform:develfrom
Xeratec:dev/open
Open

Fix Snitch Cache Configuration, Update Memory Map, and Improve Simulation Support#82
Xeratec wants to merge 5 commits intopulp-platform:develfrom
Xeratec:dev/open

Conversation

@Xeratec
Copy link
Member

@Xeratec Xeratec commented Dec 19, 2025

This pull request updates the Chimera SoC to fix the instruction cache configuration of the Snitch cluster, increase the memory island size, remap the HyperBus, and enable aliasing in the L1 TCDM of the Snitch clusters. Additionally, it provides support for a fast virtual UART in RTL simulations, introduces a useful waveform configuration, and synchronizes the cluster clock with the SoC clock in the test bench. Finally, I added some helpful comments to enhance the understanding of the configuration values.

Memory Island Size

  • In the current configuration, each cluster has 128 KiB of L1 TCDM
  • Hence, I argue a larger L2 of 512 KiB makes much more sense.

HyperBus Address

  • So far, we have mapped the HyperBus at 0x5000_0000; however, we usually use 0x8000_0000 for the DRAM.
  • Hence, I remapped the HyperBus to 0x8000_0000.

HyperBus Configuration

  • So far, the IsClockODelayed parameter in the HyperBus wrapper was set to zero, resulting in no delay line in the TX path; however, this can be problematic at higher frequencies.
  • Hence, I enabled the configurable delay for the TX path.

Snitch Cluster Instruction Cache Configuration

  • The default PMA (Physical Memory Attributes) configuration is zero.
  • Hence, I added logic to correctly cache the memory island and memory-mapped HyperBus.

Snitch Cluster TCDM Aliasing

  • So far, TCDM aliasing was disabled in the Snitch cluster; however, this is a useful feature in a multi-cluster context to load data from L2 into L1 for all clusters.
  • Hence, I enabled L1 TCDM aliasing at 0x1800_0000 by default.

@Xeratec Xeratec self-assigned this Dec 19, 2025
@Xeratec Xeratec added bug Something isn't working enhancement New feature or request labels Dec 19, 2025
@Xeratec Xeratec requested a review from Lore0599 December 19, 2025 15:55
.ZeroMemorySize (64),
.ClusterPeriphSize(64),
.NrBanks (16),
// WIESEP: TCDM size = 16 * 1024 * 64 bit = 128 KiB
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can remover this comment

Copy link
Contributor

@Lore0599 Lore0599 left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the contribution.
I left some small comments, and we can probably merge the work after discussing them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Even though this feature is nice, I would not add it because the chimera_reg_top.sv is a generated file, and if we modify the top-level registers, these changes will be lost.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I totally agree and there is for sure a better way to do that 😅 I just don't know how to do it clean right now. Maybe you can give me a tip?

Comment on lines +128 to +129
// WIESEP: Address space 512 KiB
localparam doub_bt MemIslRegionEnd = MemIslRegionStart + 64'h8_0000;
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps, you could add MemIslSize and then define MemIslRegionEnd = MemIslRegionStart + MemIslSize; or something similar.

localparam byte_bt MemIslNumWideBanks = 2;
localparam shrt_bt MemIslWordsPerBank = 1024;
// Memory Island size = 16 * 2 * 1024 * 4 B = 128 KB
// WIESEP: Memory Island size = 16 * 2 * 4096 * 32 bit = 512 KB
Copy link
Contributor

Choose a reason for hiding this comment

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

This is already written at line 131

Comment on lines +144 to 145
// WIESEP: Address space 256 MiB
localparam doub_bt HyperbusRegionEnd = HyperbusRegionStart + 64'h1000_0000;
Copy link
Contributor

Choose a reason for hiding this comment

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

We can use the same approach as suggested before for the memory island (End = Start + Size)

// Timing
parameter time ClkPeriodClu = 2ns,
parameter time ClkPeriodSys = 5ns,
parameter time ClkPeriodSys = 2ns,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this necessary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants