pub struct VerilogBackend;
Expand description
Implements a simple Verilog backend. The backend only accepts Calyx programs with no control and no groups.
Trait Implementations§
Source§impl Backend for VerilogBackend
impl Backend for VerilogBackend
Source§fn link_externs(ctx: &Context, file: &mut OutputFile) -> CalyxResult<()>
fn link_externs(ctx: &Context, file: &mut OutputFile) -> CalyxResult<()>
Generate a “fat” library by copy-pasting all of the extern files.
A possible alternative in the future is to use SystemVerilog include
statement.
Source§fn validate(ctx: &Context) -> CalyxResult<()>
fn validate(ctx: &Context) -> CalyxResult<()>
Validate this program for emitting using this backend. Returns an
Err(..) if the program has unexpected constructs.
Source§fn emit(ctx: &Context, file: &mut OutputFile) -> CalyxResult<()>
fn emit(ctx: &Context, file: &mut OutputFile) -> CalyxResult<()>
Transforms the program into a formatted string representing a valid
and write it to
write
.Source§fn run(&self, prog: Context, file: OutputFile) -> CalyxResult<()>
fn run(&self, prog: Context, file: OutputFile) -> CalyxResult<()>
Convience function to validate and emit the program.
Source§impl Default for VerilogBackend
impl Default for VerilogBackend
Source§fn default() -> VerilogBackend
fn default() -> VerilogBackend
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for VerilogBackend
impl RefUnwindSafe for VerilogBackend
impl Send for VerilogBackend
impl Sync for VerilogBackend
impl Unpin for VerilogBackend
impl UnwindSafe for VerilogBackend
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