pub struct LogicHandle { /* private fields */ }Expand description
A value-bearing signal handle (net/reg/var). Port of cocotb’s
LogicObject surface: explicit get()/set() (mapping row 20).
Buffered-write semantics live a layer up in rustdv-sim; the methods
here apply values immediately.
Implementations§
Source§impl LogicHandle
impl LogicHandle
pub fn name(&self) -> String
pub fn full_name(&self) -> String
pub fn size(&self) -> u32
Sourcepub fn get_binstr(&self) -> String
pub fn get_binstr(&self) -> String
Current value as a binary string, e.g. “0101”, “xxxx”.
Sourcepub fn get(&self) -> LogicArray
pub fn get(&self) -> LogicArray
Current value as a LogicArray (4-state).
Sourcepub fn get_u64(&self) -> Result<u64, ValueError>
pub fn get_u64(&self) -> Result<u64, ValueError>
Current value as u64; Err if any bit is x/z (design-doc §0.6:
conversion failures are Results, not exceptions).
Sourcepub fn set_u64_now(&self, v: u64)
pub fn set_u64_now(&self, v: u64)
Immediate (NoDelay) write of an integer value, zero-extended / truncated to the signal width. This is the “setimmediatevalue” analog; scheduled writes are layered above (design-doc §4.1(4)).
Sourcepub fn set_now(&self, v: &LogicArray)
pub fn set_now(&self, v: &LogicArray)
Immediate write of a 4-state value.
Trait Implementations§
Source§impl Clone for LogicHandle
impl Clone for LogicHandle
Source§fn clone(&self) -> LogicHandle
fn clone(&self) -> LogicHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LogicHandle
impl Eq for LogicHandle
Source§impl PartialEq for LogicHandle
impl PartialEq for LogicHandle
impl StructuralPartialEq for LogicHandle
Auto Trait Implementations§
impl !Send for LogicHandle
impl !Sync for LogicHandle
impl Freeze for LogicHandle
impl RefUnwindSafe for LogicHandle
impl Unpin for LogicHandle
impl UnsafeUnpin for LogicHandle
impl UnwindSafe for LogicHandle
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