Skip to content

Upgrade Cheshire (64-bit CVA6) - #84

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

Upgrade Cheshire (64-bit CVA6)#84
Xeratec wants to merge 8 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 are being upstreamed in pulp-platform/cheshire#287 and pulp-platform/cheshire#295.
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 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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done in 61462df

Comment thread hw/chimera_top_wrapper.sv Outdated
Comment thread sw/tests/testHyperbusAddr.c Outdated
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)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I argue it makes sense to resolve conflicts that we already know. This is currently the case for common_cells and axi. Thus, when running bender update you don't have to manually resolve these.

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.

Okay, but when running bender update, I think we want to see any conflicts and resolve them manually; that is part of the expected Bender behavior.

I would therefore prefer to remove this file and update both Bender.lock and Bender.yml accordingly.

Also, I think we should try to use a released version of common_cells, if possible. Can we use v1.40.0?

For AXI, instead, I think it is fine for now to keep the specific commit hash. Let’s just keep it in Bender.yml; if bender update is run, it will be our responsibility to resolve any resulting version conflicts.

Comment thread hw/chimera_pkg.sv Outdated
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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

To be honest, I don't remember. I think it is required if we use a new QuestaSim version, as we did for Torik.

@Lore0599 Lore0599 Aug 27, 2026

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.

Since, at the moment, Chimera comes with iis-env.sh which sets the QuestaSim version, I think it is better to remove this suppress at the moment, or update the Questa version in the environment.
I don't have a preference between the 2 approaches; choose the one you consider the most appropriate.

Comment thread Bender.yml
Comment thread hw/chimera_top_wrapper.sv Outdated
Comment thread hw/chimera_top_wrapper.sv Outdated
Review feedback on the Cheshire 64-bit upgrade (pulp-platform#84):

- chimera_top_wrapper: derive the LLC CDC async-bus widths from the axi_llc_*
  types emitted by CHESHIRE_TYPEDEF_ALL instead of recomputing them by hand.
  ChimeraAxiLlcIdWidth = $bits(axi_llc_id_t) and
  ChimeraAxiLlc{Ar,Aw,B,R,W}Width = (2**LogDepth) * $bits(axi_llc_*_chan_t).
  Equivalent widths; (2**LogDepth) is the axi_cdc FIFO depth exposed on the
  async data buses.

- chimera_pkg / chimera_top_wrapper: replace the bare 'h800_0000 in the hyperbus
  RstChipSpace with a named single source of truth -- HyperRamChipSize (128 MiB
  per-chip device size) and HyperbusRstChipSpace = HypNumPhys * HypNumChips *
  HyperRamChipSize.

- chimera_pkg: drop the second cfg.LlcOutRegionEnd assignment ('hFFFF_FFFF) in
  the AXI block, which silently overwrote the LLC-block value HyperbusRegionEnd.
  HyperbusRegionEnd now stands, matching the RDL / linker map.

- testHyperbusAddr.c: remove the dead commented-out setAllCluster* lines (and the
  now-unused regPtr); the test uses no cluster.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@Xeratec Xeratec left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I looked through you comments and addressed some of them. Please let me know if you want further clarification or adjustments.

Comment thread hw/chimera_pkg.sv
Comment thread Bender.yml
Comment thread Bender.local

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I argue it makes sense to resolve conflicts that we already know. This is currently the case for common_cells and axi. Thus, when running bender update you don't have to manually resolve these.

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
Member Author

Choose a reason for hiding this comment

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

To be honest, I don't remember. I think it is required if we use a new QuestaSim version, as we did for Torik.

Comment thread hw/chimera_pkg.sv Outdated
Comment thread hw/chimera_top_wrapper.sv Outdated
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
Member Author

Choose a reason for hiding this comment

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

Done in 61462df

Comment thread hw/chimera_top_wrapper.sv Outdated
Comment thread hw/chimera_top_wrapper.sv Outdated
Comment thread sw/tests/testHyperbusAddr.c Outdated
@Xeratec
Xeratec marked this pull request as ready for review August 25, 2026 11:44
@Xeratec
Xeratec marked this pull request as draft August 25, 2026 11:45

@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 for improving teh PR, is almost perfect.

I just left some comments regarding the Bender.localand the QuestaSim flag. Let's fix those and then we can merge it 💪

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