pub struct ForeignData { /* private fields */ }Expand description
Builder for a VHPI foreign-model registration record.
Construct with ForeignData::new, attach optional callbacks with
elab and exec, then pass a
reference to register_foreignf.
Implementations§
Source§impl ForeignData
impl ForeignData
Sourcepub fn new(kind: ForeignKind, library_name: &str, model_name: &str) -> Self
pub fn new(kind: ForeignKind, library_name: &str, model_name: &str) -> Self
Create a new registration record.
library_name and model_name must match the values declared in the
VHDL foreign attribute exactly. Any interior NUL bytes are stripped.
Sourcepub fn elab(self, f: ForeignCallback) -> Self
pub fn elab(self, f: ForeignCallback) -> Self
Set the elaboration callback, called once when the design is elaborated.
Sourcepub fn exec(self, f: ForeignCallback) -> Self
pub fn exec(self, f: ForeignCallback) -> Self
Set the execution callback, called each time the foreign model is invoked during simulation.
Trait Implementations§
Source§impl Clone for ForeignData
impl Clone for ForeignData
Auto Trait Implementations§
impl Freeze for ForeignData
impl RefUnwindSafe for ForeignData
impl Send for ForeignData
impl Sync for ForeignData
impl Unpin for ForeignData
impl UnsafeUnpin for ForeignData
impl UnwindSafe for ForeignData
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