pub struct PortInterface;
Expand description
Helper methods to parse @read_together
and @write_together
specifications
Implementations§
Source§impl PortInterface
impl PortInterface
Sourcepub fn write_together_specs<'a>(
primitives: impl Iterator<Item = &'a Primitive>,
) -> HashMap<Id, Vec<HashSet<Id>>>
pub fn write_together_specs<'a>( primitives: impl Iterator<Item = &'a Primitive>, ) -> HashMap<Id, Vec<HashSet<Id>>>
Construct @write_together specs from the primitive definitions.
Sourcepub fn comb_path_spec(prim: &Primitive) -> CalyxResult<Vec<(Id, HashSet<Id>)>>
pub fn comb_path_spec(prim: &Primitive) -> CalyxResult<Vec<(Id, HashSet<Id>)>>
Construct @read_together
spec from the definition of a primitive.
Each spec is allowed to have exactly one output port along with one
or more input ports.
The specification dictates that before reading the output port, the
input ports must be driven, i.e., the output port is combinationally
related to the input ports and only those ports.
Auto Trait Implementations§
impl Freeze for PortInterface
impl RefUnwindSafe for PortInterface
impl Send for PortInterface
impl Sync for PortInterface
impl Unpin for PortInterface
impl UnwindSafe for PortInterface
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more