Skip to content

Upgrade Cheshire (64-bit CVA6) - #84

Draft
Xeratec wants to merge 7 commits into
pulp-platform:mainfrom
Xeratec:dev/64bit
Draft

Upgrade Cheshire (64-bit CVA6)#84
Xeratec wants to merge 7 commits into
pulp-platform:mainfrom
Xeratec:dev/64bit

Conversation

@Xeratec

@Xeratec Xeratec commented Mar 5, 2026

Copy link
Copy Markdown
Member

Upgrades the Cheshire host to a recent main-based version (64-bit CVA6) and rebases
Chimera onto the v0.2.0 template line. Chimera-specific Cheshire changes live on
wiesep/chimera-main.

Rebased onto pulp-platform/chimera:main; supersedes the earlier #82-based version.

The generic (non-Chimera) parts of the Cheshire changes — 32-bit/XLEN parametrization and
the SerialLink-disabled fix — are being upstreamed in pulp-platform/cheshire#287.
Once that merges, wiesep/chimera-main can be rebased on top of it.

Dependencies (Bender.yml / new Bender.local)

  • cheshire: pinned commit → wiesep/chimera-main branch
  • axi: colluca/axi multicast branch → pinned commit bd1abffc
  • common_cells: 1.39.0, overridden in Bender.local to the snitch branch (ca9d577f)
  • register_interface: 0.4.30.4.7
  • memory_island: pinned commit → main
  • hyperbus: aottaviano/nonfree branch → 0.0.9
  • Add Bender.local overrides (common_cells, axi); remove workspace.package_links

Changes

  • Switch host to 64-bit: CHS_XLEN=64, cv64a6_imafdchsclic_sv39_wb (was cv32a6_convolve)
  • Cheshire AxiDataWidth → 64; add MemIslRegionLength; 64-bit-aware fast preload
  • Connect HyperBus to the LLC AXI port and enable the Cheshire LLC
  • Fix CVA6 stall error; regenerate Snitch bootrom; fix HyperBus test
  • Sim: configurable CHIM_HYPERBUS_SDF_PATH, -suppress 8386

To-do

@Xeratec
Xeratec requested a review from Lore0599 March 5, 2026 16:09
@Xeratec Xeratec self-assigned this Mar 5, 2026
@Xeratec
Xeratec force-pushed the dev/64bit branch 2 times, most recently from 332d0e9 to f930a6c Compare March 10, 2026 15:49
@phsauter

phsauter commented Jun 3, 2026

Copy link
Copy Markdown

At this point we might want to consider directly moving to the incoming version with CVA6 v3

@Lore0599 Lore0599 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you very much, teh PR looks very good. I left some comments, for some of them I'm open to discussion.

Comment thread hw/chimera_pkg.sv
Comment on lines +197 to +202
cfg.AxiExtNumSlv = ExtClusters + MemoryIsland;
cfg.AxiExtNumRules = ExtClusters + MemoryIsland;

cfg.AxiExtRegionIdx = {HyperbusIdx, MemIslandIdx, ClusterIdx};
cfg.AxiExtRegionStart = {HyperbusRegionStart, MemIslRegionStart, ClusterRegionStart};
cfg.AxiExtRegionEnd = {HyperbusRegionEnd, MemIslRegionEnd, ClusterRegionEnd};
cfg.AxiExtRegionIdx = {MemIslandIdx, ClusterIdx};
cfg.AxiExtRegionStart = {MemIslRegionStart, ClusterRegionStart};
cfg.AxiExtRegionEnd = {MemIslRegionEnd, ClusterRegionEnd};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you want to access teh hyperbus manually (without using the LLC), do you still have a path to it?

Comment thread hw/chimera_top_wrapper.sv
Comment on lines +476 to 490
logic [ChimeraAxiLlcArWidth-1:0] hyper_ar_data;
logic [ LogDepth:0] hyper_ar_wptr;
logic [ LogDepth:0] hyper_ar_rptr;
logic [ChimeraAxiSlvAwWidth-1:0] hyper_aw_data;
logic [ChimeraAxiLlcAwWidth-1:0] hyper_aw_data;
logic [ LogDepth:0] hyper_aw_wptr;
logic [ LogDepth:0] hyper_aw_rptr;
logic [ ChimeraAxiSlvBWidth-1:0] hyper_b_data;
logic [ ChimeraAxiLlcBWidth-1:0] hyper_b_data;
logic [ LogDepth:0] hyper_b_wptr;
logic [ LogDepth:0] hyper_b_rptr;
logic [ ChimeraAxiSlvRWidth-1:0] hyper_r_data;
logic [ ChimeraAxiLlcRWidth-1:0] hyper_r_data;
logic [ LogDepth:0] hyper_r_wptr;
logic [ LogDepth:0] hyper_r_rptr;
logic [ ChimeraAxiSlvWWidth-1:0] hyper_w_data;
logic [ ChimeraAxiLlcWWidth-1:0] hyper_w_data;
logic [ LogDepth:0] hyper_w_wptr;
logic [ LogDepth:0] hyper_w_rptr;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread hw/chimera_top_wrapper.sv
.RstChipBase (ChsCfg.LlcOutRegionStart),
.RstChipSpace (HyperbusRegionEnd - HyperbusRegionStart),
.RstChipBase (HyperbusRegionStart),
.RstChipSpace (HypNumPhys * HypNumChips * 'h800_0000),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two comments here:

  • You could write 'h800_0000 in a variable to make explicit where this parameter has been taken from?
  • Can we derive this parameter from those already defined in the chimera_pkg.sv? In this way we should have a single source of truth

Comment on lines +18 to +19
// setAllClusterReset(regPtr, 0);
// setAllClusterClockGating(regPtr, 0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I suppose you commented this out since the test is not using any cluster.
If thsi is the case can we just remove the 2 code of lines?

Comment thread Bender.local

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a specific reason why we need the bender local?
I think it would be better to update teh Bender.lock (and YML)

Comment thread hw/chimera_pkg.sv
cfg.AxiDataWidth = 32;
cfg.AxiDataWidth = 64;
cfg.AddrWidth = 48;
cfg.LlcOutRegionEnd = 'hFFFF_FFFF;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doesn't this line of code overwrite the previously changed line:
cfg.LlcOutRegionEnd = HyperbusRegionEnd;

Comment thread target/sim/sim.mk
VSIM_FLAGS_GUI = -voptargs=+acc

override VSIM_FLAGS += -work $(VSIM_WORK)
override VSIM_FLAGS += -work $(VSIM_WORK) -suppress 8386

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need to suppress this error? Why?

Comment thread Bender.yml
snitch_cluster: { git: "https://github.com/pulp-platform/snitch_cluster.git", rev: 5b2fccd96c42812774c20ab2f9b811e164809789}
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.31.1}
register_interface: { git: "https://github.com/pulp-platform/register_interface.git", version: 0.4.7 }
axi: { git: "https://github.com/colluca/axi", rev: bd1abffc0812f8170902e5fb93142c7785c0b8c1 } #

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not on you but one me: we should use versions and avoid referring to commits or branches.

Comment thread hw/chimera_top_wrapper.sv
Comment on lines +454 to +456
localparam int unsigned ChimeraAxiLlcIdWidth = ChsCfg.AxiMstIdWidth +
$clog2(AxiIn.num_in)+
ChsCfg.LlcNotBypass ;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

To double-check, but I think you already have this parameter decalred at thetop in this macro:

`CHESHIRE_TYPEDEF_ALL(csh_, CheshireCfg)

you could do something like:
localparam int unsigned ChimeraAxiLlcIdWidth = $bits(axi_llc_id_t);

Comment thread hw/chimera_top_wrapper.sv
Comment on lines +457 to +475
localparam int unsigned ChimeraAxiLlcArWidth = (2**LogDepth)*
axi_pkg::ar_width(ChsCfg.AddrWidth ,
ChimeraAxiLlcIdWidth ,
ChsCfg.AxiUserWidth);
localparam int unsigned ChimeraAxiLlcAwWidth = (2**LogDepth)*
axi_pkg::aw_width(ChsCfg.AddrWidth ,
ChimeraAxiLlcIdWidth ,
ChsCfg.AxiUserWidth);
localparam int unsigned ChimeraAxiLlcBWidth = (2**LogDepth)*
axi_pkg::b_width(ChimeraAxiLlcIdWidth ,
ChsCfg.AxiUserWidth);
localparam int unsigned ChimeraAxiLlcRWidth = (2**LogDepth)*
axi_pkg::r_width(ChsCfg.AxiDataWidth,
ChimeraAxiLlcIdWidth ,
ChsCfg.AxiUserWidth);
localparam int unsigned ChimeraAxiLlcWWidth = (2**LogDepth)*
axi_pkg::w_width(ChsCfg.AxiDataWidth,
ChsCfg.AxiUserWidth );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we could do the code slightly less verbose reusing the type already generate by teh CHESHIRE_TYPEDEF_ALL, something like:

Suggested change
localparam int unsigned ChimeraAxiLlcArWidth = (2**LogDepth)*
axi_pkg::ar_width(ChsCfg.AddrWidth ,
ChimeraAxiLlcIdWidth ,
ChsCfg.AxiUserWidth);
localparam int unsigned ChimeraAxiLlcAwWidth = (2**LogDepth)*
axi_pkg::aw_width(ChsCfg.AddrWidth ,
ChimeraAxiLlcIdWidth ,
ChsCfg.AxiUserWidth);
localparam int unsigned ChimeraAxiLlcBWidth = (2**LogDepth)*
axi_pkg::b_width(ChimeraAxiLlcIdWidth ,
ChsCfg.AxiUserWidth);
localparam int unsigned ChimeraAxiLlcRWidth = (2**LogDepth)*
axi_pkg::r_width(ChsCfg.AxiDataWidth,
ChimeraAxiLlcIdWidth ,
ChsCfg.AxiUserWidth);
localparam int unsigned ChimeraAxiLlcWWidth = (2**LogDepth)*
axi_pkg::w_width(ChsCfg.AxiDataWidth,
ChsCfg.AxiUserWidth );
localparam int unsigned ChimeraAxiLlcIdWidth = $bits(axi_llc_id_t);
localparam int unsigned ChimeraAxiLlcArWidth = (2 ** LogDepth) * $bits(axi_llc_ar_chan_t);
localparam int unsigned ChimeraAxiLlcAwWidth = (2 ** LogDepth) * $bits(axi_llc_aw_chan_t);
localparam int unsigned ChimeraAxiLlcBWidth = (2 ** LogDepth) * $bits(axi_llc_b_chan_t);
localparam int unsigned ChimeraAxiLlcRWidth = (2 ** LogDepth) * $bits(axi_llc_r_chan_t);
localparam int unsigned ChimeraAxiLlcWWidth = (2 ** LogDepth) * $bits(axi_llc_w_chan_t);

You can also add in include/typedef.sv after the memory island macro, one more macro to declare those types for you.

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.

3 participants