Skip to content

[core_region] Exempt the cluster's own window from the unmapped-region check - #121

Closed
alessiomangone wants to merge 1 commit into
pulp-platform:masterfrom
FondazioneChipsIT:amangone/core-region-own-window
Closed

alessiomangone wants to merge 1 commit into
pulp-platform:masterfrom
FondazioneChipsIT:amangone/core-region-own-window

Conversation

@alessiomangone

Copy link
Copy Markdown

The simulation-only CHECK_ASSERTIONS block of core_region (rtl/core_region.sv:490-493) stops the run with ERROR_2 and $finish on any core data access between CLUSTER_BASE + 32'h0040_0000 and CLUSTER_BASE + 32'h0A00_0000. The cluster's own window, however, starts at CLUSTER_BASE + (cluster_id_i << 22) (rtl/cluster_bus_wrap.sv:120, rtl/xbar_pe_wrap.sv:59): for cluster_id_i == 0 it lies below the refused range, for any other cluster_id_i it lies inside it, peripherals included. In a multi-cluster instance, every cluster but the first thus stops the simulation on its first access to its own control unit.

This keeps the check's purpose - the other clusters' windows are still refused - and exempts the cluster's own 4 MB window, from CLUSTER_BASE + (cluster_id_i << 22) to + 32'h0040_0000, with the same expression the two wrappers use.

Verified: I have carried this change as a local patch since 2026-09-04 on a 2x2 array of PULP clusters, where the offload test now runs on every cluster under QuestaSim 2026.1_2 and Verilator 5.050; without it, the simulation stops at the second cluster's end-of-computation write with ERROR_2.

…n check

The cluster's own window starts at CLUSTER_BASE + (cluster_id_i << 22):
for cluster_id_i == 0 it lies below the refused range, for any other
cluster_id_i it lies inside it, peripherals included. In a multi-cluster
instance, every cluster but the first thus stops the simulation on its
first access to its own control unit.
@alessiomangone

Copy link
Copy Markdown
Author

Closing this: it is not needed in the configuration this repository builds.

The check sits under ifndef CLUSTER_ALIAS, and bender-common.mk defines CLUSTER_ALIAS globally, so the check is never compiled there. I hit it because my build took CLUSTER_ALIAS only from pulp_soc_defines.sv, which pulp_cluster_package.sv includes. QuestaSim compiles each file as its own compilation unit, so that define does not reach core_region.sv or data_periph_demux.sv; Verilator, with a single unit, does see it. I now pass the define globally, as bender-common.mk does.

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.

1 participant