pub struct SyncSender<T: Synth> {
    pub sig_in: Signal<In, T>,
    pub clock: Signal<In, Clock>,
    pub sig_cross: Signal<Out, T>,
    pub flag_out: Signal<Out, Bit>,
    pub ack_in: Signal<In, Bit>,
    pub busy: Signal<Out, Bit>,
    pub send: Signal<In, Bit>,
    /* private fields */
}
Expand description

When you need to send many bits between two clock domains, it is risky to use a vector of BitSynchronizer structs. That is because, you cannot guarantee at any given moment that all of the bits of your multi-bit signal will cross into the new clock domain at once. So to synchronize a multi-bit signal, use a SyncSender and SyncReceiver pair. These widgets will use a set of handshake signals to move a value from one clock domain to another safely. Note that while the state machine is executing, the synchronizer will indicate it is busy. Crossing clock domains with greater ease is best done with an [AsynchronousFIFO].

Fields

sig_in: Signal<In, T>

The input signal to synchronize across clock domains

clock: Signal<In, Clock>

The input signals are assumed to be synchronous to this clock

sig_cross: Signal<Out, T>

These are the wires used to send signals to the SyncReceiver.

flag_out: Signal<Out, Bit>

A protocol flag signal indicating that data is ready to be transferred to the second clock doamin.

ack_in: Signal<In, Bit>

A protocol flag signal indicating that the data has been transferred to the second clock domain.

busy: Signal<Out, Bit>

A signal indicating that the SyncSender is busy transferring data to the second clock domain.

send: Signal<In, Bit>

A protocol signal - raise this high for one cycle to latch [sig_in].

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.