ValueTracker class
#include <netlist/ValueTracker.hpp>
Track drivers for value symbols.
Each value symbol encountered in the AST has an interval map where each interval is a range that is driven by one or more statements in the design. Intervals are non-overlapping, each interval maps to a list of DriverInfo objects, and adjacent intervals have different driver lists.
Note that a ValueDrivers variable is not a member of this class because it is stored in the analysis state during the DataFlowAnalysis pass.
Public static functions
- static auto dumpDrivers(ast::ValueSymbol const& symbol, DriverMap& driverMap) -> std::string
- Dump the current driver map for all value symbols for debugging output.
Constructors, destructors, conversion operators
Public functions
- auto begin() const -> auto
- auto end() const -> auto
- auto getSymbol(uint32_t slot) const -> const ast::ValueSymbol*
- Get a symbol by its slot index.
- auto getSlot(ast::ValueSymbol const& symbol) -> std::optional<uint32_t>
- Get the slot index for a symbol, if it exists.
- void addDriver(ValueDrivers& drivers, ast::ValueSymbol const& symbol, ast::Expression const* lsp, DriverBitRange bounds, NetlistNode* node, bool merge = false)
- void mergeDriver(ValueDrivers& drivers, ast::ValueSymbol const& symbol, ast::Expression const* lsp, DriverBitRange bounds, NetlistNode* node)
- void mergeDrivers(ValueDrivers& drivers, ast::ValueSymbol const& symbol, DriverBitRange bounds, DriverList const& driverList)
- Merge a list of drivers for the specified value symbol and bit range.
- auto getDrivers(ValueDrivers& drivers, ast::ValueSymbol const& symbol, DriverBitRange bounds) -> DriverList
-
auto getAllocator() -> DriverMap::
AllocatorType&
Function documentation
void slang:: netlist:: ValueTracker:: addDriver(ValueDrivers& drivers,
ast::ValueSymbol const& symbol,
ast::Expression const* lsp,
DriverBitRange bounds,
NetlistNode* node,
bool merge = false)
Add a driver for the specified value symbol. This overwrites any existing drivers for the specified bit range.
void slang:: netlist:: ValueTracker:: mergeDriver(ValueDrivers& drivers,
ast::ValueSymbol const& symbol,
ast::Expression const* lsp,
DriverBitRange bounds,
NetlistNode* node)
Merge a driver for the specified value symbol. This adds to any existing drivers for the specified bit range.
DriverList slang:: netlist:: ValueTracker:: getDrivers(ValueDrivers& drivers,
ast::ValueSymbol const& symbol,
DriverBitRange bounds)
Return a list of all the drivers for the given value symbol and bit range. If there are no drivers, the returned list will be empty.