|
SILICON
|
Writes named vector signals from already-sampled FST value strings. More...
#include <fstTraceWriter.hpp>
Classes | |
| struct | TraceSignal |
| Static description of a signal to register in the FST hierarchy. More... | |
| struct | Options |
| FST file metadata and hierarchy options. More... | |
| struct | RegisteredSignal |
Public Member Functions | |
| TraceWriter (std::string_view fileName, const std::vector< TraceSignal > &traceSignals) | |
| TraceWriter (std::string_view fileName, const std::vector< TraceSignal > &traceSignals, Options options) | |
| Creates an FST file and registers all non-zero-width trace signals. | |
| TraceWriter (const TraceWriter &)=delete | |
| TraceWriter & | operator= (const TraceWriter &)=delete |
| TraceWriter (TraceWriter &&) noexcept=default | |
| TraceWriter & | operator= (TraceWriter &&) noexcept=default |
| void | emitSnapshot (uint64_t time, std::span< const std::string > values) |
| Emits one timestamped snapshot of already-sampled signal values. | |
| void | flush () |
| Flushes pending FST data so external tools can read recent snapshots. | |
| std::optional< fstHandle > | handleForSignal (std::string_view name) const |
| Returns the libfst handle associated with a registered signal name. | |
| std::size_t | signalCount () const |
| Number of non-zero-width signals registered in the FST hierarchy. | |
Static Private Member Functions | |
| static std::string | normalizeValue (std::string_view value, std::size_t width) |
Private Attributes | |
| std::vector< RegisteredSignal > | registeredSignals |
| std::unordered_map< std::string, fstHandle, TransparentStringHash, TransparentStringEqual > | handlesBySignalName |
| DataWriter | writer |
Writes named vector signals from already-sampled FST value strings.
This class owns the generic FST trace behavior: signal registration, value normalization, timestamp emission, and flushing. Circuit-specific adapters can use it without exposing libfst handles or hierarchy construction to their callers.
Definition at line 44 of file fstTraceWriter.hpp.
| TraceWriter | ( | std::string_view | fileName, |
| const std::vector< TraceSignal > & | traceSignals ) |
Definition at line 43 of file fstTraceWriter.cpp.
| TraceWriter | ( | std::string_view | fileName, |
| const std::vector< TraceSignal > & | traceSignals, | ||
| Options | options ) |
Creates an FST file and registers all non-zero-width trace signals.
The constructor completes the FST hierarchy immediately. Subsequent calls to emitSnapshot() only emit timestamped value changes for the registered signals.
| fileName | Destination FST file path. |
| traceSignals | Ordered signal descriptors. This order defines value indexes for snapshots. |
| options | File metadata and top-level scope settings. |
Definition at line 49 of file fstTraceWriter.cpp.
|
delete |
|
defaultnoexcept |
| void emitSnapshot | ( | uint64_t | time, |
| std::span< const std::string > | values ) |
Emits one timestamped snapshot of already-sampled signal values.
Values are matched to registered signals by index. Missing or empty values are emitted as unknowns, invalid characters are normalized to unknowns, shorter values are left-padded, and longer values keep their rightmost bits.
| time | Timestamp for this snapshot. |
| values | Encoded FST/VCD-style values using 0, 1, x, and z symbols. |
Definition at line 79 of file fstTraceWriter.cpp.
| void flush | ( | ) |
Flushes pending FST data so external tools can read recent snapshots.
Definition at line 92 of file fstTraceWriter.cpp.
|
nodiscard |
Returns the libfst handle associated with a registered signal name.
Definition at line 97 of file fstTraceWriter.cpp.
|
staticnodiscardprivate |
Definition at line 106 of file fstTraceWriter.cpp.
|
delete |
|
defaultnoexcept |
|
inlinenodiscard |
Number of non-zero-width signals registered in the FST hierarchy.
Definition at line 128 of file fstTraceWriter.hpp.
|
private |
Definition at line 144 of file fstTraceWriter.hpp.
|
private |
Definition at line 141 of file fstTraceWriter.hpp.
|
private |
Definition at line 145 of file fstTraceWriter.hpp.