Skip to content

feat(cv32e40p): add standalone platform and core config#74

Open
marpac3 wants to merge 6 commits into
gvsoc:masterfrom
marpac3:mpaci/cv32e40p-clean
Open

feat(cv32e40p): add standalone platform and core config#74
marpac3 wants to merge 6 commits into
gvsoc:masterfrom
marpac3:mpaci/cv32e40p-clean

Conversation

@marpac3

@marpac3 marpac3 commented Apr 9, 2026

Copy link
Copy Markdown

Summary

Add CV32E40P standalone platform definition and core configuration for GVSOC simulation.

What's included

  • cv32e40p-standalone.py: Standalone platform with correct memory map (RAM 4MB @ 0x0, STDOUT @ 0x10000000, EXIT @ 0x20000000), configurable FPU/PULP/ZFINX parameters
  • cv32e40p_exit_device.py: Python model for memory-mapped exit device
  • pulp/cpu/iss/pulp_cores.py: CV32E40P core model with full CSR config (write masks, reset values, volatile flags for mcountinhibit, mstatus, tdata1, dcsr, etc.) and num_mhpmcounters parametrization

Validation

  • Standalone trace generation: 5 config variants tested
  • DPI co-simulation: 39/43 test×config pairs PASS
  • All parameters (FPU, ZFINX, PULP, num_mhpmcounters) propagated correctly through Python → JSON → C++

Related PRs

  • gvsoc-core#146: CV32E40P ISS core model

marpac3 added 6 commits May 25, 2026 23:37
Add the CV32E40P standalone platform to gvsoc-pulp:

- cv32e40p-standalone.py target file
- cv32e40p_exit_device.py Python wrapper
- CV32E40P core config in pulp_cores.py (CSR semantics, FPU,
  ZFINX, num_hpm).
Companion change to the gvsoc-core removal: cv32e40p_exit is a
target-specific device, so it lives in gvsoc-pulp.

- New pulp/cv32e40p_exit/CMakeLists.txt registers the vp_model
  pulp.cv32e40p_exit.cv32e40p_exit_device.
- pulp/CMakeLists.txt: add_subdirectory(cv32e40p_exit).
- cv32e40p_exit_device.py: set_component() updated to the new
  component path.
Follow-up to the ISS source relocation: update add_sources() to the
new src/cv32e40p/ paths. Behaviour-preserving.
Consistent Marco Paci / Fondazione Chips-it (https://chips-it.it)
attribution across the CV32E40P-specific files: standalone platform,
core config, exit device, pulp_cores patches.
mhartid is a CsrReg now and doesn't convert to int implicitly. Read
the underlying value explicitly, like the other in-ISS consumers
(e.g. lsu.cpp).
Cosmetic cleanup of inline comments in pulp_cores.py — remove
internal prefix markers, keep the technical content.
@marpac3 marpac3 force-pushed the mpaci/cv32e40p-clean branch from 3e7da68 to d52f70c Compare May 26, 2026 08:26
@marpac3

marpac3 commented May 26, 2026

Copy link
Copy Markdown
Author

Branch refreshed — ready for review @haugoug

The branch has been refactored and force-pushed. Head is now d52f70c (6 commits on top of abcddd6 "Add SpatzMempool core").

Commit history (linear, cleaned)

d52f70c doc: drop residual internal markers from CV32E40P core config
030cf3b fix(pulp_iss_wrapper): read mhartid via .value
45eb0d9 chore: normalise author headers on CV32E40P files
d380f2b refactor(iss): point CV32E40P core sources at src/cv32e40p/ subdir
d588a24 feat(cv32e40p_exit): add device
27f1cbf feat(cv32e40p): standalone platform + core config

Notes on 030cf3b

mhartid was promoted from iss_reg_t to CsrReg in the companion gvsoc-core#146 change. The pulp_iss_wrapper.cpp consumer needs to read the underlying value explicitly via .value, matching the pattern already used in gvsoc-core/iss/lsu.cpp:558.

Validation

Smoke 4/4 PASS on the 4 CV32E40P config variants via cv32e40p-standalone target.

Related PRs

  • gvsoc/gvsoc-core#146 — ISS core model (head c03a77f5). Merge this PR after #146.
  • gvsoc/gvsoc#252 — outer submodule pointer bump (head 86e2e87).

Happy to address any feedback.

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