14#ifndef CIRCT_DIALECT_ARC_RUNTIME_FSTTRACEENCODER_H
15#define CIRCT_DIALECT_ARC_RUNTIME_FSTTRACEENCODER_H
25struct fstWriterContext;
Trace buffer encoder producing an FST file.
struct::fstWriterContext * fstWriter
FST writer context.
const std::filesystem::path outFilePath
Path to the output file.
void windDownWorker() override
Called by the worker thread after leaving the encode loop.
int64_t workerStep
Current time step of the worker thread.
void encode(TraceBuffer &work) override
Encode the given trace buffer. Called by the worker thread.
bool initialize(const ArcState *state) override
Set-up the encoder before starting the worker thread.
std::vector< FSTSignalTableEntry > signalTable
Table of signals: The index matches their Trace Tap ID.
void startUpWorker() override
Called by the worker thread before entering the encode loop.
void finalize(const ArcState *state) override
Finish trace encoding. Called by the simulation thread.
void createHierarchy()
Build and dump the signal hierarchy.
void initSignalTable()
Create the table of signals.
static constexpr unsigned numTraceBuffers
Abstract TraceEncoder managing trace buffers and the encoder thread.
const ArcRuntimeModelInfo *const modelInfo
Metadata of the traced model.
Static information for a compiled hardware model, generated by the MLIR lowering.
Combined runtime and model state for a hardware model instance.
A traced signal in the FST file.
uint32_t numBits
Bit width of the signal.
uint32_t handle
FST signal handle.
FSTSignalTableEntry(uint64_t index, uint64_t stateOffset, uint32_t numBits)
uint64_t stateOffset
Offest of the signal in the model's simulation state.
unsigned getStride() const
Get the number of words occupied by the signal value in the trace buffer.
A heap allocated buffer containing raw trace data and time step markers.