Struct rust_hdl_widgets::synchronizer::SyncReceiver
source · pub struct SyncReceiver<T: Synth> {
pub sig_out: Signal<Out, T>,
pub clock: Signal<In, Clock>,
pub sig_cross: Signal<In, T>,
pub flag_in: Signal<In, Bit>,
pub ack_out: Signal<Out, Bit>,
pub update: Signal<Out, Bit>,
/* private fields */
}
Expand description
A SyncReceiver works together with a SyncSender to transmit data from one clock domain to another (in one direction). To use a SyncReceiver wire up the [sig_cross], [flag_in] and [ack_out] signals between the two.
Fields§
§sig_out: Signal<Out, T>
The data output synchronized to the receiver’s clock
clock: Signal<In, Clock>
The receivers clock signal. Data is synchronized to this clock.
sig_cross: Signal<In, T>
The wires used to send data from the SyncSender to the SyncReceiver.
flag_in: Signal<In, Bit>
This is wired up to the SyncSender::flag_out, and carries the new-data flag.
ack_out: Signal<Out, Bit>
This is wired up to the SyncSender::ack_in, and carries the acknowledge flag.
update: Signal<Out, Bit>
This signal will strobe high for one clock when the output is valid and synchronized.
Trait Implementations§
source§impl<T: Synth> Block for SyncReceiver<T>
impl<T: Synth> Block for SyncReceiver<T>
source§fn connect_all(&mut self)
fn connect_all(&mut self)
Connects the internal signals of the circuit - used to initialize the circuit
source§fn update_all(&mut self)
fn update_all(&mut self)
Propogate changes from inputs to outputs within the circuit
source§fn has_changed(&self) -> bool
fn has_changed(&self) -> bool
Returns
true
if anything in the circuit has changed (outputs or internal state)Auto Trait Implementations§
impl<T> RefUnwindSafe for SyncReceiver<T>where T: RefUnwindSafe,
impl<T> Send for SyncReceiver<T>where T: Send,
impl<T> Sync for SyncReceiver<T>where T: Sync,
impl<T> Unpin for SyncReceiver<T>where T: Unpin,
impl<T> UnwindSafe for SyncReceiver<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more