Expand description
§HashSigs U280 source-tier mock-HBM simulation
This crate couples the production Rust/RHDL U280HbmShell to the production
three-cluster SHA-256 signer while retaining separate simulation state for each
component. It drives only their published AXI4-Lite, AXI4/HBM, and signer
ports. The mock memories use deterministic, seed-keyed address, data, and
response delays; a replay with the same case and seed makes exactly the same
ready/valid decisions.
The standard suite covers successful batches 0, 1, and 6 plus soft-abort
after eight observed signer SHA requests,
input-response, signer-completion, payload-response, and summary-response
failures. Every case has a hard 60,000-cycle ceiling. The batch-6 case also
requires exactly 7,548 accepted SHA compression requests (6 * 1,258) and 210
payload W handshakes (6 * 35).
Each output directory contains:
inputs.bin: contiguous 64-byte jobs (private_seed || message_digest);outputs.bin: complete 4 KiB output slots, including deterministic poison in every byte the shell did not write; the zero-batch case has one fully poisoned 4 KiB sentinel allocation while retaining a logical output size of zero jobs;summary.bin: the exact 64-byte terminal line observed on HBM1;source-simulation.json: cycle, request, AXI, terminal, and failure results;oracle-request.json: immutable file geometry and digests for a later, separate Rust oracle; andSHA256SUMS: sorted SHA-256 coverage of those five files.
The JSON schema revision and field layout remain unchanged. Its geometry
contract now treats batch * 4 KiB as the logical output extent but requires a
physical max(batch, 1) * 4 KiB outputs.bin allocation. The request’s
manifest-bound file size and digest therefore bind the zero-batch sentinel
without inventing a logical job or payload.
The simulator never calls hashsigs-reference and does not place expected
cryptographic bytes in its request. A separate process must derive every
expected signature/public key from inputs.bin and compare all 2,208 payload
bytes in every completely written slot, even when its B response is an error.
It must also recheck all poison in unwritten slots, including the zero-batch
sentinel. Retirement remains a separate transport result, and failed runs
remain nonpromotable transport tests.
Run the bounded suite only while holding the coordinated local compiler slot:
cargo run --offline --locked -p u280-hbm-sim --bin u280-hbm-source-sim -- \
--output /new/source-simulation-directory --case allThe directory must not already exist. A single case may be selected by one of
success_batch_0, success_batch_1, success_batch_6, soft_abort,
input_error, signer_error, payload_b_error, or summary_b_error, and may
receive an explicit --seed.
This is source-simulation evidence only. It is not generated-RTL equivalence,
synthesis, implementation, timing, resource, XRT, card, or hardware-performance
evidence. Every JSON record sets source_simulation_valid only after its local
assertions pass, leaves cryptographic_oracle_valid null, and sets
hardware_completion_promotable to false.
The harness is deliberately outside both production components. It owns
independent simulation state for the shell and signer and connects only
their typed public ports on each modeled clock cycle.
Structs§
- Case
Artifacts - Raw files and report produced by one completed case.
- Decoded
Summary - Strictly decoded
HSR1terminal summary. - Simulation
Case - User-selected deterministic case configuration.
- Simulation
Report - Machine-readable result for one source simulation.
Enums§
- Scenario
- One deterministic scenario in the bounded standard suite.
Constants§
- MAX_
MODELED_ CYCLES - Hard ceiling applied independently to every modeled case.
- PAYLOAD_
W_ BEATS_ PER_ JOB - Exact payload W handshakes per successful job.
- PROFILE_
NAME - Cryptographic profile transported by the production HBM shell.
- SHA_
REQUESTS_ PER_ JOB - Exact fused-signing SHA-256 compression requests per admitted job.
- STANDARD_
SCENARIOS - Ordered standard-suite inventory.
Functions§
- run_
and_ write_ standard_ suite - Write a complete standard suite below a new root directory.
- run_
case - Execute one source-simulation case on an explicitly sized stack.
- run_
standard_ suite - Execute all eight standard cases sequentially.
- write_
case_ artifacts - Write one completed source-simulation case to a new directory.
- write_
suite_ index - Write a top-level index for a freshly created standard-suite directory.