Struct bitsy_lang::Circuit
source · pub struct Circuit(/* private fields */);
Expand description
A Circuit
is a module instance.
It allows you to walk the instance, following references to definitions.
Implementations§
source§impl Circuit
impl Circuit
pub fn package(&self) -> &Package
sourcepub fn component(&self, path: Path) -> Option<Arc<Component>>
pub fn component(&self, path: Path) -> Option<Arc<Component>>
Dot into the given path.
Follow Component::ModInst
s to their definitions.
sourcepub fn wires(&self) -> Vec<(Path, Wire)>
pub fn wires(&self) -> Vec<(Path, Wire)>
Walk the instance’s module hierarchy, returning all Wire
s.
pub fn exts(&self) -> Vec<(Path, Arc<Component>)>
sourcepub fn paths(&self) -> Vec<Path>
pub fn paths(&self) -> Vec<Path>
Walk the instance’s module hierarchy, returning all Path
s for everything.
sourcepub fn reset_for_reg(&self, path: Path) -> Option<Arc<Expr>>
pub fn reset_for_reg(&self, path: Path) -> Option<Arc<Expr>>
Given a Path
, if it is a Component::Reg
, return its reset value.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Circuit
impl Send for Circuit
impl Sync for Circuit
impl Unpin for Circuit
impl UnwindSafe for Circuit
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