From 6e8554193a652992a9be28c8647839807ea92284 Mon Sep 17 00:00:00 2001 From: Cody-ic <261693366+Cody-ic@users.noreply.github.com> Date: Mon, 12 Oct 2026 02:12:13 +0800 Subject: [PATCH] [fpga] docs: record Toy Linux hardware bring-up and programming entry --- README.md | 8 +- platforms/arty-a7-toy/.gitignore | 1 + platforms/arty-a7-toy/README.md | 43 +- platforms/arty-a7-toy/SOURCE_LOCK.json | 32 +- platforms/arty-a7-toy/VALIDATION.md | 26 +- platforms/arty-a7-toy/board/README.md | 6 +- .../arty-a7-toy/evidence/2026-10-12/README.md | 77 ++ .../2026-10-12/hardware/HARDWARE_RESULT.json | 51 ++ .../2026-10-12/hardware/MANIFEST.json | 72 ++ .../2026-10-12/hardware/PROGRAM_RESULT.json | 18 + .../evidence/2026-10-12/hardware/d2xx_load.py | 158 ++++ .../2026-10-12/hardware/dfx_runtime.txt | 2 + .../2026-10-12/hardware/linux-console.log | 163 ++++ .../hardware/live-console-first.log | 6 + .../2026-10-12/hardware/live-console.log | 6 + .../2026-10-12/hardware/live_check-first.py | 24 + .../2026-10-12/hardware/live_check.py | 25 + .../2026-10-12/hardware/load-and-linux.log | 696 ++++++++++++++++++ .../evidence/2026-10-12/hardware/program.jou | 24 + .../evidence/2026-10-12/hardware/program.log | 76 ++ .../2026-10-12/hardware/program_arty.tcl | 25 + .../2026-10-12/hardware/summarize_hardware.py | 50 ++ platforms/arty-a7-toy/evidence/README.md | 6 + platforms/arty-a7-toy/program.ps1 | 3 +- platforms/arty-a7-toy/program.tcl | 5 + .../scripts/verify_hardware_evidence.py | 76 ++ .../arty-a7-toy/scripts/verify_target.py | 3 + 27 files changed, 1653 insertions(+), 29 deletions(-) create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/README.md create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/hardware/HARDWARE_RESULT.json create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/hardware/MANIFEST.json create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/hardware/PROGRAM_RESULT.json create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/hardware/d2xx_load.py create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/hardware/dfx_runtime.txt create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/hardware/linux-console.log create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/hardware/live-console-first.log create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/hardware/live-console.log create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/hardware/live_check-first.py create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/hardware/live_check.py create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/hardware/load-and-linux.log create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/hardware/program.jou create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/hardware/program.log create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/hardware/program_arty.tcl create mode 100644 platforms/arty-a7-toy/evidence/2026-10-12/hardware/summarize_hardware.py create mode 100644 platforms/arty-a7-toy/program.tcl create mode 100644 platforms/arty-a7-toy/scripts/verify_hardware_evidence.py diff --git a/README.md b/README.md index f033fc5..db20565 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,11 @@ The Arty A7 platforms have their own pinned Chisel build, serial loader, firmwar constraints and verification record. Follow its guide directly; the setup and demo below describe the existing Kintex-7 flow. -The Toy/Linux target passes complete board implementation and Linux RTL checks. -Its current Rev E DDR engineering target still requires physical DDR calibration -and Linux boot acceptance; see its guide before programming. +The Toy/Linux target passes complete board implementation, Linux RTL checks and +a physical Arty A7-100T boot with full image readback and five Linux checks. +Its PCB revision remains unconfirmed and physical Gemmini testing is pending; +see [the hardware record](platforms/arty-a7-toy/evidence/2026-10-12/README.md) +and its build/programming guide before using another board. ## Kintex-7 setup diff --git a/platforms/arty-a7-toy/.gitignore b/platforms/arty-a7-toy/.gitignore index 838bb3f..c600d86 100644 --- a/platforms/arty-a7-toy/.gitignore +++ b/platforms/arty-a7-toy/.gitignore @@ -9,4 +9,5 @@ __pycache__/ *.log !evidence/**/*.log *.jou +!evidence/**/*.jou toy-console.log diff --git a/platforms/arty-a7-toy/README.md b/platforms/arty-a7-toy/README.md index 9bb4d2e..20019ea 100644 --- a/platforms/arty-a7-toy/README.md +++ b/platforms/arty-a7-toy/README.md @@ -2,9 +2,11 @@ A Chisel-generated Toy platform for `xc7a100tcsg324-1`, with CPU, Sv39, full FP16/32/64 support and Gemmini 8×8. Complete board implementation, timing, CDC -checks and Linux RTL tests pass. The physical board revision is unconfirmed: -this is a **Rev E engineering bring-up target**, awaiting hardware DDR and Linux -acceptance. See [measured results](VALIDATION.md) before programming. +checks and Linux RTL tests pass. On 2026-10-12 the connected board was programmed, +the complete image was read back from DDR and five Linux checks passed on hardware. +This remains a **Rev E engineering target**: PCB revision is unconfirmed and +physical Gemmini tests are pending. See [measured results](VALIDATION.md) and +[the hardware logs](evidence/2026-10-12/README.md). ## Architecture and scope @@ -79,13 +81,26 @@ products and are not committed. A successful fresh board run produces ## First hardware boot -1. Confirm the physical DDR/revision matches the official Rev E parameters; - connect PROG/UART USB and select the single XC7A100T in Hardware Manager. -2. Program the selected `.bit` into volatile FPGA SRAM. On Windows: - `./program.ps1 -Bitstream -VivadoBin `. - The script does not write flash and is not run automatically. -3. Press BTN0, wait for LED0 (DDR calibrated), and close other serial clients. -4. Install `pyserial`, then load and byte-verify the image before releasing CPU: +Confirm the physical DDR/revision matches the official Rev E parameters and +connect PROG/UART USB. The script requires exactly one attached JTAG target and +one XC7A100T. It programs the selected `.bit` into volatile FPGA SRAM. + +The portable [program.tcl](program.tcl) delegates to +[board/program_arty.tcl](board/program_arty.tcl), the script used by the hardware +run. Set both paths to actual files; a clone contains sources and logs, so build +the `.bit` and Linux payload first using the commands above. + +```bash +vivado -mode batch -source /absolute/path/to/platforms/arty-a7-toy/program.tcl \ + -tclargs /absolute/path/to/toy_a7.bit +``` + +Windows paths with spaces must be quoted. The equivalent PowerShell wrapper is +`./program.ps1 -Bitstream -VivadoBin `. + +After JTAG programming, press BTN0, wait for LED0 (DDR calibrated), and close +other serial clients. Install `pyserial`, then load and byte-verify the Linux +image before releasing the CPU: ```bash python host/load.py --port COM5 --check-linux build/board-software/fw_payload.bin @@ -93,10 +108,14 @@ python host/load.py --port COM5 --check-linux build/board-software/fw_payload.bi Use the actual serial port. Expect OpenSBI, Linux, BusyBox and five PASS markers for COW, page protection, FP64 process context, the timer and the total Linux -system check. A 17 MiB transfer with full readback takes several minutes at -1 Mbps. After the script closes the port, an interactive console is available +system check. The recorded 17 MiB transfer/readback took 544.1 seconds with a +temporary 2 ms FTDI D2XX latency; default VCP settings can take substantially +longer. The archived transport script records that experiment; normal loading +uses `host/load.py`. After it closes the port, an interactive console is available with `python -m serial.tools.miniterm COM5 1000000 --eol LF`. LED1 indicates loader error or nonzero exit, LED2 CPU released, LED3 heartbeat. LEDs alone do not establish software success. Preserve the console transcript and DDR calibration result; operator acceptance additionally needs Gemmini tests. +FPGA SRAM and the DDR image are volatile: repeat programming and loading after +power loss. See the hardware record for exact bitstream/payload SHA256 values. diff --git a/platforms/arty-a7-toy/SOURCE_LOCK.json b/platforms/arty-a7-toy/SOURCE_LOCK.json index ba5ec44..13149e9 100644 --- a/platforms/arty-a7-toy/SOURCE_LOCK.json +++ b/platforms/arty-a7-toy/SOURCE_LOCK.json @@ -3,14 +3,14 @@ "memory_rtl_sha256": "8307d252185ba71a4516d1932d235a5a188816f84a5ed237bb5f3c1281d4b580", "files": { ".gitattributes": "8d9ebca04236fcd49c43562b5c6ca1d88ded1ff8c8d437fbdfe3822a5ec22d74", - ".gitignore": "a53e6d03c290aafb77c981f7e2d7eacf3a0369637725c26386a596fb07432295", + ".gitignore": "2c2d881b7e4f197b4b0baf1df40f9f6885dbd3f0d7d0bd83a5e8cca7c908fec9", ".jvmopts": "a66471d84e6e2ed0c3c40d5ebbc237d268ed9b04f3528ef22e967a2bd4e8aa44", - "README.md": "d641e506cc7296b6d48160058b8c4a561d45f4648ea90a7f84dbbdf81256a63e", + "README.md": "8d957c96f6212498b7cf906a264ea6af6a1198b5615f3582f701854e41b35c81", "SOFTWARE_BASELINE.json": "3a5c9f65771e6fd7f8172674baf22263ba7c2d9244993c9162ba526344a7b0aa", "THIRDPARTY.md": "02ed1d3ddd4fc26a8b1580eb4948ff6cf4f548c0434c89f1c6c2220bed3d4a42", "UPSTREAM_MANIFEST.json": "c4a96343e318c452420cf86b34d6008140560eeffa91cd85b4b87b229717c9be", - "VALIDATION.md": "ccc142ab197f77c2988019d8c746469736f29f87f5f087ee7462d1ef258b6d76", - "board/README.md": "7ee92595392b27a0495b2215c406add9a6d084dba36138068ecc2adeaa0e449b", + "VALIDATION.md": "9d188957eed21af33fdd6a0657dfddb5831609523c1b5d412115427a0cdd4e07", + "board/README.md": "5a7f01460107df0c5c40d2a2b18c68648ca2d7b20c914c788b880ec1b9f6f95b", "board/SOURCE_MANIFEST.json": "03d99f1f43bbf68d92df61db52bdee0019723e2e194ee5f9c12a5ac6d4c5a105", "board/arty_a7.xdc": "f13869ba386038557084adabafeb5255943d0b67f1db4b88fd907e4f095d016f", "board/axi_fullwidth.sv": "bf07ae27724dbd0a361d732dfb57109f06beef207c47a066d400cb06d7f07d5a", @@ -67,7 +67,23 @@ "evidence/2026-10-11/tests/uart-boot/RESULT.json": "46fa4f7f8c510a7d15bb28fd5afbecea196e8e6c80d14f4968f6d1215ef8e62a", "evidence/2026-10-11/tests/uart-boot/simulation.log": "a3f5e2eeffd05e81ebf75fc9b3db693fa458308c52e27ce6de58710f87746def", "evidence/2026-10-11/tests/unit/RESULT.json": "6253cd9add8621d2581c70edae034aafd6ce95ecb78adb4c12813f4297947089", - "evidence/README.md": "fcb907b575fddd2d54604201e296c4dced4f34bc3418828edf5a83524eea4aeb", + "evidence/2026-10-12/README.md": "8288b95ca8a1986394e0766e384a2aee3915ba08c9d05beb21522b7dc162a8be", + "evidence/2026-10-12/hardware/HARDWARE_RESULT.json": "514fe87e3fb0753d416f670b2b8906e98ae6b6ec49b56154e0833e5863f085e7", + "evidence/2026-10-12/hardware/MANIFEST.json": "dc06cd7d47777269119de6306c03d71c8ddf20efb9708ebdfbcd983a02993481", + "evidence/2026-10-12/hardware/PROGRAM_RESULT.json": "f45536ce8d86fa2a735ab85a9008d662c793f31d3eadc430f426abd09b95c612", + "evidence/2026-10-12/hardware/d2xx_load.py": "bf9a8f8c931b71672932f72992cd03d15977d753eebc891800e6aaefa287218f", + "evidence/2026-10-12/hardware/dfx_runtime.txt": "b70e818734e3af5f8b01153d47a37c50449a5f53b008fb4f23849ec0f957b0b9", + "evidence/2026-10-12/hardware/linux-console.log": "aceb1739620d1b1554b809c849320ed0a5f20f9a6822d1a6c3dd33fca1d6a2d3", + "evidence/2026-10-12/hardware/live-console-first.log": "ac97f527e1ec985ba08ae2b1002a2c14ff0a54fbf8078b94ba4dbe421e3ad005", + "evidence/2026-10-12/hardware/live-console.log": "fb2b77f67b02c6e73e0b7bf1e2dbf3557c1d0b98ef0d69ac4c42191107e99bd6", + "evidence/2026-10-12/hardware/live_check-first.py": "a3e37a9671d8f526d706922cec581727dfa7bb80510789b08b785caa0443583e", + "evidence/2026-10-12/hardware/live_check.py": "822eb8fbb846eb0a41a30eadc163a735dc1932dffdded54dd2117f7aaf0c60e8", + "evidence/2026-10-12/hardware/load-and-linux.log": "9633ad82626f7e59ed0b503f0263c5d620c6b6276a262e385ae8785649c1bd8e", + "evidence/2026-10-12/hardware/program.jou": "9796d9c11dd2f362818c6833a96a9801f14fe25c357fb798db61f00df210d99d", + "evidence/2026-10-12/hardware/program.log": "c754d0f5066dbd34b9035fb77ee6e8ef3fe403b03b56b97f5cdd523aba313511", + "evidence/2026-10-12/hardware/program_arty.tcl": "fbb62bafb6df602b0f5f638fb05ae4ecc90494ac162b9a5f5ac314200f7a241c", + "evidence/2026-10-12/hardware/summarize_hardware.py": "a0f681a64ca0c441fc614bf8c2ccf664e2de86d02d3d2cfe2eb0b99e7f8edefd", + "evidence/README.md": "058e5d4580d68897450dd08eb114469007f9d931bfcd5423809cd1d12811cde0", "host/load.py": "a62e48b779c9ce1d6f8f6669523e427cf48bd19be3bf50a554dc391b09b3e3b2", "patches/buckyball/GemminiBall.scala": "c18ace5c3ae6645c022af809104e4baf35da657a42ab144ce86260327ebab5aa", "patches/buckyball/GemminiExCtrl.scala": "ac3ecc72fa7deb5d50c0c42496b19de9d596b4ebaebd24496bf3792c87d85eaf", @@ -91,7 +107,8 @@ "patches/gemmini/Tile.scala": "8bee3fc67cbc6702aba72b805c3858e8cbca7cdecbd317a083b77d108a9e6e08", "patches/rocket/FPU.scala": "df54736218a12a6ec9f48b93c3d4a626e3e56c8600e3ad712905c481c47e29e3", "patches/rocket/SharedFma.scala": "e2b00a7b6d5c70cc58d7e39605cf169eb901e1d3e15f33dc46d0d981e831bcbb", - "program.ps1": "2ed75bd9737b468beed1f564cd0b2aadb74294430d232b56dab2a699a342d49c", + "program.ps1": "78405622ac77e9e723fd6437f9649d8ce8c8762274b6cdc6d29ccbbd85c039a3", + "program.tcl": "0ff928503cf00798dae132117435e34981a176c586d7aa16e587c47877ba031f", "project/build.properties": "a59fccae87ea7dba4034abbbf5333eaaa3dbb2fdcfbf37e98e3752f28c4a3892", "project/repositories": "063c457354f9a2bd99f0d1c5c51f0fc3d7ffff04894bb4b740538043fb3b61f6", "rtl/FpuRfLvt.sv": "bbc9ad168c94204a946b3e107115fae7f6042fd6c7f95807d7af367449e28950", @@ -111,7 +128,8 @@ "scripts/resolve_config.py": "1c4fb7d8533e659c7f8cb9e0ef5eb93f06d29a51d6b3e2449efe648f8f74000d", "scripts/run_board_regression.py": "7302be4d5517eb315eb37b3ff8972bf17e2fe42990ae1fb6702c43c632515bfd", "scripts/start_board_build.py": "8ee1fa0b002d7f8ea7be7597574f4b88cb10a082eab0d43f43071cf80ad3636d", - "scripts/verify_target.py": "b54b05005382da6e73355f29ce34fbacaa7f5b06a35bb3c1583bdb1dfb59b305", + "scripts/verify_hardware_evidence.py": "60f3555a6b6ac6a9f567cf1b22caca9755bd4179dcea1f6731a70f8bd26a1202", + "scripts/verify_target.py": "bbecbf23f70ab873c630651d6e08aae4ff0efa0f2ae0c5f16924a154cb84ffb2", "software/build.sh": "908b5678edf5a710187480974c0c699ca8833faede20d044b7131060c3161292", "software/linux_system_check.c": "c1cedf2ce6e2583393c9e7f51fe20558c1402b8d81faf2152e8f6eeaf8058315", "software/prepare_dependencies.py": "5bf2eca25081e014ff0de67ae0aeb41cb4380a2767a08a109a3bf6c19238b308", diff --git a/platforms/arty-a7-toy/VALIDATION.md b/platforms/arty-a7-toy/VALIDATION.md index 06fa4a8..d51a3da 100644 --- a/platforms/arty-a7-toy/VALIDATION.md +++ b/platforms/arty-a7-toy/VALIDATION.md @@ -46,7 +46,7 @@ simulation or power measurement is claimed. Gemmini stress coverage is limited to M8/N32/K8, shift zero and no loop bias; arbitrary tails, cross-K-tile loop accumulation and loop bias are not established by that test. -## Physical acceptance still required +## Package reproducibility The staged repository package was separately relocated into a fresh Linux directory. Scala/Chisel and OpenSBI were recompiled: generated core/RAM and the @@ -61,9 +61,27 @@ API-key heuristic. The manifest now labels each digest with a `sha256` field; source paths, Git revision and digest values are unchanged. Gitleaks 8.30.1 reports no leaks in the staged PR; no ignore rule or scanner waiver was added. -Physical board revision is unknown; MIG parameters are official Digilent E.0. -DDR calibration, physical Linux boot and operator execution on hardware remain -untested. Treat the image as an engineering target for first bring-up. +## Physical hardware check: 2026-10-12 + +[The original hardware record](evidence/2026-10-12/README.md) adds evidence from +the connected Arty A7-100T; the October 11 records remain unchanged. + +- Vivado 2025.1 JTAG programming succeeds on XC7A100T, startup status HIGH. +- All 17,409,032 payload bytes are written to DDR and individually read back + before RUN; transfer/readback takes 544.1 seconds. Bitstream and payload hashes + match the original implementation and RTL-validated software. +- Physical OpenSBI v1.9, Linux 6.6.0 and BusyBox shell boot. COW, page protection, + FP64 process context, timer and total system-check PASS; process exit status 0. + The intentional child SIGSEGV belongs to the passing page-protection oracle. +- Subsequent shell reads of `/proc/version` and `/proc/meminfo` succeed; + MemTotal is 245,784 KiB. Transport restores the original 16 ms FTDI latency. + +PCB revision remains unknown; this exact official E.0 MIG image works on the +connected board. Physical Gemmini operator regression, FP16/FP32 exhaustive +checks, full 256 MiB DDR sweep, long-duration stability and power measurements +are still pending. Programming uses volatile SRAM; no configuration flash was +written. Treat the result as successful first bring-up, not full hardware release. + DRC retains 360 warnings; methodology retains 49 warnings and 16 advisories, including DSP pipeline recommendations, MIG clock/reset structure, control-set packing and a potential D-cache SDQ address collision. Reports are preserved; diff --git a/platforms/arty-a7-toy/board/README.md b/platforms/arty-a7-toy/board/README.md index e744dcf..af10a48 100644 --- a/platforms/arty-a7-toy/board/README.md +++ b/platforms/arty-a7-toy/board/README.md @@ -2,7 +2,8 @@ Build and programming commands are in [the platform guide](../README.md). This directory targets Arty A7-100T `xc7a100tcsg324-1` with official Digilent -Rev E.0 DDR parameters. Physical board revision and DDR acceptance are pending. +Rev E.0 DDR parameters. The recorded hardware run passes full payload DDR +readback and Linux checks; physical PCB revision remains unconfirmed. - `toy_a7_top.sv`: 100 MHz input, MMCM/BUFG clocks, per-domain reset sequencing, physical UART/LED/DDR pins, actual MIG and AXI Clock Converter instances. @@ -19,7 +20,8 @@ Rev E.0 DDR parameters. Physical board revision and DDR acceptance are pending. bitstream. Setup/hold, CDC Critical, bus skew, routing errors and DRC errors stop the build. No warning severity downgrade or CDC waiver is applied. - `program_arty.tcl`: explicit volatile JTAG programming; exactly one target - and one XC7A100T required. It does not program configuration flash. + and one XC7A100T required. The platform's `../program.tcl` entry delegates here. + The exact script used for first bring-up is also archived with the hardware logs. `vendor/` contains unmodified pinned Digilent MIG/board inputs and their license. Vivado generates proprietary vendor IP into ignored build directories locally. diff --git a/platforms/arty-a7-toy/evidence/2026-10-12/README.md b/platforms/arty-a7-toy/evidence/2026-10-12/README.md new file mode 100644 index 0000000..10ca424 --- /dev/null +++ b/platforms/arty-a7-toy/evidence/2026-10-12/README.md @@ -0,0 +1,77 @@ +# First physical Toy/Linux bring-up + +The Arty A7-100T was programmed on **2026-10-12, Asia/Shanghai**, using the +engineering image from [PR #5](https://github.com/DangoSys/fpga/pull/5), commit +`257b632a533dd98a7c526870edbd21c5a6976d09`. The PCB revision remains unknown; +MIG uses the pinned official Digilent E.0 parameters. + +| Recorded hardware run | Result | +|---|---| +| FPGA / programming tool | XC7A100T / Vivado 2025.1 | +| JTAG / serial | `210319BCC5FCA` / COM5, 1 Mbps | +| Programming | PASS, startup status HIGH, volatile SRAM | +| Complete DDR image readback | 17,409,032 bytes, all equal, 544.1 seconds | +| Software | OpenSBI v1.9, Linux 6.6.0, BusyBox shell | +| Linux checks / exit status | Five PASS markers / 0 | +| Timer check | `elapsed_ns=103836000` | +| Live shell MemTotal | 245,784 KiB | +| Load, boot and checks | 577.922 seconds | + +## Logs and provenance + +[`hardware/MANIFEST.json`](hardware/MANIFEST.json) hashes every original artifact; +[`HARDWARE_RESULT.json`](hardware/HARDWARE_RESULT.json) records the outcome and +coverage. Files retain their original bytes, timestamps in logs and experiment +paths. These paths are provenance, not prerequisites for a new checkout. + +- [`program.log`](hardware/program.log), [`program.jou`](hardware/program.jou), + [`PROGRAM_RESULT.json`](hardware/PROGRAM_RESULT.json): JTAG device selection, + programming and startup state. The exact used + [`program_arty.tcl`](hardware/program_arty.tcl) is archived alongside them. +- [`load-and-linux.log`](hardware/load-and-linux.log): complete write/readback + progress, verified RUN, boot and Linux checks. +- [`linux-console.log`](hardware/linux-console.log): original serial bytes; + PASS for COW, page protection, FP64 process context, timer and total check. +- [`live-console-first.log`](hardware/live-console-first.log): process exit + status 0, then an unsuccessful auxiliary probe because `uname`/`grep` links + are absent in the minimal rootfs. [`live-console.log`](hardware/live-console.log) + confirms the kernel, memory and interactive shell using shell builtins. +- Archived Python files and `dfx_runtime.txt` preserve the actual procedure. + The D2XX transport uses the existing host loader unchanged, opens only UART B, + temporarily sets latency from 16 to 2 ms, then restores 16 ms. No registry or + EEPROM change is made. These archived scripts include local paths; use the + maintained platform entry points for a new run. + +The page-protection test deliberately triggers a child SIGSEGV. Its parent +checks the fault and prints PASS; that trace is expected. + +## Repeat programming and boot + +Use [`../../program.tcl`](../../program.tcl), which resolves and delegates to +[`../../board/program_arty.tcl`](../../board/program_arty.tcl). From any directory: + +```bash +vivado -mode batch -source /absolute/path/to/platforms/arty-a7-toy/program.tcl \ + -tclargs /absolute/path/to/toy_a7.bit +``` + +The script requires one attached JTAG target and one XC7A100T. On Windows the +equivalent wrapper is `program.ps1 -Bitstream -VivadoBin `. +After programming, press BTN0, wait for DDR readiness/LED0, close other serial +clients and load the software from the platform directory: + +```bash +python host/load.py --port COM5 --check-linux build/board-software/fw_payload.bin +python -m serial.tools.miniterm COM5 1000000 --eol LF +``` + +Choose the actual port. Build products are not committed; follow the platform +build guide to create the `.bit` and payload. The measured files are identified by: + +- Bitstream SHA256: `ccc33c511e613561fb9dd1e9c847bd3b84037da1d078c44cd3de197d55dffde1`. +- Payload SHA256: `eb2ee34cc1a744498ac63b4e3fae425d4bb06be422ae6d41bd1ead696201134f`. + +Programming and DDR contents are volatile; repeat both steps after power loss. +PCB revision identification, physical Gemmini tests, exhaustive FP16/FP32 checks, +full DDR sweep, long-duration stability and power measurements remain pending. +The prior 98.82% Slice utilization and warning/coverage limits still apply. diff --git a/platforms/arty-a7-toy/evidence/2026-10-12/hardware/HARDWARE_RESULT.json b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/HARDWARE_RESULT.json new file mode 100644 index 0000000..a726ad2 --- /dev/null +++ b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/HARDWARE_RESULT.json @@ -0,0 +1,51 @@ +{ + "bitstream_sha256": "ccc33c511e613561fb9dd1e9c847bd3b84037da1d078c44cd3de197d55dffde1", + "payload_sha256": "eb2ee34cc1a744498ac63b4e3fae425d4bb06be422ae6d41bd1ead696201134f", + "payload_bytes": 17409032, + "port": "COM5", + "uart_serial": "210319BCC5FCB", + "physical_board_revision": "unknown", + "transport": "installed FTDI D2XX, temporary 2ms latency; original host loader", + "result": "PASS_HARDWARE_LOAD_AND_LINUX_CHECK", + "physical_linux_boot_tested": true, + "elapsed_seconds": 577.9219999999996, + "jtag_programming": "PASS", + "startup_status": "HIGH", + "configuration": "volatile FPGA SRAM", + "complete_payload_ddr_readback": "PASS", + "verified_ddr_bytes": 17409032, + "load_readback_seconds": 544.1, + "linux_checks": { + "VM_COPY_ON_WRITE": "PASS", + "VM_PAGE_PROTECTION": "PASS", + "FP64_PROCESS_CONTEXT": "PASS", + "LINUX_TIMER": "PASS", + "LINUX_SYSTEM_CHECK": "PASS" + }, + "system_check_process_exit_status": 0, + "live_shell": "PASS", + "linux_memtotal_kib": 245784, + "uart_latency_restored_ms": 16, + "hardware_gemmini_operator_tests_run": false, + "hardware_fp16_fp32_exhaustive_tests_run": false, + "coverage_notes": [ + "Physical PCB revision remains unknown; this exact Rev E engineering image boots on the connected board.", + "SIGSEGV is intentional in the page-protection test; parent oracle passed.", + "First live probe used absent uname/grep symlinks; preserved. Shell builtins then read /proc successfully.", + "No flash programming, power measurements, long-duration stability or full 256MiB DDR sweep." + ], + "evidence_sha256": { + "d2xx_load.py": "bf9a8f8c931b71672932f72992cd03d15977d753eebc891800e6aaefa287218f", + "dfx_runtime.txt": "b70e818734e3af5f8b01153d47a37c50449a5f53b008fb4f23849ec0f957b0b9", + "linux-console.log": "aceb1739620d1b1554b809c849320ed0a5f20f9a6822d1a6c3dd33fca1d6a2d3", + "live-console-first.log": "ac97f527e1ec985ba08ae2b1002a2c14ff0a54fbf8078b94ba4dbe421e3ad005", + "live-console.log": "fb2b77f67b02c6e73e0b7bf1e2dbf3557c1d0b98ef0d69ac4c42191107e99bd6", + "live_check-first.py": "a3e37a9671d8f526d706922cec581727dfa7bb80510789b08b785caa0443583e", + "live_check.py": "822eb8fbb846eb0a41a30eadc163a735dc1932dffdded54dd2117f7aaf0c60e8", + "load-and-linux.log": "9633ad82626f7e59ed0b503f0263c5d620c6b6276a262e385ae8785649c1bd8e", + "program.jou": "9796d9c11dd2f362818c6833a96a9801f14fe25c357fb798db61f00df210d99d", + "program.log": "c754d0f5066dbd34b9035fb77ee6e8ef3fe403b03b56b97f5cdd523aba313511", + "PROGRAM_RESULT.json": "f45536ce8d86fa2a735ab85a9008d662c793f31d3eadc430f426abd09b95c612", + "summarize_hardware.py": "a0f681a64ca0c441fc614bf8c2ccf664e2de86d02d3d2cfe2eb0b99e7f8edefd" + } +} diff --git a/platforms/arty-a7-toy/evidence/2026-10-12/hardware/MANIFEST.json b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/MANIFEST.json new file mode 100644 index 0000000..547a0f2 --- /dev/null +++ b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/MANIFEST.json @@ -0,0 +1,72 @@ +{ + "run_date": "2026-10-12", + "time_zone": "Asia/Shanghai", + "source_commit": "257b632a533dd98a7c526870edbd21c5a6976d09", + "source_pr": "https://github.com/DangoSys/fpga/pull/5", + "host_loader_sha256": "a62e48b779c9ce1d6f8f6669523e427cf48bd19be3bf50a554dc391b09b3e3b2", + "physical_board_revision": "unknown", + "files": { + "HARDWARE_RESULT.json": { + "sha256": "514fe87e3fb0753d416f670b2b8906e98ae6b6ec49b56154e0833e5863f085e7", + "kind": "original-run-artifact" + }, + "PROGRAM_RESULT.json": { + "sha256": "f45536ce8d86fa2a735ab85a9008d662c793f31d3eadc430f426abd09b95c612", + "kind": "original-run-artifact" + }, + "d2xx_load.py": { + "sha256": "bf9a8f8c931b71672932f72992cd03d15977d753eebc891800e6aaefa287218f", + "kind": "original-run-artifact" + }, + "dfx_runtime.txt": { + "sha256": "b70e818734e3af5f8b01153d47a37c50449a5f53b008fb4f23849ec0f957b0b9", + "kind": "original-run-artifact" + }, + "linux-console.log": { + "sha256": "aceb1739620d1b1554b809c849320ed0a5f20f9a6822d1a6c3dd33fca1d6a2d3", + "kind": "original-run-artifact" + }, + "live-console-first.log": { + "sha256": "ac97f527e1ec985ba08ae2b1002a2c14ff0a54fbf8078b94ba4dbe421e3ad005", + "kind": "original-run-artifact" + }, + "live-console.log": { + "sha256": "fb2b77f67b02c6e73e0b7bf1e2dbf3557c1d0b98ef0d69ac4c42191107e99bd6", + "kind": "original-run-artifact" + }, + "live_check-first.py": { + "sha256": "a3e37a9671d8f526d706922cec581727dfa7bb80510789b08b785caa0443583e", + "kind": "original-run-artifact" + }, + "live_check.py": { + "sha256": "822eb8fbb846eb0a41a30eadc163a735dc1932dffdded54dd2117f7aaf0c60e8", + "kind": "original-run-artifact" + }, + "load-and-linux.log": { + "sha256": "9633ad82626f7e59ed0b503f0263c5d620c6b6276a262e385ae8785649c1bd8e", + "kind": "original-run-artifact" + }, + "program.jou": { + "sha256": "9796d9c11dd2f362818c6833a96a9801f14fe25c357fb798db61f00df210d99d", + "kind": "original-run-artifact" + }, + "program.log": { + "sha256": "c754d0f5066dbd34b9035fb77ee6e8ef3fe403b03b56b97f5cdd523aba313511", + "kind": "original-run-artifact" + }, + "program_arty.tcl": { + "sha256": "fbb62bafb6df602b0f5f638fb05ae4ecc90494ac162b9a5f5ac314200f7a241c", + "kind": "programming-script-used-by-the-run", + "repository_path": "board/program_arty.tcl" + }, + "summarize_hardware.py": { + "sha256": "a0f681a64ca0c441fc614bf8c2ccf664e2de86d02d3d2cfe2eb0b99e7f8edefd", + "kind": "original-run-artifact" + } + }, + "notes": [ + "Original bytes and original local paths retained for provenance.", + "Archived Python scripts are experiment records, not portable launchers.", + "The failed first shell probe is preserved; its missing uname/grep command links are not a failed Linux system check." + ] +} diff --git a/platforms/arty-a7-toy/evidence/2026-10-12/hardware/PROGRAM_RESULT.json b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/PROGRAM_RESULT.json new file mode 100644 index 0000000..2669d20 --- /dev/null +++ b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/PROGRAM_RESULT.json @@ -0,0 +1,18 @@ +{ + "result": "PASS_JTAG_PROGRAMMING", + "time_zone": "Asia/Shanghai", + "part": "xc7a100t", + "jtag_target": "Digilent/210319BCC5FCA", + "serial_port": "COM5", + "uart_serial": "210319BCC5FCB", + "bitstream": "D:\\Verilog_Dev\\toy-a7-gemmini-correct-20261010\\build\\board-20261011-132657\\toy_a7.bit", + "bitstream_sha256": "ccc33c511e613561fb9dd1e9c847bd3b84037da1d078c44cd3de197d55dffde1", + "vivado_version": "2025.1", + "startup_status": "HIGH", + "configuration": "volatile FPGA SRAM", + "physical_board_revision": "unknown", + "first_256_byte_ddr_readback": "PASS", + "d2xx_4096_byte_ddr_readback": "PASS", + "loader_core_frequency_hz": 25000000, + "loader_ddr_capacity_bytes": 268435456 +} diff --git a/platforms/arty-a7-toy/evidence/2026-10-12/hardware/d2xx_load.py b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/d2xx_load.py new file mode 100644 index 0000000..c5cd96c --- /dev/null +++ b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/d2xx_load.py @@ -0,0 +1,158 @@ +"""Local bring-up transport: reuse the unmodified loader with FTDI D2XX. + +Only the enumerated UART B interface is opened. Restore its original latency +when closing; no registry, EEPROM, JTAG channel, RTL or loader protocol changes. +""" +import ctypes as c +import hashlib +import json +from pathlib import Path +import runpy +import struct +import sys +import time + +ROOT = Path('D:/Verilog_Dev/fpga-arty-a7-pr/platforms/arty-a7-toy') +OUT = Path(__file__).resolve().parent +PAYLOAD = Path('D:/Verilog_Dev/toy-a7-gemmini-correct-20261010/build/board-software/fw_payload.bin') +SERIAL = b'210319BCC5FCB' +EXPECTED = 'eb2ee34cc1a744498ac63b4e3fae425d4bb06be422ae6d41bd1ead696201134f' +sys.path.insert(0, str(ROOT / 'host')) +from load import Loader + + +class D2xxPort: + def __init__(self, port, baudrate, **kwargs): + import serial.tools.list_ports + ports = [p for p in serial.tools.list_ports.comports() if p.device == port] + assert len(ports) == 1 and ports[0].serial_number == SERIAL.decode() + assert (ports[0].vid, ports[0].pid) == (0x0403, 0x6010) + self.api = c.WinDLL('C:/Windows/System32/ftd2xx.dll') + types = { + 'FT_OpenEx': [c.c_void_p, c.c_uint32, c.POINTER(c.c_void_p)], + 'FT_Close': [c.c_void_p], + 'FT_GetLatencyTimer': [c.c_void_p, c.POINTER(c.c_ubyte)], + 'FT_SetLatencyTimer': [c.c_void_p, c.c_ubyte], + 'FT_SetBaudRate': [c.c_void_p, c.c_uint32], + 'FT_SetDataCharacteristics': [c.c_void_p, c.c_ubyte, c.c_ubyte, c.c_ubyte], + 'FT_SetFlowControl': [c.c_void_p, c.c_ushort, c.c_ubyte, c.c_ubyte], + 'FT_SetTimeouts': [c.c_void_p, c.c_uint32, c.c_uint32], + 'FT_Purge': [c.c_void_p, c.c_uint32], + 'FT_Read': [c.c_void_p, c.c_void_p, c.c_uint32, c.POINTER(c.c_uint32)], + 'FT_Write': [c.c_void_p, c.c_void_p, c.c_uint32, c.POINTER(c.c_uint32)], + 'FT_GetQueueStatus': [c.c_void_p, c.POINTER(c.c_uint32)], + } + for name, args in types.items(): + method = getattr(self.api, name) + method.argtypes = args + method.restype = c.c_uint32 + self.handle = c.c_void_p() + self.latency = c.c_ubyte() + self.deadline = time.monotonic() + 3600 + self.closed = True + self.call('FT_OpenEx', c.cast(c.c_char_p(SERIAL), c.c_void_p), 1, c.byref(self.handle)) + self.closed = False + try: + self.call('FT_GetLatencyTimer', self.handle, c.byref(self.latency)) + self.call('FT_SetLatencyTimer', self.handle, 2) + self.call('FT_SetBaudRate', self.handle, baudrate) + self.call('FT_SetDataCharacteristics', self.handle, 8, 0, 0) + self.call('FT_SetFlowControl', self.handle, 0, 0, 0) + self.call('FT_SetTimeouts', self.handle, 100, 5000) + self.call('FT_Purge', self.handle, 3) + except BaseException: + self.close() + raise + print(f'D2XX UART B {port}: {baudrate} baud, latency {self.latency.value}->2 ms', flush=True) + + def call(self, name, *args): + status = getattr(self.api, name)(*args) + if status != 0: + raise OSError(f'{name}: FT_STATUS {status}') + + def reset_input_buffer(self): + self.call('FT_Purge', self.handle, 1) + + def read(self, count): + if time.monotonic() > self.deadline: + raise TimeoutError('One-hour hardware load timeout') + if count == 0: + return b'' + available = c.c_uint32() + self.call('FT_GetQueueStatus', self.handle, c.byref(available)) + size = min(count, available.value) if available.value else min(count, 1) + buffer = c.create_string_buffer(size) + received = c.c_uint32() + self.call('FT_Read', self.handle, buffer, size, c.byref(received)) + return buffer.raw[:received.value] + + def write(self, data): + if time.monotonic() > self.deadline: + raise TimeoutError('One-hour hardware load timeout') + buffer = c.create_string_buffer(data) + written = c.c_uint32() + self.call('FT_Write', self.handle, buffer, len(data), c.byref(written)) + if written.value != len(data): + raise TimeoutError('D2XX short write') + return written.value + + def flush(self): + # FT_Write has completed its synchronous USB write before returning. + pass + + def close(self): + if not self.closed: + try: + self.call('FT_SetLatencyTimer', self.handle, self.latency.value) + finally: + self.call('FT_Close', self.handle) + self.closed = True + print(f'D2XX closed; restored UART latency {self.latency.value} ms', flush=True) + + def __enter__(self): + return self + + def __exit__(self, *args): + self.close() + + +def main(): + assert hashlib.sha256(PAYLOAD.read_bytes()).hexdigest() == EXPECTED + started = time.monotonic() + if '--probe' in sys.argv: + with D2xxPort('COM5', 1000000) as port: + loader = Loader(port) + info = loader.request(4) + assert info == b'TA7\x02' + struct.pack('2 ms +DDR 268435456 bytes, core 25000000 Hz, payload SHA256 eb2ee34cc1a744498ac63b4e3fae425d4bb06be422ae6d41bd1ead696201134f +Verified 256/17409032 bytes +Verified 65792/17409032 bytes +Verified 131328/17409032 bytes +Verified 196864/17409032 bytes +Verified 262400/17409032 bytes +Verified 327936/17409032 bytes +Verified 393472/17409032 bytes +Verified 459008/17409032 bytes +Verified 524544/17409032 bytes +Verified 590080/17409032 bytes +Verified 655616/17409032 bytes +Verified 721152/17409032 bytes +Verified 786688/17409032 bytes +Verified 852224/17409032 bytes +Verified 917760/17409032 bytes +Verified 983296/17409032 bytes +Verified 1048832/17409032 bytes +Verified 1114368/17409032 bytes +Verified 1179904/17409032 bytes +Verified 1245440/17409032 bytes +Verified 1310976/17409032 bytes +Verified 1376512/17409032 bytes +Verified 1442048/17409032 bytes +Verified 1507584/17409032 bytes +Verified 1573120/17409032 bytes +Verified 1638656/17409032 bytes +Verified 1704192/17409032 bytes +Verified 1769728/17409032 bytes +Verified 1835264/17409032 bytes +Verified 1900800/17409032 bytes +Verified 1966336/17409032 bytes +Verified 2031872/17409032 bytes +Verified 2097408/17409032 bytes +Verified 2162944/17409032 bytes +Verified 2228480/17409032 bytes +Verified 2294016/17409032 bytes +Verified 2359552/17409032 bytes +Verified 2425088/17409032 bytes +Verified 2490624/17409032 bytes +Verified 2556160/17409032 bytes +Verified 2621696/17409032 bytes +Verified 2687232/17409032 bytes +Verified 2752768/17409032 bytes +Verified 2818304/17409032 bytes +Verified 2883840/17409032 bytes +Verified 2949376/17409032 bytes +Verified 3014912/17409032 bytes +Verified 3080448/17409032 bytes +Verified 3145984/17409032 bytes +Verified 3211520/17409032 bytes +Verified 3277056/17409032 bytes +Verified 3342592/17409032 bytes +Verified 3408128/17409032 bytes +Verified 3473664/17409032 bytes +Verified 3539200/17409032 bytes +Verified 3604736/17409032 bytes +Verified 3670272/17409032 bytes +Verified 3735808/17409032 bytes +Verified 3801344/17409032 bytes +Verified 3866880/17409032 bytes +Verified 3932416/17409032 bytes +Verified 3997952/17409032 bytes +Verified 4063488/17409032 bytes +Verified 4129024/17409032 bytes +Verified 4194560/17409032 bytes +Verified 4260096/17409032 bytes +Verified 4325632/17409032 bytes +Verified 4391168/17409032 bytes +Verified 4456704/17409032 bytes +Verified 4522240/17409032 bytes +Verified 4587776/17409032 bytes +Verified 4653312/17409032 bytes +Verified 4718848/17409032 bytes +Verified 4784384/17409032 bytes +Verified 4849920/17409032 bytes +Verified 4915456/17409032 bytes +Verified 4980992/17409032 bytes +Verified 5046528/17409032 bytes +Verified 5112064/17409032 bytes +Verified 5177600/17409032 bytes +Verified 5243136/17409032 bytes +Verified 5308672/17409032 bytes +Verified 5374208/17409032 bytes +Verified 5439744/17409032 bytes +Verified 5505280/17409032 bytes +Verified 5570816/17409032 bytes +Verified 5636352/17409032 bytes +Verified 5701888/17409032 bytes +Verified 5767424/17409032 bytes +Verified 5832960/17409032 bytes +Verified 5898496/17409032 bytes +Verified 5964032/17409032 bytes +Verified 6029568/17409032 bytes +Verified 6095104/17409032 bytes +Verified 6160640/17409032 bytes +Verified 6226176/17409032 bytes +Verified 6291712/17409032 bytes +Verified 6357248/17409032 bytes +Verified 6422784/17409032 bytes +Verified 6488320/17409032 bytes +Verified 6553856/17409032 bytes +Verified 6619392/17409032 bytes +Verified 6684928/17409032 bytes +Verified 6750464/17409032 bytes +Verified 6816000/17409032 bytes +Verified 6881536/17409032 bytes +Verified 6947072/17409032 bytes +Verified 7012608/17409032 bytes +Verified 7078144/17409032 bytes +Verified 7143680/17409032 bytes +Verified 7209216/17409032 bytes +Verified 7274752/17409032 bytes +Verified 7340288/17409032 bytes +Verified 7405824/17409032 bytes +Verified 7471360/17409032 bytes +Verified 7536896/17409032 bytes +Verified 7602432/17409032 bytes +Verified 7667968/17409032 bytes +Verified 7733504/17409032 bytes +Verified 7799040/17409032 bytes +Verified 7864576/17409032 bytes +Verified 7930112/17409032 bytes +Verified 7995648/17409032 bytes +Verified 8061184/17409032 bytes +Verified 8126720/17409032 bytes +Verified 8192256/17409032 bytes +Verified 8257792/17409032 bytes +Verified 8323328/17409032 bytes +Verified 8388864/17409032 bytes +Verified 8454400/17409032 bytes +Verified 8519936/17409032 bytes +Verified 8585472/17409032 bytes +Verified 8651008/17409032 bytes +Verified 8716544/17409032 bytes +Verified 8782080/17409032 bytes +Verified 8847616/17409032 bytes +Verified 8913152/17409032 bytes +Verified 8978688/17409032 bytes +Verified 9044224/17409032 bytes +Verified 9109760/17409032 bytes +Verified 9175296/17409032 bytes +Verified 9240832/17409032 bytes +Verified 9306368/17409032 bytes +Verified 9371904/17409032 bytes +Verified 9437440/17409032 bytes +Verified 9502976/17409032 bytes +Verified 9568512/17409032 bytes +Verified 9634048/17409032 bytes +Verified 9699584/17409032 bytes +Verified 9765120/17409032 bytes +Verified 9830656/17409032 bytes +Verified 9896192/17409032 bytes +Verified 9961728/17409032 bytes +Verified 10027264/17409032 bytes +Verified 10092800/17409032 bytes +Verified 10158336/17409032 bytes +Verified 10223872/17409032 bytes +Verified 10289408/17409032 bytes +Verified 10354944/17409032 bytes +Verified 10420480/17409032 bytes +Verified 10486016/17409032 bytes +Verified 10551552/17409032 bytes +Verified 10617088/17409032 bytes +Verified 10682624/17409032 bytes +Verified 10748160/17409032 bytes +Verified 10813696/17409032 bytes +Verified 10879232/17409032 bytes +Verified 10944768/17409032 bytes +Verified 11010304/17409032 bytes +Verified 11075840/17409032 bytes +Verified 11141376/17409032 bytes +Verified 11206912/17409032 bytes +Verified 11272448/17409032 bytes +Verified 11337984/17409032 bytes +Verified 11403520/17409032 bytes +Verified 11469056/17409032 bytes +Verified 11534592/17409032 bytes +Verified 11600128/17409032 bytes +Verified 11665664/17409032 bytes +Verified 11731200/17409032 bytes +Verified 11796736/17409032 bytes +Verified 11862272/17409032 bytes +Verified 11927808/17409032 bytes +Verified 11993344/17409032 bytes +Verified 12058880/17409032 bytes +Verified 12124416/17409032 bytes +Verified 12189952/17409032 bytes +Verified 12255488/17409032 bytes +Verified 12321024/17409032 bytes +Verified 12386560/17409032 bytes +Verified 12452096/17409032 bytes +Verified 12517632/17409032 bytes +Verified 12583168/17409032 bytes +Verified 12648704/17409032 bytes +Verified 12714240/17409032 bytes +Verified 12779776/17409032 bytes +Verified 12845312/17409032 bytes +Verified 12910848/17409032 bytes +Verified 12976384/17409032 bytes +Verified 13041920/17409032 bytes +Verified 13107456/17409032 bytes +Verified 13172992/17409032 bytes +Verified 13238528/17409032 bytes +Verified 13304064/17409032 bytes +Verified 13369600/17409032 bytes +Verified 13435136/17409032 bytes +Verified 13500672/17409032 bytes +Verified 13566208/17409032 bytes +Verified 13631744/17409032 bytes +Verified 13697280/17409032 bytes +Verified 13762816/17409032 bytes +Verified 13828352/17409032 bytes +Verified 13893888/17409032 bytes +Verified 13959424/17409032 bytes +Verified 14024960/17409032 bytes +Verified 14090496/17409032 bytes +Verified 14156032/17409032 bytes +Verified 14221568/17409032 bytes +Verified 14287104/17409032 bytes +Verified 14352640/17409032 bytes +Verified 14418176/17409032 bytes +Verified 14483712/17409032 bytes +Verified 14549248/17409032 bytes +Verified 14614784/17409032 bytes +Verified 14680320/17409032 bytes +Verified 14745856/17409032 bytes +Verified 14811392/17409032 bytes +Verified 14876928/17409032 bytes +Verified 14942464/17409032 bytes +Verified 15008000/17409032 bytes +Verified 15073536/17409032 bytes +Verified 15139072/17409032 bytes +Verified 15204608/17409032 bytes +Verified 15270144/17409032 bytes +Verified 15335680/17409032 bytes +Verified 15401216/17409032 bytes +Verified 15466752/17409032 bytes +Verified 15532288/17409032 bytes +Verified 15597824/17409032 bytes +Verified 15663360/17409032 bytes +Verified 15728896/17409032 bytes +Verified 15794432/17409032 bytes +Verified 15859968/17409032 bytes +Verified 15925504/17409032 bytes +Verified 15991040/17409032 bytes +Verified 16056576/17409032 bytes +Verified 16122112/17409032 bytes +Verified 16187648/17409032 bytes +Verified 16253184/17409032 bytes +Verified 16318720/17409032 bytes +Verified 16384256/17409032 bytes +Verified 16449792/17409032 bytes +Verified 16515328/17409032 bytes +Verified 16580864/17409032 bytes +Verified 16646400/17409032 bytes +Verified 16711936/17409032 bytes +Verified 16777472/17409032 bytes +Verified 16843008/17409032 bytes +Verified 16908544/17409032 bytes +Verified 16974080/17409032 bytes +Verified 17039616/17409032 bytes +Verified 17105152/17409032 bytes +Verified 17170688/17409032 bytes +Verified 17236224/17409032 bytes +Verified 17301760/17409032 bytes +Verified 17367296/17409032 bytes +Full readback passed; CPU started after 544.1s. Console: + + +OpenSBI v1.9 + + ____ _____ ____ _____ + + / __ \ / ____| _ \_ _| + + | | | |_ __ ___ _ __ | (___ | |_) || | + + | | | | '_ \ / _ \ '_ \ \___ \| _ < | | + + | |__| | |_) | __/ | | |____) | |_) || |_ + + \____/| .__/ \___|_| |_|_____/|____/_____| + + | | + + |_| + + + +Platform Name : Buckyball + +Platform Features : medeleg + +Platform HART Count : 1 + +Platform HART Protection : pmp + +Platform IPI Device : aclint-mswi + +Platform Timer Device : aclint-mtimer @ 500000Hz + +Platform Console Device : buckyball-scu + +Platform HSM Device : --- + +Platform PMU Device : --- + +Platform Reboot Device : buckyball-scu-reset + +Platform Shutdown Device : buckyball-scu-reset + +Platform Suspend Device : --- + +Platform CPPC Device : --- + +Firmware Base : 0x80000000 + +Firmware Size : 312 KB + +Firmware RW Offset : 0x40000 + +Firmware RW Size : 56 KB + +Firmware Heap Offset : 0x45000 + +Firmware Heap Size : 36 KB (total), 0 KB (reserved), 12 KB (used), 23 KB (free) + +Firmware Scratch Size : 4096 B (total), 496 B (used), 3600 B (free) + +Runtime SBI Version : 3.0 + +Standard SBI Extensions : time,rfnc,ipi,base,hsm,srst,pmu,dbcn,fwft,legacy,sse + +Experimental SBI Extensions : none + + + +Domain0 Name : root + +Domain0 Boot HART : 0 + +Domain0 HARTs : 0x0* + +Domain0 Region00 : 0x0000000080040000-0x000000008004ffff M: (F,R,W) S/U: () + +Domain0 Region01 : 0x0000000080000000-0x000000008003ffff M: (F,R,X) S/U: () + +Domain0 Region02 : 0x0000000002008000-0x000000000200bfff M: (I,R,W) S/U: () + +Domain0 Region03 : 0x0000000002000000-0x0000000002007fff M: (I,R,W) S/U: () + +Domain0 Region04 : 0x000000000c000000-0x000000000fffffff M: (I,R,W) S/U: (R,W) + +Domain0 Region05 : 0x0000000000000000-0xffffffffffffffff M: () S/U: (R,W,X) + +Domain0 Next Address : 0x0000000080200000 + +Domain0 Next Arg1 : 0x0000000088000000 + +Domain0 Next Mode : S-mode + +Domain0 SysReset : yes + +Domain0 SysSuspend : yes + + + +Boot HART ID : 0 + +Boot HART Domain : root + +Boot HART Priv Version : v1.12 + +Boot HART Base ISA : rv64imafdcx + +Boot HART ISA Extensions : sdtrig + +Boot HART PMP Count : 8 + +Boot HART PMP Granularity : 2 bits + +Boot HART PMP Address Bits : 30 + +Boot HART MHPM Info : 0 (0x00000000) + +Boot HART Debug Triggers : 0 triggers + +Boot HART MIDELEG : 0x0000000000000222 + +Boot HART MEDELEG : 0x000000000000b109 + +Linux version 6.6.0 (yys@amax) (riscv64-unknown-linux-gnu-gcc (GCC) 15.3.0, GNU ld (GNU Binutils) 2.46) #1 Sat Oct 10 16:24:07 CST 2026 + + +Machine model: ucb-bar,buckyball + + +Forcing kernel command line to: console=hvc0 earlycon=sbi loglevel=8 ignore_loglevel panic=1 mem=256M + + +SBI specification v3.0 detected + + +SBI implementation ID=0x1 Version=0x10009 + + +SBI TIME extension detected + + +SBI IPI extension detected + + +SBI RFENCE extension detected + + +SBI SRST extension detected + + +earlycon: sbi0 at I/O port 0x0 (options '') + + +printk: bootconsole [sbi0] enabled + + +printk: debug: ignoring loglevel setting. + + +Memory limited to 256MB + + +efi: UEFI not found. + + +OF: reserved mem: 0x0000000080000000..0x000000008003ffff (256 KiB) nomap non-reusable mmode_resv1@80000000 + + +OF: reserved mem: 0x0000000080040000..0x000000008004ffff (64 KiB) nomap non-reusable mmode_resv0@80040000 + + +Zone ranges: + + + DMA32 [mem 0x0000000080000000-0x000000008fffffff] + + + Normal empty + + +Movable zone start for each node + + +Early memory node ranges + + + node 0: [mem 0x0000000080000000-0x000000008004ffff] + + + node 0: [mem 0x0000000080050000-0x000000008fffffff] + + +Initmem setup node 0 [mem 0x0000000080000000-0x000000008fffffff] + + +Falling back to deprecated "riscv,isa" + + +riscv: base ISA extensions abcdfim + + +riscv: ELF capabilities acdfim + + +pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 + + +pcpu-alloc: [0] 0 + + +Kernel command line: console=hvc0 earlycon=sbi loglevel=8 ignore_loglevel panic=1 mem=256M + + +Dentry cache hash table entries: 32768 (order: 6, 262144 bytes, linear) + + +Inode-cache hash table entries: 16384 (order: 5, 131072 bytes, linear) + + +Built 1 zonelists, mobility grouping on. Total pages: 64640 + + +mem auto-init: stack:all(zero), heap alloc:off, heap free:off + + +Memory: 241400K/262144K available (2126K kernel code, 4423K rwdata, 2048K rodata, 4385K init, 299K bss, 20744K reserved, 0K cma-reserved) + + +SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 + + +NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 + + +riscv-intc: 64 local interrupts mapped + + +plic: interrupt-controller@c000000: mapped 1 interrupts with 1 handlers for 2 contexts. + + +clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 7052723233920 ns + + +sched_clock: 64 bits at 500kHz, resolution 2000ns, wraps every 4398046511000ns + + +Console: colour dummy device 80x25 + + +printk: console [hvc0] enabled + + +printk: console [hvc0] enabled + + +printk: bootconsole [sbi0] disabled + + +printk: bootconsole [sbi0] disabled + + +Calibrating delay loop (skipped), value calculated using timer frequency.. 1.00 BogoMIPS (lpj=2000) + + +pid_max: default: 32768 minimum: 301 + + +Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear) + + +Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear) + + +riscv: ELF compat mode unsupported + + +ASID allocator disabled (0 bits) + + +EFI services will not be available. + + +devtmpfs: initialized + + +clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns + + +futex hash table entries: 256 (order: 0, 6144 bytes, linear) + + +DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations + + +DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations + + +cpu0: Ratio of byte access time to unaligned word access is 0.01, unaligned accesses are slow + + +clocksource: Switched to clocksource riscv_clocksource + + +workingset: timestamp_bits=62 max_order=16 bucket_order=0 + + +io scheduler mq-deadline registered + + +io scheduler kyber registered + + +clk: Disabling unused clocks + + +Freeing unused kernel image (initmem) memory: 4384K + + +Run /init as init process + + + with arguments: + + + /init + + + with environment: + + + HOME=/ + + + TERM=linux + + + + + + __ __ __ ____ + + + / / / /___ __ _____ ____ _ / /_ ____ _/ / / + + + / /_/ / __ `/ | / / _ \ / __ `/ / __ \/ __ `/ / / + + + / __ / /_/ /| |/ / __/ / /_/ / / /_/ / /_/ / / / + + + /_/ /_/\__,_/ |___/\___/ \__,_/ /_.___/\__,_/_/_/ + + + + + +/bin/sh: can't access tty; job control turned off + + +~ # /root/linux_system_check-linux + + +BEGIN LINUX_SYSTEM_CHECK + + +PASS VM_COPY_ON_WRITE + + +linux_system_ch[25]: unhandled signal 11 code 0x2 at 0x0000003f9f350000 in linux_system_check-linux[10000+7a000] + + +CPU: 0 PID: 25 Comm: linux_system_ch Not tainted 6.6.0 #1 + + +Hardware name: ucb-bar,buckyball (DT) + + +epc : 00000000000105c6 ra : 000000000001041e sp : 0000003ff77a4b50 + + + gp : 0000000000090078 tp : 0000000000096760 t0 : 0000000000000000 + + + t1 : 0000000000000000 t2 : 0000000000000000 s0 : 0000003ff77a4bd0 + + + s1 : 0000003f9f34f000 a0 : 0000000000000000 a1 : 0000000000000000 + + + a2 : 0000000000000000 a3 : 0000000000000000 a4 : 0000000000000000 + + + a5 : 0000000000000000 a6 : 0000000000000000 a7 : 0000000000000000 + + + s2 : 0000000000000042 s3 : 0000000000001000 s4 : 0000003f9f350000 + + + s5 : 0000003ff77a4d88 s6 : 0000000000000002 s7 : 00000000000106ba + + + s8 : 00000000000101e0 s9 : 000000000000003a s10: 0000000000094e28 + + + s11: 0000000000000000 t3 : 0000000000000000 t4 : 0000000000000000 + + + t5 : 0000000000000000 t6 : 0000000000000000 + + +status: 800000020001e020 badaddr: 0000003f9f350000 cause: 000000000000000d + + +PASS VM_PAGE_PROTECTION + + +PASS FP64_PROCESS_CONTEXT + + +PASS LINUX_TIMER elapsed_ns=103836000 + + +PASS LINUX_SYSTEM_CHECK +Saved console to D:\Verilog_Dev\fpga-arty-a7-pr\platforms\arty-a7-toy\build\hardware-20261012-015059\linux-console.log +D2XX closed; restored UART latency 16 ms diff --git a/platforms/arty-a7-toy/evidence/2026-10-12/hardware/program.jou b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/program.jou new file mode 100644 index 0000000..11cd6e8 --- /dev/null +++ b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/program.jou @@ -0,0 +1,24 @@ +#----------------------------------------------------------- +# Vivado v2025.1 (64-bit) +# SW Build 6140274 on Thu May 22 00:12:29 MDT 2025 +# IP Build 6138677 on Thu May 22 03:10:11 MDT 2025 +# SharedData Build 6139179 on Tue May 20 17:58:58 MDT 2025 +# Start of session at: Mon Oct 12 01:51:01 2026 +# Process ID : 13116 +# Current directory : D:/Verilog_Dev/fpga-arty-a7-pr/platforms/arty-a7-toy +# Command line : vivado.exe -mode batch -source D:\Verilog_Dev\fpga-arty-a7-pr\platforms\arty-a7-toy\board\program_arty.tcl -log D:\Verilog_Dev\fpga-arty-a7-pr\platforms\arty-a7-toy\build\hardware-20261012-015059\program.log -journal D:\Verilog_Dev\fpga-arty-a7-pr\platforms\arty-a7-toy\build\hardware-20261012-015059\program.jou -tclargs D:\Verilog_Dev\toy-a7-gemmini-correct-20261010\build\board-20261011-132657\toy_a7.bit +# Log file : D:/Verilog_Dev/fpga-arty-a7-pr/platforms/arty-a7-toy/build/hardware-20261012-015059/program.log +# Journal file : D:\Verilog_Dev\fpga-arty-a7-pr\platforms\arty-a7-toy\build\hardware-20261012-015059\program.jou +# Running On : LAPTOP-IQGP9732 +# Platform : Windows Server 2016 or Windows 10 +# Operating System : 26200 +# Processor Detail : AMD Ryzen 9 8945HX with Radeon Graphics +# CPU Frequency : 2495 MHz +# CPU Physical cores : 16 +# CPU Logical cores : 32 +# Host memory : 33605 MB +# Swap memory : 66571 MB +# Total Virtual : 100177 MB +# Available Virtual : 74928 MB +#----------------------------------------------------------- +source {D:\Verilog_Dev\fpga-arty-a7-pr\platforms\arty-a7-toy\board\program_arty.tcl} diff --git a/platforms/arty-a7-toy/evidence/2026-10-12/hardware/program.log b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/program.log new file mode 100644 index 0000000..3465a05 --- /dev/null +++ b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/program.log @@ -0,0 +1,76 @@ +#----------------------------------------------------------- +# Vivado v2025.1 (64-bit) +# SW Build 6140274 on Thu May 22 00:12:29 MDT 2025 +# IP Build 6138677 on Thu May 22 03:10:11 MDT 2025 +# SharedData Build 6139179 on Tue May 20 17:58:58 MDT 2025 +# Start of session at: Mon Oct 12 01:51:01 2026 +# Process ID : 13116 +# Current directory : D:/Verilog_Dev/fpga-arty-a7-pr/platforms/arty-a7-toy +# Command line : vivado.exe -mode batch -source D:\Verilog_Dev\fpga-arty-a7-pr\platforms\arty-a7-toy\board\program_arty.tcl -log D:\Verilog_Dev\fpga-arty-a7-pr\platforms\arty-a7-toy\build\hardware-20261012-015059\program.log -journal D:\Verilog_Dev\fpga-arty-a7-pr\platforms\arty-a7-toy\build\hardware-20261012-015059\program.jou -tclargs D:\Verilog_Dev\toy-a7-gemmini-correct-20261010\build\board-20261011-132657\toy_a7.bit +# Log file : D:/Verilog_Dev/fpga-arty-a7-pr/platforms/arty-a7-toy/build/hardware-20261012-015059/program.log +# Journal file : D:\Verilog_Dev\fpga-arty-a7-pr\platforms\arty-a7-toy\build\hardware-20261012-015059\program.jou +# Running On : LAPTOP-IQGP9732 +# Platform : Windows Server 2016 or Windows 10 +# Operating System : 26200 +# Processor Detail : AMD Ryzen 9 8945HX with Radeon Graphics +# CPU Frequency : 2495 MHz +# CPU Physical cores : 16 +# CPU Logical cores : 32 +# Host memory : 33605 MB +# Swap memory : 66571 MB +# Total Virtual : 100177 MB +# Available Virtual : 74928 MB +#----------------------------------------------------------- +source {D:\Verilog_Dev\fpga-arty-a7-pr\platforms\arty-a7-toy\board\program_arty.tcl} +# if {$argc != 1} { error "Supply the Arty A7-100T .bit file" } +# set bitfile [file normalize [lindex $argv 0]] +# if {![file isfile $bitfile]} { error "Bitstream not found: $bitfile" } +# open_hw_manager +open_hw_manager: Time (s): cpu = 00:00:04 ; elapsed = 00:00:09 . Memory (MB): peak = 495.270 ; gain = 215.820 +# connect_hw_server -allow_non_jtag +INFO: [Labtools 27-2285] Connecting to hw_server url TCP:localhost:3121 +INFO: [Labtools 27-2222] Launching hw_server... +INFO: [Labtools 27-2221] Launch Output: + +****** Xilinx hw_server v2025.1 + **** Build date : May 6 2025 at 09:15:36 + ** Copyright 1986-2022 Xilinx, Inc. All Rights Reserved. + + +INFO: [Labtools 27-3415] Connecting to cs_server url TCP:localhost:0 +INFO: [Labtools 27-3417] Launching cs_server... +INFO: [Labtools 27-2221] Launch Output: + + +******** Xilinx cs_server v2025.1.0 + ****** Build date : May 14 2025-03:15:27 + **** Build number : 2025.1.1747163727 + ** Copyright 2017-2022 Xilinx, Inc. All Rights Reserved. + ** Copyright 2022-2026 Advanced Micro Devices, Inc. All Rights Reserved. + + + +connect_hw_server: Time (s): cpu = 00:00:00 ; elapsed = 00:00:08 . Memory (MB): peak = 495.270 ; gain = 0.000 +# set targets [get_hw_targets -quiet] +# if {[llength $targets] != 1} { +# error "Expected one connected JTAG target. Select the Arty manually in Hardware Manager if multiple boards are attached." +# } +# open_hw_target [lindex $targets 0] +INFO: [Labtoolstcl 44-466] Opening hw_target localhost:3121/xilinx_tcf/Digilent/210319BCC5FCA +# set devices [get_hw_devices -quiet -filter {PART == xc7a100t}] +# if {[llength $devices] != 1} { error "Expected one XC7A100T; inspect the connected board" } +# set device [lindex $devices 0] +# current_hw_device $device +# set_property PROGRAM.FILE $bitfile $device +# program_hw_devices $device +INFO: [Labtools 27-3164] End of startup status: HIGH +# refresh_hw_device $device +INFO: [Labtools 27-1434] Device xc7a100t (JTAG device index = 0) is programmed with a design that has no supported debug core(s) in it. +# puts "ARTY_JTAG_PROGRAMMED: $bitfile" +ARTY_JTAG_PROGRAMMED: D:/Verilog_Dev/toy-a7-gemmini-correct-20261010/build/board-20261011-132657/toy_a7.bit +# close_hw_target +INFO: [Labtoolstcl 44-464] Closing hw_target localhost:3121/xilinx_tcf/Digilent/210319BCC5FCA +# disconnect_hw_server +# close_hw_manager +# exit +INFO: [Common 17-206] Exiting Vivado at Mon Oct 12 01:51:36 2026... diff --git a/platforms/arty-a7-toy/evidence/2026-10-12/hardware/program_arty.tcl b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/program_arty.tcl new file mode 100644 index 0000000..f70f054 --- /dev/null +++ b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/program_arty.tcl @@ -0,0 +1,25 @@ +# Volatile JTAG programming only. Usage: +# Confirm physical Rev E DDR compatibility before using this engineering image. +# vivado -mode batch -source board/program_arty.tcl -tclargs /path/to/toy_a7.bit +if {$argc != 1} { error "Supply the Arty A7-100T .bit file" } +set bitfile [file normalize [lindex $argv 0]] +if {![file isfile $bitfile]} { error "Bitstream not found: $bitfile" } +open_hw_manager +connect_hw_server -allow_non_jtag +set targets [get_hw_targets -quiet] +if {[llength $targets] != 1} { + error "Expected one connected JTAG target. Select the Arty manually in Hardware Manager if multiple boards are attached." +} +open_hw_target [lindex $targets 0] +set devices [get_hw_devices -quiet -filter {PART == xc7a100t}] +if {[llength $devices] != 1} { error "Expected one XC7A100T; inspect the connected board" } +set device [lindex $devices 0] +current_hw_device $device +set_property PROGRAM.FILE $bitfile $device +program_hw_devices $device +refresh_hw_device $device +puts "ARTY_JTAG_PROGRAMMED: $bitfile" +close_hw_target +disconnect_hw_server +close_hw_manager +exit diff --git a/platforms/arty-a7-toy/evidence/2026-10-12/hardware/summarize_hardware.py b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/summarize_hardware.py new file mode 100644 index 0000000..d8487d7 --- /dev/null +++ b/platforms/arty-a7-toy/evidence/2026-10-12/hardware/summarize_hardware.py @@ -0,0 +1,50 @@ +import hashlib +import json +from pathlib import Path +import re + +ROOT = Path(__file__).resolve().parent +def sha(path): + return hashlib.sha256(path.read_bytes()).hexdigest() + +record = json.loads((ROOT / 'HARDWARE_RESULT.json').read_text()) +assert record['result'] == 'PASS_HARDWARE_LOAD_AND_LINUX_CHECK' +program = (ROOT / 'program.log').read_text(errors='replace') +assert 'End of startup status: HIGH' in program +assert 'ARTY_JTAG_PROGRAMMED:' in program +load = (ROOT / 'load-and-linux.log').read_text(errors='replace') +assert 'Full readback passed; CPU started after 544.1s.' in load +console = (ROOT / 'linux-console.log').read_bytes() +checks = ['VM_COPY_ON_WRITE', 'VM_PAGE_PROTECTION', 'FP64_PROCESS_CONTEXT', + 'LINUX_TIMER', 'LINUX_SYSTEM_CHECK'] +assert all(('PASS ' + check).encode() in console for check in checks) +assert b'Linux version 6.6.0' in console +assert b'~ # ' in console +first = (ROOT / 'live-console-first.log').read_bytes() +assert re.search(rb'(?:^|\n)HARDWARE_RC:0\r*\n', first) +live = (ROOT / 'live-console.log').read_bytes() +assert b'KERNEL:Linux version 6.6.0' in live +assert b'MEMORY:MemTotal: 245784 kB' in live +assert re.search(rb'(?:^|\n)FPGA_LIVE_DONE\r*\n', live) +record.update(jtag_programming='PASS', startup_status='HIGH', + configuration='volatile FPGA SRAM', + complete_payload_ddr_readback='PASS', + verified_ddr_bytes=17409032, load_readback_seconds=544.1, + linux_checks={name: 'PASS' for name in checks}, + system_check_process_exit_status=0, live_shell='PASS', + linux_memtotal_kib=245784, uart_latency_restored_ms=16, + hardware_gemmini_operator_tests_run=False, + hardware_fp16_fp32_exhaustive_tests_run=False, + coverage_notes=[ + 'Physical PCB revision remains unknown; this exact Rev E engineering image boots on the connected board.', + 'SIGSEGV is intentional in the page-protection test; parent oracle passed.', + 'First live probe used absent uname/grep symlinks; preserved. Shell builtins then read /proc successfully.', + 'No flash programming, power measurements, long-duration stability or full 256MiB DDR sweep.', + ]) +record['evidence_sha256'] = { + str(path.relative_to(ROOT)): sha(path) + for path in sorted(ROOT.iterdir()) + if path.is_file() and path.name != 'HARDWARE_RESULT.json' +} +(ROOT / 'HARDWARE_RESULT.json').write_text(json.dumps(record, indent=2)+'\n') +print('PASS: JTAG, complete DDR image readback, physical Linux boot, five Linux checks and live shell') diff --git a/platforms/arty-a7-toy/evidence/README.md b/platforms/arty-a7-toy/evidence/README.md index c223507..f4a7c4e 100644 --- a/platforms/arty-a7-toy/evidence/README.md +++ b/platforms/arty-a7-toy/evidence/README.md @@ -5,6 +5,12 @@ selected isolated candidate. The archived report mentions that candidate's original build paths; repository build/operation instructions are in `../README.md`. Checkpoints, generated RTL, images and bitstreams are omitted from Git. +[`2026-10-12/`](2026-10-12/README.md) records the first physical JTAG programming, +complete DDR payload readback, Linux boot, five userspace checks and live shell. +Its original artifacts and programming Tcl snapshot have explicit SHA256 entries. +The October 11 records retain their original pre-hardware status; October 12 +adds the later evidence rather than rewriting the earlier measurements. + The core/RAM hashes and original firmware payload hash identify the exact measured hardware/software. The archived machine record's source paths and commands describe the original experiment, not installation requirements. diff --git a/platforms/arty-a7-toy/program.ps1 b/platforms/arty-a7-toy/program.ps1 index a0ac4bc..d0af10a 100644 --- a/platforms/arty-a7-toy/program.ps1 +++ b/platforms/arty-a7-toy/program.ps1 @@ -5,8 +5,9 @@ param( $ErrorActionPreference = "Stop" if (!$VivadoBin) { $VivadoBin = Split-Path (Get-Command vivado.bat -ErrorAction Stop).Source } if (!(Test-Path -LiteralPath $Bitstream -PathType Leaf)) { throw "Bitstream not found: $Bitstream" } +$toyBitstreamPath = (Resolve-Path -LiteralPath $Bitstream).ProviderPath Push-Location $PSScriptRoot try { - & (Join-Path $VivadoBin "vivado.bat") -mode batch -source board/program_arty.tcl -tclargs $Bitstream + & (Join-Path $VivadoBin "vivado.bat") -mode batch -source (Join-Path $PSScriptRoot "program.tcl") -tclargs $toyBitstreamPath if ($LASTEXITCODE -ne 0) { throw "FPGA programming failed; inspect Vivado log" } } finally { Pop-Location } diff --git a/platforms/arty-a7-toy/program.tcl b/platforms/arty-a7-toy/program.tcl new file mode 100644 index 0000000..9538500 --- /dev/null +++ b/platforms/arty-a7-toy/program.tcl @@ -0,0 +1,5 @@ +# Arty A7-100T volatile JTAG entry point, usable from any working directory. +# vivado -mode batch -source /path/to/program.tcl -tclargs /path/to/toy_a7.bit +# Delegates to the exact board script used by the recorded hardware run. +set toy_program_script [file join [file dirname [file normalize [info script]]] board program_arty.tcl] +source $toy_program_script diff --git a/platforms/arty-a7-toy/scripts/verify_hardware_evidence.py b/platforms/arty-a7-toy/scripts/verify_hardware_evidence.py new file mode 100644 index 0000000..d674054 --- /dev/null +++ b/platforms/arty-a7-toy/scripts/verify_hardware_evidence.py @@ -0,0 +1,76 @@ +"""Check the immutable physical bring-up archive without contacting hardware.""" +import hashlib +import json +from pathlib import Path +import re + +ROOT = Path(__file__).resolve().parents[1] +ARCHIVE = ROOT / "evidence/2026-10-12/hardware" + + +def read(path): + return json.loads(path.read_text(encoding="utf-8")) + + +def sha(path): + return hashlib.sha256(path.read_bytes()).hexdigest() + + +def verify(): + manifest = read(ARCHIVE / "MANIFEST.json") + assert manifest["run_date"] == "2026-10-12" + assert manifest["time_zone"] == "Asia/Shanghai" + for name, metadata in manifest["files"].items(): + assert sha(ARCHIVE / name) == metadata["sha256"], name + assert sha(ROOT / "board/program_arty.tcl") == sha(ARCHIVE / "program_arty.tcl") + assert sha(ROOT / "host/load.py") == manifest["host_loader_sha256"] + hardware = read(ARCHIVE / "HARDWARE_RESULT.json") + implementation = read(ROOT / "evidence/2026-10-11/BOARD_RESULT.json") + assert hardware["result"] == "PASS_HARDWARE_LOAD_AND_LINUX_CHECK" + assert hardware["physical_linux_boot_tested"] + assert hardware["bitstream_sha256"] == implementation["bitstream_sha256"] + assert hardware["payload_sha256"] == implementation["linux"]["payload_sha256"] + for name, expected in hardware["evidence_sha256"].items(): + assert sha(ARCHIVE / name) == expected, name + assert hardware["physical_board_revision"] == "unknown" + assert not hardware["hardware_gemmini_operator_tests_run"] + assert not hardware["hardware_fp16_fp32_exhaustive_tests_run"] + assert hardware["configuration"] == "volatile FPGA SRAM" + assert hardware["verified_ddr_bytes"] == hardware["payload_bytes"] == 17409032 + assert hardware["complete_payload_ddr_readback"] == "PASS" + assert hardware["system_check_process_exit_status"] == 0 + assert hardware["live_shell"] == "PASS" + assert hardware["uart_latency_restored_ms"] == 16 + program = (ARCHIVE / "program.log").read_bytes() + assert b"End of startup status: HIGH" in program + assert b"ARTY_JTAG_PROGRAMMED:" in program + assert b"Device xc7a100t" in program + load = (ARCHIVE / "load-and-linux.log").read_bytes() + progress = [(int(done), int(total)) for done, total in + re.findall(rb"Verified (\d+)/(\d+) bytes", load)] + assert progress[0][0] == 256 + assert all(total == hardware["payload_bytes"] for _, total in progress) + assert all(b[0] - a[0] == 65536 for a, b in zip(progress, progress[1:])) + assert progress[-1][0] >= hardware["payload_bytes"] - 65536 + assert b"Full readback passed; CPU started after 544.1s." in load + console = (ARCHIVE / "linux-console.log").read_bytes() + checks = {"VM_COPY_ON_WRITE", "VM_PAGE_PROTECTION", "FP64_PROCESS_CONTEXT", + "LINUX_TIMER", "LINUX_SYSTEM_CHECK"} + assert set(hardware["linux_checks"]) == checks + for check in checks: + assert hardware["linux_checks"][check] == "PASS" + assert ("PASS " + check).encode() in console, check + assert b"OpenSBI v1.9" in console and b"Linux version 6.6.0" in console + assert b"elapsed_ns=103836000" in console + first = (ARCHIVE / "live-console-first.log").read_bytes() + assert re.search(rb"(?:^|\n)HARDWARE_RC:0\r*\n", first) + live = (ARCHIVE / "live-console.log").read_bytes() + assert b"KERNEL:Linux version 6.6.0" in live + assert b"MEMORY:MemTotal: 245784 kB" in live + assert re.search(rb"(?:^|\n)FPGA_LIVE_DONE\r*\n", live) + print(f"PASS physical hardware archive: {len(manifest['files'])} original artifacts; " + "complete DDR image readback, five Linux checks and live shell") + + +if __name__ == "__main__": + verify() diff --git a/platforms/arty-a7-toy/scripts/verify_target.py b/platforms/arty-a7-toy/scripts/verify_target.py index 9bf24d8..900827c 100644 --- a/platforms/arty-a7-toy/scripts/verify_target.py +++ b/platforms/arty-a7-toy/scripts/verify_target.py @@ -4,6 +4,7 @@ import json from pathlib import Path import re +from verify_hardware_evidence import verify as verify_hardware ROOT = Path(__file__).resolve().parents[1] EVIDENCE = ROOT / "evidence/2026-10-11" @@ -35,6 +36,7 @@ def main(): assert record["part"] == "xc7a100tcsg324-1" assert record["core_rtl_sha256"] == lock["core_rtl_sha256"] assert record["gemmini_mesh_dsp"] == 64 + # This immutable October 11 record predates the separate physical archive. assert not record["physical_linux_boot_tested"] and not record["board_release_ready"] for name, expected in record["board_sources"].items(): if not name.endswith(".md"): @@ -58,6 +60,7 @@ def main(): assert marker in transcript, marker assert re.search(r"PASS BOARD_LINUX_USERSPACE cycles=273506752", transcript) assert read(EVIDENCE / "tests/uart-boot/RESULT.json")["result"] == "PASS_UART_LOAD_VERIFY_BOOT" + verify_hardware() if args.core: assert sha(ROOT / "build/serial-bound/ToyLinuxChip.sv") == lock["core_rtl_sha256"] assert sha(ROOT / "build/serial-bound/FpgaMemories.sv") == lock["memory_rtl_sha256"]