Skip to content

VirtualTrace

class VirtualTrace : public Trace

@brief A trace with no file behind it, created by (new-trace id max-index).

Upstream calls this a virtual trace. It has a timeline and nothing else: every signal on it is a virtual signal, defined by defsig as an expression rather than read from a dump. It is how a WAL program builds a derived trace, for example a decoded view of a bus, and then writes it out with dump-trace.

It holds no samples, so contains_signal and get_all_signals answer purely from the virtual-signal map that Trace already carries.

Functions

Name Description
signal_value A virtual trace stores no samples.

Function Details

signal_value

Value signal_value(const std::string& name, int offset = 0, const std::string& scope = "") override

A virtual trace stores no samples. Reading a signal here means reading the expression defsig left behind; evaluating it is the caller's job, because only the evaluator knows the environment it was defined in.