Expand description
Hardware-free: builds and is tested on the host too. What each PPS slot does, decided without I/O.
Hardware-free on purpose: it compiles on the host, where cargo test runs
the tests below. crate::io::pps executes what [Planner::plan] picks.
Structs§
- Held
- The part of a bank read that planning depends on.
- Planner
- What the loop knows: the module’s last bank read and what it last wrote.
- PpsSetpoint
- What the module should hold. Sampled every slot.
Enums§
- Slot
- What a slot is for. A slot runs at most one transaction.
- Transaction
- The one transaction a slot decided on.
Constants§
- AUX_
EVERY_ TICKS - Every this many ticks, the tick’s second read becomes the
Slot::Auxtransaction: once a second atPPS_TICK_MS100 ms. - PPS_
MIN_ GAP_ MS - The least time from the end of one transaction to the start of the next: the module NACKs one addressed right after another. A slot’s transaction ends ~1 ms in, so on time the slot grid keeps this with room to spare.
- PPS_
SLOT_ MS - Slot length. A slot holds one transaction of at most ~1 ms; the rest is the gap the module needs before it answers the next one.
- PPS_
TICK_ MS - A tick: one pass through
SCHEDULE. - SCHEDULE
- One tick. Every write slot is followed by a read slot, so each write is
verified before the next one, and no slot is ever back to back with
another transaction: they are
PPS_SLOT_MSapart.
Functions§
- next_
slot_ start - When the next slot starts, in µs, given when this one started and when its
transaction ended (
end == startwithout one). On time that is the next grid point. Late, a stalled executor, it is a fullPPS_MIN_GAP_MSafter the end: missed slots are skipped, never run back to back to catch up. - slot_at
- The slot at
indexof ticktick. With an auxiliary transaction, the second read of everyAUX_EVERY_TICKSth tick is it, so it is spaced from the module’s traffic like any other slot.