Upgrade Cheshire (64-bit CVA6) - #84
Conversation
332d0e9 to
f930a6c
Compare
|
At this point we might want to consider directly moving to the incoming version with CVA6 v3 |
Lore0599
left a comment
There was a problem hiding this comment.
Thank you very much, teh PR looks very good. I left some comments, for some of them I'm open to discussion.
| 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}; |
There was a problem hiding this comment.
If you want to access teh hyperbus manually (without using the LLC), do you still have a path to it?
| 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; |
There was a problem hiding this comment.
I think all this could be replaced with teh axi typedefs: https://github.com/pulp-platform/axi/blob/4da15979747f326bde2f9869c64e587ce599772c/include/axi/typedef.svh#L134-L141
| .RstChipBase (ChsCfg.LlcOutRegionStart), | ||
| .RstChipSpace (HyperbusRegionEnd - HyperbusRegionStart), | ||
| .RstChipBase (HyperbusRegionStart), | ||
| .RstChipSpace (HypNumPhys * HypNumChips * 'h800_0000), |
There was a problem hiding this comment.
Two comments here:
- You could write
'h800_0000in 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
| // setAllClusterReset(regPtr, 0); | ||
| // setAllClusterClockGating(regPtr, 0); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Is there a specific reason why we need the bender local?
I think it would be better to update teh Bender.lock (and YML)
| cfg.AxiDataWidth = 32; | ||
| cfg.AxiDataWidth = 64; | ||
| cfg.AddrWidth = 48; | ||
| cfg.LlcOutRegionEnd = 'hFFFF_FFFF; |
There was a problem hiding this comment.
Doesn't this line of code overwrite the previously changed line:
cfg.LlcOutRegionEnd = HyperbusRegionEnd;
| VSIM_FLAGS_GUI = -voptargs=+acc | ||
|
|
||
| override VSIM_FLAGS += -work $(VSIM_WORK) | ||
| override VSIM_FLAGS += -work $(VSIM_WORK) -suppress 8386 |
There was a problem hiding this comment.
Do we need to suppress this error? Why?
| 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 } # |
There was a problem hiding this comment.
Not on you but one me: we should use versions and avoid referring to commits or branches.
| localparam int unsigned ChimeraAxiLlcIdWidth = ChsCfg.AxiMstIdWidth + | ||
| $clog2(AxiIn.num_in)+ | ||
| ChsCfg.LlcNotBypass ; |
There was a problem hiding this comment.
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);
| 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 ); | ||
|
|
There was a problem hiding this comment.
I think we could do the code slightly less verbose reusing the type already generate by teh CHESHIRE_TYPEDEF_ALL, something like:
| 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.
Upgrades the Cheshire host to a recent
main-based version (64-bit CVA6) and rebasesChimera onto the v0.2.0 template line. Chimera-specific Cheshire changes live on
wiesep/chimera-main.Dependencies (
Bender.yml/ newBender.local)cheshire: pinned commit →wiesep/chimera-mainbranchaxi:colluca/aximulticastbranch → pinned commitbd1abffccommon_cells:1.39.0, overridden inBender.localto the snitch branch (ca9d577f)register_interface:0.4.3→0.4.7memory_island: pinned commit →mainhyperbus:aottaviano/nonfreebranch →0.0.9Bender.localoverrides (common_cells,axi); removeworkspace.package_linksChanges
CHS_XLEN=64,cv64a6_imafdchsclic_sv39_wb(wascv32a6_convolve)AxiDataWidth→ 64; addMemIslRegionLength; 64-bit-aware fast preloadCHIM_HYPERBUS_SDF_PATH,-suppress 8386To-do
wiesep/chimera-maincheshirecommit hash is pinned before merge (currently a branch ref)wiesep/chimera-mainonto feat: parametrize Cheshire for 32-bit cores + SerialLink fix cheshire#287 once it lands