Skip to main content

Coverage

Struct Coverage 

Source
pub struct Coverage { /* private fields */ }
Expand description

Toggle + Mux branch + FSM state-visit coverage over named signals / labels.

Implementations§

Source§

impl Coverage

Source

pub fn sample(&mut self, name: impl Into<String>, value: u64)

Source

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.

Source

pub fn register_fsm_states<I, S>(&mut self, fsm: &str, states: I)
where I: IntoIterator<Item = S>, S: Into<String>,

Register an explicit FSM state enum (or label set) for state-visit (FR109 / C3).

Source

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).

Source

pub fn hits(&self) -> impl Iterator<Item = &str>

Source

pub fn misses(&self) -> impl Iterator<Item = &str>

Source

pub fn branch_hits(&self) -> impl Iterator<Item = &str>

Source

pub fn branch_misses(&self) -> impl Iterator<Item = &str>

Source

pub fn state_hits(&self) -> impl Iterator<Item = &str>

Source

pub fn state_misses(&self) -> impl Iterator<Item = &str>

Source

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-visit with state_hit / state_miss lines (toggle + branch retained).
Source

pub fn is_empty(&self) -> bool

True when no toggle/branch/state points were ever registered.

Source

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).

Source

pub fn coverage_gui_html(&self, title: &str) -> String

In-tree Bitloom coverage GUI HTML (FR114) — browse hit/miss with search.

Trait Implementations§

Source§

impl Clone for Coverage

Source§

fn clone(&self) -> Coverage

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Coverage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Coverage

Source§

fn default() -> Coverage

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.