AnalysisManager class
#include <slang/analysis/AnalysisManager.h>
The analysis manager coordinates running various analyses on AST symbols.
Analysis is done downstream from one or more Compilation objects. Once a design has an AST successfully built, analysis passes can be run to check for various issues or extract information.
Constructors, destructors, conversion operators
- AnalysisManager(AnalysisOptions options = {}) explicit
- Default constructor for the analysis manager.
Public functions
- const AnalysisOptions& getOptions() const
- Gets the set of options used to construct the analysis manager.
- bool hasFlag(bitmask<AnalysisFlags> flags) const
- Returns true if the given flag(s) are enabled for this analysis.
-
void addListener(std::
function<void(const AnalyzedProcedure&)> listener) - Adds a listener that will be invoked when a procedure is analyzed.
-
void addListener(std::
function<void(const AnalyzedScope&)> listener) - Adds a listener that will be invoked when a scope is analyzed.
-
void addListener(std::
function<void(const AnalyzedAssertion&)> listener) - Adds a listener that will be invoked when an assertion is analyzed.
- void setCustomDFAProvider(CustomDFAProvider provider)
- Sets a callback that will be invoked whenever a procedure needs to be analyzed.
-
void analyze(const ast::
Compilation& compilation) - Analyzes the given compilation and returns a representation of the design.
-
DriverList getDrivers(const ast::
ValueSymbol& symbol) const - Returns all of the known drivers for the given symbol.
-
std::
optional<InstanceDriverState> getInstanceDriverState(const ast:: InstanceBodySymbol& symbol) const - Return the driver state tracked per canonical instance.
- Diagnostics getDiagnostics()
- Collects and returns all issued analysis diagnostics.
-
const AnalyzedScope* getAnalyzedScope(const ast::
Scope& scope) const - Returns the results of a previous analysis of a scope, if available.
-
const AnalyzedProcedure* getAnalyzedSubroutine(const ast::
SubroutineSymbol& symbol) const - Gets the result of analyzing a subroutine, if available.
-
std::
vector<const AnalyzedAssertion*> getAnalyzedAssertions(const ast:: Symbol& symbol) const - Returns all analyzed assertions for the given symbol.
-
template<std::derived_from<ast::void analyzeNonProceduralExprs(const TSymbol& symbol)
Symbol> TSymbol> - Analyzes the non-procedural expressions in the given symbol.
-
void analyzeNonProceduralExprs(const ast::
TimingControl& timing, const ast:: Symbol& containingSymbol) - Analyzes the non-procedural expressions in the given timing control.
-
void analyzeNonProceduralExprs(const ast::
Expression& expr, const ast:: Symbol& containingSymbol, bool isDisableCondition = false) - Analyzes the given non-procedural expression.
Function documentation
void slang:: analysis:: AnalysisManager:: addListener(std:: function<void(const AnalyzedProcedure&)> listener)
Adds a listener that will be invoked when a procedure is analyzed.
void slang:: analysis:: AnalysisManager:: addListener(std:: function<void(const AnalyzedScope&)> listener)
Adds a listener that will be invoked when a scope is analyzed.
void slang:: analysis:: AnalysisManager:: addListener(std:: function<void(const AnalyzedAssertion&)> listener)
Adds a listener that will be invoked when an assertion is analyzed.
void slang:: analysis:: AnalysisManager:: setCustomDFAProvider(CustomDFAProvider provider)
Sets a callback that will be invoked whenever a procedure needs to be analyzed.
The callback should perform whatever custom data flow analysis is desired and then return a properly constructed AnalyzedProcedure object.
void slang:: analysis:: AnalysisManager:: analyze(const ast:: Compilation& compilation)
Analyzes the given compilation and returns a representation of the design.
const AnalyzedProcedure* slang:: analysis:: AnalysisManager:: getAnalyzedSubroutine(const ast:: SubroutineSymbol& symbol) const
Gets the result of analyzing a subroutine, if available.
Otherwise returns nullptr.