|
SILICON
|
High-level zero-overhead wrapper around libfst reader APIs. More...
#include <fstWrapper.hpp>
Classes | |
| struct | EnumTable |
| Decoded enum table extracted from libfst. More... | |
| struct | FstVarNode |
| Represents a single waveform variable/signal. More... | |
| struct | FstScopeNode |
| Recursive hierarchy node representing scopes/modules/packages/etc. More... | |
Public Member Functions | |
| Reader (std::string_view fileName) | |
| Opens an FST file for reading. | |
| ~Reader ()=default | |
| Reader (const Reader &)=delete | |
| Reader & | operator= (const Reader &)=delete |
| Reader (Reader &&) noexcept=default | |
| Reader & | operator= (Reader &&) noexcept=default |
| const std::string & | getFileName () const |
| uint64_t | getStartTime () const |
| uint64_t | getEndTime () const |
| uint64_t | getVarCount () const |
| uint64_t | getScopeCount () const |
| int8_t | getTimescale () const |
| Returns the exponent used by the timescale. | |
| std::string | getVersion () const |
| std::string | getDate () const |
| template<typename Func> | |
| void | iterateHierarchy (Func &&callback) |
| Generic hierarchy iterator. | |
| FstScopeNode | buildHierarchyTree () |
| Reconstructs hierarchy into a recursive tree structure. | |
| void | setLimitTimeRange (uint64_t start_time, uint64_t end_time) |
| Restricts waveform iteration to a bounded time window. | |
| void | setUnlimitedTimeRange () |
| Removes any previously configured time restrictions. | |
| void | setFacProcessMaskAll () |
| Enables processing for all signals. | |
| void | clearFacProcessMaskAll () |
| Disables processing for all signals. | |
| void | setFacProcessMask (fstHandle facidx) |
| Enables a specific signal for processing. | |
| void | clearFacProcessMask (fstHandle facidx) |
| Disables a specific signal for processing. | |
| template<typename Func> | |
| void | readIterateBlocks (Func &&callback) |
| Iterates waveform blocks and forwards value changes to a callback. | |
Static Public Member Functions | |
| static EnumTable | parseEnumTable (std::string_view enumString) |
| Parses a textual enum encoding into structured data. | |
Private Attributes | |
| std::string | fn |
| std::unique_ptr< fstReaderContext, ReaderDeleter > | context |
High-level zero-overhead wrapper around libfst reader APIs.
The existence of an Reader instance guarantees that the FST file is successfully opened and the underlying reader context is valid.
Definition at line 78 of file fstWrapper.hpp.
|
explicit |
Opens an FST file for reading.
Throws immediately on failure.
This constructor establishes the class invariant that a successfully constructed object always owns a valid reader context.
Definition at line 27 of file fstWrapper.cpp.
|
default |
|
delete |
Copying is forbidden because the underlying libfst context is a unique ownership resource.
|
defaultnoexcept |
Moving is safe because ownership transfers cleanly through unique_ptr.
|
nodiscard |
Reconstructs hierarchy into a recursive tree structure.
Internally this performs a single linear pass over the hierarchy event stream using a stack-based AST construction algorithm.
Definition at line 57 of file fstWrapper.cpp.
|
inline |
Disables a specific signal for processing.
Definition at line 328 of file fstWrapper.hpp.
|
inline |
Disables processing for all signals.
Definition at line 310 of file fstWrapper.hpp.
|
nodiscard |
Definition at line 48 of file fstWrapper.cpp.
|
inlinenodiscard |
Definition at line 193 of file fstWrapper.hpp.
|
inlinenodiscard |
Definition at line 183 of file fstWrapper.hpp.
|
inlinenodiscard |
Definition at line 205 of file fstWrapper.hpp.
|
inlinenodiscard |
Definition at line 187 of file fstWrapper.hpp.
|
inlinenodiscard |
Returns the exponent used by the timescale.
Example: -9 => nanoseconds -12 => picoseconds
Definition at line 218 of file fstWrapper.hpp.
|
inlinenodiscard |
Definition at line 199 of file fstWrapper.hpp.
|
nodiscard |
Definition at line 40 of file fstWrapper.cpp.
|
inline |
Generic hierarchy iterator.
This uses a templated callable rather than std::function in order to avoid:
The callback is fully inlinable by the compiler.
Example:
reader.iterateHierarchy([](const fstHier* h) { ... });
Definition at line 246 of file fstWrapper.hpp.
|
static |
Parses a textual enum encoding into structured data.
libfst internally allocates the intermediate structure. This wrapper copies the data into STL-owned memory before releasing the libfst allocation.
Definition at line 98 of file fstWrapper.cpp.
|
inline |
Iterates waveform blocks and forwards value changes to a callback.
This is the hottest execution path in waveform processing, so the design is aggressively optimized:
libfst expects C function pointers, so stateless lambdas are used as trampoline adapters.
Definition at line 348 of file fstWrapper.hpp.
|
inline |
Enables a specific signal for processing.
Definition at line 319 of file fstWrapper.hpp.
|
inline |
Enables processing for all signals.
Definition at line 301 of file fstWrapper.hpp.
|
inline |
Restricts waveform iteration to a bounded time window.
Definition at line 283 of file fstWrapper.hpp.
|
inline |
Removes any previously configured time restrictions.
Definition at line 292 of file fstWrapper.hpp.
|
private |
Sole owner of the underlying libfst reader context.
Definition at line 388 of file fstWrapper.hpp.
|
private |
Cached filename for diagnostics/debugging.
Definition at line 383 of file fstWrapper.hpp.