Commit Graph
100 Commits
Author SHA1 Message Date
maksyuki 07b849e24c fix(ci): raise the Mini ci_smoke SDRAM Verilator budget to 7200s
The merged HP subsystem makes the Mini ci_smoke ld2_sdram Verilator step
need roughly 4400 s locally (SIM_TEST_PASS code=0 in 4389 s,
build/ics55-2026-10-23-15-17-2e059475a01b/), so hosted runners time out the
existing 3600 s tier during the crypto self-test on ICS55/SKY130/GF180
(jobs 120251738572, 120251738799, 120251738649). Double the tier to 7200 s;
the ld2_all_sram step stays at 3600 s (measured need about half of that).
Validation-only budget change with the two contract assertions pinned to the
new values; no RTL, firmware, or marker-rule change.
2026-10-23 16:38:51 +08:00
maksyuki 9ab05c6404 fix(ci): raise the Mini ci_smoke Verilator budget to the 3600s tier
The feat/mini-hp-core merge adds the HP subsystem to the Mini Verilator
model, so the ci_smoke acceptance step (which ends in the crypto self-test)
exceeds the old 1800 s wall budget on hosted runners and fails with
SIM_TEST_TIMEOUT. The merged content is functionally correct: the identical
step passes locally with SIM_TEST_PASS code=0 in 1806 s wall
(build/ihp130-2026-10-23-11-20-cff97749f2f3/). This is a validation-only
budget change to the existing 3600 s tier already used by the SDRAM variant;
the contract tests in tests/test_script_tools.py are updated to pin the new
value. No RTL, firmware, or marker-rule change. CI failure under repair:
regression-ihp130 run 39889921334.
2026-10-23 11:54:17 +08:00
maksyuki 3062aec09b chore(quality): regenerate the Mini rtl-lint baseline for the merged source
Regenerated from a successful merged-source Verilator lint run
(build/ihp130-2026-10-23-08-35-f2c2308f4da3/lint/verilator/lint.log) after
the feat/mini-hp-core merge. Reviewed normalized signatures: new entries are
attributable to the merged HP core content (openc906 combined source), Mini
wiring of newer shared-IP pins (apb4_gpio taps, apb4_system clock hz), and
the dma_reg SupportedRequests parameter from the shared DMA V2.2 work; eight
stale signatures resolved. Kept separate from the contract fix per the
baseline policy. check-rtl-lint passes after regeneration
(build/ihp130-2026-10-23-08-36-f2c2308f4da3/meta/rtl-lint-warnings.json).
2026-10-23 08:37:35 +08:00
maksyuki 0072c0d125 fix(publications): cover the HP JTAG debug boot branch in the checked contracts
The feat/mini-hp-core merge brought in the HP_JTAG_DEBUG knob's boot block,
which predates two checked publication contracts that neither side had
updated: the boot preprocessor review only allowed the NPU conditions, and
the boot diagnostic list/namespace ended at code 19. Align them with the
merged content: accept defined(RS_HP_JTAG_DEBUG) in
publications/boot_acceptance_reference.py, add fail code 20 to
expected_direct and its meaning in publications/datasheets/system-reference.json,
extend the boot namespace to range(21) in tests/test_publication_retrieval.py,
and write the knob's guard in main.c in the reviewed '#if defined(...)' form
(identical preprocessor semantics).

Validation: the publication suites pass (122 passed, 1 known pypdf skip);
format/policy/host gates clean.
2026-10-23 08:37:23 +08:00
maksyuki 5c0a3aa280 Merge branch 'feat/mini-hp-core' into dev 2026-10-23 08:19:21 +08:00
maksyuki 408e75854c feat(spi): implement SPI-P4 sub-stage A display acceptance
Add the frozen display path on top of the committed SPI-P3 integration:
the project-owned ST7789VI four-wire adapter in app/board (held-CS
command/data chains, D/C at clean boundaries with readback, bounded
workspaces), the TINY_SPI_P4_ACCEPTANCE ci_smoke image (discovery, panel
init ordering, color bars, gradient, odd rectangles, rotation variant,
abort/recover/release/reacquire case, measurements), the pin-independent
panel oracle rtl/tiny/dv/tiny_st7789_panel.sv, the golden geometry/pixel
checker scripts/spi_p4.py, pytest contracts tests/test_spi_p4.py and the
st7789vi host tests. The runbook is docs/ip/spi-p4.md.

Validation: Verilator acceptance passes on both Tiny profiles at
SIM_TEST_PASS Tiny cycles=43019427 (build/ics55-tiny-2026-10-23-01-37-106e35060a8e/,
build/ihp130-tiny-2026-10-23-01-38-616e0604657d/) and Icarus behavioral
passes on both profiles with the documented QUICK delay/geometry variant at
cycles=2710932 (build/ics55-tiny-2026-10-23-01-34-106e35060a8e/,
build/ihp130-tiny-2026-10-23-01-39-616e0604657d/); the independent golden
checker reports zero problems on all four logs (8/8 windows, pixel counts
and FNV-1a checksums, violations=0); full Pytest 2102 passed, 0 failed,
1 skipped; C format/policy/host and RTL format gates clean.

Sub-stage B (PSRAM-source display, sequential capture/verify/SD save,
SRAM-vs-PSRAM performance) remains gated on R2-P8/R2-P9 human acceptance.
SPI-P5 remains deferred; phase_accepted stays false. Recorded in
docs/ip/spi-verification.md.
2026-10-23 08:04:58 +08:00
maksyuki 3d464bb228 fix(spi): repair session readiness and lifecycle semantics
Three defects found by SPI-P4 display bring-up in the committed SPI-P3
integration and HAL, each root-caused with log-level evidence:

- retrosoc_tiny.sv wired the SPI gpio_ready_i to the GPIO APB bridge's
  transaction-level ready, which drops for the whole CDC round trip of every
  GPIO register access. The frozen D/C contract requires GPIO30 writes
  between segments during a session, so the guard latched fault 2 and closed
  the session on the first D/C change. The readiness scope per the frozen
  text is GPIO clock/reset availability; the expression is now
  s_gpio_rst_n && !s_actual_gate[1], stable during a session.
- rs_spi_acquire returned after GPIO_READY alone, before the enable gap
  reached IDLE; the first ARM could then be rejected. It now also waits
  BUS_IDLE, so an acquired session is immediately usable.
- rs_spi_recover waited for ownership to clear, but RECOVER retains the
  session per the ABI; it now waits for wire-state Disabled. rs_spi_release
  unconditionally issued DISABLE, legal only from IDLE; from the
  post-recover Disabled state it now goes straight to pin restore and
  RELEASE.

Validation: SPI-P3 acceptance re-run passes after the HAL changes
(SIM_TEST_PASS Tiny cycles=1037899); the SPI-P4 display acceptance passes on
both profiles and both simulators with these fixes in place
(build/ics55-tiny-2026-10-23-01-37-106e35060a8e/,
build/ihp130-tiny-2026-10-23-01-38-616e0604657d/ and the Icarus QUICK
variants); full Pytest 2102 passed, 0 failed; C format/policy/host gates
clean. No ABI or Mini change.
2026-10-23 08:04:15 +08:00
maksyuki 4ef4b1d4e4 fix(dv): hold Verilator UART1 RX idle instead of looping TX back
The Verilator testbench tied the HP console UART1 RX pin directly to its
TX pin, so every byte the C906 transmitted looped back into the UART1 RX
FIFO. The Linux kernel's hvc console (hvc0) is a TTY with ECHO enabled;
its __hvc_poll thread reads the looped-back bytes and the N_TTY line
discipline re-emits them. The result is a feedback loop that re-prints
the console output repeatedly with progressive character loss (the
OpenSBI banner appearing four times, degrading into truncated fragments
and thousands of blank lines in the boot log).

Hold the RX pin idle (no external input) so console_getc always reports
no input and the echo loop never starts. uart0 (the LP console) is
unconnected on both pins and was already unaffected.

Evidence: hp-linux-sim on configs/ci/ihp130-hp.mk (Verilator) now shows
the OpenSBI banner exactly once with no blank-line artifacts, and still
completes userspace acceptance (HP_LINUX_INIT_PASS, retroSoC HP Linux
ready, HP_LINUX_READY, SIM_TEST_PASS code=0; 1.56 G emulator cycles,
status: passed with no missing markers).
2026-10-23 07:27:19 +08:00
maksyuki 95c243b709 fix(tiny): restore Icarus behavioral simulation for the dv observers
The Tiny Icarus flow compiles only the sv2v-lowered converted_soc.v, where
packed structs become plain vectors and interface ports dissolve, while the
dv observers read struct fields hierarchically and tiny_p9_recovery.svh used
a string case that crashes Icarus code generation. Elaboration failed with
29 errors on both profiles (CI runs 39719773195 and 39719773217).

Keep every observer semantically identical: move a time declaration above
its first use in tiny_p8_observers.svh, read the identical packed bit ranges
through named slice constants in tiny_p9_observers.svh and
retrosoc_tiny_tb.sv (valid in both the Verilator struct view and the sv2v
vector view), read the XPI APB wires through the top-level interface
instance u_xpi_apb4_if (the same nets), and rewrite the string case as an
exact-match if/else chain. No DUT, Mini, baseline, or verdict-rule change.

Validation: Icarus compile clean on both profiles; the R2-P7 Icarus
behavioral acceptance passes with SIM_TEST_PASS Tiny cycles=3859487
(build/ihp130-tiny-2026-10-22-12-16-aae2707c2aa5/sim/iverilog/), matching
the Verilator cycle count exactly; SPI-P3 acceptance (cycles=1030088 on both
profiles) and R2-P7 Verilator acceptance (cycles=3859487) are unchanged;
full Pytest 2097 passed, 0 failed, 1 skipped; formatting gates pass.
Evidence recorded in docs/ip/tiny-soc-verification.md.
2026-10-22 14:38:25 +08:00
maksyuki 6191ef4d0e fix(build): restore make formatting after SPI-P3 additions
The SPI-P3 guard and source additions introduced longer variable names
(TINY_SPI_P3_ACCEPTANCE), so mbake realigns the affected assignment blocks
in Makefile, app/apps/ci_smoke/tiny.mk and rtl/mk/software.mk. Formatting
only; no functional change. Fails the quality gate's mk-format-check
otherwise (CI run 39719773198).
2026-10-22 13:15:17 +08:00
maksyuki 31daf3e84c feat(spi): implement SPI-P3 Tiny GPIO RCU and SDK integration
Integrate the SPI-P2 shared-DMA ABI into the Tiny product: SPI0 at
0x1001D000 with IRQ25 and RCU target16, the four frozen Gen1 ALT routes,
latched four-bit source qualification through the fabric and APB CDC, GPIO
readiness/ownership guard, and the bounded rs_spi_* HAL with the
TINY_SPI_P3_ACCEPTANCE ci_smoke image. Tiny DMA enables V2.2 requests 16/17
with exact fixed FIFO MMIO checks; Mini remains default-disabled and
unchanged. Review closure: the DMA AXI4 master stages the origin channel with
each burst so final and contended SPI alias bursts stay qualified, the RCU
spare feedback bit is tied off for four-state simulators, and the
clock-switch quiescence now includes the SPI session.

Validation: full Pytest 2097 passed, 0 failed, 1 skipped (optional pypdf);
both Tiny profiles pass the SPI-P3 Verilator acceptance (SIM_TEST_PASS
cycles=1030088); R2-P7 Verilator acceptance, Mini DMA formal prove and
cover, Mini/Tiny lint, Tiny Yosys synthesis, netsim-boot and OpenSTA pass;
C format/policy/host tests and RTL format/style checks clean. Evidence and
remaining obligations are recorded in docs/ip/spi-verification.md.

Tiny Icarus behavioral remains blocked by the pre-existing observer/sv2v
defect (routed to the R2 DV owners); Mini smoke synthesis host timeout is
skipped per maintainer decision. Human phase acceptance and SPI-P4/P5
remain outstanding; phase_accepted stays false.
2026-10-22 11:57:29 +08:00
maksyuki 991ae606f9 fix(hp): order OpenC906 write bursts behind their pad AW issue
The vendored BIU streams a writeback's W data as soon as the victim
buffer offers it (AXI-legal W-before-AW), while the AW still waits in
awbuf for the serializing 128->64 downsizer to finish the previous
write (the ~200-cycle SDRAM write response latency). The Mini HP
fabric behind the pad is single-outstanding (downsizer + MMIO demux +
target guard, no WID), so the early W beats are absorbed into the
previous write's burst; each write's AW then arrives to find its W
already consumed by the previous write's stream. The cascade persists
until the LSU freezes (its fills block behind the SDRAM write channel,
which is parked waiting for the orphaned write's W data), leaving a
final orphaned AW whose W beats never come: the target guard parks in
WriteStream, the SDRAM core parks in its write-data state and blocks
the pending read fill, and the C906 stalls at the next LSU-serializing
instruction.

Event-level tracing pinned the mechanism: with the guard parked, the
C906 write side is fully idle (victim buffer idle, store buffer idle,
BIU write-selection FIFO empty, zero W beats presented at the 128-bit
port for the wedged write) while the guard and the SDRAM controller
both hold the orphaned write's AW.

The rtl/mini/ip_overrides/aq_biu_write_channel.v override gates the W
stream on the burst's AW having been issued on the pad (pad-issued-AW
vs completed-W-burst order counters), restoring the AW-before-W order
the fabric requires without touching the vendored checkout. The
generator registers the override under the pinned sha256 guard, and
the Makefile stamps it as a dependency.

Evidence: the deterministic wedge payload and the no-fence control run
unbounded (previously wedged at ~22 rounds); hp-smoke-sim and
hp-rtthread-sim pass (SIM_TEST_PASS code=0); hp-linux-sim completes
userspace acceptance (Run /init as init process, HP_LINUX_INIT_PASS,
retroSoC HP Linux ready, HP_LINUX_READY, SIM_TEST_PASS code=0, 1.63 G
emulator cycles, status: passed with no missing markers); pytest
tests/test_hp_platform.py passes 20/20. docs/hp-rv64-validation.md
records the mechanism and the acceptance.
2026-10-21 11:30:42 +08:00
maksyuki 3b9b83657a feat(spi): implement DMA V2.2 paced FIFO integration
Add five-bit SPI DMA request support, capability discovery, source-qualified pacing, descriptor cancellation guards, and focused P2 evidence. Keep Tiny and Mini product instances default-disabled until product integration.

Validation: focused SPI-P2, DMA parity, SPI parity, and SPI-P1 checks passed (53 passed, 10 deselected).

Full product integration, post-edit full Pytest, and physical qualification remain pending.
2026-10-21 09:16:07 +08:00
maksyuki 4b3553faa7 docs(spi): record SPI-P1 validation and review closure
Document the standalone interfaces, timing checker, FIFO pressure cases,
tool-component identity and exact execution commands. Update subsystem
guides and the verification ledger with the matching ICS55/IHP130 evidence.

Keep historical failures and producer identities separate from the new
results. Record the optional PDF-test skip, unconstrained IO boundaries,
deferred full-product regressions and the human phase-acceptance gate.

Validation: 21 local links and the documentation-only post-test delta
checked; git diff --check passed. No generated evidence is committed.
2026-10-19 13:53:32 +08:00
maksyuki a64526c6a9 feat(spi): add standalone SPI-P1 core and verification
Implement SPI-P1 from docs/ip/spi.md with a PCLK master, registered APB
responses, packed 8x32 TX/RX FIFOs, finite quotas and retained-session
abort/recovery. Add the handwritten SVH/C register mirror and private
source, credit and GPIO qualification interfaces.

Add independent pin timing and data checks, malformed-waveform negatives,
FIFO stall/resume and phase-safe abort cases. Provide isolated lint,
simulation, compositional formal, synthesis, netlist and observational STA
flows with source-bound artifacts and tool-component fingerprints.

Validation on the reviewed worktree: 2085 pytest tests passed and one
optional pypdf test skipped; both RTL simulators, fresh depth-192 BMC and
cover, and ICS55/IHP130 block synthesis and netlist simulation passed.
Formatting, style/readiness, Ruff and regression dry-runs passed.

SPI remains outside product filelists with DMA capability disabled.
SPI-P2/P3 integration, full-product regression closure and physical/IO
qualification remain pending; no phase acceptance or policy change.
2026-10-19 13:47:03 +08:00
maksyuki e62ccdad87 docs(tiny): record R2-P10 validation and remaining gaps
Document the P10 workload, profile selection, exact command matrix,
single-execution policy and retained source/binary identities. Record
matched performance, camera/audio/backend results, P7 and VGA follow-ups,
and the approved quality repairs with their original phase attribution.

Preserve failed attempts and distinguish later successful checks from
historical evidence. Record 2031 passed / 1 skipped for the final Pytest
run, five firmware builds and four byte-identical Tiny HEX comparisons.

Keep phase_accepted=false. Full long Icarus and complete supported
regression, publication/PDF readiness and final physical/PVT/board/sensor
qualification remain open; observed timing is not timing closure.

Validation: documentation links and commands checked; git diff --check
passes. The existing evidence remains bound to its pre-commit revision.
2026-10-18 20:52:13 +08:00
maksyuki 1d5959680e fix(publications): align DVP and PSRAM source bindings
Follow the shared PSRAM model path and bind the DVP DMA selector together
with its Tiny/Mini definition, preserving Mini bulk-channel semantics.

Describe the 129-bit configuration/epoch CDC packet, 128-bit payload
extraction and applied register using the existing RTL. Complete isolated
fixture dependencies and add negative checks for channel, width, slice
and register-bypass drift without relaxing source validation.

The final publication selection passes 163 tests with one optional skip;
the full final worktree passes 2031 tests with the same pypdf skip.
Retain publication identity and strict source-drift checks. No RTL, PDF
generation, source-baseline refresh or physical qualification is included.
2026-10-18 20:51:47 +08:00
maksyuki aaeaef6fa1 fix(tiny): align P7 capability checks with DVP targets
Require the implemented DVP-inclusive 0x7fff target set in the P7
acceptance image. Preserve the exact startup comparison and keep the
architectural allowed mask separate from implemented capabilities.

Add cross-source checks against the real SYSCTRL instance and negative
cases for stale, expanded, missing, ambiguous or weakened expectations.
Production capability bits and the HAL ABI are unchanged.

The focused 14-test selection and both ICS55/IHP130 P7 Verilator runs
pass strict Tiny terminal, lifecycle and profile checks. The final
worktree also passes 2031 Pytest tests with one optional pypdf skip.
2026-10-18 20:51:15 +08:00
maksyuki dd340b9bd6 feat(tiny): add R2-P10 performance qualification campaign
Add an isolated SAFE24 QVGA capture, CPU statistics and SDIO save/readback
image with passive transaction observers. Keep ordinary images, production
RTL, public interfaces and dependency versions unchanged.

Retain matched binaries and source-bound stage evidence, distinguish
software comparisons from architectural measurements, and reject invalid
terminal results or incompatible resume inputs. Count SDIO descriptors and
status writebacks separately from pixel payload.

Validation on the final worktree includes 2031 passed / 1 skipped Pytest
tests, C format/policy/host checks, and directed observer tests on Icarus
and Verilator. Selected ICS55 and IHP130 SAFE24 campaigns and compact
backend checks pass; negative STA and warning observations are retained.
Complete P10 acceptance remains pending final regression and human review.

Specification: docs/ip/tiny-soc.md, TINY-R2-P10.
2026-10-18 20:50:55 +08:00
maksyuki 0ab5eefba4 build: normalize Make file endings for the locked formatter
Remove one final LF from four Make files to satisfy the existing mbake
1.4.6 configuration. Preserve all other bytes and keep the independent
P10 implementation out of this formatting commit.

Final-worktree validation confirms identical configuration and command
expansion for five firmware variants, including the Mini lint dry-run.
Format, software policy and host checks pass. The existing editorconfig
newline discrepancy remains a separate policy issue.
2026-10-18 20:50:10 +08:00
maksyuki 5b81dea4fe docs(tiny): record R2-P9 validation and remaining gaps
Document the DVP integration contract, reviewed remediation and source-bound
ICS55/IHP130 evidence, preserving original phase IDs and historical runs.
Record matched firmware binaries, current functional results, observational
STA, warning deltas and unresolved global quality/qualification gaps.

Evidence was produced from 39ae718 plus the archived worktree; retain that
provenance rather than relabeling earlier runs with new commit identities.
P9 human acceptance remains pending. This documentation does not advance P10
or qualify a physical operating point.

Validation: read-only artifact/source hash review and git diff --check.
2026-10-17 15:33:25 +08:00
maksyuki 83fe263e40 fix(physical): separate Tiny camera timing constraints
Add isolated default and camera LibreLane IO profiles, assigning camera
inputs to the pixel clock and keeping ordinary GPIO constraints in default.
Separate generated output roots and synchronize the commercial clock-domain
inventory with the P9 DVP domain.

Retained validation: nine LibreLane scenario tests and 50 commercial-flow/
Tiny reset-inventory tests pass. Constraints retain development assumptions;
no commercial EDA, physical signoff or board timing qualification is claimed.

Specification: docs/ip/tiny-soc.md, TINY-R2-P9.
2026-10-17 15:33:13 +08:00
maksyuki 8f5630fb41 feat(tiny): implement R2-P9 DVP capture and recovery
Connect DVP to Tiny DMA2/request 11, IRQ15 and the camera pad/reset lifecycle.
Harden shared capture CDC, frame statistics, per-row size validation and HAL
cleanup while preserving the Mini DMA3 binding and existing register ABI.

Add deterministic capture/recovery firmware, source-bound evidence tooling,
focused RTL/host tests and compact netlist acceptance. Preserve SAFE24,
128 KiB main SRAM, private Crypto storage and the locked dependencies.

Retained validation: focused RTL, host/policy checks, Mini firmware, and
ICS55/IHP130 RECOVERY, QVGA, synthesis and boot/DVP netlist checks pass.
Full-system VGA remains historical; long full Icarus and broad regressions
remain deferred. Global publication/format gaps and negative observational
STA are retained, not reported as passing qualification.

Specification: docs/ip/tiny-soc.md, TINY-R2-P9.
Evidence: docs/ip/tiny-soc-verification.md.
2026-10-17 15:32:59 +08:00
maksyuki fd03776a36 fix(xpi): align error metadata with interrupt events
Present the complete error bundle on the event sampling edge and clear stale
address and PC fields for rejected requests and polling timeouts. Preserve
register encodings, response latency and first-error snapshot semantics.

Add 12 error/IRQ scenarios for Tiny Icarus, Tiny Verilator and the Mini
Verilator consumer. Retained P9 validation covers these paths; see
docs/ip/tiny-soc-verification.md and docs/ip/xpi.md.
2026-10-17 15:32:43 +08:00
maksyuki 59b6eca095 docs: pin the write wedge to the C906 LSU data-release with probe evidence 2026-10-17 09:05:51 +08:00
maksyuki 4497168950 docs: record the HP Linux write-channel wedge frontier and its evidence 2026-10-17 03:46:32 +08:00
maksyuki 3d2f685a9a docs: record the GF180 SRAM macro path and its evidence
Extend the chapter 3 memory-swap documentation to GF180: hp-platform.md
adds the tiling table (8-bit macro stacking with registered read muxes),
notes the repo-owned functional models versus the vendor collateral in the
locked PDK, and documents the SKY130 byte-mask blocker as the reason that
PDK stays behavioral; hp-rv64-validation.md records the directed-TB,
MEM_INTF, boot-testbench, and SoC macro-sim evidence; the two READMEs
generalize the override wording to IHP130/ICS55/GF180. Physical
qualification (Liberty registration, STA, LEC) stays explicitly deferred.
2026-10-15 15:55:19 +08:00
maksyuki 7da9a7efb8 test(hp): cover the GF180 SRAM+ICG macro path in the boot testbench
The gf180 boot testbench mode defines PDK_GF180 and therefore now compiles
the SRAM macro branches alongside the ICG cells: add the repo-owned
gf180_sram_sim_cells.sv to its model list and rename the test to
test_c906_boots_smoke_payload_with_gf180_macros. Both GF180 models are
repo-owned, so the mode no longer depends on the PDK checkout.

Evidence: tests/test_hp_platform.py passes 20/20 with all five boot modes
(behavioral, ihp130, ics55, sky130-icg, gf180); the CI-flavored gf180
profile simulation passes at 26,462,456 cycles with SIM_TEST_PASS code=0.
2026-10-15 15:55:01 +08:00
maksyuki a8c897d475 feat(hp): add the GF180 SRAM macro path to the OpenC906 wrappers
Add a PDK_GF180+HAVE_SRAM_MACRO (without PDK_BEHAV) branch to each of the
eight aq_spsram_* overrides, tiling the 8-bit GF180 macros
(sram{64,128,256,512}x8m8wm1, per-bit active-low WEN, matching polarity so
no inversion is needed): 512x8 tiles with registered read-mux depth
stacking for 1024x16/2048x32/1024x64, width stacks of depth-exact 256x8
and 64x8 tiles for 256x59/64x58/64x88/64x98 (partial top tiles tie unused
WEN bits inactive), and a single exact 128x8 tile for the dirty array.
VDD/VSS follow the tc_sram.sv GF180 convention.

The GF180 CI profile (HAVE_HP=YES, HAVE_SRAM_MACRO=YES, PDK_BEHAV unset)
now compiles the macro path automatically. Behavioral, IHP130, and ICS55
paths are bit-identical. SKY130 intentionally stays behavioral: the locked
OpenRAM macro offers only byte-granular wmask0 while six of the eight C906
arrays require per-bit writes (BHT one-hot, 29/44/48-bit field groups,
single-bit dirty updates).

Evidence: directed 8-wrapper equivalence TB and the MEM_INTF adaptation
pass on the GF180 path; the gf180 boot testbench and the GF180 SoC
hp-smoke-sim both pass (SIM_TEST_PASS code=0, 3,644,186 cycles, identical
to every other macro mode).
2026-10-15 15:54:42 +08:00
maksyuki e5819d0a27 feat(tech): add the GF180 64/128/256x8 SRAM functional models
Extend gf180_sram_sim_cells.sv with pin-compatible functional models for
gf180mcu_fd_ip_sram__sram{64,128,256}x8m8wm1, matching the existing 512x8
model's style and behavior (registered read, per-bit active-low WEN,
VDD/VSS sanity checks). All four geometries ship vendor collateral in the
locked gf180mcu-pdk checkout; the repo-owned models keep simulation
self-contained per the existing convention. No filelist change: the file
is already listed in pdk_gf180.fl.
2026-10-15 15:54:01 +08:00
maksyuki 7070be96c9 docs: record the ICG replacement and its evidence
Close out the chapter 3 documentation: hp-platform.md gains the ICG
section (three override points, per-PDK cell table, the ICS55 SE-into-E
note, and the two-state reset rationale), leaving only physical/STA
qualification deferred; hp-rv64-validation.md records the MEM_INTF ICG
results, the five boot testbench modes, and the four SoC-level runs with
the remaining gaps; the two READMEs extend the override inventory to
hart-ID + sysmap + SRAM wrappers + clock-gating cells.
2026-10-15 14:06:08 +08:00
maksyuki f83fc3c1c4 test(hp): boot the C906 smoke payload with per-PDK ICG cells
The ihp130/ics55 macro-mode boot testbenches define PDK_IHP130/PDK_ICS55,
so they now also compile the ICG branches: extend their model sets with
sg13g2_udp.v+sg13g2_stdcell.v and ics55_h7cr_functional.v respectively
(the latter with +define+functional, mirroring pdk_ics55.fl). Add
test_c906_boots_smoke_payload_with_sky130_icg and ..._gf180_icg covering
the two PDKs whose SRAM wrappers intentionally stay behavioral (mixed-mode
coverage); both skip when the PDK checkout is not materialized.

Evidence: all five boot testbench modes pass with HP_C906_BOOT_TEST_PASS
(5 passed, 634s); whole-SoC macro+ICG runs pass for IHP130 and ICS55
(hp-smoke-sim, SIM_TEST_PASS code=0 with the GA2D lifecycle markers), and
the CI-flavored sky130/gf180 profile simulations pass at 26.46M cycles.
2026-10-15 14:05:56 +08:00
maksyuki 65c19e7005 feat(hp): replace the OpenC906 clock-gating cells with per-PDK ICGs
Complete the integration manual chapter 3 cell swap (the ICG half; the
SRAM half landed earlier). Three new reviewed overrides, registered in
generate_openc906.py with sha256 pins on the vendored files and added to
the generated-filelist stamp prerequisites:

- gated_clk_cell.v (216 CPU instances) and tdt_gated_clk_cell.v (DTM):
  pass-through upstream by default; with PDK_IHP130/PDK_ICS55/PDK_SKY130/
  PDK_GF180 and without PDK_BEHAV they instantiate the process ICG cell
  (sg13g2_slgcp_1 with SCE, ICGX1H7R with the scan enable ORed into E
  because the ICS55 cell has no TE pin, sky130_fd_sc_hd__sdlclkp_1 with
  SCE, gf180mcu_fd_sc_mcu7t5v0__icgtp_1 with TE and notifier tied off).
- BUFGCE.v (PLIC/CLINT div-2 gate): the upstream behavioral latch model
  stays byte-identical by default; the same four PDK branches substitute
  the process cell with the scan input tied off.

The GF180 branch uses a repo-owned icgtp_1 functional model in
rtl/tech/gf180_seq_sim_cells.v (following the file's dff precedent)
because the vendor functional model references a UDP latch primitive that
the locked gf180mcu-pdk checkout never ships. SKY130 picks up the vendor
sdlclkp model through pdk_sky130.fl, following the existing cell pattern.
ASIC CI profiles with PDK_BEHAV unset now compile real clock gating;
PDK_BEHAV=YES profiles are bit-identical.

Evidence: the manual's MEM_INTF c906_icg_test_tb passes on all four PDK
cell paths (Icarus adaptation); the five-mode boot testbench suite passes
on top of this change.
2026-10-15 14:05:46 +08:00
maksyuki 65b1794a20 fix(hp): hold the C906 ICG scan enable during reset
Real clock-gating cells deadlocked the C906 boot in two-state Verilator:
a reset held low from t=0 never fires an async-reset flop's reset branch,
and the DTM sleeps at boot (dmactive=0), so the gated dm_pclk never edges
and dm_core_rstn (reset value 1) kept its zero-init 0, holding the core in
reset forever. Drive pad_yy_icg_scan_en/pad_tdt_icg_scan_en with the
inverted core/APB reset so every gate is transparent while in reset and
async-reset flops initialize on running-clock edges — the standard POR
clock-force pattern silicon gets from the held level.

Pass-through (default/PDK_BEHAV) builds ignore SE entirely; the default
ihp130-hp smoke run stays cycle-identical (3,644,186 cycles), proving the
change is inert until real ICG cells are compiled in.
2026-10-15 14:05:33 +08:00
maksyuki 39ae71887c docs(tiny): record R2-P8 PSRAM validation
Document the optional NSS1 PSRAM contract, workload and evidence policy, P7 acceptance boundary, P8 correction follow-up, and profile-specific synthesis, netlist and observational STA results. Keep full Icarus, physical qualification and human P8 acceptance explicitly open.
2026-10-15 11:59:18 +08:00
maksyuki f6190f91e6 feat(tiny): implement R2-P8 XPI PSRAM transport
Add optional Tiny NSS1 PSRAM initialization, identity and geometry checks, mapped CPU/DMA workload coverage, and retained pin-level device verification. Harden shared XPI byte lanes, burst boundaries, response completion and timeout behavior while preserving NOR/SRAM-only boot and Mini compatibility.\n\nValidation: focused P8/XPI tests, ICS55 and IHP130 Verilator P8 replays, Tiny netlist boot, synthesis and observational STA completed. Full long-running Icarus firmware remains deferred to final Tiny qualification.
2026-10-15 11:57:18 +08:00
maksyuki 655c5871ea feat(tests): implement historical publication fixture preparation and validation tests 2026-10-15 02:57:30 +08:00
maksyuki 6fba349894 docs: record the ICS55 SRAM macro path and its evidence
Extend the chapter 3 SRAM swap documentation to the ICS55 exact-geometry
macros: hp-platform.md describes the direct-replacement mapping and
gating next to the IHP130 stacking table, hp-rv64-validation.md records
the ICS55 boot-TB, MEM_INTF, and SoC macro-sim evidence along with the
precise remaining gaps (Yosys smoke synth needs Liberty registration for
the new macros; STA/LEC stay deferred), and the two READMEs generalize
the override wording to the PDK-selectable IHP130/ICS55 paths.
2026-10-15 02:42:48 +08:00
maksyuki b33c57fae2 test(hp): boot the C906 smoke payload on ICS55 SRAM macros
Generalize the focused boot testbench helper from a boolean to a macro
mode selector (behavioral / ihp130 / ics55) and add
test_c906_boots_smoke_payload_with_ics55_sram_macros, which runs the same
real smoke payload with +define+PDK_ICS55/+HAVE_SRAM_MACRO and the eight
materialized ics55_ecos_sram_* core models; the test skips when the
macros are not materialized. The ICS55 models need no FUNCTIONAL define.

Evidence: all three boot testbench modes pass with
HP_C906_BOOT_TEST_PASS; a whole-SoC macro-mode run via
'make CONFIG=configs/ci/ihp130-hp.mk PDK=ICS55 PDK_BEHAV=NO SIMU=VERILATOR
hp-smoke-sim' passes with SIM_TEST_PASS code=0 and the GA2D cache
lifecycle markers.
2026-10-15 02:42:36 +08:00
maksyuki 64c62f8cfb feat(hp): add the ICS55 macro path to the OpenC906 SRAM wrappers
Extend each of the eight aq_spsram_* overrides with a
PDK_ICS55+HAVE_SRAM_MACRO (without PDK_BEHAV) branch that instantiates
the matching exact-geometry ics55_ecos_sram_* macro. The ICS55 interface
polarity (CEB/GWEB/WEB active-low, per-bit WEB) matches the wrappers
exactly, so the branch is a single direct instantiation with MARE/MAR
tied off; no inversion, stacking, or padding is needed. Priority order is
PDK_BEHAV behavioral, then IHP130 macros, then ICS55 macros, else the
upstream behavioral model; the behavioral and IHP130 paths are
bit-identical.

The committed ICS55 CI/cluster profiles (HAVE_HP=YES, HAVE_SRAM_MACRO=YES,
PDK_BEHAV unset) now compile the macro path automatically.

Evidence: directed 8-wrapper equivalence TB and the manual section 3.2
MEM_INTF adaptation (Icarus) pass on the ICS55 path; the CI-flavored
ics55 profile simulation passes with SIM_TEST_PASS code=0.
2026-10-15 02:42:22 +08:00
maksyuki 2583f13828 build(pdk): lock the eight C906 ICS55 SRAM macro releases
Register the eight exact-geometry OpenECOS ICS55 SRAM macros for the Mini
HP core (1024x16_m8, 2048x32_m8, 256x59_m4, 1024x64_m8, 128x8_m8,
64x58_m4, 64x88_m4, 64x98_m4) as locked archives in
dependencies.lock.json, each pinned to its GitHub release URL and tarball
SHA-256. Extend the setup.py materialization list so 'make setup-pdk'
downloads and extracts them below .cache/retrosoc/pdk/ics55/sram/, and
list the new core models in the ICS55 Icarus/Verilator filelists (stub
entries in the Yosys filelist for cross-file consistency; the synthesis
macro binding itself remains Liberty-side physical collateral).

Evidence: dependency_lock.py validates the updated lock; setup-pdk
materializes all eight macros with verified checksums.
2026-10-15 02:42:13 +08:00
maksyuki 01e33b6209 feat(tiny): update regression commands for P7 acceptance and adjust quality workflow tools 2026-10-14 20:21:20 +08:00
maksyuki 16f2a8118a Merge branch 'dev' into feat/mini-hp-core 2026-10-14 18:23:57 +08:00
maksyuki b3edbaedd4 docs(tiny): record P7 validation and reset integration contracts
Document the RCU ownership, profile/PDK mapping, exact validation commands,
matched firmware, source snapshots and current 06-00 backend evidence.
Separate historical checkpoints and the rejected 04-00 candidate from
current response-conservation and source-reset validation.

State the production DMA drain and common XPI reset preconditions without
claiming unrestricted standalone bridge source-reset support. Record the
54-case directed result, expected-negative checks and unchanged design
inputs that justify retaining the original backend evidence.

Preserve full-suite failures and focused corrections, interrupted Icarus
attempts, final-phase deferral, negative timing and missing physical
qualification. Keep P7 human acceptance and later phases separate.
2026-10-14 16:56:34 +08:00
maksyuki bc48cec74a feat(tiny): implement R2-P7 clock and reset lifecycle
Integrate the Tiny RCU, normalized REF24 control, external-input profiles,
single PLL backend, SYS/MEM/PCLK clocks, CPU-only WFI gating, peripheral
lifecycle control and retained debug behavior. Keep CPU and all 32 main
SRAM macros on SYS and the six private Crypto macros on PCLK.

Add the handwritten RCU register/HAL contract, RS_EBUSY, bounded SDK
operations and focused firmware. Preserve shared-IP defaults and the
ICS55/PLL SAFE24 boot and explicit IHP130/no-PLL compatibility profiles.

Use APB/AXI domain bridges and source-owned response holders to preserve
backpressured responses, complete aborted bursts and prevent stale replay.
Verify production DMA source-reset drain and common XPI endpoint reset
with extracted integration bindings and an independent scoreboard.

Add source-bound macro/clock audits, SAFE24 observational STA constraints
and commercial-adapter host checks. No P8 functionality or operating-point
qualification is included. See TINY-R2-P7 in docs/ip/tiny-soc.md.

Validation: 54 P7 directed tests pass, including both simulators, ten
source-reset ratio runs and two expected-negative drain mutations.
RTL format/style, clock/reset inventory, Ruff and both Tiny PDK PR dry-runs
pass. Retained 06-00 synthesis and strict netlist boots pass for both PDKs;
STA remains negative and observational. Source comparison confirms only
the follow-up tests changed after that backend campaign.

Evidence: build/ics55-tiny-2026-10-14-06-00-ff4b5cef6eb5/meta/
tiny-r2-p7-source-reset/summary.json. Earlier firmware, HAL and compatibility
results and the non-clean full-suite attempt retain their original
attribution. Full Icarus firmware is deferred to final Tiny qualification;
this commit does not constitute human phase acceptance or physical signoff.
2026-10-14 16:56:01 +08:00
maksyuki 6fbc6ec521 fix(flow): retain terminal evidence across interrupted runs
Record parent and child process IDs for diagnostics, persist interruption
before cleanup, and ignore repeated termination signals during cleanup.
Close unexpected failures with a terminal result and retain the child's
exit status without treating namespace-local PID absence as completion.

Require a successful terminal run_flow result when checking simulation
logs with an associated result file. Cover repeated cancellation and
reject running, failed or inconsistent terminal records despite PASS text.

This supports the TINY-R2-P7 campaign. Interrupted and timed-out runs remain
non-acceptance evidence; UART output alone cannot qualify a Tiny simulation.
2026-10-14 16:55:12 +08:00
maksyuki a14fe12724 build(deps): pin PWM runtime clock reporting for Tiny P7
Advance the approved PWM dependency to
38efaf5e20f084a00148920087c60cadab61839b so Tiny RCU can publish the
committed PCLK rate through the existing PWM register interface.
Keep the static-clock default for existing consumers.

Required by TINY-R2-P7 in docs/ip/tiny-soc.md. The locked checkout and
P7 validation use this exact revision; dependency-lock validation passes.
2026-10-14 16:54:43 +08:00
maksyuki 06e90bdb93 docs: record the OpenC906 SRAM macro swap and its evidence
Move the chapter 3 memory swap from deferred to simulation-validated in
docs/ip/hp-platform.md (mechanism, define gating, and the stacking table)
and docs/hp-rv64-validation.md (macro-mode boot TB and SoC macro-sim
evidence, with the remaining synthesis/netlist/STA/LEC gates called out).
Extend the override inventories in rtl/README.md and scripts/README.md to
cover the eight aq_spsram_* wrappers. The chapter 3 ICG replacement and
physical qualification stay explicitly deferred.
2026-10-14 16:33:55 +08:00
maksyuki 7ca1a1a746 test(hp): boot the C906 smoke payload on IHP130 SRAM macros
Factor the focused hp_core_wrapper boot testbench into a shared helper and
add test_c906_boots_smoke_payload_with_ihp130_sram_macros, which rebuilds
the same real smoke payload run with +define+PDK_IHP130/+HAVE_SRAM_MACRO/
+FUNCTIONAL and the committed RM_IHPSG13_1P_* models. The payload's cache
maintenance and GA2D data movement exercise all eight replaced SRAMs
(BHT/ICache/DCache/JTLB) for real; both modes must reach
HP_C906_BOOT_TEST_PASS.

Evidence: pytest tests/test_hp_platform.py -k boots_smoke_payload passes in
both modes (2 passed); a whole-SoC macro-mode run via
'make CONFIG=configs/ci/ihp130-hp.mk PDK_BEHAV=NO SIMU=VERILATOR
hp-smoke-sim' passes with SIM_TEST_PASS code=0 and the
HP_LINUX_READY/HP_GA2D_PASS/HP_GA2D_CACHE_CLEAN markers.
2026-10-14 16:33:46 +08:00
maksyuki dd3ee032b2 feat(hp): swap the OpenC906 SRAM wrappers to PDK-selectable macros
Implement the memory replacement required by chapter 3 of the OpenC906
integration manual for the Mini HP core. The eight aq_spsram_* single-port
SRAM wrappers (BHT, ICache data/tag, DCache data/dirty/tag, JTLB data/tag)
gain reviewed overrides in rtl/mini/ip_overrides/, registered in
scripts/generate_openc906.py with sha256 pins on the vendored files at the
locked revision b0c06eb1.

Each override keeps the upstream behavioral aq_f_spsram_* instance
byte-identical by default; only PDK_IHP130 + HAVE_SRAM_MACRO without
PDK_BEHAV instantiates IHP130 RM_IHPSG13_1P_* macros, stacked per manual
section 3.1.5 (depth stacks with a read-registered bank select, width
stacks, zero-padded unused write-mask bits). Macro ports map CEN/GWEN/WEN
onto A_MEN/A_WEN/A_REN/A_BM with A_DLY tied high and BIST pins tied off,
matching the tc_sram.sv convention. Committed CI profiles keep
PDK_BEHAV=YES, so their simulation results are unchanged.

The Makefile also lists the new overrides as prerequisites of the
generated-filelist stamp so editing one forces regeneration.

Evidence: directed 8-wrapper equivalence TB (behavioral vs macro, Icarus)
and the manual section 3.2 MEM_INTF suite adapted to Icarus both pass on
the macro path.
2026-10-14 16:33:35 +08:00
maksyuki e6774d0f69 docs: record the STIMECMP supervisor-timer storm root cause 2026-10-12 22:34:03 +08:00
maksyuki 4ce34734ce fix(hp/linux): park the C906 internal-CLINT STIMECMP at cold boot
The C906 ORs the internal CLINT's hardware supervisor-timer line into
mip.STIP (aq_cp0_trap_csr.v: st_int && CLINTEE || stip_reg) and the RTL
resets mxstatus.CLINTEE to 1. Nothing ever programmed STIMECMP, and the
compare registers' 0xFFFF_FFFF reset values are not guaranteed to be
applied (the HP hold-reset produces no async negedge in Verilator, so
the regs stay zero), so st_int fires from the first cycle: the moment
the kernel enables sie.STIE in time_init, it falls into an infinite
supervisor-timer storm and the boot thread starves right after the
sched_clock print. (M-mode firmware is immune, which is why RT-Thread
and OpenSBI were unaffected.)

Probe evidence after the fix: MTIMECMP arms exactly one jiffy out
(mtime+3979 at HZ=250) and MTIP fires exactly at the compare value on a
healthy 288K-cycle cadence; the kernel boots through console init,
BogoMIPS, devtmpfs, and switches to the riscv_clocksource.

Park both compare registers explicitly at cold boot so the state is
deterministic on silicon and in simulation.
2026-10-12 22:32:26 +08:00
maksyuki 43a3c8d453 docs(tiny): document P6 integration and validation boundaries
Record the shared-IP and eight-channel DMA integration, common I2S/SDIO correctness fixes, deterministic workloads, snapshot update scopes and both PDKs' functional and smoke-flow evidence.

Keep original failed attempts, publication history and source attribution intact. The later final full Pytest passed 1726 tests with one optional pypdf skip in 4021.61 seconds, exit 0, in terminal session 36439; it has no standalone verdict log or JSON. Existing campaign evidence is not rewritten by this documentation commit.

Retain explicit negative timing, warning observations, legacy package/floorplan limits and pending physical qualification. Human phase acceptance and any P7 work remain separate.
2026-10-12 21:44:28 +08:00
maksyuki 952b060a70 feat(tiny): integrate P6 shared IP and eight-channel DMA
Integrate RNG, CRC, WS2812, Crypto, I2S master and the SDIO private AXI owner on SAFE24. Preserve the 128 KiB main SRAM and six private Crypto macros, add product-specific DMA assignments and reject unsupported SDK operations.

Correct APB read strobes, I2S receive assembly and SDIO command timing, backpressure and descriptor retirement. Add pin-level workloads, source-bound evidence checks and publication/commercial consumer compatibility.

Validation of the final P6 worktree: 1726 pytest tests passed with one optional pypdf skip (exit 0, 4021.61 seconds; terminal session 36439). Both PDKs passed both RTL simulators, netlist boot and 38-macro binding checks. Shared formal, Mini compatibility and software/source quality gates passed.

Evidence remains attributed to the retained dirty-worktree snapshots based on b3b30a72cd under build/ics55-tiny-2026-10-12-11-50-2eb98c0e1fae/meta/tiny-r2-p6/. Timing is negative and warning observations are not promoted. This commit does not accept P6, qualify physical operation or enable P7.
2026-10-12 21:43:30 +08:00
maksyuki b3b30a72cd docs(tiny): record P5 reset correction validation
Document corrected reset behavior, source-bound evidence, validation commands and both PDK timing observations. Mark the earlier reset repair as superseded while preserving its historical attribution.

Retain explicit limits for workload replay, full-function netlist testing and physical qualification. Human phase acceptance and P6 execution remain separate.
2026-10-12 07:15:53 +08:00
maksyuki edb6e93eee fix(tiny): preserve AXI transactions across target reset
Drain remaining write beats before returning B, retain captured R/B responses, and append missing read error beats through the response spills. Preserve first-error attribution and prevent replay after target reset release.

Cover 28 reset scenarios in both simulators, including production DMA drain and APB bridge cases. Extend reset formal checks and publication contract mutation tests.

Validation: 101 focused tests passed; full Pytest reported 1685 passed and one optional pypdf skip. TINY ICS55 and IHP130 PR regressions passed. Timing remains observational and unclosed; no performance or physical qualification is claimed.
2026-10-12 07:15:32 +08:00
maksyuki ec0adc0fd8 docs: register the HP_JTAG_DEBUG knob in the app composition guide 2026-10-12 03:20:46 +08:00
maksyuki cec7949e8b feat(hp/boot): add HP_JTAG_DEBUG pre-release JTAG select knob
Select the HP (OpenC906) JTAG target before the LP releases it, for HP
bring-up debug sessions. Behavior-neutral when off. The knob deliberately
stays out of the variant key: debug runs are not qualification evidence,
and enabling it should not force a full Linux-bundle rebuild.
2026-10-12 03:19:32 +08:00
maksyuki 31ea1a2754 fix(hp/linux): clear OpenC906 mxstatus.MAEE in OpenSBI early init
The OpenC906 user manual states mxstatus.MAEE resets to 0, but the RTL
(aq_cp0_ext_csr.v) resets it to 1. With MAEE set, S-mode page attributes
come from the T-Head extended PTE bits [63:59], which a stock mainline
kernel never programs, so every translated page is non-cacheable; the
C906 then raises a store/AMO access fault (cause 7) for any AMO on such
a page (aq_lsu_ag.v: !mmu_ca && ag_pipe_amo). The first victim was
set_cpu_online()'s amoor.d.aqrl on __cpu_online_mask, after which the
kernel entered the do_trap_break storm before its first console print.

Bare-metal Sv39 payloads proved independently that page-table walks,
loads/stores, and the bus fill path are correct (4 KiB three-level,
2 MiB megapage, high-half canonical VAs, cold fills from SDRAM after D$
eviction); the failure was purely the AMO-on-non-cacheable rule, and no
bus error response or PMP denial was observed on probes.

early_init now clears mxstatus.MAEE so translated accesses follow the
sysmap override (RAM cacheable, MMIO strong-order device) and the stock
kernel needs no T-Head PBMT errata. Evidence: directed payload passes
the full AMO battery (amoor/amoadd/amoswap/lr-sc, cold-line and
high-half-VA variants); hp-linux-sim (bounded 2 h wall) boots past
set_cpu_online, prints 'Linux version 6.12.105+', and keeps retiring
into meminit with no further traps. Userspace acceptance continues on a
longer bounded run; the target stays unqualified until it completes.
2026-10-12 03:19:21 +08:00
maksyuki 160d4e35f0 fix(hp/linux): initialize the C906-internal PLIC through OpenSBI
The retrosoc_hp platform registered no irqchip_init hook, so the
C906-internal PLIC (thead,c900-plic, decoded by the core BIU rather than
the SoC fabric) was never initialized before the kernel probed it. Select
FDT_IRQCHIP_PLIC and register fdt_irqchip_init: OpenSBI v1.9's
thead,c900-plic match applies the T-Head M-to-S delegation quirk that
S-mode external-interrupt delivery requires. Verified by nm on the
rebuilt fw_jump.elf (fdt_irqchip_init/fdt_irqchip_plic linked in).
2026-10-12 03:18:54 +08:00
maksyuki 4e6ab1a6fb feat: add Tiny R2 P5 fault handling and reset isolation tests
- Introduced  for formal verification of fault handling in the Tiny R2 P5 architecture.
- Added  to test target reset isolation and ensure proper handling of reset signals across multiple targets.
- Created  to validate system-level interactions, including CPU and DMA progress during resets.
- Enhanced  to include fault counting and master tracking for concurrent fault events.
- Developed  to automate testing of concurrency, fault accounting, and retained-image acceptance.
- Updated Python test suite to validate new configurations and ensure proper integration with Tiny R2 P5 architecture.
2026-10-11 22:55:39 +08:00
Yuchi Miao b7a776da3d Merge pull request #218 from retroSoC/dependabot/github_actions/dev/actions/upload-artifact-7.0.2
build(deps): bump actions/upload-artifact from 4.3.3 to 7.0.2
2026-10-11 22:54:13 +08:00
maksyuki dcdb7d3782 docs: record OpenC906 RT-Thread and bounded Linux bring-up evidence
hp-rtthread-sim now passes on the OpenC906 HP core with all selftest
markers (6,373,952 cycles in 542 s), exercising the internal CLINT
timer/MSWI and the internal PLIC mailbox doorbell. The RT-Thread
bring-up root-cause chain (mcor/mhcr init, sdram_axi4 and crossbar WRAP
handling) is recorded with its regression locks.

hp-linux-sim ran with a bounded 4 h wall budget (158.7 M cycles):
OpenSBI v1.9 completes on the repo-owned retrosoc_hp platform and hands
off to the kernel correctly; the kernel enters S-mode with Sv39 but
stalls in the S-mode fault path after the __cpu_online_mask store page
fault (A/D-bit emulation fixup loop), which is the current bring-up
frontier. The target stays unqualified; the synthesis-dependent gates
remain deferred to the SRAM macro swap round. Also records the latent
gap that OpenSBI never initializes the C906-internal PLIC (no
.irqchip_init), harmless for the current minimal acceptance.
2026-10-11 08:15:41 +08:00
maksyuki 473e249125 docs: retire stale Zicbom/VexiiRiscv wording after the OpenC906 swap
The Mini HP core is the locked OpenC906 with T-Head XTheadCmo custom-0
dcache maintenance; the former rv64imafdc_zicbom_max VexiiRiscv
configuration survives only as the frozen Std-series generator asset.
Sweep the leftover wording:

- scripts/README.md gains the missing setup_openc906.py and
  generate_openc906.py entries (locked source install; sha256-pinned
  overrides; single compilation unit below build/).
- configs/README.md and app/README.md describe the OpenC906 core and
  XTheadCmo maintenance instead of VexiiRiscv RTL generation and Zicbom.
- The npu-p5-hp-sim help line and the npu_p5_report.py emitted HP
  evidence mode now say polling-xtheadcmo, matching the payload's
  actual dcache.cva/iva mechanism.
2026-10-11 08:15:27 +08:00
maksyuki 269edc43a6 fix(hp): run the C906 mcor/mhcr init sequence before any real work
The C906 resets with caches and the BPU disabled (mhcr=0) and does not
initialize the cache/predictor RAMs (aq_cp0_ext_csr.v). The upstream
reference crt0 (openc906 smart_run/tests/lib/crt0.s) invalidates them
via mcor before enabling mhcr; skipping mcor makes the core execute
through uninitialized predictor/cache state (wild control flow with no
trap), and leaving caches off makes SDRAM execution ~100x slower, which
livelocked the RT-Thread 1 kHz tick ISR before the first selftest
marker.

Apply the upstream sequence at the earliest point of both HP boot
paths: RT-Thread start.S and the OpenSBI platform early_init. MMIO
windows stay strong-order non-cacheable via the sysmap override, so
enabling the D-cache is safe. hp-rtthread-sim now passes with all
selftest markers (6,373,952 cycles in 542 s).
2026-10-11 08:15:12 +08:00
maksyuki 489ff284e1 fix(axi4): correct WRAP burst handling for mid-line and page-edge fills
The OpenC906 is the first master to issue WRAP bursts (cache line fills
start at the critical word). Two latent path bugs made every such fill
fail or corrupt data:

- sdram_axi4 reconstructed the WRAP wrap-back address from the
  decrementing remaining-beat count, which cannot reproduce the wrap
  boundary; mid-line starts read the second half from wrong addresses.
  Beat stepping now uses the registered original geometry through the
  proven shared axi4_addr_gen, on both the read and write paths.
- axi4_data_crossbar burst_legal computed a WRAP burst's last address
  as if it were INCR, so fills starting in the last 64 bytes of a 4 KiB
  page were faulted as FaultProtocol and answered with DECERR. The WRAP
  last address is now computed from the wrap boundary.

Locked by new directed cases: mid-line WRAP read/write with
address-encoded data in tests/rtl/sdram_data_tb.sv and a page-edge WRAP
read routing case in tests/rtl/axi4_data_crossbar_tb.sv. Both fail on
the pre-fix RTL and pass after; full test_axi4/test_sdram (17/17),
hp-smoke-sim, hp-rtthread-sim and the PR ci_smoke all pass with the fix.
2026-10-11 08:14:57 +08:00
maksyuki 3131762b35 feat: refactor tests for SRAM and CPU in Tiny R2 P4 flow
- Updated SRAM instance paths in  to reflect new hierarchy.
- Enhanced  to include additional source files and updated parameterized tests for SRAM configurations.
- Modified  to align with new SRAM structure and added a test for stale macro hierarchy.
- Introduced  to validate dual-port local-memory protocol and CPU debug/reset functionality, including comprehensive simulation checks.
2026-10-10 18:04:19 +08:00
maksyuki ef8f7459a3 feat: add HP release window transaction retention test and update documentation 2026-10-10 16:16:11 +08:00
maksyuki 8d735aafbd feat: refactor tests and update configurations for OpenC906 migration
- Adjusted slot assignments in  to reflect new peripheral mappings.
- Updated  to validate new OpenC906 configurations, including generator and profile checks.
- Modified  to reference the new Std-series VexiiRiscv generator.
- Changed cache maintenance instructions in  to align with C906 specifications.
- Revised assertions in  to account for internal unit removals.
- Updated  to reflect changes in peripheral interface counts and policies.
- Added new test file  to ensure preservation of the frozen HP configuration in the Std-series generator.
2026-10-10 15:15:21 +08:00
maksyuki 4db27524a6 feat: implement DMA IRQ handling and WS2812 completion race tests 2026-10-10 09:35:49 +08:00
maksyuki 3e46cc80e2 feat: update API signature regex and enhance DMA function selections in tests 2026-10-09 17:13:52 +08:00
maksyuki 352b2007fd style: format Makefile and configuration files for consistency 2026-10-09 15:02:39 +08:00
maksyuki 0272c2417b feat: add WS2812 DMA and refill tests, enhance AXI4 crossbar test, and improve Tiny R2 P3 validation
- Implemented tests for WS2812 DMA sessions and refill functionality in .
- Added a new RTL testbench for WS2812 refill functionality in .
- Enhanced AXI4 data crossbar testbench to diagnose MMIO boundaries for the Mini DMA.
- Created a new Python test suite for Tiny R2 P3 to validate firmware warnings and layout placements.
- Updated existing WS2812 tests to parameterize and check for DMA backpressure integration.
2026-10-09 14:51:39 +08:00
maksyuki bab01352f8 feat: enhance commercial flow with new features and improvements
- Added support for optional files in GDS generation to handle legacy layouts.
- Introduced macro-level LVS/ERC processing to improve verification of hard macros.
- Updated STA scripts to adopt PrimeTime analysis settings from legacy flows.
- Enhanced synthesis settings to align with CX55 legacy flow, including clock gating and area optimization.
- Improved reporting functions to include detailed synthesis summaries and area metrics.
- Updated package generation script to support both TINY and MINI SOC configurations.
- Added comprehensive tests for ECO translation, timing contract generation, and constraint handling.
- Ensured compatibility with new timing contract formats and enhanced error handling for domain drift.
2026-10-08 15:20:39 +08:00
maksyuki 8a2dad4a93 feat: enhance Tiny ICS55 support in quality workflow and add validation tests 2026-10-08 15:20:05 +08:00
maksyuki e3ddeacea3 feat: enhance Tiny R2 Baseline and ICS55 Support
- Updated  to include support for the ICS55 PDK, allowing for conditional source inputs and configuration checks.
- Added new test cases for the ICS55 platform, including PLL backend and GPIO readback functionality.
- Modified existing tests to accommodate changes in configuration and source input handling.
- Introduced new parameters in the  testbench for better configurability.
- Ensured compatibility checks for the IHP130 and ICS55 PDKs in the feasibility script.
- Enhanced the publication tests to validate hardware changes more robustly.
2026-10-08 09:44:39 +08:00
maksyuki ecac3559b0 docs: refactor Tiny SoC documentation and integrate ICS55 PLL support
- Updated tiny-soc.md to reflect the 2026-10-07 refreeze, establishing ICS55 as the default target PDK with HAVE_PLL=YES.
- Added detailed sections on final timing gate policies, PLL integration, and execution order for Tiny SoC.
- Modified soc-family-positioning.md to indicate the new default target for Tiny as ICS55/PLL while maintaining IHP130 compatibility.
- Enhanced pdk/README.md and setup.py to support the integration of the locked ICS55 PLL views, including setup commands and validation.
- Introduced tests for the ICS55 PLL dependency to ensure proper integration and validation of PLL views.
- Updated rtl/tiny/README.md to clarify the current executable baseline and the pending integration of ICS55.
2026-10-07 19:24:55 +08:00
maksyuki 14a253a49a chore: update ECC installation process to use upstream installer and remove version locking 2026-10-07 18:10:28 +08:00
maksyuki 614fa6237b feat: integrate OpenECOS SRAM models for ICS55 and update related configurations 2026-10-07 08:24:23 +08:00
maksyuki b5cbc89928 feat: add Tiny R2 reset distribution and feasibility analysis
- Implemented a new TCL script for Tiny R2 feasibility checks, reporting clock properties, path delays, and reset loads.
- Created a SystemVerilog module for the Tiny R2 reset tree, managing multiple reset signals for the system and its leaves.
- Developed a Python script for capturing and analyzing feasibility metrics, ensuring compliance with reset-load and clock frequency requirements.
- Added testbenches for the Tiny R2 reset tree and FIFO, validating reset behavior and timing contracts.
- Introduced unit tests for feasibility analysis, ensuring correct handling of clock rates and reset load conditions.
2026-10-06 14:28:52 +08:00
maksyuki f06c039e79 feat: add comprehensive tests for Tiny baseline evidence and log parsing
- Introduced a new test file  to validate the functionality of the Tiny baseline evidence.
- Implemented tests for CPU checksum verification, log parsing, error handling, and artifact identity checks.
- Added parameterized tests to cover various edge cases, including handling of incomplete or duplicate measurements and incorrect data.
- Ensured that the tests validate the integrity of simulation results and the retention of compiler commands after post-processing.
2026-10-06 09:15:00 +08:00
maksyuki bfdc3ffaf6 feat: add PPALite extension documentation and integration details
- Introduced the PPALite extension, approved on 2026-10-05, detailing its features such as camera-inline Y extraction, RGB565 ordering, and fixed pixel/line sampling.
- Updated the tiny-soc-verification and tiny-soc documentation to reflect the new PPALite extension, including its integration with existing DVP and DMA channels.
- Added comprehensive evidence tables for PPALite phases (PPALITE-P0 to P5) outlining required evidence and current statuses.
- Clarified the relationship between PPALite and existing SPI/PIO extensions, emphasizing that earlier results cannot qualify newly added PPALite logic.
- Enhanced the README files in the RTL directory to specify PPALite's role and requirements in the context of Tiny SoC development.
2026-10-05 09:36:40 +08:00
maksyuki 2a07ebcdb1 feat: add SPI extension documentation and integration details for Tiny SoC
- Introduced the separately approved SPI extension (2026-10-04) for the Tiny SoC, detailing the addition of SPI0 as a master-only controller with 8/16-bit capabilities.
- Updated documentation to reflect the SPI phases (SPI-P0 to SPI-P5) and their respective requirements, including DMA V2.2 pacing and fixed-MMIO requests.
- Specified GPIO assignments for SPI functionality, including the use of previously reserved Gen1 ALT routes.
- Clarified the integration boundaries and dependencies on existing R2 and PIO-lite phases, emphasizing the need for complete implementation before qualification.
- Documented the implications of SPI integration on existing GPIO and DMA channels, ensuring no additional resources are allocated without proper validation.
- Updated the verification ledgers to track pending evidence and implementation gaps for both SPI and PIO-lite extensions.
2026-10-05 07:49:51 +08:00
maksyuki dad28f0c39 feat: enhance documentation for Tiny SoC and PIO-lite extension
- Updated the tiny-soc-verification.md to clarify the separation of PIO-lite as a standard-product extension, detailing its planned features and evidence requirements.
- Revised tiny-soc.md to emphasize the historical context of the R2 design freeze and the independent nature of the PIO-lite extension, including its integration requirements and phase structure.
- Added details in soc-family-positioning.md regarding the PIO-lite extension's capabilities and its distinction from the R2 performance-only approval.
- Enhanced README.md files in rtl/ip and rtl/tiny to reflect the future integration of the PIO-lite extension, specifying its features and the implications for existing RTL and DMA configurations.
2026-10-04 22:35:36 +08:00
maksyuki f633159109 feat: update documentation for Tiny Gen1 R2 target
- Clarified integration details for WS2812 and XPI in respective documentation.
- Updated the SOC family positioning to reflect changes in clock/reset configurations and DMA channels.
- Enhanced README files for librelane and RTL to include R2 target specifics, including execution order and peripheral contracts.
- Specified the active execution order for R2 and clarified the implications of the new architecture on performance and integration.
2026-10-04 17:35:01 +08:00
maksyuki 39bc766994 feat(gpio): add GPIO pad capabilities and integration tests for pull controls 2026-10-04 11:59:40 +08:00
maksyuki bb63d81978 docs: update XPI and SOC family documentation for Tiny Gen1 enhancements
- Added details on the Tiny Gen1 target's shared XPI register/LUT/PHY contract and optional NSS1 PSRAM integration.
- Clarified the memory model to include optional initialized XPI NSS1 PSRAM for whole-frame data.
- Updated the edge I/O section to reflect the alternate DVP V2 camera profile and GPIO allocations.
- Revised the shared services and package specifications to align with the latest P10 refreeze.
- Enhanced the README to include P10 documentation refreeze details, emphasizing DVP V2 contract and PSRAM integration.
2026-10-02 08:56:28 +08:00
Yuchi Miao 30ee86e3d0 Merge pull request #215 from retroSoC/dependabot/pip/requirements/dev/ruff-0.16.9
build(deps): bump ruff from 0.11.0 to 0.16.9 in /requirements
2026-10-02 08:46:42 +08:00
Yuchi Miao ee53beac43 Merge pull request #214 from retroSoC/dependabot/pip/requirements/dev/scons-4.11.1
build(deps): bump scons from 4.8.1 to 4.11.1 in /requirements
2026-10-01 22:20:05 +08:00
Yuchi Miao 902f979f3a Merge pull request #213 from retroSoC/dependabot/pip/requirements/dev/pillow-12.3.0
build(deps): bump pillow from 9.0.1 to 12.3.0 in /requirements
2026-10-01 20:40:45 +08:00
maksyuki 7f2e78b81b feat: add edge operation tests for NPU P6 reference implementation 2026-10-01 15:27:33 +08:00
maksyuki 422f48d0cd feat: refactor and enhance documentation for Linux runtime, boot acceptance, and NPU integration
- Updated fault reference documentation to clarify Linux termination behavior and NPU-P6 requirements.
- Enhanced Linux runtime section with emphasis on platform setup and kernel handoff processes.
- Revised overview section to include detailed descriptions of NPU capabilities and memory configurations.
- Improved product use documentation to specify Linux rootfs behavior and acceptance checkpoints.
- Clarified reset summary to differentiate between Linux and smoke/NPU-P6 acceptance processes.
- Updated software section to reflect changes in Linux image loading and readiness protocols.
- Modified build scripts to support RV64 architecture and ensure proper ELF requirements.
- Enhanced NPU compiler to support cycle counting for RV64 and RV32 architectures.
- Added tests to validate new configurations and ensure compliance with updated publication contracts.
2026-10-01 12:41:05 +08:00
maksyuki d084002bfe Merge branch 'dev' of github.com:retroSoC/retroSoC into dev 2026-10-01 10:51:25 +08:00
maksyuki 8e257d8043 docs: update WS2812, PLL Clock Control, and SoC Family Positioning documentation
- Revised WS2812 documentation to clarify the shared block and integration details for Mini and Tiny targets.
- Enhanced PLL Dynamic Clock Control document to specify differences between Mini and Tiny RCU implementations.
- Updated SoC Family Positioning to reflect changes in the Gen1 product/package target, including shared IP and DMA details.
- Adjusted Tiny MCU Integration README to include new features and requirements for the 2026-09-30 P6 target, emphasizing the shared peripherals and clock specifications.
2026-10-01 10:50:14 +08:00
maksyuki 3be04e9a54 feat: update README.md to enhance platform overview and quick start instructions 2026-09-30 18:32:19 +08:00
maksyuki e901e02694 feat: enhance dependency management with fallback URLs and download functionality 2026-09-30 16:30:47 +08:00
maksyuki 649758fcdf feat: add references and improve documentation for retroSoC skills
- Introduced a new maintenance reference for dependency and environment routing.
- Enhanced the feature implementation skill with migration references for behavior-preserving changes.
- Added regression and RTL migration references to support feature review processes.
- Created a new physical flow skill with detailed execution and recovery guidelines.
- Updated evals for feature implementation and review skills to include new scenarios.
- Improved the AGENTS.md and tests to reflect the new skills and references.
2026-09-30 15:08:29 +08:00
maksyuki 2f36051fd1 feat: introduce retroSoC feature implementation and review skills
- Added new skills for retroSoC feature implementation and review, including YAML configurations and evaluation cases.
- Removed deprecated mini feature design and implementation skills.
- Updated documentation to reflect changes in skill names and functionalities.
- Adjusted test cases to ensure compatibility with the new skill structure and validate the presence of required files and metadata.
2026-09-30 12:19:56 +08:00
maksyuki 3ac9e73ab9 feat: refactor tests for mailbox and environment validation
- Updated mailbox purpose tests to reflect new write order and sequence handling.
- Added tests to ensure Linux-ready values match LP contract and constants match Linux helper.
- Introduced tests to verify that offset changes do not hide stale Linux helpers.
- Enhanced environment tests to report current locked launcher and runtime versions.
- Added checks for SBT launcher presence in environment labels.
- Improved full diagram tests to validate storage geometry and RSA vector configurations.
- Expanded register tests to ensure crypto interrupt registers publish all events and lifecycle annotations preserve security boundaries.
- Modified script tools tests to include Vexii generation validation and updated workflow assertions.
2026-09-30 10:51:04 +08:00
maksyuki 9a634a9dc3 feat: update documentation for Tiny Gen1 product and package specifications 2026-09-27 22:23:16 +08:00