Commentary. No functional change

This commit is contained in:
Wilson Snyder
2026-09-22 07:20:46 -04:00
parent dc179243eb
commit f883b1c858
41 changed files with 156 additions and 158 deletions
+3 -5
View File
@@ -261,7 +261,7 @@ class VL_SCOPED_CAPABILITY VerilatedLockGuard final {
VL_UNCOPYABLE(VerilatedLockGuard);
private:
VerilatedMutex& m_mutexr;
VerilatedMutex& m_mutexr; // Mutex protecting the guard
public:
/// Construct and hold given mutex lock until destruction or unlock()
@@ -380,8 +380,7 @@ class VerilatedEvalLoop final {
const uint32_t m_convergeLimit; // --converge-limit from compiler command line
// Where to record --prof-exec sections, or null if not profiling
VlExecutionProfilerBase* m_profilerp = nullptr;
// Whether this is the top level model during profiling
bool m_profTopLevel = false;
bool m_profTopLevel = false; // Top level model during profiling
public:
// CONSTRUCTORS
@@ -607,9 +606,8 @@ protected:
// List of free descriptors in the MCT region [4, 32)
std::vector<IData> m_fdFreeMct VL_GUARDED_BY(m_fdMutex);
// Magic to check for bad construction
static constexpr uint64_t MAGIC = 0xC35F9A6E5298EE6EULL; // SHA256 "VerilatedContext"
uint64_t m_magic = MAGIC;
uint64_t m_magic = MAGIC; // Magic to check for bad construction
private:
// CONSTRUCTORS
+2 -2
View File
@@ -240,8 +240,8 @@ protected:
};
template <typename T>
class View final {
T* m_beginp;
T* m_endp;
T* m_beginp; // First element of the viewed slice
T* m_endp; // One past the last element of the viewed slice
public:
View(T* datap, uint64_t size)
+3 -3
View File
@@ -105,9 +105,9 @@ private:
int m_msb; // Inclusive upper bit for scalar path or element index for unpacked
int m_rhsLsb; // Destination index that maps to RHS index 0
const void* m_rhsDatap; // Pointer to RHS storage
int m_bitLsb = 0;
int m_bitMsb = 0;
int m_elemWidth = 0;
int m_bitLsb = 0; // Bit's LSB
int m_bitMsb = 0; // Bit's MSB
int m_elemWidth = 0; // Element width
};
std::vector<Entry> m_entries; // Sorted by msb, non-overlapping
+1 -1
View File
@@ -169,7 +169,7 @@ class VlExecutionProfiler final : public VlExecutionProfilerBase {
// STATE
VerilatedContext& m_context; // The context this profiler is under
static thread_local ExecutionTrace t_trace; // thread-local trace buffers
mutable VerilatedMutex m_mutex;
mutable VerilatedMutex m_mutex; // Mutex protecting traces
// Map from thread id to &t_trace of given thread
std::map<uint32_t, ExecutionTrace*> m_traceps VL_GUARDED_BY(m_mutex);
+3 -3
View File
@@ -38,8 +38,8 @@
// See also V3Ast::VNumRange
class VerilatedRange final {
int m_left = 0;
int m_right = 0;
int m_left = 0; // Left side of range (pre-':')
int m_right = 0; // Right side of range (post-':')
protected:
friend class VerilatedVarProps;
@@ -283,7 +283,7 @@ class VerilatedVar final : public VerilatedVarProps {
m_forceControlSignals; // Force control signals
protected:
const bool m_isParam;
const bool m_isParam; // From a parameter
friend class VerilatedScope;
// CONSTRUCTORS
VerilatedVar(const char* namep, void* datap, VerilatedVarType vltype,
+1 -1
View File
@@ -140,7 +140,7 @@ class VlWorkerThread final {
};
// MEMBERS
mutable VerilatedMutex m_mutex;
mutable VerilatedMutex m_mutex; // Protection mutex
std::condition_variable_any m_cv;
// Only notify the condition_variable if the worker is waiting
bool m_waiting VL_GUARDED_BY(m_mutex) = false;
+3 -4
View File
@@ -71,13 +71,12 @@
class VlFileLineDebug final {
// MEMBERS
#ifdef VL_DEBUG
const char* m_filename = nullptr;
int m_lineno = 0;
const char* m_filename = nullptr; // Filename from sources, nullptr for unlnown
int m_lineno = 0; // Line number from sources
#endif
public:
// CONSTRUCTORS
// Construct
VlFileLineDebug() = default;
VlFileLineDebug(const char* filename, int lineno)
#ifdef VL_DEBUG
@@ -431,7 +430,7 @@ class VlForkSyncState final {
public:
size_t m_counter = 0; // When reaches 0, resume suspended coroutine
VlCoroutineHandle m_susp; // Coroutine to resume
bool m_inited = false;
bool m_inited = false; // Initialization complete
size_t m_pendingDones = 0; // done() calls seen before init() (e.g. early killed branch)
bool m_inDone = false; // Guard against re-entrant resume recursion from nested kills
bool m_resumePending = false; // Join reached zero again while inside done()
+3 -3
View File
@@ -147,9 +147,9 @@ private:
struct CallbackRecord final {
union { // The callback
const initCb_t m_initCb;
const dumpCb_t m_dumpCb;
const cleanupCb_t m_cleanupCb;
const initCb_t m_initCb; // Init-callback constructor
const dumpCb_t m_dumpCb; // Dump-callback constructor
const cleanupCb_t m_cleanupCb; // Cleanup-callback constructor
};
const uint32_t m_fidx; // The index of the tracing function
void* const m_userp; // The user pointer to pass to the callback (the symbol table)
+1 -1
View File
@@ -747,7 +747,7 @@ namespace vlstd {
template <typename T>
struct reverse_wrapper final {
const T& m_v;
const T& m_v; // Pre-wrapped iterator
explicit reverse_wrapper(const T& a_v)
: m_v(a_v) {} // Need () constructor
+1 -1
View File
@@ -391,7 +391,7 @@ protected:
RELINK_OP4
};
AstNode* m_oldp = nullptr; // The old node that was linked to this point in the tree
AstNode* m_backp = nullptr;
AstNode* m_backp = nullptr; // Saved AstNode::m_backp of the unlinked node, to relink
AstNode** m_iterpp = nullptr;
RelinkWhatEn m_chg = RELINK_BAD;
+2 -2
View File
@@ -1764,8 +1764,8 @@ inline std::ostream& operator<<(std::ostream& os, const VLifetime& rhs) {
class VNumRange final {
public:
int m_left = 0;
int m_right = 0;
int m_left = 0; // Left side of range (pre-':')
int m_right = 0; // Right side of range (post-':')
bool m_ranged = false; // Has a range
bool operator==(const VNumRange& rhs) const {
return m_left == rhs.m_left && m_right == rhs.m_right && m_ranged == rhs.m_ranged;
+11 -11
View File
@@ -250,8 +250,8 @@ class AstNodeUOrStructDType VL_NOT_FINAL : public AstNodeDType {
//
// @astgen ptr := m_classOrPackagep : Optional[AstNodeModule] // Package emitted with
string m_name; // Name from upper typedef, if any
const int m_uniqueNum;
bool m_packed;
const int m_uniqueNum; // Unique ID distinguishing this dtype instance, for hashing/naming
bool m_packed; // Packed struct/union, else unpacked
bool m_isFourstate = false; // V3Width computes; true if any member is 4-state
bool m_constrainedRand = false; // True if struct has constraint expression
bool m_emitToString = false; // Generate to_string() for this struct/union if set
@@ -319,7 +319,7 @@ public:
class AstEnumItem final : public AstNode {
// @astgen op1 := rangep : Optional[AstRange] // Range for name appending
// @astgen op2 := valuep : Optional[AstNodeExpr]
string m_name;
string m_name; // Name of item
public:
// Parents: ENUM
@@ -693,10 +693,10 @@ public:
class AstCoverCrossDType final : public AstNodeDType {
// Borrowed pointer to VlCoverCrossT<dimensions, tuples, bins, autoBins, binWords>.
const uint32_t m_dimensions;
const uint32_t m_tuples;
const uint32_t m_bins;
const uint32_t m_autoBins;
const uint64_t m_binWords;
const uint32_t m_tuples; // Fixed capacity number of cross tuples (VlCoverCrossT's Tuples)
const uint32_t m_bins; // Fixed capacity number of explicit bins (VlCoverCrossT's Bins)
const uint32_t m_autoBins; // Fixed capacity number of auto bins (VlCoverCrossT's AutoBins)
const uint64_t m_binWords; // Fixed capacity selection words (VlCoverCrossT's BinWords)
public:
AstCoverCrossDType(FileLine* fl, uint32_t dimensions, uint32_t tuples, uint32_t bins,
@@ -767,8 +767,8 @@ class AstDefImplicitDType final : public AstNodeDType {
// This allows "var enum {...} a,b" to share the enum definition for both variables
// After link, these become typedefs
// @astgen op1 := childDTypep : Optional[AstNodeDType]
string m_name;
const int m_uniqueNum;
string m_name; // Data type name
const int m_uniqueNum; // Unique ID distinguishing this dtype instance, for hashing/naming
public:
AstDefImplicitDType(FileLine* fl, const string& name, VFlagChildDType, AstNodeDType* dtp)
@@ -883,7 +883,7 @@ public:
private:
string m_name; // Name from upper typedef, if any
const int m_uniqueNum;
const int m_uniqueNum; // Unique ID distinguishing this dtype instance, for hashing/naming
// dist-ast-dump-suppress // Skip dumping cache
TableMap m_tableMap; // Created table for V3Width only to remove duplicates
@@ -1051,7 +1051,7 @@ class AstMemberDType final : public AstNodeDType {
string m_name; // Name of variable
string m_tag; // Holds the string of the verilator tag -- used in JSON output.
int m_lsb = -1; // Within this level's packed struct, the LSB of the first bit of the member
bool m_constrainedRand = false;
bool m_constrainedRand = false; // Member has a constraint expression
VRandAttr m_rand; // Randomizability of this member (rand, randc, etc)
public:
AstMemberDType(FileLine* fl, const string& name, VFlagChildDType, AstNodeDType* dtp,
+3 -3
View File
@@ -1475,7 +1475,7 @@ class AstExprStmt final : public AstNodeExpr {
// @astgen op1 := stmtsp : List[AstNode]
// @astgen op2 := resultp : AstNodeExpr
private:
bool m_hasResult = true;
bool m_hasResult = true; // Returns result via resultp()
public:
AstExprStmt(FileLine* fl, AstNode* stmtsp, AstNodeExpr* resultp)
@@ -2035,7 +2035,7 @@ class AstParseRef final : public AstNodeExpr {
// @astgen op1 := lhsp : Optional[AstNodeExpr]
// @astgen op2 := ftaskrefp : Optional[AstNodeFTaskRef]
string m_name;
string m_name; // Name of the variable/function/task
public:
AstParseRef(FileLine* fl, const string& name, AstNodeExpr* lhsp = nullptr,
@@ -2637,7 +2637,7 @@ class AstScopeName final : public AstNodeExpr {
// For display %m and DPI context imports
// Parents: AstSFormatF, AstNodeFTaskRef, AstNodeFTask
std::string m_scopeAttr;
std::string m_scopeEntr;
std::string m_scopeEntr; // Scope path for the DPI import/export context name
bool m_dpiExport = false; // Is for dpiExport
const bool m_forFormat; // Is for a format %m
static std::string scopeNameFormatter(const std::string& text);
+6 -6
View File
@@ -2107,10 +2107,10 @@ class AstTypedef final : public AstNode {
// @astgen op1 := childDTypep : Optional[AstNodeDType]
// @astgen op4 := attrsp : List[AstNode] // Attributes during early parse
string m_name;
string m_name; // Name of the typedef
string m_tag; // Holds the string of the verilator tag -- used in JSON output.
uint32_t m_declTokenNum; // Declaration token number
bool m_attrPublic = false;
bool m_attrPublic = false; // Marked with public; keep even if unused
bool m_isHideLocal : 1; // Verilog local
bool m_isHideProtected : 1; // Verilog protected
bool m_isUnderClass : 1; // Underneath class
@@ -2747,10 +2747,10 @@ class AstCoverOtherDecl final : public AstNodeCoverDecl {
// Coverage analysis point declaration
// Used for other than toggle types of coverage
string m_linescov;
string m_fsmVar;
string m_fsmFrom;
string m_fsmTo;
string m_fsmTag;
string m_fsmVar; // FSM state variable name
string m_fsmFrom; // FSM source state label
string m_fsmTo; // FSM destination state label
string m_fsmTag; // FSM arc kind tag (e.g. reset, reset_include, default)
int m_offset; // Offset column numbers to uniq-ify IFs
public:
AstCoverOtherDecl(FileLine* fl, const string& page, const string& comment,
+1 -1
View File
@@ -3854,7 +3854,7 @@ string AstVar::dpiArgType(bool named, bool forReturn) const {
}
string AstVar::dpiTmpVarType(const string& varName) const {
class converter final : public DpiTypesToStringConverter {
const string m_name;
const string m_name; // Variable name
string arraySuffix(const AstVar* varp, size_t n) const {
if (const AstUnpackArrayDType* const unpackp
= VN_CAST(varp->dtypep()->skipRefp(), UnpackArrayDType)) {
+2 -2
View File
@@ -44,8 +44,8 @@ class CombineVisitor final : VNVisitor {
// TYPES
using funcit_t = std::list<AstCFunc*>::iterator;
struct CFuncs final {
std::list<AstCFunc*> m_fast;
std::list<AstCFunc*> m_slow;
std::list<AstCFunc*> m_fast; // Functions that are not slow
std::list<AstCFunc*> m_slow; // Functions marked for slow files
};
// STATE
+14 -14
View File
@@ -110,12 +110,12 @@ class ConstBitOpTreeVisitor final : public VNVisitorConst {
class LeafInfo final { // Leaf node (either AstConst or AstVarRef)
// MEMBERS
bool m_polarity = true;
bool m_polarity = true; // Invert result due to NOT
int m_lsb = 0; // LSB of actually used bit of m_refp->varp()
int m_msb = 0; // MSB of actually used bit of m_refp->varp()
int m_wordIdx = -1; // -1 means AstWordSel is not used.
AstVarRef* m_refp = nullptr;
const AstConst* m_constp = nullptr;
AstVarRef* m_refp = nullptr; // Leaf's variable reference
const AstConst* m_constp = nullptr; // Leaf's constant
public:
// CONSTRUCTORS
@@ -187,9 +187,9 @@ class ConstBitOpTreeVisitor final : public VNVisitorConst {
};
struct BitPolarityEntry final { // Found bit polarity during iterate()
LeafInfo m_info;
bool m_polarity = false;
int m_bit = 0;
LeafInfo m_info; // Leaf (variable or constant) bit polarity was found on
bool m_polarity = false; // Polarity the bit must have to match
int m_bit = 0; // Bit index within the leaf that was tested
BitPolarityEntry(const LeafInfo& info, bool pol, int bit)
: m_info{info}
, m_polarity{pol}
@@ -198,8 +198,8 @@ class ConstBitOpTreeVisitor final : public VNVisitorConst {
};
struct FrozenNodeInfo final { // Context when a frozen node is found
bool m_polarity;
int m_lsb;
bool m_polarity; // Polarity the frozen node must match
int m_lsb; // LSB position of the frozen node
bool operator<(const FrozenNodeInfo& other) const {
if (m_lsb != other.m_lsb) return m_lsb < other.m_lsb;
return m_polarity < other.m_polarity;
@@ -207,12 +207,12 @@ class ConstBitOpTreeVisitor final : public VNVisitorConst {
};
class Restorer final { // Restore the original state unless disableRestore() is called
ConstBitOpTreeVisitor& m_visitor;
const size_t m_polaritiesSize;
const size_t m_frozenSize;
const unsigned m_ops;
const bool m_polarity;
bool m_restore = true;
ConstBitOpTreeVisitor& m_visitor; // Visitor whose state is saved and restored
const size_t m_polaritiesSize; // Saved m_visitor.m_bitPolarities size to truncate back to
const size_t m_frozenSize; // Saved m_visitor.m_frozenNodes size to truncate back to
const unsigned m_ops; // Saved m_visitor.m_ops to restore
const bool m_polarity; // Saved m_visitor.m_polarity to restore
bool m_restore = true; // Whether the destructor still needs to restore state
public:
explicit Restorer(ConstBitOpTreeVisitor& visitor)
+6 -6
View File
@@ -709,8 +709,8 @@ public:
// Tracks what matches are known to hit against V3ControlScopeTraceEntries
class V3ControlScopeTraceEntryMatch final {
public:
const V3ControlScopeTraceEntry* m_entryp;
const string m_scopepart;
const V3ControlScopeTraceEntry* m_entryp; // Entry the match refers to
const string m_scopepart; // Scope prefix being matched against the entry
V3ControlScopeTraceEntryMatch(const V3ControlScopeTraceEntry* entryp, const string& scopepart)
: m_entryp{entryp}
, m_scopepart{scopepart} {}
@@ -780,8 +780,8 @@ public:
// Resolve modules and files in the design
class V3ControlResolverHierWorkerEntry final {
const int m_workers;
FileLine* const m_flp;
const int m_workers; // Number of workers requested for the hierarchical block
FileLine* const m_flp; // Location the worker count was specified at
public:
explicit V3ControlResolverHierWorkerEntry(int workers, FileLine* flp)
@@ -798,9 +798,9 @@ class V3ControlResolver final {
V3ControlScopeTraceResolver m_scopeTraces; // Regexp to trace enables
std::unordered_map<string, std::unordered_map<string, uint64_t>>
m_profileData; // Access to profile_data records
uint8_t m_mode = NONE;
uint8_t m_mode = NONE; // Kind of profile_data records is currently active
std::unordered_map<string, V3ControlResolverHierWorkerEntry> m_hierWorkers;
FileLine* m_profileFileLine = nullptr;
FileLine* m_profileFileLine = nullptr; // Location profile_data was read from
V3ControlResolver() = default;
~V3ControlResolver() = default;
+4 -4
View File
@@ -152,9 +152,9 @@ class TraceDriver final : public DfgVisitor {
// TYPES
// Key for caching the result of a trace
struct CacheKey final {
DfgVertex* m_vtxp;
uint32_t m_lsb;
uint32_t m_msb;
DfgVertex* m_vtxp; // Vertex being traced
uint32_t m_lsb; // LSB of the range within m_vtxp being traced
uint32_t m_msb; // MSB of the range within m_vtxp being traced
CacheKey() = delete;
CacheKey(DfgVertex* vtxp, uint32_t lsb, uint32_t msb)
@@ -484,7 +484,7 @@ class TraceDriver final : public DfgVisitor {
m_splicep = nullptr;
struct Driver final {
DfgVertex* m_vtxp;
DfgVertex* m_vtxp; // Vertex driving this range
uint32_t m_lsb; // LSB of driven range (internal, not Verilog)
uint32_t m_msb; // MSB of driven range (internal, not Verilog)
Driver() = delete;
+10 -9
View File
@@ -409,17 +409,18 @@ public:
// Sub contexts - keep sorted by type
V3DfgAstToDfgContext m_ast2DfgContext;
V3DfgBinToOneHotContext m_binToOneHotContext;
V3DfgBreakCyclesContext m_breakCyclesContext;
V3DfgBinToOneHotContext m_binToOneHotContext; // Statistics context for V3DfgBinToOneHot
V3DfgBreakCyclesContext m_breakCyclesContext; // Statistics context for V3DfgBreakCycles
V3DfgCseContext m_cseContext0{"1st"};
V3DfgCseContext m_cseContext1{"2nd"};
V3DfgDfgToAstContext m_dfg2AstContext;
V3DfgPeepholeContext m_peepholeContext;
V3DfgPushDownSelsContext m_pushDownSelsContext;
V3DfgRegularizeContext m_regularizeContext;
V3DfgRemoveSelectsContext m_removeSelectsContext;
V3DfgRemoveUnobservableContext m_removeUnobservableContext;
V3DfgSynthesisContext m_synthContext;
V3DfgDfgToAstContext m_dfg2AstContext; // Statistics context for V3DfgDfgToAst
V3DfgPeepholeContext m_peepholeContext; // Statistics context for V3DfgPeephole
V3DfgPushDownSelsContext m_pushDownSelsContext; // Statistics context for V3DfgPushDownSels
V3DfgRegularizeContext m_regularizeContext; // Statistics context for V3DfgRegularize
V3DfgRemoveSelectsContext m_removeSelectsContext; // Stats context for V3DfgRemoveSelects
V3DfgRemoveUnobservableContext
m_removeUnobservableContext; // Stats context for V3DfgRemoveUnobservable
V3DfgSynthesisContext m_synthContext; // Statistics context for V3DfgSynthesize
// CONSTRUCTOR
V3DfgContext() = default;
+3 -3
View File
@@ -257,9 +257,9 @@ class AstToDfgConverter final : public VNVisitor {
// Represents a DFG assignment contributed by the AST assignment with the above 'lhsp'.
// There might be multiple of these if 'lhsp' is a concatenation.
struct Assignment final {
DfgVertexSplice* m_lhsp;
uint32_t m_idx;
DfgVertex* m_rhsp;
DfgVertexSplice* m_lhsp; // Splice vertex being driven
uint32_t m_idx; // Position (bit or array index) within m_lhsp being driven
DfgVertex* m_rhsp; // Vertex driving that position
Assignment() = delete;
Assignment(DfgVertexSplice* lhsp, uint32_t idx, DfgVertex* rhsp)
: m_lhsp{lhsp}
+1 -1
View File
@@ -39,7 +39,7 @@ class EmitCHeader final : public EmitCConstInit {
// METHODS
class CoverCountVisitor final : public VNVisitorConst {
int m_bins = 0;
int m_bins = 0; // Running total of coverage bins counted so far
void visit(AstNodeCoverDecl* nodep) override {
// Each module class owns the counters for declarations it emits;
+13 -13
View File
@@ -46,11 +46,11 @@ class EmitCSyms final : EmitCBaseVisitorConst {
// TYPES
struct ScopeData final {
const AstNode* m_nodep;
const std::string m_symName;
const std::string m_prettyName;
const std::string m_defName;
const int m_timeunit;
const AstNode* m_nodep; // Scope symbol-table entry corresponds to
const std::string m_symName; // Mangled name used to build __Vscopep_ variable
const std::string m_prettyName; // Pretty (unprotected) name for display
const std::string m_defName; // Name registered for this scope
const int m_timeunit; // Timeunit of this scope
std::string m_type; // TODO: this should be an enum
ScopeData(const AstNode* nodep, const std::string& symName, const std::string& prettyName,
const std::string& defName, int timeunit, const std::string& type)
@@ -74,20 +74,20 @@ class EmitCSyms final : EmitCBaseVisitorConst {
, m_modportName{modportName} {}
};
struct ScopeFuncData final {
const AstScopeName* const m_scopep;
const AstCFunc* const m_cfuncp;
const AstNodeModule* const m_modp;
const AstScopeName* const m_scopep; // Scope the DPI export function is registered under
const AstCFunc* const m_cfuncp; // DPI export function
const AstNodeModule* const m_modp; // Module containing the DPI export function
ScopeFuncData(const AstScopeName* scopep, const AstCFunc* funcp, const AstNodeModule* modp)
: m_scopep{scopep}
, m_cfuncp{funcp}
, m_modp{modp} {}
};
struct ScopeVarData final {
const std::string m_scopeName;
const std::string m_varBasePretty;
const AstVar* const m_varp;
const AstNodeModule* const m_modp;
const AstScope* const m_scopep;
const std::string m_scopeName; // Full name of the scope containing the variable
const std::string m_varBasePretty; // Pretty base name of the variable, without scope
const AstVar* const m_varp; // Public variable
const AstNodeModule* const m_modp; // Module containing the variable
const AstScope* const m_scopep; // Scope containing the variable
ScopeVarData(const std::string& scopeName, const std::string& varBasePretty,
const AstVar* varp, const AstNodeModule* modp, const AstScope* scopep)
: m_scopeName{scopeName}
+2 -2
View File
@@ -102,8 +102,8 @@ private:
const int64_t intervalsNum = std::min<int64_t>(topScore + 1, MAX_INTERVALS_NUM);
struct Interval final {
uint64_t m_lowerBound = 0;
int m_size = 0;
uint64_t m_lowerBound = 0; // Lowest score included in this histogram bucket
int m_size = 0; // Number of scores that fell into this bucket
};
std::vector<Interval> intervals;
+3 -3
View File
@@ -70,7 +70,7 @@ class V3FileDependImp final {
class DependFile final {
// A single file
const bool m_target; // True if write, else read
bool m_exists = true;
bool m_exists = true; // File exists
const string m_filename; // Filename
struct stat m_stat; // Stat information
VHashSha256 m_hash; // SHA hash of file contents
@@ -365,8 +365,8 @@ class VInFilterImp final {
#else
int m_pid = 0; // fork() process id - always zero as disabled
#endif
bool m_pidExited = false;
int m_pidStatus = 0;
bool m_pidExited = false; // waitpid() reaped the filter process
int m_pidStatus = 0; // Exit status of the filter process
int m_writeFd = 0; // File descriptor TO filter
int m_readFd = 0; // File descriptor FROM filter
+16 -16
View File
@@ -46,9 +46,9 @@ class ForceState final {
public:
struct ForceRange VL_NOT_FINAL {
int m_rangeLsb = 0; // VlForceVec range: bit index or array element index
int m_rangeMsb = 0;
int m_rangeMsb = 0; // VlForceVec range: bit index or array element index
int m_padLsb = 0; // Bit positions for RHS padding
int m_padMsb = 0;
int m_padMsb = 0; // Bit positions for RHS padding
};
struct ForceInfo final : ForceRange {
@@ -75,13 +75,13 @@ public:
};
struct VarForceInfo final {
AstVarScope* m_forceVecVscp = nullptr;
AstVarScope* m_forceRdVscp = nullptr;
AstVarScope* m_forceEnVscp = nullptr;
AstVarScope* m_forceValVscp = nullptr;
AstVarScope* m_varVscp = nullptr;
AstVar* m_varp = nullptr;
AstScope* m_scopep = nullptr;
AstVarScope* m_forceVecVscp = nullptr; // Scope of the __VforceVec (VlForceVec) variable
AstVarScope* m_forceRdVscp = nullptr; // Scope of the __VforceRd (read-back) variable
AstVarScope* m_forceEnVscp = nullptr; // Scope of the __VforceEn (force enable) variable
AstVarScope* m_forceValVscp = nullptr; // Scope of the __VforceVal (force value) variable
AstVarScope* m_varVscp = nullptr; // Scope of the forced (original) variable
AstVar* m_varp = nullptr; // The forced (original) variable
AstScope* m_scopep = nullptr; // Scope containing the forced variable
std::unordered_map<AstAssignForce*, ForceInfo> m_forces;
std::unordered_map<string, int> m_forcePathToIndex;
int m_nextForcePathIndex = 1; // Start at 1 so 0 can be the base path (whole signal)
@@ -125,19 +125,19 @@ public:
};
struct ForceHelperVars final {
AstVar* m_rdVarp = nullptr;
AstVar* m_enVarp = nullptr;
AstVar* m_valVarp = nullptr;
AstVar* m_rdVarp = nullptr; // The __VforceRd (read-back) variable
AstVar* m_enVarp = nullptr; // The __VforceEn (force enable) variable
AstVar* m_valVarp = nullptr; // The __VforceVal (force value) variable
};
struct ArraySelInfo final {
std::vector<AstArraySel*> m_sels;
bool m_hasBitSel = false;
std::vector<AstArraySel*> m_sels; // Array selects collected along the path, outer first
bool m_hasBitSel = false; // Bit-select was found along the path too
};
struct ForceRangeInfo final : ForceRange {
bool m_hasArraySel = false;
ArraySelInfo m_arrayInfo;
bool m_hasArraySel = false; // LHS has an array select
ArraySelInfo m_arrayInfo; // Array-select information collected for the LHS
};
private:
+1 -1
View File
@@ -634,7 +634,7 @@ class FsmDetectVisitor final : public VNVisitor {
}
class RegisterAlwaysAnalyzer final {
AstScope* const m_scopep;
AstScope* const m_scopep; // Scope containing the always block(s) being analyzed
public:
explicit RegisterAlwaysAnalyzer(AstScope* scopep)
+1 -1
View File
@@ -131,7 +131,7 @@ private:
// The entry comes first, so it starts the slot whatever its alignment.
// It is a union so it is alive only while the slot is occupied.
union {
Entry m_entry;
Entry m_entry; // Stored entry; alive only while the slot is occupied
};
size_t m_hash = 0; // Hash of the entry, or zero when the slot is free
+3 -3
View File
@@ -50,9 +50,9 @@ class InstrCountVisitor final : public VNVisitorConst {
// Little class to cleanly call startVisitBase/endVisitBase
class VisitBase final {
// MEMBERS
uint32_t m_savedCount;
AstNode* const m_nodep;
InstrCountVisitor* const m_visitor;
uint32_t m_savedCount; // Count before visit applied
AstNode* const m_nodep; // Node helper is visiting
InstrCountVisitor* const m_visitor; // Visitor whose start/endVisitBase are called
public:
// CONSTRUCTORS
+1 -1
View File
@@ -130,7 +130,7 @@ V3OPTION_PARSER_DEF_ACT_CB_CLASS(ActionCbPartialMatchVal, void(const char*, cons
template <>
class V3OptionParser::Impl::ActionCbVal<int> final : public ActionBase<en::VALUE> {
std::function<void(int)> m_cb;
std::function<void(int)> m_cb; // Callback function
public:
using CbType = std::function<void(int)>;
+1 -1
View File
@@ -61,7 +61,7 @@ public:
private:
// MEMBERS
const std::unique_ptr<Impl> m_pimpl;
const std::unique_ptr<Impl> m_pimpl; // Implementation class
// METHODS
ActionIfs* find(const char* optp) VL_MT_DISABLED;
+3 -3
View File
@@ -429,9 +429,9 @@ class Contraction final {
// functions are efficient enough and using more optimized methods (e.g.: sorting networks)
// has no measurable benefit.
struct alignas(16) SortingRecord final {
uint64_t m_cp;
uint32_t m_id;
uint8_t m_idx;
uint64_t m_cp; // Critical path cost of the neighbor (primary sort key)
uint32_t m_id; // Id of the neighbor (tiebreaker sort key)
uint8_t m_idx; // Index of the neighbor within 'neighbors'
static_assert(PART_SIBLING_EDGE_LIMIT <= std::numeric_limits<uint8_t>::max(),
"m_idx must fit all indices into 'neighbors'");
bool operator<(const SortingRecord& that) const {
+2 -2
View File
@@ -110,8 +110,8 @@ class OrderMoveDomScope final {
// Key type for map below
class DomScopeMapKey final {
const AstSenTree* const m_domainp;
const AstScope* const m_scopep;
const AstSenTree* const m_domainp; // Domain the vertices belong to
const AstScope* const m_scopep; // Scope the vertices belong to
public:
DomScopeMapKey(const AstSenTree* domainp, const AstScope* scopep)
+1 -1
View File
@@ -2258,7 +2258,7 @@ class ParamProcessor final {
// deparameterize a class and delete its parameter pins, so no pointer to a
// child may remain pending when its parent is resolved.
class DeferredResolverVisitor final : public VNVisitor {
ParamProcessor& m_processor;
ParamProcessor& m_processor; // Processor used to resolve deferred references
std::set<const AstNode*> m_reachedDecls;
bool firstReach(const AstNode* const declp) { return m_reachedDecls.insert(declp).second; }
+3 -3
View File
@@ -101,9 +101,9 @@ private:
// We want to re-use allocated constants across calls to clear(), but we want to be able
// to 'clear()' fast, so we use a generation number based allocator.
struct ConstAllocator final {
size_t m_generation = 0;
size_t m_nextFree = 0;
std::deque<AstConst*> m_constps;
size_t m_generation = 0; // Generation as of last clear(); invalidates m_nextFree cheaply
size_t m_nextFree = 0; // Index of the next unused constant in m_constps
std::deque<AstConst*> m_constps; // Pool of allocated constants, reused across generations
AstConst* allocate(size_t currentGeneration, AstNode* nodep) {
if (m_generation != currentGeneration) {
m_generation = currentGeneration;
+8 -8
View File
@@ -371,7 +371,7 @@ public:
void add(AstSel* nodep) { m_sels.insert(nodep); }
void remove(AstNode* nodep) {
struct Visitor final : public VNVisitor {
RefsInModule& m_parent;
RefsInModule& m_parent; // RefsInModule instance to remove entries from
void visit(AstNode* nodep) override { iterateChildren(nodep); }
void visit(AstVar* nodep) override { m_parent.m_vars.erase(nodep); }
void visit(AstVarRef* nodep) override { m_parent.m_refs.erase(nodep); }
@@ -406,18 +406,18 @@ public:
struct SplitVarRefs final {
std::map<AstNodeModule*, RefsInModule, AstNodeComparator> m_refs;
std::unordered_set<AstVar*> m_hasXref;
std::unordered_set<AstVar*> m_hasXref; // Vars also referenced via a hierarchical AstVarXRef
};
class SplitUnpackedVarVisitor final : public VNVisitor, public SplitVarImpl {
using VarSet = std::set<AstVar*, AstNodeComparator>;
VarSet m_foundTargetVar;
UnpackRefMap m_refs;
AstNodeModule* m_modp = nullptr;
VarSet m_foundTargetVar; // Target-of-split variables found so far in the current context
UnpackRefMap m_refs; // References to unpacked-array variables, collected for splitting
AstNodeModule* m_modp = nullptr; // Module currently being visited
// AstNodeStmt, AstCell, or AstAlways(Public) for sensitivity
AstNode* m_contextp = nullptr;
const AstNodeFTask* m_inFTaskp = nullptr;
size_t m_numSplit = 0;
const AstNodeFTask* m_inFTaskp = nullptr; // Task/function currently being visited, if any
size_t m_numSplit = 0; // Number of variables split so far
// List for SplitPackedVarVisitor
SplitVarRefs m_forPackedSplit;
V3UniqueNames m_tempNames; // For generating unique temporary variable names
@@ -816,7 +816,7 @@ public:
// Split variable
class SplitNewVar final {
const int m_lsb; // LSB in the original bitvector
const int m_bitwidth;
const int m_bitwidth; // Width of this split-out piece
AstVar* m_varp; // The LSB of this variable is always 0, not m_lsb
public:
SplitNewVar(int lsb, int bitwidth, AstVar* varp = nullptr)
+3 -3
View File
@@ -39,9 +39,9 @@ class StackCountVisitor final : public VNVisitorConst {
// Little class to cleanly call startVisitBase/endVisitBase
class VisitBase final {
// MEMBERS
uint32_t m_savedCount;
AstNode* const m_nodep;
StackCountVisitor* const m_visitor;
uint32_t m_savedCount; // Count before visit applied
AstNode* const m_nodep; // Node this RAII helper is visiting
StackCountVisitor* const m_visitor; // Visitor whose start/endVisitBase are called
public:
// CONSTRUCTORS
+2 -2
View File
@@ -201,8 +201,8 @@ private:
// TODO use this wherever there is currently a "string m_name"
class VName final {
string m_name;
string m_hashed;
string m_name; // Pre-hashed symbol name
string m_hashed; // Hashed version of symbol name
static std::map<string, string> s_dehashMap; // hashed -> original decoder
static size_t s_maxLength; // Length at which to start hashing
+1 -1
View File
@@ -222,7 +222,7 @@ class TraceVisitor final : public VNVisitor {
m_ifaceMemberVscps;
class TraceInitDeclCollector final : public VNVisitor {
std::vector<AstTraceDecl*>& m_declps;
std::vector<AstTraceDecl*>& m_declps; // Output: trace declarations found so far
std::set<const AstCFunc*> m_seenFuncps;
void visit(AstTraceDecl* nodep) override { m_declps.push_back(nodep); }
+7 -7
View File
@@ -420,13 +420,13 @@ class TristateVisitor final : public TristateBaseVisitor {
// TYPES
struct RefStrength final {
AstNodeVarRef* m_varrefp;
AstNodeVarRef* m_varrefp; // Variable reference this strength/enable info was found on
AstNodeAssign* m_assignp; // Assignment containing m_varrefp
const AstNodeProcedure* m_procedurep; // Process containing m_assignp, if procedural
AstNodeExpr* m_enLhsp; // Procedural enable LHS with same footprint as m_varrefp
AstNodeVarRef* m_enVarrefp; // Variable reference within m_enLhsp to retarget
AstNodeExpr* m_enRhsp; // Procedural enable value matching m_enLhsp
VStrength m_strength;
VStrength m_strength; // Drive strength of the assignment/procedural write
AstDelay* m_delayp; // Explicit delay on the continuous assignment
RefStrength(AstNodeVarRef* varrefp, AstNodeAssign* assignp,
const AstNodeProcedure* procedurep, AstNodeExpr* enLhsp,
@@ -442,13 +442,13 @@ class TristateVisitor final : public TristateBaseVisitor {
, m_delayp{delayp} {}
};
struct LhsProjection final {
AstNodeExpr* m_lhsp;
AstNodeVarRef* m_varrefp;
AstNodeExpr* m_enp;
AstNodeExpr* m_lhsp; // LHS giving the enable assign
AstNodeVarRef* m_varrefp; // Variable reference within m_lhsp to retarget to enable var
AstNodeExpr* m_enp; // Procedural enable value to assign through m_lhsp
};
struct ProceduralEnable final {
AstNodeExpr* m_lhsp;
AstNodeExpr* m_rhsp;
AstNodeExpr* m_lhsp; // Enable LHS piece to concat onto the combined assignment LHS
AstNodeExpr* m_rhsp; // Enable value piece to concat onto the combined assignment RHS
};
using RefStrengthVec = std::vector<RefStrength>;
using VarMap = std::map<AstVar*, RefStrengthVec*>;
+1 -1
View File
@@ -30,7 +30,7 @@ class UnrollGenVisitor;
class GenForUnroller final {
// MEMBERS
UnrollGenVisitor* const m_unrollerp;
UnrollGenVisitor* const m_unrollerp; // Unroller implementation class
public:
// CONSTRUCTOR