pub struct ChiselModule {
pub name: String,
pub ports: Vec<ChiselPort>,
pub body: Vec<String>,
}Expand description
A complete Chisel module definition.
Fields§
§name: StringClass name for the Chisel module
ports: Vec<ChiselPort>I/O ports
body: Vec<String>Body statements (pre-formatted Scala strings)
Implementations§
Source§impl ChiselModule
impl ChiselModule
Sourcepub fn add_input(&mut self, name: impl Into<String>, ty: ChiselType)
pub fn add_input(&mut self, name: impl Into<String>, ty: ChiselType)
Add an input port.
Sourcepub fn add_output(&mut self, name: impl Into<String>, ty: ChiselType)
pub fn add_output(&mut self, name: impl Into<String>, ty: ChiselType)
Add an output port.
Trait Implementations§
Source§impl Clone for ChiselModule
impl Clone for ChiselModule
Source§fn clone(&self) -> ChiselModule
fn clone(&self) -> ChiselModule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ChiselModule
impl RefUnwindSafe for ChiselModule
impl Send for ChiselModule
impl Sync for ChiselModule
impl Unpin for ChiselModule
impl UnsafeUnpin for ChiselModule
impl UnwindSafe for ChiselModule
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