pub struct LogicHandle { /* private fields */ }Expand description
A value-bearing signal. Explicit get()/set() (mapping row 20 —
cocotb 2.x itself moved off the .value property).
Implementations§
Source§impl LogicHandle
impl LogicHandle
pub fn size(&self) -> u32
Sourcepub fn get_bool(&self) -> Result<bool, ValueError>
pub fn get_bool(&self) -> Result<bool, ValueError>
Current boolean value, or Err if VPI does not supply it.
Sourcepub fn get_u8(&self) -> Result<u8, ValueError>
pub fn get_u8(&self) -> Result<u8, ValueError>
Current unsigned 8-bit value, or Err if VPI does not supply it.
Sourcepub fn get_u16(&self) -> Result<u16, ValueError>
pub fn get_u16(&self) -> Result<u16, ValueError>
Current unsigned 16-bit value, or Err if VPI does not supply it.
Sourcepub fn get_u32(&self) -> Result<u32, ValueError>
pub fn get_u32(&self) -> Result<u32, ValueError>
Current unsigned 32-bit value, or Err if VPI does not supply it.
Sourcepub fn get_u64(&self) -> Result<u64, ValueError>
pub fn get_u64(&self) -> Result<u64, ValueError>
Current unsigned 64-bit value, or Err if VPI does not supply it.
Sourcepub fn get_u128(&self) -> Result<u128, ValueError>
pub fn get_u128(&self) -> Result<u128, ValueError>
Current unsigned 128-bit value, or Err if VPI does not supply it.
Sourcepub fn get_bigint(&self) -> Result<BigUint, ValueError>
pub fn get_bigint(&self) -> Result<BigUint, ValueError>
Current arbitrary-width unsigned value, or Err if VPI does not supply it.
Sourcepub fn get_logic(&self) -> Result<LogicArray, ValueError>
pub fn get_logic(&self) -> Result<LogicArray, ValueError>
Current four-state value, or Err if VPI does not supply it.
Sourcepub fn get_binstr(&self) -> Result<String, ValueError>
pub fn get_binstr(&self) -> Result<String, ValueError>
Current four-state value formatted as an MSB-first binary string.
Sourcepub fn set_bool(&self, v: bool)
pub fn set_bool(&self, v: bool)
Set the boolean value to be applied at the next ReadWrite phase. The write is buffered and the last write wins, preserving order of distinct signals.
Sourcepub fn set_u8(&self, v: u8)
pub fn set_u8(&self, v: u8)
Set the unsigned 8-bit value to be applied at the next ReadWrite phase. The write is buffered and the last write wins, preserving order of distinct signals.
Sourcepub fn set_u16(&self, v: u16)
pub fn set_u16(&self, v: u16)
Set the unsigned 16-bit value to be applied at the next ReadWrite phase. The write is buffered and the last write wins, preserving order of distinct signals.
Sourcepub fn set_u32(&self, v: u32)
pub fn set_u32(&self, v: u32)
Set the unsigned 32-bit value to be applied at the next ReadWrite phase. The write is buffered and the last write wins, preserving order of distinct signals.
Sourcepub fn set_u64(&self, v: u64)
pub fn set_u64(&self, v: u64)
Set the unsigned 64-bit value to be applied at the next ReadWrite phase. The write is buffered and the last write wins, preserving order of distinct signals.
Sourcepub fn set_u128(&self, v: u128)
pub fn set_u128(&self, v: u128)
Set the unsigned 128-bit value to be applied at the next ReadWrite phase. The write is buffered and the last write wins, preserving order of distinct signals.
Sourcepub fn set_bigint(&self, v: &BigUint)
pub fn set_bigint(&self, v: &BigUint)
Set the arbitrary-width unsigned value to be applied at the next ReadWrite phase. The write is buffered and the last write wins, preserving order of distinct signals.
Sourcepub fn set_logic(&self, v: &LogicArray)
pub fn set_logic(&self, v: &LogicArray)
Set the four-state value to be applied at the next ReadWrite phase. The write is buffered and the last write wins, preserving order of distinct signals.
Sourcepub fn set_bool_now(&self, v: bool)
pub fn set_bool_now(&self, v: bool)
Set the boolean value immediately, skipping the write scheduler. The write is applied at once, but the ReadOnly rule is still enforced.
Sourcepub fn set_u8_now(&self, v: u8)
pub fn set_u8_now(&self, v: u8)
Set the unsigned 8-bit value immediately, skipping the write scheduler. The write is applied at once, but the ReadOnly rule is still enforced.
Sourcepub fn set_u16_now(&self, v: u16)
pub fn set_u16_now(&self, v: u16)
Set the unsigned 16-bit value immediately, skipping the write scheduler. The write is applied at once, but the ReadOnly rule is still enforced.
Sourcepub fn set_u32_now(&self, v: u32)
pub fn set_u32_now(&self, v: u32)
Set the unsigned 32-bit value immediately, skipping the write scheduler. The write is applied at once, but the ReadOnly rule is still enforced.
Sourcepub fn set_u64_now(&self, v: u64)
pub fn set_u64_now(&self, v: u64)
Set the unsigned 64-bit value immediately, skipping the write scheduler. The write is applied at once, but the ReadOnly rule is still enforced.
Sourcepub fn set_u128_now(&self, v: u128)
pub fn set_u128_now(&self, v: u128)
Set the unsigned 128-bit value immediately, skipping the write scheduler. The write is applied at once, but the ReadOnly rule is still enforced.
Sourcepub fn set_bigint_now(&self, v: &BigUint)
pub fn set_bigint_now(&self, v: &BigUint)
Set the arbitrary-width unsigned value immediately, skipping the write scheduler. The write is applied at once, but the ReadOnly rule is still enforced.
Sourcepub fn set_logic_now(&self, v: &LogicArray)
pub fn set_logic_now(&self, v: &LogicArray)
Set the four-state value immediately, skipping the write scheduler. The write is applied at once, but the ReadOnly rule is still enforced.
Trait Implementations§
Source§impl Clone for LogicHandle
impl Clone for LogicHandle
impl Copy for LogicHandle
Source§impl Debug for LogicHandle
impl Debug for LogicHandle
impl Eq for LogicHandle
Source§impl From<LogicHandle> for LogicHandle
impl From<LogicHandle> for LogicHandle
Source§fn from(raw: LogicHandle) -> Self
fn from(raw: LogicHandle) -> Self
Source§impl HandleBase for LogicHandle
impl HandleBase for LogicHandle
Source§impl HandleEvent for LogicHandle
impl HandleEvent for LogicHandle
Source§fn rising_edge(&self) -> Edge ⓘ
fn rising_edge(&self) -> Edge ⓘ
Get the rising edge event for this handle
Source§fn falling_edge(&self) -> Edge ⓘ
fn falling_edge(&self) -> Edge ⓘ
Get the falling edge event for this handle
Source§fn value_change(&self) -> Edge ⓘ
fn value_change(&self) -> Edge ⓘ
Get the value change event for this handle