feat(inner_jib_top): full integration + sum_ints end-to-end test passing#7
Conversation
Sprint C complete. `src/inner_jib_top.sv` wires:
upstream core (mast/src/core.sv)
-> core_axi4_adapter
-> axi4_master_simple
-> axi4_mem_model (with loader back-door from MAST#8)
The cocotb test in `verif/inner_jib_top/` runs the real RISC-V program
`mast/examples/direct/sum_ints.asm` end-to-end through this chain:
1. Pre-assembled `fixtures/sum_ints.hex` is loaded into the mem model
via loader_en/addr/data, byte address 128 onward.
2. set_pc_addr=128 + set_pc_req pulse points the core at the program.
3. ena=1 releases the core.
4. Test captures every (out, outen) pulse until halt.
5. Asserts the captured sequence equals [0, 5, 4, 3, 2, 1, 0, 15] —
hand-traced from the asm source.
6. Asserts halt asserts within 50 000 cycles.
TESTS=2 PASS=2 FAIL=0 SKIP=0
test_reset PASS 90 ns
test_sum_ints_runs_and_halts PASS 2530 ns sim time
This is the first program of any kind running on PopSolutions silicon-
equivalent hardware in simulation. Every subsequent program (factorial,
primes, matrix multiply, GGML kernels) lands on the same path.
Closes #4 (top-level integration).
DEPENDS ON popsolutions/MAST#8 (loader back-door port). The MAST
submodule is temporarily pinned to MAST's feat/mem-loader branch
(commit c12a6a5); it will be bumped to MAST main HEAD after MAST#8
merges.
Also adds:
- .github/workflows/ci.yml — Verilator + cocotb on every push/PR,
with submodule checkout, Verilator 5.040 from source with cache.
- README.md — status badge, run-locally instructions, MAST link.
- .gitignore — verif outputs (sim_build, .venv, *.vcd, etc.)
Signed-off-by: Marcos <m@pop.coop>
Self-review on PR #7 flagged 2 MEDIUM findings: MEDIUM 1. fixtures/sum_ints.hex had no regeneration recipe. Future updates to sum_ints.asm would have no documented path to refresh the fixture. Fix: added verif/inner_jib_top/fixtures/README.md with the exact assembler command, a hand-traced output expectation, and a rationale for checking the hex in (vs. regenerating in CI). MEDIUM 2. Loader-to-core start timing assumption (one clock gap between final loader_en=0 and set_pc_req=1) was not documented. Test passes locally but the assumption is implicit. Defer to a follow-up — the assumption is documented now in the fixture README via the rationale paragraph; a dedicated comment in the test loop can land in a small doc-only PR. Also bumps the MAST submodule pin to include MAST PR #8's self-review fixes (loader collapsed into AXI4 write FSM, alignment assert, README loader docs). The pin still points at MAST's feat/mem-loader branch because PR #8 has not yet merged to MAST main; once it does, a follow-up commit will bump the pin again to a main-reachable SHA. Test status (verified locally with the bumped submodule): inner_jib_top: 2/2 pass — sum_ints.asm still runs end-to-end. Signed-off-by: Marcos <m@pop.coop>
Self-review (code-reviewer agent, 2026-05-05)Per MAST/GOVERNANCE.md self-review bridge.
MEDIUM 1 — addressedFixture regeneration recipe missing. MEDIUM 2 — addressedLoader-to-core start timing assumption. Documented in the fixture README via the rationale paragraph. A dedicated inline comment in the test loop can land in a small doc-only follow-up PR. Cross-cutting risk — MAST submodule branch pinThe submodule was pinned to MAST's Upstream issue noted (not blocking this PR)
Verdict from this self-review passAPPROVE-WITH-NITS for merge. No CRITICAL or HIGH findings. Per GOVERNANCE.md "No AI self-merge" clause, the merge button is yours, Marcos. This PR depends on MAST PR #8; merge MAST #8 first, then this one. Suggested sequence: # After CI on both PRs is green:
gh pr merge 8 --repo popsolutions/MAST --squash
gh pr merge 7 --repo popsolutions/InnerJib7EA --squash(After merging InnerJib7EA #7, the submodule will still point at MAST's |
loader) After PR popsolutions/MAST#7 (governance) and popsolutions/MAST#8 (loader port) merged to MAST main, this commit moves the InnerJib7EA submodule pin from the throwaway feat/mem-loader branch to MAST main HEAD. The SHA referenced is now reachable from MAST main and will not garbage collect. No source-level changes; just submodule pin bump. Signed-off-by: Marcos <m@pop.coop>
The CI failure on this branch was: 'Host key verification failed' when GitHub Actions tried to clone git@git.pop.coop:pop/MAST.git via SSH. GitHub runners have no SSH key for git.pop.coop, so the SSH URL cannot be used in CI. Fix: switch the submodule URL to https://git.pop.coop/pop/MAST.git. The Forgejo MAST repo is public, so HTTPS clone needs no auth. Local developers who prefer SSH can override locally without committing: git config submodule.mast.url git@git.pop.coop:pop/MAST.git Also adds 'branch = main' to the .gitmodules entry so future 'git submodule update --remote' tracks the canonical branch. Signed-off-by: Marcos <m@pop.coop>
…stream tasks CI on Verilator 5.040 (built from source in the workflow cache) now treats parameter declarations inside upstream tasks (mast/src/int/chunked_add_task.sv:12, chunked_sub_task.sv:12) as IMPLICITSTATIC warnings, which our Makefile escalates to errors via the cocotb default '%Error: Exiting due to N warning(s)'. The local Verilator 5.048 (Manjaro) does not flag these — version drift between local and CI again. Fix: add -Wno-IMPLICITSTATIC alongside the other upstream-legacy warning suppressions already in EXTRA_ARGS. The upstream files are otherwise clean and we don't want to modify them locally. Signed-off-by: Marcos <m@pop.coop>
Sprint C complete.
src/inner_jib_top.svwires the upstream RISC-V core through MAST's AXI4 subsystem to an internal SRAM, with a cocotb test that runssum_ints.asmend-to-end and verifies the expected output sequence.What this proves
A real RISC-V program (
mast/examples/direct/sum_ints.asm, the classic verigpu sum-of-integers benchmark) is loaded into the mem model via the new back-door loader port, then the core is released to fetch instructions through AXI4 and execute them. Every output value the core emits via itsout/outenports is captured and the captured sequence is asserted to equal the hand-traced expected sequence.This is the first program of any kind running on PopSolutions silicon-equivalent hardware in simulation. Every subsequent program lands on the same path.
Dependencies
feat/mem-loaderbranch (commitc12a6a5); it will be bumped to MAST main HEAD after MAST#8 merges. Until MAST#8 merges, CI on this PR will pass because the submodule checks out the branch directly.Files
src/inner_jib_top.sv— top-level integration moduleverif/inner_jib_top/Makefile— cocotb makefile referencing all upstream + MAST sourcesverif/inner_jib_top/test_inner_jib_top.py— 2 cocotb testsverif/inner_jib_top/fixtures/sum_ints.hex— pre-assembled hex (20 instructions).github/workflows/ci.yml— first CI workflow for InnerJib7EA, mirrors MAST's pattern with submodule initREADME.md— status badge, local run instructions.gitignore— verif outputsCloses
Self-review
Will be added as a PR comment after CI goes green and the code-reviewer agent runs.