[#74021] correct comments
This commit is contained in:
parent
38f87e5016
commit
6a4390ef03
|
|
@ -64,9 +64,9 @@
|
|||
|
||||
class VerilatedSaifActivityBit final {
|
||||
// MEMBERS
|
||||
bool m_lastVal = false; // last emitted activity bit value
|
||||
uint64_t m_highTime = 0; // total time when bit was high
|
||||
size_t m_transitions = 0; // total number of bit transitions
|
||||
bool m_lastVal = false; // Last emitted activity bit value
|
||||
uint64_t m_highTime = 0; // Total time when bit was high
|
||||
size_t m_transitions = 0; // Total number of bit transitions
|
||||
|
||||
public:
|
||||
// METHODS
|
||||
|
|
@ -88,9 +88,9 @@ public:
|
|||
|
||||
class VerilatedSaifActivityVar final {
|
||||
// MEMBERS
|
||||
uint64_t m_lastTime{0}; // last time when variable value was updated
|
||||
VerilatedSaifActivityBit* m_bits; // pointer to variable bits objects
|
||||
uint32_t m_width; // width of variable (in bits)
|
||||
uint64_t m_lastTime{0}; // Last time when variable value was updated
|
||||
VerilatedSaifActivityBit* m_bits; // Pointer to variable bits objects
|
||||
uint32_t m_width; // Width of variable (in bits)
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
|
|
@ -134,15 +134,15 @@ private:
|
|||
|
||||
class VerilatedSaifActivityScope final {
|
||||
// MEMBERS
|
||||
// absolute path to the scope
|
||||
// Absolute path to the scope
|
||||
std::string m_scopePath{};
|
||||
// name of the activity scope
|
||||
// Name of the activity scope
|
||||
std::string m_scopeName{};
|
||||
// array indices of child scopes
|
||||
// Array indices of child scopes
|
||||
std::vector<std::unique_ptr<VerilatedSaifActivityScope>> m_childScopes{};
|
||||
// children signals codes mapped to their names in the current scope
|
||||
// Children signals codes mapped to their names in the current scope
|
||||
std::vector<std::pair<uint32_t, std::string>> m_childActivities{};
|
||||
// parent scope pointer
|
||||
// Parent scope pointer
|
||||
VerilatedSaifActivityScope* m_parentScope{nullptr};
|
||||
|
||||
public:
|
||||
|
|
@ -192,12 +192,12 @@ class VerilatedSaifActivityAccumulator final {
|
|||
friend class VerilatedSaif;
|
||||
|
||||
// MEMBERS
|
||||
// map of scopes paths to codes of activities inside
|
||||
// Map of scopes paths to codes of activities inside
|
||||
std::unordered_map<std::string, std::vector<std::pair<uint32_t, std::string>>>
|
||||
m_scopeToActivities;
|
||||
// map of variables codes mapped to their activity objects
|
||||
// Map of variables codes mapped to their activity objects
|
||||
std::unordered_map<uint32_t, VerilatedSaifActivityVar> m_activity;
|
||||
// memory pool for signals bits objects
|
||||
// Memory pool for signals bits objects
|
||||
std::vector<std::vector<VerilatedSaifActivityBit>> m_activityArena;
|
||||
|
||||
public:
|
||||
|
|
@ -328,7 +328,7 @@ void VerilatedSaif::openInstanceScope(const std::string& instanceName) {
|
|||
void VerilatedSaif::closeInstanceScope() {
|
||||
decrementIndent();
|
||||
printIndent();
|
||||
printStr(")\n");
|
||||
printStr(")\n"); // INSTANCE
|
||||
}
|
||||
|
||||
void VerilatedSaif::printScopeActivities(const VerilatedSaifActivityScope& scope) {
|
||||
|
|
@ -365,7 +365,7 @@ void VerilatedSaif::openNetScope() {
|
|||
void VerilatedSaif::closeNetScope() {
|
||||
decrementIndent();
|
||||
printIndent();
|
||||
printStr(")\n");
|
||||
printStr(")\n"); // NET
|
||||
}
|
||||
|
||||
bool VerilatedSaif::printActivityStats(VerilatedSaifActivityVar& activity,
|
||||
|
|
@ -580,7 +580,7 @@ void VerilatedSaif::commitTraceBuffer(VerilatedSaif::Buffer* bufp) { delete bufp
|
|||
|
||||
VL_ATTR_ALWINLINE
|
||||
void VerilatedSaifBuffer::emitEvent(const uint32_t code) {
|
||||
// Noop
|
||||
// NOP
|
||||
}
|
||||
|
||||
VL_ATTR_ALWINLINE
|
||||
|
|
@ -639,5 +639,5 @@ void VerilatedSaifBuffer::emitWData(const uint32_t code, const WData* newvalp, c
|
|||
|
||||
VL_ATTR_ALWINLINE
|
||||
void VerilatedSaifBuffer::emitDouble(const uint32_t code, const double newval) {
|
||||
// Noop
|
||||
// NOP
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,18 +53,18 @@ private:
|
|||
bool m_isOpen = false; // True indicates open file
|
||||
std::string m_filename; // Filename we're writing to (if open)
|
||||
|
||||
int m_indent = 0; // indentation size in spaces
|
||||
int m_indent = 0; // Indentation size in spaces
|
||||
|
||||
// currently active scope
|
||||
// Currently active scope
|
||||
VerilatedSaifActivityScope* m_currentScope{nullptr};
|
||||
// array of declared scopes
|
||||
// Array of declared scopes
|
||||
std::vector<std::unique_ptr<VerilatedSaifActivityScope>> m_scopes{};
|
||||
// activity accumulators used to store variables statistics over simulation time
|
||||
// Activity accumulators used to store variables statistics over simulation time
|
||||
std::vector<std::unique_ptr<VerilatedSaifActivityAccumulator>> m_activityAccumulators{};
|
||||
// total time of the currently traced simulation
|
||||
// Total time of the currently traced simulation
|
||||
uint64_t m_time{0};
|
||||
|
||||
// stack of declared scopes combined names
|
||||
// Stack of declared scopes combined names
|
||||
std::vector<std::pair<std::string, VerilatedTracePrefixType>> m_prefixStack{
|
||||
{"", VerilatedTracePrefixType::SCOPE_MODULE}};
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ public:
|
|||
};
|
||||
|
||||
#ifndef DOXYGEN
|
||||
// Declare specialization here as it's used in VerilatedFstC just below
|
||||
// Declare specialization here as it's used in VerilatedSaifC just below
|
||||
template <>
|
||||
void VerilatedSaif::Super::dump(uint64_t time);
|
||||
template <>
|
||||
|
|
@ -218,7 +218,7 @@ class VerilatedSaifBuffer VL_NOT_FINAL {
|
|||
//=============================================================================
|
||||
// VerilatedSaifC
|
||||
/// Class representing a SAIF dump file in C standalone (no SystemC)
|
||||
/// simulations. Also derived for use in SystemC simulations.
|
||||
/// simulations. Also derived for use in SystemC simulations.
|
||||
|
||||
class VerilatedSaifC VL_NOT_FINAL : public VerilatedTraceBaseC {
|
||||
VerilatedSaif m_sptrace; // Trace file being created
|
||||
|
|
@ -242,8 +242,7 @@ public:
|
|||
/// just as if this object was deleted and reconstructed.
|
||||
virtual void open(const char* filename) VL_MT_SAFE { m_sptrace.open(filename); }
|
||||
|
||||
void rolloverSize(size_t size) VL_MT_SAFE { /* noop */
|
||||
}
|
||||
void rolloverSize(size_t size) VL_MT_SAFE { } // NOP
|
||||
|
||||
/// Close dump
|
||||
void close() VL_MT_SAFE {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class SAIFParser:
|
|||
|
||||
def __init__(self):
|
||||
self.token_stack = []
|
||||
# for parsing simplicity
|
||||
# For parsing simplicity
|
||||
self.token_stack.append(SAIFToken('saif_root'))
|
||||
self.current_instance = None
|
||||
self.has_saifile_header = False
|
||||
|
|
@ -102,7 +102,7 @@ class SAIFParser:
|
|||
index += 1
|
||||
continue
|
||||
if re.match(r'DESIGN|DATE|VENDOR|PROGRAM_NAME|VERSION', token):
|
||||
# noop, only skip value
|
||||
# NOP, only skip value
|
||||
saif_assert(index < num_of_tokens, EOF_ERROR)
|
||||
index += 1
|
||||
continue
|
||||
|
|
@ -157,7 +157,7 @@ class SAIFParser:
|
|||
index += 1
|
||||
continue
|
||||
if re.match(r'TZ|TX|TB|TG|IG|IK', token):
|
||||
# noop, only skip value
|
||||
# NOP, only skip value
|
||||
index += 1
|
||||
continue
|
||||
if self.token_stack[-2].type == NET_LIST_TYPE:
|
||||
|
|
@ -169,7 +169,7 @@ class SAIFParser:
|
|||
f"SAIF file doesn't have a valid/compatible direction: {self.direction}")
|
||||
saif_assert(self.saif_version == "2.0",
|
||||
f"SAIF file doesn't have a valid/compatible version: {self.saif_version}")
|
||||
# only 'saif_root' token should be left
|
||||
# Only 'saif_root' token should be left
|
||||
saif_assert(len(self.token_stack) == 1, "Incorrect nesting of scopes")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue