pub struct Coverage { /* private fields */ }Expand description
Toggle + Mux branch + FSM state-visit coverage over named signals / labels.
Implementations§
Source§impl Coverage
impl Coverage
pub fn sample(&mut self, name: impl Into<String>, value: u64)
Sourcepub fn sample_mux_branch(&mut self, sel: &str, took_true: bool)
pub fn sample_mux_branch(&mut self, sel: &str, took_true: bool)
Register both arms of a Mux and record which arm was taken this eval.
Sourcepub fn register_fsm_states<I, S>(&mut self, fsm: &str, states: I)
pub fn register_fsm_states<I, S>(&mut self, fsm: &str, states: I)
Register an explicit FSM state enum (or label set) for state-visit (FR109 / C3).
Sourcepub fn sample_state_visit(&mut self, fsm: &str, state: &str)
pub fn sample_state_visit(&mut self, fsm: &str, state: &str)
Record that state of fsm was visited (must be registered first for miss tracking).
pub fn hits(&self) -> impl Iterator<Item = &str>
pub fn misses(&self) -> impl Iterator<Item = &str>
pub fn branch_hits(&self) -> impl Iterator<Item = &str>
pub fn branch_misses(&self) -> impl Iterator<Item = &str>
pub fn state_hits(&self) -> impl Iterator<Item = &str>
pub fn state_misses(&self) -> impl Iterator<Item = &str>
Sourcepub fn report(&self) -> String
pub fn report(&self) -> String
Stable line-oriented report.
- No FSM registered →
# bitloom-sim coverage v2(FR105 dialect). - FSM registered →
# bitloom-sim coverage v3+# FR109 C3 FSM/state-visitwithstate_hit/state_misslines (toggle + branch retained).
Sourcepub fn to_lcov(&self, source_file: &str) -> String
pub fn to_lcov(&self, source_file: &str) -> String
Emit LCOV (coverage.lcov dialect) for FR114 — one DA line per coverage point.
Hits use DA:line,1; misses use DA:line,0. Synthetic SF path documents the
Bitloom coverage namespace (not a Rust source map — Tywaves typed IDE is deferred).
Sourcepub fn coverage_gui_html(&self, title: &str) -> String
pub fn coverage_gui_html(&self, title: &str) -> String
In-tree Bitloom coverage GUI HTML (FR114) — browse hit/miss with search.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Coverage
impl RefUnwindSafe for Coverage
impl Send for Coverage
impl Sync for Coverage
impl Unpin for Coverage
impl UnsafeUnpin for Coverage
impl UnwindSafe for Coverage
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