Skip to main content

relay_kernel

Function relay_kernel 

Source
pub fn relay_kernel<T: Digital>(
    cr: ClockReset,
    i: RelayIn<T>,
    q: RelayQ<T>,
) -> (RelayOut<T>, RelayD<T>)
Expand description

Carloni’s controller (figure 4), with the state as one bit.

  • Run (stall low): main loads the incoming item whenever downstream is not stopped, or main is empty. If downstream stops while both main and the input hold items, the input item goes into aux and the station moves to Stall.
  • Stall: stop_out is high. When downstream releases, main takes the item from aux and the station returns to Run (still stopping upstream for that one clock, so nothing new arrives while aux drains).