13#ifndef CIRCT_TOOLS_CIRCT_BMC_BMCTRACE_H
14#define CIRCT_TOOLS_CIRCT_BMC_BMCTRACE_H
16#include "llvm/ADT/APInt.h"
17#include "llvm/ADT/ArrayRef.h"
18#include "llvm/ADT/FunctionExtras.h"
19#include "llvm/ADT/StringRef.h"
20#include "llvm/Support/raw_ostream.h"
36 llvm::function_ref<std::optional<llvm::APInt>(
Handle,
unsigned width)>;
49 size_t addSignal(llvm::StringRef name,
unsigned width);
57 std::optional<Handle>
lookup(
size_t step,
size_t signal)
const;
65 using Step = std::vector<std::optional<Handle>>;
llvm::StringRef getTopName() const
bool printTextTrace(llvm::raw_ostream &os, Evaluator evaluate) const
Render the trace as cycle-by-cycle text using the provided evaluator to materialize values from recor...
size_t getNumSteps() const
void ensureStep(size_t step)
std::vector< Step > recorded
const void * Handle
Opaque per-signal value reference recorded for a specific cycle.
llvm::ArrayRef< Signal > getSignals() const
size_t addSignal(llvm::StringRef name, unsigned width)
Register a signal to be tracked and return its stable index.
std::vector< std::optional< Handle > > Step
Per-cycle storage for all tracked signals.
llvm::function_ref< std::optional< llvm::APInt >(Handle, unsigned width)> Evaluator
Callback used to materialize a recorded handle into a concrete value when formatting a trace.
std::vector< Signal > signals
void record(size_t step, size_t signal, Handle handle)
Record the value handle for a tracked signal at the given cycle.
std::optional< Handle > lookup(size_t step, size_t signal) const
Return the recorded handle for a signal at a given cycle, if present.
Metadata for a tracked signal in the trace.