Skip to main content

slice_signer_kernel

Function slice_signer_kernel 

Source
pub fn slice_signer_kernel(
    clock_reset: ClockReset,
    input: SignerInput,
    q: SliceSignerQ,
) -> (SignerOutput, SliceSignerD)
Expand description

The signer’s wiring.

One kernel runs every stage each cycle, in this order (later sections may override decisions of earlier ones, so the order matters):

  1. keys and certificates: count finished keys, accept a certificate;
  2. [1] burn + hash: offer the message hash; burn the key if taken;
  3. [2] digits: turn a returning message hash into 68 digits;
  4. [4] stream: address the next chain, follow read tokens, feed the packer and write packed beats (the packer has priority on the frame buffer’s write port);
  5. [3] prepare: sibling reads, then header beats when the write port is free;
  6. frame completion and drain to the HBM writer;
  7. certificate FIFO retire/accept.

Timing: the metadata RAM, proof port and frame buffer answer one cycle after their address; the cache answers CACHE_READ_LATENCY cycles after. The packer adds one cycle.