pub trait Block: Logic {
// Required methods
fn connect_all(&mut self);
fn update_all(&mut self);
fn has_changed(&self) -> bool;
fn accept(&self, name: &str, probe: &mut dyn Probe);
}
Expand description
The Block trait is required for all circuitry that
can be simulated by RustHDL. If you want to be able
to simulate a circuit, the corresponding struct must
impl Block. Normally, this is done via the #[derive(LogicBlock)]
construct, and you will rarely, if ever, need to
impl the Block trait yourself.
Required Methods§
Sourcefn connect_all(&mut self)
fn connect_all(&mut self)
Connects the internal signals of the circuit - used to initialize the circuit
Sourcefn update_all(&mut self)
fn update_all(&mut self)
Propogate changes from inputs to outputs within the circuit
Sourcefn has_changed(&self) -> bool
fn has_changed(&self) -> bool
Returns true
if anything in the circuit has changed (outputs or internal state)