pub enum EdgeControl {
AnyChange,
Edges(EdgeSet),
}Expand description
What makes a timing-check event occur (LRM 31.5): the resolved form of one
event’s posedge / negedge / edge / edge [descriptors] / nothing.
Whether a particular (from, to) value change is such an event is
sv-sim-bin::timingcheck::edge_matches’s job – the one place that
interprets this.
Variants§
AnyChange
No edge control: ANY value change of the terminal is the event
(from != to; an x<->z change counts, it is a change of the
signal even though no edge descriptor names it).
Edges(EdgeSet)
Only a change that is one of these transitions is the event.
Implementations§
Source§impl EdgeControl
impl EdgeControl
Sourcepub fn opposite(self) -> Option<EdgeControl>
pub fn opposite(self) -> Option<EdgeControl>
The control of “the reference event signal with opposite edge” (LRM
31.4.4, $width’s derived data event; $nochange’s trailing edge is the
same derivation): every transition reversed. None for
EdgeControl::AnyChange, which has no direction to oppose – a check
that needs this has an edge-specified reference (T13 enforces it), so a
caller meeting None reports it by name rather than guessing.
Sourcepub fn from_syntax(
edge: EdgeKind,
descriptors: &[String],
) -> Result<Self, String>
pub fn from_syntax( edge: EdgeKind, descriptors: &[String], ) -> Result<Self, String>
Resolves the parsed edge / edge_descriptors pair of a
SystemTimingCheckArg (sv-lang keeps the descriptors as written).
posedge/negedgeare the lists LRM 31.5 states they abbreviate;edge [d, ...]is the union of its descriptors;- a bare
edge(no list) is NOT defined by 31.5’s text. It is taken as all six transitions – “any edge”, as 9.4.2’s@(edge e)– chosen once here.
A descriptor that is not one of the six, or a descriptor list on
anything but edge, is a named Err (slang rejects the former at
parse time; this is the backstop for an sv-lang that stops doing so).
Trait Implementations§
Source§impl Clone for EdgeControl
impl Clone for EdgeControl
impl Copy for EdgeControl
Source§impl Debug for EdgeControl
impl Debug for EdgeControl
Source§impl<'de> Deserialize<'de> for EdgeControl
impl<'de> Deserialize<'de> for EdgeControl
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for EdgeControl
Source§impl Hash for EdgeControl
impl Hash for EdgeControl
Source§impl PartialEq for EdgeControl
impl PartialEq for EdgeControl
Source§impl Serialize for EdgeControl
impl Serialize for EdgeControl
impl StructuralPartialEq for EdgeControl
Auto Trait Implementations§
impl Freeze for EdgeControl
impl RefUnwindSafe for EdgeControl
impl Send for EdgeControl
impl Sync for EdgeControl
impl Unpin for EdgeControl
impl UnsafeUnpin for EdgeControl
impl UnwindSafe for EdgeControl
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.