MAGIA-V3 Realignment#47
Open
Dequino wants to merge 136 commits into
Open
Conversation
…nd tensor as input
… FondazioneChipsIT-sc/onnx
…elf (same as spatz compilaton flow)
- Fix RedMulE register offsets in tile_ctrl.h (X=0x2C, MCFG0=0x20, etc.)
to match gvsoc LightRedmule req_v2 interface; removes computation errors
in test_mm_os
- Restore mcfg_reg1 format bits and MCFG2 write in redmule_isa_utils.h
- Re-add mhartid guard on BSS clear in crt0.S to prevent hart races
- Include base magia tests for magia_v3 in all TEST_MAPPINGS branches
…cate task symbols
Redesign the PULP cluster software interface to align with the new GVSoC
cluster_regs model:
API changes (magia_pulp_utils.h):
- pulp_init(binary) drops the nb_cores argument; broadcasts CLK_EN and
busy-waits until all PULP cores signal READY
- pulp_run_task(task, core_mask) accepts a one-hot core bitmask, sets
nb_cores_to_wait = popcount(mask) internally, writes the mask to PULP_START,
then polls until PULP_START is cleared by the cores' ACK
pulp_crt0.S rewritten with a two-phase completion protocol:
1. ACK phase (before task): each woken hart writes 0 to PULP_START;
cluster_regs counts ACKs and clears the register, unblocking the CV32 poll
2. DONE phase (after task): each hart writes 1 to PULP_DONE after the task
returns; cluster_regs counts DONEs and fires the DONE IRQ to the CV32 event
unit, waking eu_pulp_wait()
Task symbol deduplication:
- Rename hello_task → hello_pulp_task / hello_spatz_task in all test sources
to avoid HELLO_TASK name collision in combined Spatz+PULP tests
- Remove stale FIRST_TASK_NAME overrides from CMakeLists (default now matches
the renamed function names)
- Update extract_pulp_symbols.sh grep pattern to match renamed symbols
Adds tests/spatz_pulp_on_magia/multi_task — a test that exercises two sequential Spatz tasks and four sequential PULP task dispatches on different core pairs within the same run.
Spatz tasks (fp16 RVV):
1. vec_add: vfadd.vv on A+B → C
2. vec_relu: vfmax.vf(0) on X → Y
PULP tasks (int32, one pair of cores each):
1. vec_sum — cores 0+1 (mask=0x03): parallel partial sums
2. vec_dot — cores 2+3 (mask=0x0C): parallel partial dot product
3. vec_scale — cores 4+5 (mask=0x30): element-wise multiply by scalar
4. vec_absmax — cores 6+7 (mask=0xC0): parallel absolute maximum
Each PULP task uses pair_local_id = GET_PULP_LOCAL_ID(hartid) % 2 to split work between the two dispatched cores. CV32 verifies all results before proceeding to the next dispatch.
… ad/magia-v3-chipsit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Realignment process for the SDK on the new MAGIA RTL architecture version, including support for the PULP Cluster and using the OpenHW toolchain for the CV32E40P cores.
This PR also includes a redesign and cleanup of the repository, including changing "magia_v1" and "magia_v2" into the real targets (CV32E40X and CV32E40P) to avoid confusion.
New CI tests for pulp cluster will also be added, alognside APIs for managing and running the cluster.