Struct rust_hdl_widgets::synchronizer::BitSynchronizer
source · pub struct BitSynchronizer {
pub sig_in: Signal<In, Bit>,
pub sig_out: Signal<Out, Bit>,
pub clock: Signal<In, Clock>,
/* private fields */
}
Expand description
A BitSynchronizer is used to move signals that are asynchronous to a clock into that clock domain using a pair of back-to-back flip-flops. While the first flip flop may become metastable, the second one is likely to be stable.
Fields§
§sig_in: Signal<In, Bit>
The input signal, which is asynchronous to the clock
sig_out: Signal<Out, Bit>
The output signal, synchronized to the clock
clock: Signal<In, Clock>
The clock signal to synchronize the output to
Trait Implementations§
source§impl Block for BitSynchronizer
impl Block for BitSynchronizer
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)source§impl Default for BitSynchronizer
impl Default for BitSynchronizer
source§fn default() -> BitSynchronizer
fn default() -> BitSynchronizer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for BitSynchronizer
impl Send for BitSynchronizer
impl Sync for BitSynchronizer
impl Unpin for BitSynchronizer
impl UnwindSafe for BitSynchronizer
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