Skip to main content

Crate u280_hbm_sim

Crate u280_hbm_sim 

Source
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; and
  • SHA256SUMS: 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 all

The 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§

CaseArtifacts
Raw files and report produced by one completed case.
DecodedSummary
Strictly decoded HSR1 terminal summary.
SimulationCase
User-selected deterministic case configuration.
SimulationReport
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.