From 35254847309c5a48347ef3329798df1180bc94ac Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Tue, 10 Sep 2024 19:04:55 -0400 Subject: [PATCH] Commentary --- Changes | 2 +- Makefile.in | 2 +- docs/internals.rst | 4 ++-- include/verilated_fst_c.cpp | 2 +- include/verilated_fst_c.h | 4 ++-- include/verilated_intrinsics.h | 6 +++--- include/verilated_trace.h | 22 +++++++++++----------- include/verilated_trace_imp.h | 18 +++++++++--------- include/verilated_vcd_c.cpp | 4 ++-- include/verilated_vcd_c.h | 4 ++-- include/verilatedos.h | 4 ++-- src/Makefile_obj.in | 2 +- src/V3Ast.h | 2 +- src/V3Hasher.cpp | 4 ++-- test_regress/driver.pl | 2 +- 15 files changed, 41 insertions(+), 41 deletions(-) diff --git a/Changes b/Changes index f71caa82f..fcdf229f4 100644 --- a/Changes +++ b/Changes @@ -584,7 +584,7 @@ Verilator 5.012 2023-06-13 * Fix wide structure VL_TOSTRING_W generation (#4188) (#4189). [Aylon Chaim Porat] * Fix references to members of parameterized base classes (#4196). [Ryszard Rozak, Antmicro Ltd] * Fix tracing undefined alignment (#4201) (#4288) [John Wehle] -* Fix class specific same methods for AstVarScope, AstVar, and AstScope (#4203) (#4250). [John Wehle] +* Fix class-specific same methods for AstVarScope, AstVar, and AstScope (#4203) (#4250). [John Wehle] * Fix dotted references in parameterized classes (#4206). [Ryszard Rozak, Antmicro Ltd] * Fix bit selections under parameterized classes (#4210). [Ryszard Rozak, Antmicro Ltd] * Fix duplicate std:: declaration with -I (#4215). [Harald Pretl] diff --git a/Makefile.in b/Makefile.in index 30f42e5e4..e3593adf3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -77,7 +77,7 @@ datadir = @datadir@ # Directory in which to install documentation info files. infodir = @infodir@ -# Directory in which to install package specific files +# Directory in which to install package-specific files # Generally ${prefix}/share/verilator pkgdatadir = @pkgdatadir@ diff --git a/docs/internals.rst b/docs/internals.rst index ba88d7976..35ac156f0 100644 --- a/docs/internals.rst +++ b/docs/internals.rst @@ -2100,13 +2100,13 @@ driver.py Non-Scenario Arguments memory leaks. --site - Run site specific tests also. + Run site-specific tests also. --stop Stop on the first error. --trace - Set the simulator specific flags to request waveform tracing. + Set the simulator-specific flags to request waveform tracing. --valgrind Same as ``verilator --valgrind``: Run Verilator under `Valgrind `_. diff --git a/include/verilated_fst_c.cpp b/include/verilated_fst_c.cpp index 05422641f..56f379b16 100644 --- a/include/verilated_fst_c.cpp +++ b/include/verilated_fst_c.cpp @@ -294,7 +294,7 @@ void VerilatedFst::configure(const VerilatedTraceConfig& config) { // so always inline them. VL_ATTR_ALWINLINE -void VerilatedFstBuffer::emitEvent(uint32_t code, const VlEventBase* newval) { +void VerilatedFstBuffer::emitEvent(uint32_t code, const VlEventBase* newvalp) { VL_DEBUG_IFDEF(assert(m_symbolp[code]);); fstWriterEmitValueChange(m_fst, m_symbolp[code], "1"); } diff --git a/include/verilated_fst_c.h b/include/verilated_fst_c.h index a8559c464..9c840faa6 100644 --- a/include/verilated_fst_c.h +++ b/include/verilated_fst_c.h @@ -47,7 +47,7 @@ private: friend VerilatedFstBuffer; // Give the buffer access to the private bits //========================================================================= - // FST specific internals + // FST-specific internals void* m_fst = nullptr; std::map m_code2symbol; @@ -177,7 +177,7 @@ class VerilatedFstBuffer VL_NOT_FINAL { // Implementations of duck-typed methods for VerilatedTraceBuffer. These are // called from only one place (the full* methods), so always inline them. - VL_ATTR_ALWINLINE void emitEvent(uint32_t code, const VlEventBase* newval); + VL_ATTR_ALWINLINE void emitEvent(uint32_t code, const VlEventBase* newvalp); VL_ATTR_ALWINLINE void emitBit(uint32_t code, CData newval); VL_ATTR_ALWINLINE void emitCData(uint32_t code, CData newval, int bits); VL_ATTR_ALWINLINE void emitSData(uint32_t code, SData newval, int bits); diff --git a/include/verilated_intrinsics.h b/include/verilated_intrinsics.h index a8c153e49..ff5f56fbd 100644 --- a/include/verilated_intrinsics.h +++ b/include/verilated_intrinsics.h @@ -12,13 +12,13 @@ //************************************************************************* /// /// \file -/// \brief Verilator common target specific intrinsics header +/// \brief Verilator common target-specific intrinsics header /// /// This file is not part of the Verilated public-facing API. /// -/// It is only for internal use; code using machine specific intrinsics for +/// It is only for internal use; code using machine-specific intrinsics for /// optimization should include this header rather than directly including -/// he target specific headers. We provide macros to check for availability +/// the target-specific headers. We provide macros to check for availability /// of instruction sets, and a common mechanism to disable them. /// //************************************************************************* diff --git a/include/verilated_trace.h b/include/verilated_trace.h index dd47ad81b..4ddac6661 100644 --- a/include/verilated_trace.h +++ b/include/verilated_trace.h @@ -198,8 +198,8 @@ public: //============================================================================= // VerilatedTrace -// T_Trace is the format specific subclass of VerilatedTrace. -// T_Buffer is the format specific base class of VerilatedTraceBuffer. +// T_Trace is the format-specific subclass of VerilatedTrace. +// T_Buffer is the format-specific base class of VerilatedTraceBuffer. template class VerilatedTrace VL_NOT_FINAL { public: @@ -348,7 +348,7 @@ private: protected: //========================================================================= - // Internals available to format specific implementations + // Internals available to format-specific implementations mutable VerilatedMutex m_mutex; // Ensure dump() etc only called from single thread @@ -381,7 +381,7 @@ protected: } //========================================================================= - // Virtual functions to be provided by the format specific implementation + // Virtual functions to be provided by the format-specific implementation // Called when the trace moves forward to a new time point virtual void emitTimeChange(uint64_t timeui) = 0; @@ -438,7 +438,7 @@ public: //============================================================================= // VerilatedTraceBuffer -// T_Buffer is the format specific base class of VerilatedTraceBuffer. +// T_Buffer is the format-specific base class of VerilatedTraceBuffer. // The format-specific hot-path methods use duck-typing via T_Buffer for performance. template class VerilatedTraceBuffer VL_NOT_FINAL : public T_Buffer { @@ -464,7 +464,7 @@ public: // Hot path internal interface to Verilator generated code // Implementation note: We rely on the following duck-typed implementations - // in the derived class T_Derived. These emit* functions record a format + // in the derived class T_Derived. These emit* functions record a format- // specific trace entry. Normally one would use pure virtual functions for // these here, but we cannot afford dynamic dispatch for calling these as // this is very hot code during tracing. @@ -487,7 +487,7 @@ public: void fullQData(uint32_t* oldp, QData newval, int bits); void fullWData(uint32_t* oldp, const WData* newvalp, int bits); void fullDouble(uint32_t* oldp, double newval); - void fullEvent(uint32_t* oldp, const VlEventBase* newval); + void fullEvent(uint32_t* oldp, const VlEventBase* newvalp); // In non-offload mode, these are called directly by the trace callbacks, // and are called chg*. In offload mode, they are called by the worker @@ -524,8 +524,8 @@ public: } } } - VL_ATTR_ALWINLINE void chgEvent(uint32_t* oldp, const VlEventBase* newval) { - fullEvent(oldp, newval); + VL_ATTR_ALWINLINE void chgEvent(uint32_t* oldp, const VlEventBase* newvalp) { + fullEvent(oldp, newvalp); } VL_ATTR_ALWINLINE void chgDouble(uint32_t* oldp, double newval) { double old; @@ -537,7 +537,7 @@ public: //============================================================================= // VerilatedTraceOffloadBuffer -// T_Buffer is the format specific base class of VerilatedTraceBuffer. +// T_Buffer is the format-specific base class of VerilatedTraceBuffer. // The format-specific hot-path methods use duck-typing via T_Buffer for performance. template class VerilatedTraceOffloadBuffer final : public VerilatedTraceBuffer { @@ -605,7 +605,7 @@ public: m_offloadBufferWritep += 4; VL_DEBUG_IF(assert(m_offloadBufferWritep <= m_offloadBufferEndp);); } - void chgEvent(uint32_t code, const VlEventBase* newval) { + void chgEvent(uint32_t code, const VlEventBase* newvalp) { m_offloadBufferWritep[0] = VerilatedTraceOffloadCommand::CHG_EVENT; m_offloadBufferWritep[1] = code; m_offloadBufferWritep += 2; diff --git a/include/verilated_trace_imp.h b/include/verilated_trace_imp.h index 94549dc19..501a8e6f6 100644 --- a/include/verilated_trace_imp.h +++ b/include/verilated_trace_imp.h @@ -12,7 +12,7 @@ //============================================================================= // // Verilated tracing implementation code template common to all formats. -// This file is included by the format specific implementations and +// This file is included by the format-specific implementations and // should not be used otherwise. // //============================================================================= @@ -299,7 +299,7 @@ VerilatedTrace::~VerilatedTrace() { } //========================================================================= -// Internals available to format specific implementations +// Internals available to format-specific implementations template <> void VerilatedTrace::traceInit() VL_MT_UNSAFE { @@ -401,7 +401,7 @@ bool VerilatedTrace::declCode(uint32_t code, const std::stri } //========================================================================= -// Internals available to format specific implementations +// Internals available to format-specific implementations template <> std::string VerilatedTrace::timeResStr() const { @@ -543,7 +543,7 @@ void VerilatedTrace::dump(uint64_t timeui) VL_MT_SAFE_EXCLUD Verilated::quiesce(); - // Call hook for format specific behaviour + // Call hook for format-specific behaviour if (VL_UNLIKELY(m_fullDump)) { if (!preFullDump()) return; } else { @@ -667,7 +667,7 @@ void VerilatedTrace::addModel(VerilatedModel* modelp) VL_FATAL_MT(__FILE__, __LINE__, "", "Cannot use parallel tracing with offloading"); } // LCOV_EXCL_STOP - // Configure format specific sub class + // Configure format-specific sub class configure(*(configp.get())); } @@ -818,8 +818,8 @@ VerilatedTraceBuffer::VerilatedTraceBuffer(Trace& owner) , m_sigs_enabledp{owner.m_sigs_enabledp} {} // These functions must write the new value back into the old value store, -// and subsequently call the format specific emit* implementations. Note -// that this file must be included in the format specific implementation, so +// and subsequently call the format-specific emit* implementations. Note +// that this file must be included in the format-specific implementation, so // the emit* functions can be inlined for performance. template <> @@ -831,10 +831,10 @@ void VerilatedTraceBuffer::fullBit(uint32_t* oldp, CData newval) { } template <> -void VerilatedTraceBuffer::fullEvent(uint32_t* oldp, const VlEventBase* newval) { +void VerilatedTraceBuffer::fullEvent(uint32_t* oldp, const VlEventBase* newvalp) { const uint32_t code = oldp - m_sigs_oldvalp; *oldp = 1; // Do we really store an "event" ? - emitEvent(code, newval); + emitEvent(code, newvalp); } template <> diff --git a/include/verilated_vcd_c.cpp b/include/verilated_vcd_c.cpp index fb6ea3fa8..ff669a505 100644 --- a/include/verilated_vcd_c.cpp +++ b/include/verilated_vcd_c.cpp @@ -573,8 +573,8 @@ void VerilatedVcdBuffer::finishLine(uint32_t code, char* writep) { // so always inline them. VL_ATTR_ALWINLINE -void VerilatedVcdBuffer::emitEvent(uint32_t code, const VlEventBase* newval) { - const bool triggered = newval->isTriggered(); +void VerilatedVcdBuffer::emitEvent(uint32_t code, const VlEventBase* newvalp) { + const bool triggered = newvalp->isTriggered(); // TODO : It seems that untriggered events are not filtered // should be tested before this last step if (triggered) { diff --git a/include/verilated_vcd_c.h b/include/verilated_vcd_c.h index 82f222345..5a7570527 100644 --- a/include/verilated_vcd_c.h +++ b/include/verilated_vcd_c.h @@ -43,7 +43,7 @@ private: friend VerilatedVcdBuffer; // Give the buffer access to the private bits //========================================================================= - // VCD specific internals + // VCD-specific internals VerilatedVcdFile* m_filep; // File we're writing to bool m_fileNewed; // m_filep needs destruction @@ -214,7 +214,7 @@ class VerilatedVcdBuffer VL_NOT_FINAL { // Implementation of VerilatedTraceBuffer interface // Implementations of duck-typed methods for VerilatedTraceBuffer. These are // called from only one place (the full* methods), so always inline them. - VL_ATTR_ALWINLINE void emitEvent(uint32_t code, const VlEventBase* newval); + VL_ATTR_ALWINLINE void emitEvent(uint32_t code, const VlEventBase* newvalp); VL_ATTR_ALWINLINE void emitBit(uint32_t code, CData newval); VL_ATTR_ALWINLINE void emitCData(uint32_t code, CData newval, int bits); VL_ATTR_ALWINLINE void emitSData(uint32_t code, SData newval, int bits); diff --git a/include/verilatedos.h b/include/verilatedos.h index f56c101bd..93c907269 100644 --- a/include/verilatedos.h +++ b/include/verilatedos.h @@ -593,9 +593,9 @@ static inline double VL_ROUND(double n) { #endif //========================================================================= -// Macros controlling target specific optimizations +// Macros controlling target-specific optimizations -// Define VL_PORTABLE_ONLY to disable all target specific optimizations +// Define VL_PORTABLE_ONLY to disable all target-specific optimizations #ifndef VL_PORTABLE_ONLY # ifdef __x86_64__ # define VL_X86_64 1 diff --git a/src/Makefile_obj.in b/src/Makefile_obj.in index 3603d5a6e..18947923a 100644 --- a/src/Makefile_obj.in +++ b/src/Makefile_obj.in @@ -49,7 +49,7 @@ prefix = @prefix@ # Directory in which to install data across multiple architectures datarootdir = @datarootdir@ -# Directory in which to install package specific files +# Directory in which to install package-specific files # Generally ${prefix}/share/verilator pkgdatadir = @pkgdatadir@ diff --git a/src/V3Ast.h b/src/V3Ast.h index b8ec59dac..89a069a7a 100644 --- a/src/V3Ast.h +++ b/src/V3Ast.h @@ -2440,7 +2440,7 @@ public: static void dumpTreeFileGdb(const AstNode* nodep, const char* filenamep = nullptr); void dumpTreeDot(std::ostream& os = std::cout) const; void dumpTreeDotFile(const string& filename, bool doDump = true); - virtual void dumpJson(std::ostream& os) const { dumpJsonGen(os); }; // node specific fields + virtual void dumpJson(std::ostream& os) const { dumpJsonGen(os); }; // node-specific fields // Generated by 'astgen'. Dumps node-specific pointers and calls 'dumpJson()' of parent class // Note that we don't make it virtual as it would result in infinite recursion void dumpJsonGen(std::ostream& os) const {}; diff --git a/src/V3Hasher.cpp b/src/V3Hasher.cpp index 5d0deb8f2..9b8be0dc3 100644 --- a/src/V3Hasher.cpp +++ b/src/V3Hasher.cpp @@ -60,7 +60,7 @@ class HasherVisitor final : public VNVisitorConst { VL_RESTORER(m_hash); // Reset accumulator m_hash = V3Hash{nodep->type()}; // Node type - f(); // Node specific hash + f(); // Node-specific hash if (hashDType && nodep != nodep->dtypep()) iterateConstNull(nodep->dtypep()); // Node dtype if (hashChildren) iterateChildrenConst(nodep); // Children @@ -74,7 +74,7 @@ class HasherVisitor final : public VNVisitorConst { constexpr static bool HASH_DTYPE = true; constexpr static bool HASH_CHILDREN = true; - // Each visitor below contributes to the hash any node specific content + // Each visitor below contributes to the hash any node-specific content // that is not dependent on either of the following, as these are // included by default by hashNode: // - Node type (as given by AstNode::type()) diff --git a/test_regress/driver.pl b/test_regress/driver.pl index d122114c9..f1d90284c 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -1024,7 +1024,7 @@ sub lint { my $self = (ref $_[0] ? shift : $Self); my %param = (# %{$self}, # Default arguments are from $self - # Lint specific default overrides + # Lint-specific default overrides make_main => 0, make_top_shell => 0, verilator_flags2 => ["--lint-only"],