pub struct FSM {
pub attributes: Attributes,
pub assignments: Vec<Vec<Assignment<Nothing>>>,
pub transitions: Vec<Transition>,
pub wires: SmallVec<[RRC<Port>; 2]>,
/* private fields */
}
Fields§
§attributes: Attributes
Attributes for this FSM
assignments: Vec<Vec<Assignment<Nothing>>>
State indexes into assignments that are supposed to be enabled at that state
transitions: Vec<Transition>
State indexes into (potentially guarded) next states
wires: SmallVec<[RRC<Port>; 2]>
Implementations§
Source§impl FSM
impl FSM
Sourcepub fn find<S>(&self, name: S) -> Option<RRC<Port>>
pub fn find<S>(&self, name: S) -> Option<RRC<Port>>
Get a reference to the named hole if it exists.
pub fn get<S>(&self, name: S) -> RRC<Port>
Sourcepub fn extend_fsm<A, T>(&mut self, assigns: A, transitions: T)
pub fn extend_fsm<A, T>(&mut self, assigns: A, transitions: T)
Extend the FSM with new transitions and assignments. Will panic if the lengths are not consistent.
Sourcepub fn extend_state_assignments<I>(&mut self, state: u64, assigns: I)
pub fn extend_state_assignments<I>(&mut self, state: u64, assigns: I)
Extend the assignments that are supposed to be active at a given state.
Sourcepub fn get_called_port_parents<F>(&self, push_parent_name: F) -> Vec<Id>
pub fn get_called_port_parents<F>(&self, push_parent_name: F) -> Vec<Id>
Returns a list of names of the groups, cells, or other port parents used by the FSM. Requires as an argument a function that can in-place update a Vec with the name of kinds of port parents you care about.
Sourcepub fn merge_assignments(&self) -> Vec<Vec<(usize, Assignment<Nothing>)>>
pub fn merge_assignments(&self) -> Vec<Vec<(usize, Assignment<Nothing>)>>
Each element of the resulting Vec is a collection of assignments writing
to the same destination port, where the usize
value represents the
FSM state at which the assignment should take place.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FSM
impl !RefUnwindSafe for FSM
impl !Send for FSM
impl !Sync for FSM
impl Unpin for FSM
impl !UnwindSafe for FSM
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
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>
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>
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