pub struct BetSimEmitter { /* private fields */ }Expand description
Generates Icarus Verilog simulation testbenches for BET programs.
Implementations§
Source§impl BetSimEmitter
impl BetSimEmitter
pub fn new() -> Self
pub fn with_max_cycles(max_cycles: usize) -> Self
Sourcepub fn emit_testbench(&self, bytecode: &[u8]) -> String
pub fn emit_testbench(&self, bytecode: &[u8]) -> String
Emit a complete, self-contained Verilog testbench for the given BET bytecode.
The output file can be compiled and run with:
iverilog -o bet_sim.vvp bet_sim_tb.v && vvp bet_sim.vvpSourcepub fn iverilog_available() -> bool
pub fn iverilog_available() -> bool
Check whether Icarus Verilog (iverilog) is available on $PATH.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BetSimEmitter
impl RefUnwindSafe for BetSimEmitter
impl Send for BetSimEmitter
impl Sync for BetSimEmitter
impl Unpin for BetSimEmitter
impl UnsafeUnpin for BetSimEmitter
impl UnwindSafe for BetSimEmitter
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