pub struct RustHdlModule {
pub name: String,
pub signals: Vec<Signal>,
/* private fields */
}Expand description
Represents a rust-hdl module.
It should be trivial to generate a wrapping rust-hdl module from this struct.
Fields§
§name: StringName for the rust-hdl struct
signals: Vec<Signal>The interface of the rust-hdl module
Implementations§
Source§impl RustHdlModule
impl RustHdlModule
pub fn new(verilog_name: String, signals: Vec<Signal>, verilog: String) -> Self
Sourcepub fn internal_verilog(&self) -> String
pub fn internal_verilog(&self) -> String
Verilog that should be used as the internal logic of the rust-hdl module.
It just instantiates the external module and connects the ports.
Sourcepub fn external_verilog(&self) -> &str
pub fn external_verilog(&self) -> &str
Verilog that contains the module that is being wrapped.
This needs to be included besides the internal verilog.
Sourcepub fn verilog_name(&self) -> &str
pub fn verilog_name(&self) -> &str
The name of the verilog module that is being wrapped.
Trait Implementations§
Source§impl Debug for RustHdlModule
impl Debug for RustHdlModule
Source§impl PartialEq for RustHdlModule
impl PartialEq for RustHdlModule
impl Eq for RustHdlModule
impl StructuralPartialEq for RustHdlModule
Auto Trait Implementations§
impl Freeze for RustHdlModule
impl RefUnwindSafe for RustHdlModule
impl Send for RustHdlModule
impl Sync for RustHdlModule
impl Unpin for RustHdlModule
impl UnwindSafe for RustHdlModule
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more