pub struct Bind {
pub contract: String,
pub lsb: u32,
pub width: u32,
pub dut: String,
pub dut_lsb: u32,
pub valid: Option<String>,
pub dut_width: u32,
}Expand description
Contract bits [lsb, lsb + width) of port contract connect to DUT port dut. Several binds
to one input DUT port concatenate, the first in the least significant bits; an input DUT port
wider than what is bound to it is sign-extended when the topmost bound contract field is signed,
else zero-extended. An output DUT port contributes its low width bits.
Fields§
§contract: String§lsb: u32§width: u32§dut: String§dut_lsb: u32For an output: the DUT port bit the contract bits start at.
valid: Option<String>For an output: the DUT port whose one-cycle pulse marks a new value on dut. Values arrive in
operation order; the harness queues each port and folds a result once every port has one.
dut_width: u32For an output the DUT carries narrower than the contract field: the DUT supplies this many
bits from dut_lsb, a signed value sign-extended to the bind’s width (0: the whole width).
Implementations§
Source§impl Bind
impl Bind
Sourcepub fn whole(contract: &str, dut: &str) -> Bind
pub fn whole(contract: &str, dut: &str) -> Bind
The whole contract port contract to DUT port dut; the width is the contract’s.
pub fn slice(contract: &str, lsb: u32, width: u32, dut: &str) -> Bind
Sourcepub fn sign_extended(self, dut_width: u32) -> Bind
pub fn sign_extended(self, dut_width: u32) -> Bind
This output bind taking only dut_width signed bits from the DUT, sign-extended to its width.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Bind
impl<'de> Deserialize<'de> for Bind
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 StructuralPartialEq for Bind
Auto Trait Implementations§
impl Freeze for Bind
impl RefUnwindSafe for Bind
impl Send for Bind
impl Sync for Bind
impl Unpin for Bind
impl UnsafeUnpin for Bind
impl UnwindSafe for Bind
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.