This commit is contained in:
Todd Strader 2026-04-03 17:43:11 +08:00 committed by GitHub
commit ae9329c542
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
64 changed files with 51049 additions and 1948 deletions

View File

@ -1139,6 +1139,16 @@ public:
bool isWritable() const VL_MT_SAFE { return m_e == OUTPUT || m_e == INOUT || m_e == REF; }
bool isRef() const VL_MT_SAFE { return m_e == REF; }
bool isConstRef() const VL_MT_SAFE { return m_e == CONSTREF; }
string traceSigDirection() const {
if (isInout()) {
return "VerilatedTraceSigDirection::INOUT";
} else if (isWritable()) {
return "VerilatedTraceSigDirection::OUTPUT";
} else if (isNonOutput()) {
return "VerilatedTraceSigDirection::INPUT";
}
return "VerilatedTraceSigDirection::NONE";
}
};
constexpr bool operator==(const VDirection& lhs, const VDirection& rhs) VL_MT_SAFE {
return lhs.m_e == rhs.m_e;
@ -1798,6 +1808,10 @@ public:
static const char* const names[] = {"CONSTANT", "FULL", "CHANGE"};
return names[m_e];
}
const char* func_prefix() const {
static const char* const names[] = {"trace_const", "trace_full", "trace_chg"};
return names[m_e];
}
};
constexpr bool operator==(const VTraceType& lhs, const VTraceType& rhs) {
return lhs.m_e == rhs.m_e;

View File

@ -4567,6 +4567,7 @@ public:
string selfPointerProtect(bool useSelfForThis) const {
return selfPointer().protect(useSelfForThis, protect());
}
bool maybePointedTo() const override VL_MT_SAFE { return true; }
};
class AstCMethodCall final : public AstNodeCCall {
// C++ method call

View File

@ -2089,6 +2089,12 @@ public:
}
VDirection direction() const VL_MT_SAFE { return m_direction; }
bool isIO() const VL_MT_SAFE { return m_direction != VDirection::NONE; }
bool isVLIO() const {
const AstBasicDType* const bdtypep = basicp();
return isPrimaryIO() && bdtypep && !bdtypep->isOpaque()
&& !dtypep()->skipRefp()->isCompound()
&& !VN_IS(dtypep()->skipRefp(), UnpackArrayDType);
}
void declDirection(const VDirection& flag) { m_declDirection = flag; }
VDirection declDirection() const { return m_declDirection; }
void varType(VVarType type) { m_varType = type; }
@ -2107,7 +2113,7 @@ public:
string dpiTmpVarType(const string& varName) const;
// Return Verilator internal type for argument: CData, SData, IData, WData
string vlArgType(bool named, bool forReturn, bool forFunc, const string& namespc = "",
bool asRef = false) const;
bool asRef = false, bool constRef = false) const;
string vlEnumType() const; // Return VerilatorVarType: VLVT_UINT32, etc
string vlEnumDir() const; // Return VerilatorVarDir: VLVD_INOUT, etc
string vlPropDecl(const string& propName) const; // Return VerilatorVarProps declaration

View File

@ -1264,6 +1264,9 @@ class AstTraceDecl final : public AstNodeStmt {
// Parents: {statement list}
// Expression being traced - Moved to AstTraceInc by V3Trace
// @astgen op1 := valuep : Optional[AstNodeExpr]
//
// @astgen ptr := m_dtypeCallp: Optional[AstCCall] // Type init function call
// @astgen ptr := m_dtypeDeclp: Optional[AstTraceDecl] // CCall TraceDecl which replaces this
uint32_t m_code{std::numeric_limits<uint32_t>::max()}; // Trace identifier code
uint32_t m_fidx{0}; // Trace function index
const string m_showname; // Name of variable
@ -1271,18 +1274,23 @@ class AstTraceDecl final : public AstNodeStmt {
const VNumRange m_arrayRange; // Property of var the trace details
const VVarType m_varType; // Type of variable (for localparam vs. param)
const VDirection m_declDirection; // Declared direction input/output etc
const bool m_inDtypeFunc; // Trace decl inside type init function
int m_codeInc{0}; // Code increment for type
public:
AstTraceDecl(FileLine* fl, const string& showname,
AstVar* varp, // For input/output state etc
AstNodeExpr* valuep, const VNumRange& bitRange, const VNumRange& arrayRange)
AstNodeExpr* valuep, const VNumRange& bitRange, const VNumRange& arrayRange,
AstCCall* const dtypeCallp, const bool inDtypeFunc)
: ASTGEN_SUPER_TraceDecl(fl)
, m_showname{showname}
, m_bitRange{bitRange}
, m_arrayRange{arrayRange}
, m_varType{varp->varType()}
, m_declDirection{varp->declDirection()} {
, m_declDirection{varp->declDirection()}
, m_inDtypeFunc{inDtypeFunc} {
dtypeFrom(valuep);
this->valuep(valuep);
this->dtypeCallp(dtypeCallp);
}
void dump(std::ostream& str) const override;
void dumpJson(std::ostream& str) const override;
@ -1291,7 +1299,7 @@ public:
string name() const override VL_MT_STABLE { return m_showname; }
bool maybePointedTo() const override VL_MT_SAFE { return true; }
bool hasDType() const override VL_MT_SAFE { return true; }
bool sameNode(const AstNode* samep) const override { return false; }
bool sameNode(const AstNode* samep) const override { return true; }
string showname() const { return m_showname; } // * = Var name
// Details on what we're tracing
uint32_t code() const { return m_code; }
@ -1299,7 +1307,9 @@ public:
bool codeAssigned() const { return m_code != std::numeric_limits<uint32_t>::max(); }
uint32_t fidx() const { return m_fidx; }
void fidx(uint32_t fidx) { m_fidx = fidx; }
void codeInc(uint32_t codeInc) { m_codeInc = codeInc; }
uint32_t codeInc() const {
if (m_codeInc) { return m_codeInc; }
return (m_arrayRange.ranged() ? m_arrayRange.elements() : 1)
* valuep()->dtypep()->widthWords()
* (VL_EDATASIZE / 32); // A code is always 32-bits
@ -1308,6 +1318,11 @@ public:
const VNumRange& arrayRange() const { return m_arrayRange; }
VVarType varType() const { return m_varType; }
VDirection declDirection() const { return m_declDirection; }
AstCCall* dtypeCallp() const { return m_dtypeCallp; }
void dtypeCallp(AstCCall* const callp) { m_dtypeCallp = callp; }
AstTraceDecl* dtypeDeclp() const { return m_dtypeDeclp; }
void dtypeDeclp(AstTraceDecl* const declp) { m_dtypeDeclp = declp; }
bool inDtypeFunc() const { return m_inDtypeFunc; }
};
class AstTraceInc final : public AstNodeStmt {
// Trace point dump
@ -1356,20 +1371,23 @@ class AstTracePushPrefix final : public AstNodeStmt {
const VTracePrefixType m_prefixType; // Type of prefix being pushed
const int m_left; // Array left index, or struct/union member count
const int m_right; // Array right index
const bool m_quotedPrefix; // Quote prefix name
public:
AstTracePushPrefix(FileLine* fl, const string& prefix, VTracePrefixType prefixType,
int left = 0, int right = 0)
int left = 0, int right = 0, bool quotedPrefix = true)
: ASTGEN_SUPER_TracePushPrefix(fl)
, m_prefix{prefix}
, m_prefixType{prefixType}
, m_left{left}
, m_right{right} {}
, m_right{right}
, m_quotedPrefix{quotedPrefix} {}
ASTGEN_MEMBERS_AstTracePushPrefix;
bool sameNode(const AstNode* samep) const override { return false; }
string prefix() const { return m_prefix; }
VTracePrefixType prefixType() const { return m_prefixType; }
int left() const { return m_left; }
int right() const { return m_right; }
bool quotedPrefix() const { return m_quotedPrefix; }
};
class AstWait final : public AstNodeStmt {
// @astgen op1 := condp : AstNodeExpr

View File

@ -614,7 +614,7 @@ string AstVar::verilogKwd() const {
}
string AstVar::vlArgType(bool named, bool forReturn, bool forFunc, const string& namespc,
bool asRef) const {
bool asRef, bool constRef) const {
UASSERT_OBJ(!forReturn, this,
"Internal data is never passed as return, but as first argument");
string ostatic;
@ -622,7 +622,7 @@ string AstVar::vlArgType(bool named, bool forReturn, bool forFunc, const string&
asRef = asRef || isDpiOpenArray() || (forFunc && (isWritable() || isRef() || isConstRef()));
if (forFunc && isReadOnly() && asRef) ostatic = ostatic + "const ";
if (forFunc && (isReadOnly() || constRef) && asRef) ostatic = ostatic + "const ";
string oname;
if (named) {
@ -3276,7 +3276,8 @@ void AstStop::dumpJson(std::ostream& str) const {
}
void AstTraceDecl::dump(std::ostream& str) const {
this->AstNodeStmt::dump(str);
if (code()) str << " [code=" << code() << "]";
if (codeAssigned()) str << " [code=" << code() << "]";
if (dtypeCallp()) str << " [dtypeCallp=" << dtypeCallp() << "]";
}
void AstTraceDecl::dumpJson(std::ostream& str) const {
dumpJsonNumFunc(str, code);

View File

@ -207,9 +207,7 @@ void EmitCBaseVisitorConst::emitVarDecl(const AstVar* nodep, bool asRef) {
if (asRef && refNeedParens) puts(")");
emitDeclArrayBrackets(nodep);
puts(";\n");
} else if (nodep->isPrimaryIO() && basicp && !basicp->isOpaque()
&& !nodep->dtypep()->skipRefp()->isCompound()
&& !VN_IS(nodep->dtypep()->skipRefp(), UnpackArrayDType)) {
} else if (nodep->isVLIO()) {
if (nodep->isInout()) {
putns(nodep, "VL_INOUT");
} else if (nodep->isWritable()) {

View File

@ -627,6 +627,16 @@ class EmitCTrace final : public EmitCFunc {
}
void emitTraceInitOne(const AstTraceDecl* nodep, int enumNum) {
std::string direction;
direction = nodep->declDirection().traceSigDirection();
AstCCall* const callp = nodep->dtypeCallp();
if (callp) {
callp->argTypes(callp->argTypes() + ", " + cvtToStr(nodep->fidx()) + ", c+"
+ cvtToStr(nodep->code()) + ", " + direction);
return;
}
if (nodep->dtypep()->basicp()->isDouble()) {
puts("VL_TRACE_DECL_DOUBLE");
} else if (nodep->isWide()) {
@ -653,7 +663,11 @@ class EmitCTrace final : public EmitCFunc {
// Function index
puts(",");
puts(cvtToStr(nodep->fidx()));
if (nodep->inDtypeFunc()) {
puts("fidx");
} else {
puts(cvtToStr(nodep->fidx()));
}
// Name
puts(",");
@ -663,14 +677,10 @@ class EmitCTrace final : public EmitCFunc {
puts("," + cvtToStr(enumNum));
// Direction
if (nodep->declDirection().isInout()) {
puts(", VerilatedTraceSigDirection::INOUT");
} else if (nodep->declDirection().isWritable()) {
puts(", VerilatedTraceSigDirection::OUTPUT");
} else if (nodep->declDirection().isNonOutput()) {
puts(", VerilatedTraceSigDirection::INPUT");
if (nodep->inDtypeFunc()) {
puts(", direction");
} else {
puts(", VerilatedTraceSigDirection::NONE");
puts(", " + direction);
}
// Kind
@ -767,16 +777,7 @@ class EmitCTrace final : public EmitCFunc {
puts("VL_SC_BV_DATAP(");
}
iterateConst(varrefp); // Put var name out
// Tracing only supports 1D arrays
if (nodep->declp()->arrayRange().ranged()) {
if (arrayindex == -2) {
puts("[i]");
} else if (arrayindex == -1) {
puts("[0]");
} else {
puts("[" + cvtToStr(arrayindex) + "]");
}
}
emitTraceIndex(nodep, arrayindex);
if (varp->isSc()) puts(".read()");
if (emitTraceIsScUint(nodep)) {
puts(nodep->isQuad() ? ".to_uint64()" : ".to_uint()");
@ -789,10 +790,24 @@ class EmitCTrace final : public EmitCFunc {
} else {
puts("(");
iterateConst(nodep->valuep());
emitTraceIndex(nodep, arrayindex);
puts(")");
}
}
void emitTraceIndex(const AstTraceInc* const nodep, int arrayindex) {
// Tracing only supports 1D arrays
if (nodep->declp()->arrayRange().ranged()) {
if (arrayindex == -2) {
puts("[i]");
} else if (arrayindex == -1) {
puts("[0]");
} else {
puts("[" + cvtToStr(arrayindex) + "]");
}
}
}
// VISITORS
using EmitCFunc::visit; // Suppress hidden overloaded virtual function warning
void visit(AstCFunc* nodep) override {
@ -812,7 +827,11 @@ class EmitCTrace final : public EmitCFunc {
}
void visit(AstTracePushPrefix* nodep) override {
putns(nodep, "VL_TRACE_PUSH_PREFIX(tracep, ");
putsQuoted(VIdProtect::protectWordsIf(nodep->prefix(), nodep->protect()));
if (nodep->quotedPrefix()) {
putsQuoted(VIdProtect::protectWordsIf(nodep->prefix(), nodep->protect()));
} else {
puts(nodep->prefix());
}
puts(", VerilatedTracePrefixType::");
puts(nodep->prefixType().ascii());
puts(", " + std::to_string(nodep->left()));

View File

@ -429,11 +429,11 @@ class GateOkVisitor final : public VNVisitorConst {
// We only allow a LHS ref for the var being set, and a RHS ref for
// something else being read.
AstVarScope* const vscp = nodep->varScopep();
if (nodep->access().isWriteOnly()) {
if (m_lhsVarRef) clearSimple(">1 write refs");
m_lhsVarRef = nodep;
} else {
AstVarScope* const vscp = nodep->varScopep();
// TODO: possible bug, should it be >= 1 as add is below?
if (m_readVscps.size() > 1) {
if (m_buffersOnly) clearSimple(">1 rhs varRefs");

View File

@ -39,13 +39,16 @@
#include "V3Trace.h"
#include "V3Ast.h"
#include "V3DupFinder.h"
#include "V3EmitCBase.h"
#include "V3Graph.h"
#include "V3Stats.h"
#include "V3UniqueNames.h"
#include <limits>
#include <set>
#include <unordered_map>
VL_DEFINE_DEBUG_FUNCTIONS;
@ -118,6 +121,8 @@ class TraceTraceVertex final : public V3GraphVertex {
AstTraceDecl* const m_nodep; // TRACEINC this represents
// nullptr, or other vertex with the real code() that duplicates this one
TraceTraceVertex* m_duplicatep = nullptr;
// When aliasing to a dtype parent, offset of the member within the dtype
uint32_t m_dtypeAliasOffset = 0;
public:
TraceTraceVertex(V3Graph* graphp, AstTraceDecl* nodep)
@ -134,6 +139,9 @@ public:
UASSERT_OBJ(!duplicatep(), nodep(), "Assigning duplicatep() to already duplicated node");
m_duplicatep = dupp;
}
void redirectDuplicatep(TraceTraceVertex* dupp) { m_duplicatep = dupp; }
uint32_t dtypeAliasOffset() const { return m_dtypeAliasOffset; }
void dtypeAliasOffset(uint32_t offset) { m_dtypeAliasOffset = offset; }
};
class TraceVarVertex final : public V3GraphVertex {
@ -162,8 +170,10 @@ class TraceVisitor final : public VNVisitor {
// Cleared entire netlist
// AstCFunc::user1() // V3GraphVertex* for this node
// AstTraceDecl::user1() // V3GraphVertex* for this node
// AstTraceDecl::user2() // dtype decl cannot be used for _chg
// AstVarScope::user1() // V3GraphVertex* for this node
// AstStmtExpr::user2() // bool; walked next list for other ccalls
// AstVarRef::user2() // dtype V3TraceDecl* for this node
// Ast*::user3() // TraceActivityVertex* for this node
const VNUser1InUse m_inuser1;
const VNUser2InUse m_inuser2;
@ -183,6 +193,15 @@ class TraceVisitor final : public VNVisitor {
V3Graph m_graph; // Var/CFunc tracking
TraceActivityVertex* const m_alwaysVtxp; // "Always trace" vertex
bool m_finding = false; // Pass one of algorithm?
struct DtypeFuncs final {
public:
AstCFunc* fullFuncp = nullptr;
AstCFunc* chgFuncp = nullptr;
};
std::unordered_map<const AstNodeDType*, DtypeFuncs>
m_dtypeNonConstFuncs; // Full / Chg funcs per type
std::unordered_map<const AstNodeDType*, AstCFunc*> m_dtypeConstFuncs; // Const func per type
V3UniqueNames m_dtypeNames{""}; // Unique type func names
// Trace parallelism. Only VCD tracing can be parallelized at this time.
const uint32_t m_parallelism
@ -203,31 +222,114 @@ class TraceVisitor final : public VNVisitor {
UINFO(9, "Finding duplicates");
// Note uses user4
V3DupFinder dupFinder; // Duplicate code detection
// Compute member offsets within dtype instances incrementally.
// For each dtype member TraceDecl, stores its code offset within the
// dtype parent's code range.
std::unordered_map<const AstTraceDecl*, uint32_t> memberOffsets;
std::unordered_map<const AstTraceDecl*, uint32_t> runningOffset;
// For fixup pass: track dups redirected to dtype parents, so we can
// fix them if the parent's user2 is later set during the loop.
// Maps dup vertex -> original canonical member vertex.
std::vector<std::pair<TraceTraceVertex*, TraceTraceVertex*>> dtypeParentRedirects;
// Hash all of the traced values and find if there are any duplicates
for (V3GraphVertex& vtx : m_graph.vertices()) {
if (TraceTraceVertex* const vvertexp = vtx.cast<TraceTraceVertex>()) {
const AstTraceDecl* const nodep = vvertexp->nodep();
AstTraceDecl* const nodep = vvertexp->nodep();
if (nodep->dtypeCallp()) continue;
if (nodep->dtypeDeclp()) {
uint32_t& offset = runningOffset[nodep->dtypeDeclp()];
memberOffsets[nodep] = offset;
offset += nodep->codeInc();
}
UASSERT_OBJ(!vvertexp->duplicatep(), nodep, "Should not be a duplicate");
const auto dupit = dupFinder.findDuplicate(nodep->valuep());
const auto dupit = dupFinder.findDuplicate(nodep);
if (dupit == dupFinder.end()) {
dupFinder.insert(nodep->valuep());
dupFinder.insert(nodep);
} else {
const AstTraceDecl* const dupDeclp = VN_AS(dupit->second->backp(), TraceDecl);
AstTraceDecl* const dupDeclp = VN_AS(dupit->second, TraceDecl);
UASSERT_OBJ(dupDeclp, nodep, "Trace duplicate of wrong type");
TraceTraceVertex* const dupvertexp
= dupDeclp->user1u().toGraphVertex()->cast<TraceTraceVertex>();
UINFO(8, " Orig " << nodep);
UINFO(8, " dup " << dupDeclp);
// Mark the hashed node as the original and our
// iterating node as duplicated
vvertexp->duplicatep(dupvertexp);
UINFO(8, " Orig " << dupDeclp << endl);
UINFO(8, " dup " << nodep << endl);
if (dupDeclp->dtypeDeclp() && !dupDeclp->dtypeDeclp()->user2()) {
AstTraceDecl* const dtypeParentp = dupDeclp->dtypeDeclp();
TraceTraceVertex* const dtypeVtxp
= dtypeParentp->user1u().toGraphVertex()->cast<TraceTraceVertex>();
const auto it2 = memberOffsets.find(dupDeclp);
UASSERT_OBJ(it2 != memberOffsets.end(), dupDeclp,
"Member offset not precomputed");
vvertexp->duplicatep(dtypeVtxp);
vvertexp->dtypeAliasOffset(it2->second);
dtypeParentRedirects.emplace_back(vvertexp, dupvertexp);
} else {
vvertexp->duplicatep(dupvertexp);
}
if (nodep->dtypeDeclp()) nodep->dtypeDeclp()->user2(true);
}
}
}
for (const auto& pair : dtypeParentRedirects) {
TraceTraceVertex* const dupVtxp = pair.first;
TraceTraceVertex* const memberVtxp = pair.second;
const AstTraceDecl* const parentDeclp = dupVtxp->duplicatep()->nodep();
if (parentDeclp->user2()) {
dupVtxp->redirectDuplicatep(memberVtxp);
dupVtxp->dtypeAliasOffset(0);
}
}
if (dumpLevel() || debug() >= 9)
dupFinder.dumpFile(v3Global.debugFilename("trace") + ".hash", false);
}
void graphDtypePrune() {
for (V3GraphVertex* const vtxp : m_graph.vertices().unlinkable()) {
if (TraceTraceVertex* const vvertexp = vtxp->cast<TraceTraceVertex>()) {
AstTraceDecl* const declp = vvertexp->nodep();
// This skips the dtype sub-func optimization if a var is affected by multiple
// activities. We really only need to do this for _chg funcs (and not decls,
// _const and _full) but it's simpiler to do it all one way or the other.
if (declp) {
if (declp->user2() || (declp->dtypeDeclp() && !declp->dtypeDeclp()->user2())) {
AstCCall* const callp = declp->dtypeCallp();
if (callp) {
AstNode* stmtexprp = callp->backp();
VL_DO_DANGLING(pushDeletep(stmtexprp->unlinkFrBack()), stmtexprp);
} else {
bool emptyScope;
do {
emptyScope = false;
AstNode* const declBackp = declp->backp();
AstNode* const declNextp = declp->nextp();
if (VN_IS(declBackp, TracePushPrefix)
&& VN_IS(declNextp, TracePopPrefix)) {
VL_DO_DANGLING(pushDeletep(declBackp->unlinkFrBack()),
declBackp);
VL_DO_DANGLING(pushDeletep(declNextp->unlinkFrBack()),
declNextp);
emptyScope = true;
}
} while (emptyScope);
}
// Can't purge until we finish this pass
pushDeletep(declp->unlinkFrBack());
vvertexp->rerouteEdges(&m_graph);
vvertexp->unlinkDelete(&m_graph);
}
declp->dtypeDeclp(nullptr);
}
}
}
}
void graphSimplify(bool initial) {
if (initial) {
// Remove all variable nodes
@ -481,24 +583,26 @@ class TraceVisitor final : public VNVisitor {
}
AstCFunc* newCFunc(VTraceType traceType, AstCFunc* topFuncp, uint32_t funcNum,
uint32_t baseCode = 0) {
uint32_t baseCode = 0, const AstTraceDecl* const declp = nullptr,
bool declSub = false) {
// Create new function
const bool isTopFunc = topFuncp == nullptr;
const bool isTopFunc = !declp && topFuncp == nullptr;
std::string funcName;
if (isTopFunc) {
if (traceType == VTraceType::CONSTANT) {
funcName = "trace_const";
} else if (traceType == VTraceType::FULL) {
funcName = "trace_full";
} else {
funcName = "trace_chg";
}
if (isTopFunc || declp) {
funcName = traceType.func_prefix();
} else {
funcName = topFuncp->name();
funcName += "_sub";
}
funcName += "_";
funcName += cvtToStr(funcNum);
if (declp) {
funcName += "_dtype";
if (declSub) funcName += "_sub";
funcName += "__";
funcName = m_dtypeNames.get(funcName);
} else {
funcName += "_";
funcName += cvtToStr(funcNum);
}
FileLine* const flp = m_topScopep->fileline();
AstCFunc* const funcp = new AstCFunc{flp, funcName, m_topScopep};
@ -511,7 +615,10 @@ class TraceVisitor final : public VNVisitor {
m_topScopep->addBlocksp(funcp);
const std::string bufArg
= v3Global.opt.traceClassBase()
+ "::" + (v3Global.opt.useTraceOffload() ? "OffloadBuffer" : "Buffer") + "* bufp";
+ "::" + (v3Global.opt.useTraceOffload() ? "OffloadBuffer" : "Buffer") + "* bufp"
+ (declp ? (", uint32_t offset, const " + declp->dtypep()->cType("", true, true)
+ " __VdtypeVar")
: "");
if (isTopFunc) {
// Top functions
funcp->argTypes("void* voidSelf, " + bufArg);
@ -546,35 +653,82 @@ class TraceVisitor final : public VNVisitor {
if (traceType != VTraceType::CHANGE) {
// Full dump sub function
funcp->addStmtsp(new AstCStmt{flp, //
"uint32_t* const oldp VL_ATTR_UNUSED = "
"bufp->oldp(vlSymsp->__Vm_baseCode);\n"});
string("uint32_t* const oldp VL_ATTR_UNUSED = "
"bufp->oldp(vlSymsp->__Vm_baseCode")
+ (declp ? " + offset" : "") + ");\n"});
} else {
// Change dump sub function
if (v3Global.opt.useTraceOffload()) {
funcp->addStmtsp(new AstCStmt{flp, //
"const uint32_t base VL_ATTR_UNUSED = "
"vlSymsp->__Vm_baseCode + "
+ cvtToStr(baseCode) + ";\n"});
+ (declp ? " offset" : cvtToStr(baseCode))
+ ";\n"});
funcp->addStmtsp(
new AstCStmt{flp, "(void)bufp; // Prevent unused variable warning\n"});
} else {
funcp->addStmtsp(new AstCStmt{flp, //
"uint32_t* const oldp VL_ATTR_UNUSED = "
"bufp->oldp(vlSymsp->__Vm_baseCode + "
+ cvtToStr(baseCode) + ");\n"});
+ (declp ? " offset" : cvtToStr(baseCode))
+ ");\n"});
}
}
// Add call to top function
AstCCall* const callp = new AstCCall{funcp->fileline(), funcp};
callp->dtypeSetVoid();
callp->argTypes("bufp");
topFuncp->addStmtsp(callp->makeStmt());
if (!declp) {
// Add call to top function
AstCCall* const callp = new AstCCall{funcp->fileline(), funcp};
callp->dtypeSetVoid();
callp->argTypes("bufp");
topFuncp->addStmtsp(callp->makeStmt());
}
}
// Done
UINFO(5, " newCFunc " << funcp);
return funcp;
}
AstCFunc* newCDtypeSubFunc(VTraceType traceType, const AstTraceDecl* const declp,
AstCFunc* parentp) {
AstCFunc* const funcp = newCFunc(traceType, nullptr, 0, 0, declp, true);
FileLine* const flp = m_topScopep->fileline();
AstCCall* const callp = new AstCCall{flp, funcp};
callp->dtypeSetVoid();
callp->argTypes("bufp, offset, __VdtypeVar");
parentp->addStmtsp(callp->makeStmt());
return funcp;
}
AstCFunc* createConstDtypeTraceFunctions(const AstTraceDecl* declp) {
const AstNodeDType* const dtypep = declp->dtypep()->skipRefp();
auto pair = m_dtypeConstFuncs.emplace(dtypep, nullptr);
if (pair.second) {
FileLine* const flp = declp->fileline();
AstCFunc* const funcp = newCFunc(VTraceType::CONSTANT, nullptr, 0, 0, declp);
bool first = true;
for (AstNode* callStmtp = declp->dtypeCallp()->funcp()->stmtsp(); callStmtp;
callStmtp = callStmtp->nextp()) {
const AstCCall* const callp
= VN_CAST(VN_CAST(callStmtp, StmtExpr)->exprp(), CCall);
bool onlyOne = first && !callStmtp->nextp();
AstCFunc* const subFuncp
= onlyOne ? funcp : newCDtypeSubFunc(VTraceType::CONSTANT, declp, funcp);
for (AstNode* stmtp = callp->funcp()->stmtsp(); stmtp; stmtp = stmtp->nextp()) {
if (AstTraceDecl* const fieldDeclp = VN_CAST(stmtp, TraceDecl)) {
AstTraceInc* const incp
= new AstTraceInc{flp, fieldDeclp, VTraceType::CONSTANT};
subFuncp->addStmtsp(incp);
}
}
first = false;
}
pair.first->second = funcp;
}
return pair.first->second;
}
void createConstTraceFunctions(const TraceVec& traces) {
const int splitLimit = v3Global.opt.outputSplitCTrace() ? v3Global.opt.outputSplitCTrace()
: std::numeric_limits<int>::max();
@ -583,18 +737,12 @@ class TraceVisitor final : public VNVisitor {
uint32_t subFuncNum = 0;
AstCFunc* subFuncp = nullptr;
int subStmts = 0;
std::vector<const TraceTraceVertex*> duplicates;
for (auto it = traces.cbegin(); it != traces.end(); ++it) {
const TraceTraceVertex* const vtxp = it->second;
AstTraceDecl* const declp = vtxp->nodep();
if (const TraceTraceVertex* const canonVtxp = vtxp->duplicatep()) {
// This is a duplicate trace node. We will assign the signal
// number to the canonical node, and emit this as an alias, so
// no need to create a TraceInc node.
const AstTraceDecl* const canonDeclp = canonVtxp->nodep();
UASSERT_OBJ(!canonVtxp->duplicatep(), canonDeclp, "Canonical node is a duplicate");
UASSERT_OBJ(canonDeclp->codeAssigned(), canonDeclp,
"Canonical node should have code assigned already");
declp->code(canonDeclp->code());
if (vtxp->duplicatep()) {
duplicates.push_back(vtxp);
continue;
}
@ -616,11 +764,71 @@ class TraceVisitor final : public VNVisitor {
++subFuncNum;
}
FileLine* const flp = declp->fileline();
AstTraceInc* const incp = new AstTraceInc{flp, declp, VTraceType::CONSTANT};
subFuncp->addStmtsp(incp);
subStmts += incp->nodeCount();
if (declp->dtypeCallp()) {
AstCFunc* const funcp = createConstDtypeTraceFunctions(declp);
AstNodeExpr* argsp = nullptr;
argsp = AstNode::addNext(argsp, declp->valuep()->cloneTree(false));
AstCCall* const callp = new AstCCall{flp, funcp, argsp};
callp->dtypeSetVoid();
callp->argTypes(callp->argTypes() + "bufp, " + std::to_string(declp->code()));
subFuncp->addStmtsp(callp->makeStmt());
subStmts += 1;
} else {
AstTraceInc* const incp = new AstTraceInc{flp, declp, VTraceType::CONSTANT};
subFuncp->addStmtsp(incp);
subStmts += incp->nodeCount();
}
}
}
// Assign codes to duplicate nodes from their canonicals
for (const TraceTraceVertex* const vtxp : duplicates) {
AstTraceDecl* const declp = vtxp->nodep();
const TraceTraceVertex* const canonVtxp = vtxp->duplicatep();
const AstTraceDecl* const canonDeclp = canonVtxp->nodep();
UASSERT_OBJ(!canonVtxp->duplicatep(), canonDeclp, "Canonical node is a duplicate");
UASSERT_OBJ(canonDeclp->codeAssigned(), canonDeclp,
"Canonical node should have code assigned already");
declp->code(canonDeclp->code() + vtxp->dtypeAliasOffset());
}
}
DtypeFuncs createNonConstDtypeTraceFunctions(const AstTraceDecl* declp) {
AstNodeDType* dtypep = declp->dtypep()->skipRefp();
auto pair = m_dtypeNonConstFuncs.emplace(dtypep, DtypeFuncs{});
if (pair.second) {
FileLine* const flp = declp->fileline();
AstCFunc* const fullFuncp = newCFunc(VTraceType::FULL, nullptr, 0, 0, declp);
AstCFunc* const chgFuncp = newCFunc(VTraceType::CHANGE, nullptr, 0, 0, declp);
bool first = true;
for (AstNode* callStmtp = declp->dtypeCallp()->funcp()->stmtsp(); callStmtp;
callStmtp = callStmtp->nextp()) {
const AstCCall* const callp
= VN_CAST(VN_CAST(callStmtp, StmtExpr)->exprp(), CCall);
bool onlyOne = first && !callStmtp->nextp();
AstCFunc* const fullSubFuncp
= onlyOne ? fullFuncp : newCDtypeSubFunc(VTraceType::FULL, declp, fullFuncp);
AstCFunc* const chgSubFuncp
= onlyOne ? chgFuncp : newCDtypeSubFunc(VTraceType::CHANGE, declp, chgFuncp);
for (AstNode* stmtp = callp->funcp()->stmtsp(); stmtp; stmtp = stmtp->nextp()) {
if (AstTraceDecl* const fieldDeclp = VN_CAST(stmtp, TraceDecl)) {
AstTraceInc* const incFullp
= new AstTraceInc{flp, fieldDeclp, VTraceType::FULL};
fullSubFuncp->addStmtsp(incFullp);
AstTraceInc* const incChgp
= new AstTraceInc{flp, fieldDeclp, VTraceType::CHANGE};
chgSubFuncp->addStmtsp(incChgp);
}
}
first = false;
}
pair.first->second = {.fullFuncp = fullFuncp, .chgFuncp = chgFuncp};
}
return pair.first->second;
}
void createNonConstTraceFunctions(const TraceVec& traces, uint32_t nAllCodes,
@ -698,24 +906,44 @@ class TraceVisitor final : public VNVisitor {
// Add TraceInc nodes
FileLine* const flp = declp->fileline();
AstTraceInc* const incFulp = new AstTraceInc{flp, declp, VTraceType::FULL};
subFulFuncp->addStmtsp(incFulp);
AstTraceInc* const incChgp
= new AstTraceInc{flp, declp, VTraceType::CHANGE, baseCode};
ifp->addThensp(incChgp);
if (declp->dtypeCallp()) {
DtypeFuncs funcs = createNonConstDtypeTraceFunctions(declp);
AstNodeExpr* argsp = nullptr;
argsp = AstNode::addNext(argsp, declp->valuep()->cloneTree(false));
AstCCall* const callFullp = new AstCCall{flp, funcs.fullFuncp, argsp};
callFullp->dtypeSetVoid();
callFullp->argTypes(callFullp->argTypes() + "bufp, "
+ std::to_string(declp->code()));
subFulFuncp->addStmtsp(callFullp->makeStmt());
argsp = nullptr;
argsp = AstNode::addNext(argsp, declp->valuep()->cloneTree(false));
AstCCall* const callChgp = new AstCCall{flp, funcs.chgFuncp, argsp};
callChgp->dtypeSetVoid();
callChgp->argTypes(callChgp->argTypes() + "bufp, "
+ std::to_string(declp->code()));
ifp->addThensp(callChgp->makeStmt());
// Set the function index of the decl
declp->fidx(topFuncNum);
// Track splitting due to size
UASSERT_OBJ(incFulp->nodeCount() == incChgp->nodeCount(), declp,
"Should have equal cost");
const VNumRange range = declp->arrayRange();
if (range.ranged()) {
// 2x because each element is a TraceInc and a VarRef
subStmts += range.elements() * 2;
subStmts += 2;
} else {
subStmts += incChgp->nodeCount();
AstTraceInc* const incFulp = new AstTraceInc{flp, declp, VTraceType::FULL};
subFulFuncp->addStmtsp(incFulp);
AstTraceInc* const incChgp
= new AstTraceInc{flp, declp, VTraceType::CHANGE, baseCode};
ifp->addThensp(incChgp);
// Set the function index of the decl
declp->fidx(topFuncNum);
// Track splitting due to size
UASSERT_OBJ(incFulp->nodeCount() == incChgp->nodeCount(), declp,
"Should have equal cost");
const VNumRange range = declp->arrayRange();
if (range.ranged()) {
// 2x because each element is a TraceInc and a VarRef
subStmts += range.elements() * 2;
} else {
subStmts += incChgp->nodeCount();
}
}
// Track partitioning
@ -761,6 +989,8 @@ class TraceVisitor final : public VNVisitor {
void createTraceFunctions() {
// Detect and remove duplicate values
detectDuplicates();
graphDtypePrune();
m_graph.removeRedundantEdgesMax(&V3GraphEdge::followAlwaysTrue);
// Simplify & optimize the graph
@ -885,7 +1115,7 @@ class TraceVisitor final : public VNVisitor {
|| nodep->isCoroutine()) {
// Cannot treat a coroutine as slow, it may be resumed later
const bool slow = nodep->slow() && !nodep->isCoroutine();
V3GraphVertex* const activityVtxp = getActivityVertexp(nodep, slow);
TraceActivityVertex* const activityVtxp = getActivityVertexp(nodep, slow);
new V3GraphEdge{&m_graph, activityVtxp, funcVtxp, 1};
}
}
@ -895,7 +1125,7 @@ class TraceVisitor final : public VNVisitor {
}
void visit(AstTraceDecl* nodep) override {
UINFO(8, " TRACE " << nodep);
if (!m_finding) {
if (!m_finding && !nodep->inDtypeFunc()) {
V3GraphVertex* const vertexp = new TraceTraceVertex{&m_graph, nodep};
nodep->user1p(vertexp);
@ -906,10 +1136,11 @@ class TraceVisitor final : public VNVisitor {
}
}
void visit(AstVarRef* nodep) override {
UASSERT_OBJ(nodep->varScopep(), nodep, "No var scope?");
AstVarScope* const varscopep = nodep->varScopep();
V3GraphVertex* varVtxp = varscopep->user1u().toGraphVertex();
if (m_tracep) {
UASSERT_OBJ(nodep->varScopep(), nodep, "No var scope?");
UASSERT_OBJ(nodep->access().isReadOnly(), nodep, "Lvalue in trace? Should be const.");
V3GraphVertex* varVtxp = nodep->varScopep()->user1u().toGraphVertex();
if (!varVtxp) {
varVtxp = new TraceVarVertex{&m_graph, nodep->varScopep()};
nodep->varScopep()->user1p(varVtxp);
@ -920,12 +1151,23 @@ class TraceVisitor final : public VNVisitor {
|| nodep->varp()->isSigPublic()) { // Or ones user can change
new V3GraphEdge{&m_graph, m_alwaysVtxp, traceVtxp, 1};
}
if (m_tracep->dtypeCallp()) varscopep->user2p(m_tracep);
} else if (m_cfuncp && m_finding && nodep->access().isWriteOrRW()) {
UASSERT_OBJ(nodep->varScopep(), nodep, "No var scope?");
V3GraphVertex* const funcVtxp = getCFuncVertexp(m_cfuncp);
V3GraphVertex* const varVtxp = nodep->varScopep()->user1u().toGraphVertex();
if (varVtxp) { // else we're not tracing this signal
new V3GraphEdge{&m_graph, funcVtxp, varVtxp, 1};
AstTraceDecl* const declp = VN_AS(varscopep->user2p(), TraceDecl);
if (declp) {
V3GraphVertex* const cFuncVtxp = getCFuncVertexp(m_cfuncp);
for (const V3GraphEdge& edge : cFuncVtxp->inEdges()) {
V3GraphVertex* const activityp = edge.fromp();
if (!declp->user3p()) {
declp->user3p(activityp);
} else if (declp->user3u().toGraphVertex() != activityp) {
declp->user2(true);
}
}
}
}
}
}
@ -936,7 +1178,15 @@ public:
// CONSTRUCTORS
explicit TraceVisitor(AstNetlist* nodep)
: m_alwaysVtxp{new TraceActivityVertex{&m_graph, TraceActivityVertex::ACTIVITY_ALWAYS}} {
nodep->user2ClearTree(); // TraceDecl multiple activities flag
nodep->user3ClearTree(); // TraceDecl TraceActivityVertex (assumes we start at nullptr)
iterate(nodep);
nodep->foreach([](AstTraceDecl* const declp) {
if (declp->inDtypeFunc()) {
declp->valuep()->unlinkFrBack()->deleteTree();
declp->valuep(nullptr);
}
});
}
~TraceVisitor() override {
V3Stats::addStat("Tracing, Activity setters", m_statSetters);

View File

@ -24,13 +24,21 @@
#include "V3TraceDecl.h"
#include "V3Ast.h"
#include "V3Control.h"
#include "V3EmitCBase.h"
#include "V3Error.h"
#include "V3File.h"
#include "V3Global.h"
#include "V3Number.h"
#include "V3Stats.h"
#include "V3UniqueNames.h"
#include <cstdint>
#include <functional>
#include <limits>
#include <tuple>
#include <unordered_map>
#include <vector>
VL_DEFINE_DEBUG_FUNCTIONS;
@ -94,6 +102,10 @@ public:
// TraceDecl state, as a visitor of each AstNode
class TraceDeclVisitor final : public VNVisitor {
// NODE STATE
// AstCFunc::user1() // code offset for current type
// AstCFunc::user2() // VarScope for dtype functions
// STATE
AstTopScope* const m_topScopep; // The singleton AstTopScope
const AstScope* m_currScopep = nullptr; // Current scope being visited
@ -101,6 +113,15 @@ class TraceDeclVisitor final : public VNVisitor {
std::vector<AstCFunc*> m_topFuncps; // Top level trace initialization functions
std::vector<AstCFunc*> m_subFuncps; // Trace sub functions for this scope
std::set<const AstTraceDecl*> m_declUncalledps; // Declarations not called
std::unordered_map<const AstNodeDType*, AstCFunc*> m_dtypeFuncs; // Functions per type
AstCFunc* m_dtypeFuncp = nullptr; // Current type func
AstCFunc* m_dtypeSubFuncp = nullptr; // Current type sub func
const string m_dtypeArgs{", const char* name, uint32_t fidx, uint32_t c, "
"VerilatedTraceSigDirection direction"}; // Type func args
AstTraceDecl* m_dtypeDeclp = nullptr; // Current type func decl
V3UniqueNames m_dtypeNames{""}; // Unique names for dtype funcs
bool m_skipDtypeFunc = false; // Don't create a type func
uint32_t m_offset = std::numeric_limits<uint32_t>::max(); // Offset for types
int m_topFuncSize = 0; // Size of the top function currently being built
int m_subFuncSize = 0; // Size of the sub function currently being built
const int m_funcSizeLimit // Maximum size of a function
@ -255,6 +276,13 @@ class TraceDeclVisitor final : public VNVisitor {
}
void addToSubFunc(AstNodeStmt* stmtp) {
// TODO (maybe) -- sub funcs for dtype components
if (m_dtypeSubFuncp) {
if (m_subFuncSize > m_funcSizeLimit) newDeclSubFunc();
m_dtypeSubFuncp->addStmtsp(stmtp);
m_subFuncSize += stmtp->nodeCount();
return;
}
if (m_subFuncSize > m_funcSizeLimit || m_subFuncps.empty()) {
m_subFuncSize = 0;
//
@ -269,20 +297,38 @@ class TraceDeclVisitor final : public VNVisitor {
m_subFuncSize += stmtp->nodeCount();
}
void addTraceDecl(const VNumRange& arrayRange,
int widthOverride) { // If !=0, is packed struct/array where basicp size
// misreflects one element
AstTraceDecl* addTraceDecl(const VNumRange& arrayRange,
int widthOverride, // If !=0, is packed struct/array where basicp
// size misreflects one element
AstCCall* const dtypeCallp = nullptr) {
VNumRange bitRange;
if (widthOverride) {
bitRange = VNumRange{widthOverride - 1, 0};
} else if (const AstBasicDType* const bdtypep = m_traValuep->dtypep()->basicp()) {
bitRange = bdtypep->nrange();
}
FileLine* const flp = m_traVscp->fileline();
AstNodeExpr* valuep = m_traValuep->cloneTree(false);
const bool validOffset = m_offset != std::numeric_limits<uint32_t>::max();
AstTraceDecl* const newp
= new AstTraceDecl{m_traVscp->fileline(), m_traName, m_traVscp->varp(),
m_traValuep->cloneTree(false), bitRange, arrayRange};
= new AstTraceDecl{flp, m_traName, m_traVscp->varp(), valuep,
bitRange, arrayRange, dtypeCallp, validOffset};
if (validOffset) {
newp->code(m_offset);
if (!dtypeCallp) { m_offset += newp->codeInc(); }
valuep->foreach([&](AstVarRef* const refp) {
UASSERT_OBJ(refp->varScopep() == m_traVscp, refp,
"Trace decl expression references unexpected var");
refp->replaceWith(new AstCExpr{flp, "__VdtypeVar", m_traVscp->width()});
VL_DO_DANGLING(refp->deleteTree(), refp);
});
} else {
newp->dtypeDeclp(m_dtypeDeclp);
}
m_declUncalledps.emplace(newp);
addToSubFunc(newp);
return newp;
}
void addIgnore(const string& why) {
@ -398,6 +444,166 @@ class TraceDeclVisitor final : public VNVisitor {
});
}
bool isBasicIO() { return m_traVscp->varp()->isVLIO(); }
void newDeclSubFunc() {
FileLine* const flp = m_dtypeFuncp->fileline();
AstCFunc* const subFuncp = newCFunc(flp, m_dtypeNames.get("trace_init_dtype_sub__"));
subFuncp->argTypes(subFuncp->argTypes() + m_dtypeArgs);
AstCCall* const subCallp = new AstCCall{flp, subFuncp};
subCallp->dtypeSetVoid();
subCallp->argTypes("tracep, name, fidx, c, direction");
m_dtypeFuncp->addStmtsp(subCallp->makeStmt());
m_dtypeSubFuncp = subFuncp;
m_subFuncSize = 0;
}
void newDeclFunc(AstNodeDType* nodep) {
AstNodeDType* const skipTypep = nodep->skipRefp();
// offset and direction args added in EmitCImp
std::string callArgs{"tracep, \"" + VIdProtect::protect(m_traName) + "\""};
VL_RESTORER(m_traName);
FileLine* const flp = skipTypep->fileline();
auto pair = m_dtypeFuncs.emplace(skipTypep, nullptr);
AstCFunc** funcpp = &pair.first->second;
if (pair.second) {
*funcpp = newCFunc(flp, m_dtypeNames.get("trace_init_dtype__"));
(*funcpp)->argTypes((*funcpp)->argTypes() + m_dtypeArgs);
(*funcpp)->user2p(m_traVscp);
}
AstCCall* const callp = new AstCCall{flp, *funcpp};
callp->dtypeSetVoid();
callp->argTypes(callArgs);
m_dtypeDeclp = addTraceDecl(VNumRange{}, skipTypep->width(), callp);
addToSubFunc(callp->makeStmt());
if (pair.second) {
VL_RESTORER(m_offset);
m_offset = 0;
VL_RESTORER(m_dtypeFuncp);
VL_RESTORER(m_dtypeSubFuncp);
VL_RESTORER(m_subFuncSize);
m_dtypeFuncp = *funcpp;
newDeclSubFunc();
if (AstStructDType* const dtypep = VN_CAST(skipTypep, StructDType)) {
declStruct(dtypep, true);
} else if (AstUnpackArrayDType* const dtypep = VN_CAST(skipTypep, UnpackArrayDType)) {
declUnpackedArray(dtypep, true);
} else if (AstPackArrayDType* const dtypep = VN_CAST(skipTypep, PackArrayDType)) {
declPackedArray(dtypep, true);
} else {
UASSERT_OBJ(false, skipTypep, "Creating a trace function for an unexpected type");
}
m_dtypeFuncp->user1(m_offset);
}
m_dtypeDeclp->codeInc((*funcpp)->user1());
m_offset += m_dtypeDeclp->codeInc();
}
void declUnpackedArray(AstUnpackArrayDType* const nodep, bool newFunc) {
string prefixName(newFunc ? "name" : m_traName);
VL_RESTORER(m_traName);
FileLine* const flp = nodep->fileline();
addToSubFunc(new AstTracePushPrefix{flp, prefixName, VTracePrefixType::ARRAY_UNPACKED,
nodep->left(), nodep->right(), !newFunc});
if (VN_IS(nodep->subDTypep()->skipRefToEnump(),
BasicDType) // Nothing lower than this array
&& m_traVscp->dtypep()->skipRefToEnump() == nodep) { // Nothing above this array
// Simple 1-D array, use existing V3EmitC runtime loop rather than unrolling
// This will put "(index)" at end of signal name for us
if (m_traVscp->dtypep()->skipRefToEnump()->isString()) {
addIgnore("Unsupported: strings");
} else {
m_traName = "";
addTraceDecl(nodep->declRange(), 0);
}
} else {
AstNodeDType* const subtypep = nodep->subDTypep()->skipRefToEnump();
// Always iterate left index to right index
const int inc = nodep->rangep()->ascending() ? 1 : -1;
for (int i = nodep->left(); i != nodep->right() + inc; i += inc) {
VL_RESTORER(m_traValuep);
m_traName = '[' + std::to_string(i) + ']';
m_traValuep = m_traValuep->cloneTree(false);
m_traValuep = new AstArraySel{flp, m_traValuep, i - nodep->lo()};
m_traValuep->dtypep(subtypep);
iterate(subtypep);
VL_DO_DANGLING(m_traValuep->deleteTree(), m_traValuep);
}
}
addToSubFunc(new AstTracePopPrefix{flp});
}
void declPackedArray(AstPackArrayDType* const nodep, bool newFunc) {
string prefixName(newFunc ? "name" : m_traName);
AstNodeDType* const subtypep = nodep->subDTypep()->skipRefToEnump();
VL_RESTORER(m_traName);
FileLine* const flp = nodep->fileline();
addToSubFunc(new AstTracePushPrefix{flp, prefixName, VTracePrefixType::ARRAY_PACKED,
nodep->left(), nodep->right(), !newFunc});
// Always iterate left index to right index
const int inc = nodep->rangep()->ascending() ? 1 : -1;
for (int i = nodep->left(); i != nodep->right() + inc; i += inc) {
VL_RESTORER(m_traValuep);
m_traName = '[' + std::to_string(i) + ']';
const int lsb = (i - nodep->lo()) * subtypep->width();
m_traValuep = m_traValuep->cloneTree(false);
m_traValuep = new AstSel{flp, m_traValuep, lsb, subtypep->width()};
m_traValuep->dtypep(subtypep);
iterate(subtypep);
VL_DO_CLEAR(m_traValuep->deleteTree(), m_traValuep = nullptr);
}
addToSubFunc(new AstTracePopPrefix{flp});
}
void declStruct(AstStructDType* const nodep, bool newFunc) {
FileLine* const flp = nodep->fileline();
string prefixName(newFunc ? "name" : m_traName);
int nMembers = 0;
for (AstNode* mp = nodep->membersp(); mp; mp = mp->nextp()) ++nMembers;
if (!nodep->packed()) {
addToSubFunc(new AstTracePushPrefix{flp, prefixName, //
VTracePrefixType::STRUCT_UNPACKED, nMembers, 0,
!newFunc});
for (const AstMemberDType *itemp = nodep->membersp(), *nextp; itemp; itemp = nextp) {
nextp = VN_AS(itemp->nextp(), MemberDType);
AstNodeDType* const subtypep = itemp->subDTypep()->skipRefToEnump();
m_traName = itemp->prettyName();
VL_RESTORER(m_traValuep);
m_traValuep = m_traValuep->cloneTree(false);
m_traValuep = new AstStructSel{flp, m_traValuep, itemp->name()};
m_traValuep->dtypep(subtypep);
iterate(subtypep);
VL_DO_DANGLING(m_traValuep->deleteTree(), m_traValuep);
}
addToSubFunc(new AstTracePopPrefix{flp});
} else {
addToSubFunc(new AstTracePushPrefix{flp, prefixName, //
VTracePrefixType::STRUCT_PACKED, nMembers, 0,
!newFunc});
for (const AstMemberDType *itemp = nodep->membersp(), *nextp; itemp; itemp = nextp) {
nextp = VN_AS(itemp->nextp(), MemberDType);
AstNodeDType* const subtypep = itemp->subDTypep()->skipRefToEnump();
m_traName = itemp->prettyName();
VL_RESTORER(m_traValuep);
m_traValuep = m_traValuep->cloneTree(false);
m_traValuep = new AstSel{flp, m_traValuep, itemp->lsb(), subtypep->width()};
m_traValuep->dtypep(subtypep);
iterate(subtypep);
VL_DO_DANGLING(m_traValuep->deleteTree(), m_traValuep);
}
addToSubFunc(new AstTracePopPrefix{flp});
}
}
// VISITORS
void visit(AstScope* nodep) override {
UINFO(9, "visit " << nodep);
@ -545,10 +751,14 @@ class TraceDeclVisitor final : public VNVisitor {
// VISITORS - Data types when tracing
void visit(AstConstDType* nodep) override {
if (!m_traVscp) return;
VL_RESTORER(m_offset);
VL_RESTORER(m_skipDtypeFunc);
m_skipDtypeFunc = true;
iterate(nodep->subDTypep()->skipRefToEnump());
}
void visit(AstRefDType* nodep) override {
if (!m_traVscp) return;
VL_RESTORER(m_offset);
iterate(nodep->subDTypep()->skipRefToEnump());
}
void visit(AstIfaceRefDType* /*nodep*/) override {
@ -570,39 +780,15 @@ class TraceDeclVisitor final : public VNVisitor {
return;
}
VL_RESTORER(m_traName);
FileLine* const flp = nodep->fileline();
VL_RESTORER(m_skipDtypeFunc);
VL_RESTORER(m_dtypeDeclp);
if (isBasicIO()) m_skipDtypeFunc = true;
addToSubFunc(new AstTracePushPrefix{flp, m_traName, VTracePrefixType::ARRAY_UNPACKED,
nodep->left(), nodep->right()});
if (VN_IS(nodep->subDTypep()->skipRefToEnump(),
BasicDType) // Nothing lower than this array
&& m_traVscp->dtypep()->skipRefToEnump() == nodep) { // Nothing above this array
// Simple 1-D array, use existing V3EmitC runtime loop rather than unrolling
// This will put "(index)" at end of signal name for us
if (m_traVscp->dtypep()->skipRefToEnump()->isString()) {
addIgnore("Unsupported: strings");
} else {
m_traName = "";
addTraceDecl(nodep->declRange(), 0);
}
} else {
AstNodeDType* const subtypep = nodep->subDTypep()->skipRefToEnump();
// Always iterate left index to right index
const int inc = nodep->rangep()->ascending() ? 1 : -1;
for (int i = nodep->left(); i != nodep->right() + inc; i += inc) {
VL_RESTORER(m_traValuep);
m_traName = '[' + std::to_string(i) + ']';
m_traValuep = m_traValuep->cloneTree(false);
m_traValuep = new AstArraySel{flp, m_traValuep, i - nodep->lo()};
m_traValuep->dtypep(subtypep);
iterate(subtypep);
VL_DO_DANGLING(m_traValuep->deleteTree(), m_traValuep);
}
if (!(m_skipDtypeFunc || m_dtypeDeclp)) {
VL_RESTORER(m_offset);
newDeclFunc(nodep);
}
addToSubFunc(new AstTracePopPrefix{flp});
declUnpackedArray(nodep, false);
}
void visit(AstPackArrayDType* nodep) override {
if (!m_traVscp) return;
@ -625,26 +811,15 @@ class TraceDeclVisitor final : public VNVisitor {
}
}
VL_RESTORER(m_traName);
FileLine* const flp = nodep->fileline();
VL_RESTORER(m_skipDtypeFunc);
VL_RESTORER(m_dtypeDeclp);
if (isBasicIO()) m_skipDtypeFunc = true;
addToSubFunc(new AstTracePushPrefix{flp, m_traName, VTracePrefixType::ARRAY_PACKED,
nodep->left(), nodep->right()});
// Always iterate left index to right index
const int inc = nodep->rangep()->ascending() ? 1 : -1;
for (int i = nodep->left(); i != nodep->right() + inc; i += inc) {
VL_RESTORER(m_traValuep);
m_traName = '[' + std::to_string(i) + ']';
const int lsb = (i - nodep->lo()) * subtypep->width();
m_traValuep = m_traValuep->cloneTree(false);
m_traValuep = new AstSel{flp, m_traValuep, lsb, subtypep->width()};
m_traValuep->dtypep(subtypep);
iterate(subtypep);
VL_DO_CLEAR(m_traValuep->deleteTree(), m_traValuep = nullptr);
if (!(m_skipDtypeFunc || m_dtypeDeclp)) {
VL_RESTORER(m_offset);
newDeclFunc(nodep);
}
addToSubFunc(new AstTracePopPrefix{flp});
declPackedArray(nodep, false);
}
void visit(AstStructDType* nodep) override {
if (!m_traVscp) return;
@ -657,47 +832,26 @@ class TraceDeclVisitor final : public VNVisitor {
return;
}
VL_RESTORER(m_traName);
FileLine* const flp = nodep->fileline();
VL_RESTORER(m_skipDtypeFunc);
VL_RESTORER(m_dtypeDeclp);
if (isBasicIO()) m_skipDtypeFunc = true;
int nMembers = 0;
for (AstNode* mp = nodep->membersp(); mp; mp = mp->nextp()) ++nMembers;
if (!nodep->packed()) {
addToSubFunc(new AstTracePushPrefix{flp, m_traName, //
VTracePrefixType::STRUCT_UNPACKED, nMembers});
for (const AstMemberDType *itemp = nodep->membersp(), *nextp; itemp; itemp = nextp) {
nextp = VN_AS(itemp->nextp(), MemberDType);
AstNodeDType* const subtypep = itemp->subDTypep()->skipRefToEnump();
m_traName = itemp->prettyName();
VL_RESTORER(m_traValuep);
m_traValuep = m_traValuep->cloneTree(false);
m_traValuep = new AstStructSel{flp, m_traValuep, itemp->name()};
m_traValuep->dtypep(subtypep);
iterate(subtypep);
VL_DO_DANGLING(m_traValuep->deleteTree(), m_traValuep);
}
addToSubFunc(new AstTracePopPrefix{flp});
} else {
addToSubFunc(new AstTracePushPrefix{flp, m_traName, //
VTracePrefixType::STRUCT_PACKED, nMembers});
for (const AstMemberDType *itemp = nodep->membersp(), *nextp; itemp; itemp = nextp) {
nextp = VN_AS(itemp->nextp(), MemberDType);
AstNodeDType* const subtypep = itemp->subDTypep()->skipRefToEnump();
m_traName = itemp->prettyName();
VL_RESTORER(m_traValuep);
m_traValuep = m_traValuep->cloneTree(false);
m_traValuep = new AstSel{flp, m_traValuep, itemp->lsb(), subtypep->width()};
m_traValuep->dtypep(subtypep);
iterate(subtypep);
VL_DO_DANGLING(m_traValuep->deleteTree(), m_traValuep);
}
addToSubFunc(new AstTracePopPrefix{flp});
// Only create sub functions for top-level structs, i.e. don't have struct funcs
// call other struct funcs for child types. This could easily be done for decl funcs
// but full / chg funcs would require copying / aligning data for child types or more
// complicated / wonky / generalized data access.
if (!(m_skipDtypeFunc || m_dtypeDeclp)) {
VL_RESTORER(m_offset);
newDeclFunc(nodep);
}
declStruct(nodep, false);
}
void visit(AstUnionDType* nodep) override {
if (!m_traVscp) return;
VL_RESTORER(m_skipDtypeFunc);
m_skipDtypeFunc = true;
if (nodep->packed() && !v3Global.opt.traceStructs()) {
// Everything downstream is packed, so deal with as one trace unit
// This may not be the nicest for user presentation, but is

View File

@ -2634,49 +2634,85 @@ class VlTest:
case _:
self.error("Unknown trace file format " + traceFn)
def _vcd_read(self, filename: str) -> dict:
data = {}
@staticmethod
def _vcd_parse_header(filename: str, root_scope: 'str | None' = None) -> 'tuple[dict, dict]':
"""Parse VCD header into hierarchy data and signal-code mapping.
Returns (hier_data, var_codes) where:
hier_data: dict used by _vcd_read for hierarchy comparison
(scope paths -> scope description, var paths -> $var prefix,
attr paths -> $attrbegin text)
var_codes: dict mapping 'scope.signal' -> VCD code identifier
"""
hier_data: dict = {}
var_codes: dict = {}
hier_stack = [root_scope] if root_scope else []
attr: list = []
with open(filename, 'r', encoding='latin-1') as fh:
hier_stack = ["TOP"]
var = []
attr = []
for line in fh:
match1 = re.search(r'\$scope (\S*)\s+(\S+)', line)
match2 = re.search(r'(\$var \S+\s+\d+\s+)\S+\s+(.+)\s+\$end', line)
match3 = re.search(r'(\$attrbegin .* \$end)', line)
line = line.rstrip()
# print("VR"+ ' '*len(hier_stack) +" L " + line)
if match1: # $scope
name = match1.group(2)
# print("VR"+ ' '*len(hier_stack) +" scope " + line)
hier_stack += [name]
m_scope = re.search(r'\$scope\s+(\S*)\s+(\S+)', line)
m_var = re.search(r'(\$var\s+\S+\s+\d+\s+)(\S+)\s+(.+)\s+\$end', line)
m_attr = re.search(r'(\$attrbegin .* \$end)', line)
if m_scope:
scope_type = m_scope.group(1)
name = m_scope.group(2)
hier_stack.append(name)
scope = '.'.join(hier_stack)
data[scope] = match1.group(1) + " " + name
hier_data[scope] = scope_type + " " + name
if attr:
data[scope + "#"] = " ".join(attr)
hier_data[scope + "#"] = " ".join(attr)
attr = []
elif match2: # $var
# print("VR"+ ' '*len(hier_stack) +" var " + line)
elif m_var:
scope = '.'.join(hier_stack)
var = match2.group(2)
data[scope + "." + var] = match2.group(1)
decl_prefix = m_var.group(1)
code = m_var.group(2)
var_name = m_var.group(3)
hier_data[scope + "." + var_name] = decl_prefix
if attr:
data[scope + "." + var + "#"] = " ".join(attr)
hier_data[scope + "." + var_name + "#"] = " ".join(attr)
attr = []
elif match3: # $attrbegin
# print("VR"+ ' '*len(hier_stack) +" attr " + line)
attr.append(match3.group(1))
bare_name = var_name.split()[0]
var_codes[scope + "." + bare_name] = code
elif m_attr:
attr.append(m_attr.group(1))
elif re.search(r'\$enddefinitions', line):
break
n = len(re.findall(r'\$upscope', line))
if n:
for i in range(0, n): # pylint: disable=unused-variable
# print("VR"+ ' '*len(hier_stack) +" upscope " + line)
for _i in range(0, n):
hier_stack.pop()
if attr:
self.error(f"Unhandled attribute: {attr}")
return hier_data, var_codes
def _vcd_read(self, filename: str) -> dict:
data, _ = self._vcd_parse_header(filename, root_scope="TOP")
return data
def vcd_extract_codes(self, filename: str) -> dict:
_, codes = self._vcd_parse_header(filename)
return codes
def vcd_check_aliased(self, codes: dict, sig_a: str, sig_b: str) -> None:
code_a = codes.get(sig_a)
code_b = codes.get(sig_b)
if code_a is None:
self.error(f"Signal '{sig_a}' not found in VCD")
if code_b is None:
self.error(f"Signal '{sig_b}' not found in VCD")
if code_a != code_b:
self.error(f"Expected '{sig_a}' (code {code_a}) to alias "
f"'{sig_b}' (code {code_b})")
def vcd_check_not_aliased(self, codes: dict, sig_a: str, sig_b: str) -> None:
code_a = codes.get(sig_a)
code_b = codes.get(sig_b)
if code_a is None:
self.error(f"Signal '{sig_a}' not found in VCD")
if code_b is None:
self.error(f"Signal '{sig_b}' not found in VCD")
if code_a == code_b:
self.error(f"Expected '{sig_a}' and '{sig_b}' to have different codes, "
f"both have code {code_a}")
def inline_checks(self) -> None:
covfn = self.coverage_filename
contents = self.file_contents(covfn)
@ -2771,7 +2807,7 @@ class VlTest:
contents = self.file_contents(filename)
if contents == "_Already_Errored_":
return
count = len(re.findall(regexp, contents))
count = len(re.findall(regexp, contents, re.MULTILINE))
if expcount != count:
self.error("File_grep_count: " + filename + ": Got='" + str(count) + "' Expected='" +
str(expcount) + "' in regexp: '" + regexp + "'")
@ -2781,7 +2817,7 @@ class VlTest:
contents = self.file_contents(filename)
if contents == "_Already_Errored_":
return
match = re.search(regexp, contents)
match = re.search(regexp, contents, re.MULTILINE)
if match:
if expvalue is not None and str(expvalue) != match.group(1):
self.error("file_grep: " + filename + ": Got='" + match.group(1) +

View File

@ -13,7 +13,6 @@ module t;
initial begin
smaller = 8'hfa;
bigger = bigger_t'(signed'(smaller));
$display("%x", bigger); // NOCOMMIT
if (bigger != 16'hfffa) $stop;
$write("*-* All Finished *-*\n");

View File

@ -15,7 +15,7 @@ test.compile(verilator_flags2=["--trace-vcd", "--trace-structs", "--output-split
if test.vlt_all:
test.file_grep_count(test.obj_dir + "/V" + test.name + "__Trace__0.cpp",
r'void Vt.*trace_chg_.*sub.*{', 3)
r'void Vt.*trace_chg_.*sub.*{', 3 if test.vltmt else 1)
test.execute()

View File

@ -0,0 +1,18 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
import vltest_bootstrap
test.scenarios("simulator_st")
test.compile(verilator_flags2=["--trace", "--trace-structs"])
test.execute()
test.passes()

View File

@ -0,0 +1,40 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2026 Wilson Snyder
// SPDX-License-Identifier: CC0-1.0
module t (/*AUTOARG*/
// Inputs
clk
);
input clk;
int cyc;
initial cyc = 0;
always_ff @(posedge clk) begin
cyc <= cyc + 1;
if (cyc == 2) begin
$write("*-* All Finished *-*\n");
$finish;
end
end
sub the_sub (.*);
endmodule
module sub_sub
(
input logic [4-1:0][32-1:0] data_in
);
endmodule
module sub ();
logic [4-1:0][32-1:0][1-1:0] some_data;
sub_sub
the_sub_sub (
.data_in (some_data)
);
endmodule

View File

@ -38,6 +38,7 @@ module t (
typedef strp_t arru_strp_t[4:3];
strp_t v_strp;
strp_t v_strp2;
strp_strp_t v_strp_strp;
unip_strp_t v_unip_strp;
arrp_t v_arrp;
@ -98,6 +99,7 @@ module t (
always @(posedge clk) begin
cyc <= cyc + 1;
v_strp <= ~v_strp;
v_strp2 <= ~v_strp2;
v_strp_strp <= ~v_strp_strp;
v_unip_strp <= ~v_unip_strp;
v_arrp_strp <= ~v_arrp_strp;

View File

@ -1,5 +1,5 @@
$date
Sat Mar 14 09:16:56 2026
Tue Mar 31 17:14:29 2026
$end
$version
@ -19,106 +19,108 @@ $end
$var wire 1 ! clk $end
$var integer 32 # cyc [31:0] $end
$var bit 2 $ v_strp [1:0] $end
$var bit 4 % v_strp_strp [3:0] $end
$var bit 2 & v_unip_strp [1:0] $end
$var bit 2 ' v_arrp [2:1] $end
$var bit 4 ( v_arrp_arrp [3:0] $end
$var bit 4 ) v_arrp_strp [3:0] $end
$var bit 2 % v_strp2 [1:0] $end
$var bit 4 & v_strp_strp [3:0] $end
$var bit 2 ' v_unip_strp [1:0] $end
$var bit 2 ( v_arrp [2:1] $end
$var bit 4 ) v_arrp_arrp [3:0] $end
$var bit 4 * v_arrp_strp [3:0] $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array v_arru $end
$var bit 1 * v_arru[2] $end
$var bit 1 + v_arru[1] $end
$var bit 1 + v_arru[2] $end
$var bit 1 , v_arru[1] $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_arru $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array [4] $end
$var bit 1 , v_arru_arru[4][2] $end
$var bit 1 - v_arru_arru[4][1] $end
$var bit 1 - v_arru_arru[4][2] $end
$var bit 1 . v_arru_arru[4][1] $end
$upscope $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array [3] $end
$var bit 1 . v_arru_arru[3][2] $end
$var bit 1 / v_arru_arru[3][1] $end
$var bit 1 / v_arru_arru[3][2] $end
$var bit 1 0 v_arru_arru[3][1] $end
$upscope $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_arrp $end
$var bit 2 0 v_arru_arrp[4] [2:1] $end
$var bit 2 1 v_arru_arrp[3] [2:1] $end
$var bit 2 1 v_arru_arrp[4] [2:1] $end
$var bit 2 2 v_arru_arrp[3] [2:1] $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_strp $end
$var bit 2 2 v_arru_strp[4] [1:0] $end
$var bit 2 3 v_arru_strp[3] [1:0] $end
$var bit 2 3 v_arru_strp[4] [1:0] $end
$var bit 2 4 v_arru_strp[3] [1:0] $end
$upscope $end
$var real 64 4 v_real $end
$var real 64 5 v_real $end
$attrbegin array unpacked bounds 1 $end
$scope sv_array v_arr_real $end
$var real 64 5 v_arr_real[0] $end
$var real 64 6 v_arr_real[1] $end
$var real 64 6 v_arr_real[0] $end
$var real 64 7 v_arr_real[1] $end
$upscope $end
$var longint 64 7 v_chandle [63:0] $end
$var logic 64 8 v_str32x2 [63:0] $end
$var longint 64 8 v_chandle [63:0] $end
$var logic 64 9 v_str32x2 [63:0] $end
$attrbegin misc 07 "" 1 $end
$var int 32 9 v_enumed [31:0] $end
$var int 32 : v_enumed [31:0] $end
$attrbegin misc 07 "" 1 $end
$var int 32 : v_enumed2 [31:0] $end
$var int 32 ; v_enumed2 [31:0] $end
$attrbegin misc 07 "" 2 $end
$var logic 3 ; v_enumb [2:0] $end
$var logic 6 < v_enumb2_str [5:0] $end
$var logic 3 < v_enumb [2:0] $end
$var logic 6 = v_enumb2_str [5:0] $end
$attrbegin array unpacked bounds -8589934592 $end
$scope sv_array unpacked_array $end
$var logic 8 = unpacked_array[-2] [7:0] $end
$var logic 8 > unpacked_array[-1] [7:0] $end
$var logic 8 ? unpacked_array[0] [7:0] $end
$var logic 8 > unpacked_array[-2] [7:0] $end
$var logic 8 ? unpacked_array[-1] [7:0] $end
$var logic 8 @ unpacked_array[0] [7:0] $end
$upscope $end
$var bit 1 @ LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$var bit 1 A LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$scope module a_module_instantiation_with_a_very_long_name_that_once_its_signals_get_concatenated_and_inlined_will_almost_certainly_result_in_them_getting_hashed $end
$var parameter 32 A PARAM [31:0] $end
$upscope $end
$scope module p2 $end
$var parameter 32 B PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$scope module p2 $end
$var parameter 32 C PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$var parameter 32 D PARAM [31:0] $end
$upscope $end
$upscope $end
$upscope $end
$enddefinitions $end
#0
$dumpvars
b00000000000000000000000000000011 C
b00000000000000000000000000000010 B
b00000000000000000000000000000100 A
0@
b00000000000000000000000000000011 D
b00000000000000000000000000000010 C
b00000000000000000000000000000100 B
0A
b00000000 @
b00000000 ?
b00000000 >
b00000000 =
b000000 <
b000 ;
b000000 =
b000 <
b00000000000000000000000000000000 ;
b00000000000000000000000000000000 :
b00000000000000000000000000000000 9
b0000000000000000000000000000000000000000000000000000000011111111 8
b0000000000000000000000000000000000000000000000000000000000000000 7
b0000000000000000000000000000000000000000000000000000000011111111 9
b0000000000000000000000000000000000000000000000000000000000000000 8
r0 7
r0 6
r0 5
r0 4
b00 4
b00 3
b00 2
b00 1
b00 0
00
0/
0.
0-
0,
0+
0*
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000000 #
1"
@ -128,134 +130,140 @@ $end
1!
b00000000000000000000000000000001 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 0
b1111 *
b11 1
b11 2
b11 3
r0.1 4
r0.2 5
r0.3 6
b0000000000000000000000000000000100000000000000000000000011111110 8
b00000000000000000000000000000001 9
b00000000000000000000000000000010 :
b111 ;
b11 4
r0.1 5
r0.2 6
r0.3 7
b0000000000000000000000000000000100000000000000000000000011111110 9
b00000000000000000000000000000001 :
b00000000000000000000000000000010 ;
b111 <
#15
0!
#20
1!
b110 ;
b00000000000000000000000000000100 :
b00000000000000000000000000000010 9
b0000000000000000000000000000001000000000000000000000000011111101 8
r0.6 6
r0.4 5
r0.2 4
b110 <
b00000000000000000000000000000100 ;
b00000000000000000000000000000010 :
b0000000000000000000000000000001000000000000000000000000011111101 9
r0.6 7
r0.4 6
r0.2 5
b00 4
b00 3
b00 2
b00 1
b00 0
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000010 #
b111111 <
b111111 =
#25
0!
#30
1!
b110110 <
b110110 =
b00000000000000000000000000000011 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 0
b1111 *
b11 1
b11 2
b11 3
r0.3 4
r0.6000000000000001 5
r0.8999999999999999 6
b0000000000000000000000000000001100000000000000000000000011111100 8
b00000000000000000000000000000011 9
b00000000000000000000000000000110 :
b101 ;
b11 4
r0.3 5
r0.6000000000000001 6
r0.8999999999999999 7
b0000000000000000000000000000001100000000000000000000000011111100 9
b00000000000000000000000000000011 :
b00000000000000000000000000000110 ;
b101 <
#35
0!
#40
1!
b100 ;
b00000000000000000000000000001000 :
b00000000000000000000000000000100 9
b0000000000000000000000000000010000000000000000000000000011111011 8
r1.2 6
r0.8 5
r0.4 4
b100 <
b00000000000000000000000000001000 ;
b00000000000000000000000000000100 :
b0000000000000000000000000000010000000000000000000000000011111011 9
r1.2 7
r0.8 6
r0.4 5
b00 4
b00 3
b00 2
b00 1
b00 0
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000100 #
b101101 <
b101101 =
#45
0!
#50
1!
b100100 <
b100100 =
b00000000000000000000000000000101 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 0
b1111 *
b11 1
b11 2
b11 3
r0.5 4
r1 5
r1.5 6
b0000000000000000000000000000010100000000000000000000000011111010 8
b00000000000000000000000000000101 9
b00000000000000000000000000001010 :
b011 ;
b11 4
r0.5 5
r1 6
r1.5 7
b0000000000000000000000000000010100000000000000000000000011111010 9
b00000000000000000000000000000101 :
b00000000000000000000000000001010 ;
b011 <
#55
0!
#60
1!
b010 ;
b00000000000000000000000000001100 :
b00000000000000000000000000000110 9
b0000000000000000000000000000011000000000000000000000000011111001 8
r1.8 6
r1.2 5
r0.6 4
b010 <
b00000000000000000000000000001100 ;
b00000000000000000000000000000110 :
b0000000000000000000000000000011000000000000000000000000011111001 9
r1.8 7
r1.2 6
r0.6 5
b00 4
b00 3
b00 2
b00 1
b00 0
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000110 #
b011011 <
b011011 =

View File

@ -52,6 +52,8 @@
(cyc\[31\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_strp\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_strp\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_strp2\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_strp2\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_strp_strp\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_strp_strp\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_strp_strp\[2\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
@ -68,20 +70,20 @@
(v_arrp_strp\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arrp_strp\[2\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arrp_strp\[3\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru[1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru[2] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[3][1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[3][2] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[4][1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru[1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[4][2] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arrp[3]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_arrp[3]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_arru[4][1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[3][2] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[3][1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arrp[4]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_arrp[4]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_strp[3]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_strp[3]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_arrp[3]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_arrp[3]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_strp[4]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_strp[4]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_strp[3]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_strp[3]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_real\[0\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_real\[1\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_real\[2\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))

View File

@ -1,51 +1,52 @@
$version Generated by VerilatedVcd $end
$timescale 1ps $end
$scope module top $end
$var wire 1 : clk $end
$var wire 1 ; clk $end
$scope module $unit $end
$var wire 1 " global_bit $end
$upscope $end
$scope module t $end
$var wire 1 : clk $end
$var wire 1 ; clk $end
$var wire 32 # cyc [31:0] $end
$var wire 2 $ v_strp [1:0] $end
$var wire 4 % v_strp_strp [3:0] $end
$var wire 2 & v_unip_strp [1:0] $end
$var wire 2 ' v_arrp [2:1] $end
$var wire 4 ( v_arrp_arrp [3:0] $end
$var wire 4 ) v_arrp_strp [3:0] $end
$var wire 1 ; v_arru[1] $end
$var wire 2 % v_strp2 [1:0] $end
$var wire 4 & v_strp_strp [3:0] $end
$var wire 2 ' v_unip_strp [1:0] $end
$var wire 2 ( v_arrp [2:1] $end
$var wire 4 ) v_arrp_arrp [3:0] $end
$var wire 4 * v_arrp_strp [3:0] $end
$var wire 1 < v_arru[2] $end
$var wire 1 = v_arru_arru[3][1] $end
$var wire 1 > v_arru_arru[3][2] $end
$var wire 1 = v_arru[1] $end
$var wire 1 > v_arru_arru[4][2] $end
$var wire 1 ? v_arru_arru[4][1] $end
$var wire 1 @ v_arru_arru[4][2] $end
$var wire 2 * v_arru_arrp[3] [2:1] $end
$var wire 1 @ v_arru_arru[3][2] $end
$var wire 1 A v_arru_arru[3][1] $end
$var wire 2 + v_arru_arrp[4] [2:1] $end
$var wire 2 , v_arru_strp[3] [1:0] $end
$var wire 2 , v_arru_arrp[3] [2:1] $end
$var wire 2 - v_arru_strp[4] [1:0] $end
$var real 64 . v_real $end
$var real 64 0 v_arr_real[0] $end
$var real 64 2 v_arr_real[1] $end
$var wire 64 A v_chandle [63:0] $end
$var wire 64 4 v_str32x2 [63:0] $end
$var wire 32 6 v_enumed [31:0] $end
$var wire 32 7 v_enumed2 [31:0] $end
$var wire 3 8 v_enumb [2:0] $end
$var wire 6 9 v_enumb2_str [5:0] $end
$var wire 8 C unpacked_array[-2] [7:0] $end
$var wire 8 D unpacked_array[-1] [7:0] $end
$var wire 8 E unpacked_array[0] [7:0] $end
$var wire 1 F LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$var wire 2 . v_arru_strp[3] [1:0] $end
$var real 64 / v_real $end
$var real 64 1 v_arr_real[0] $end
$var real 64 3 v_arr_real[1] $end
$var wire 64 B v_chandle [63:0] $end
$var wire 64 5 v_str32x2 [63:0] $end
$var wire 32 7 v_enumed [31:0] $end
$var wire 32 8 v_enumed2 [31:0] $end
$var wire 3 9 v_enumb [2:0] $end
$var wire 6 : v_enumb2_str [5:0] $end
$var wire 8 D unpacked_array[-2] [7:0] $end
$var wire 8 E unpacked_array[-1] [7:0] $end
$var wire 8 F unpacked_array[0] [7:0] $end
$var wire 1 G LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$scope module a_module_instantiation_with_a_very_long_name_that_once_its_signals_get_concatenated_and_inlined_will_almost_certainly_result_in_them_getting_hashed $end
$var wire 32 G PARAM [31:0] $end
$upscope $end
$scope module p2 $end
$var wire 32 H PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$scope module p2 $end
$var wire 32 I PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$var wire 32 J PARAM [31:0] $end
$upscope $end
$upscope $end
$upscope $end
$enddefinitions $end
@ -55,170 +56,177 @@ $enddefinitions $end
1"
b00000000000000000000000000000000 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0 .
r0 0
r0 2
b0000000000000000000000000000000000000000000000000000000011111111 4
b00000000000000000000000000000000 6
b00 .
r0 /
r0 1
r0 3
b0000000000000000000000000000000000000000000000000000000011111111 5
b00000000000000000000000000000000 7
b000 8
b000000 9
0:
b00000000000000000000000000000000 8
b000 9
b000000 :
0;
0<
0=
0>
0?
0@
b0000000000000000000000000000000000000000000000000000000000000000 A
b00000000 C
0A
b0000000000000000000000000000000000000000000000000000000000000000 B
b00000000 D
b00000000 E
0F
b00000000000000000000000000000100 G
b00000000000000000000000000000010 H
b00000000000000000000000000000011 I
b00000000 F
0G
b00000000000000000000000000000100 H
b00000000000000000000000000000010 I
b00000000000000000000000000000011 J
#10
b00000000000000000000000000000001 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 *
b1111 *
b11 +
b11 ,
b11 -
r0.1 .
r0.2 0
r0.3 2
b0000000000000000000000000000000100000000000000000000000011111110 4
b00000000000000000000000000000001 6
b00000000000000000000000000000010 7
b111 8
1:
b11 .
r0.1 /
r0.2 1
r0.3 3
b0000000000000000000000000000000100000000000000000000000011111110 5
b00000000000000000000000000000001 7
b00000000000000000000000000000010 8
b111 9
1;
#15
0:
0;
#20
b00000000000000000000000000000010 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0.2 .
r0.4 0
r0.6 2
b0000000000000000000000000000001000000000000000000000000011111101 4
b00000000000000000000000000000010 6
b00000000000000000000000000000100 7
b110 8
b111111 9
1:
b00 .
r0.2 /
r0.4 1
r0.6 3
b0000000000000000000000000000001000000000000000000000000011111101 5
b00000000000000000000000000000010 7
b00000000000000000000000000000100 8
b110 9
b111111 :
1;
#25
0:
0;
#30
b00000000000000000000000000000011 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 *
b1111 *
b11 +
b11 ,
b11 -
r0.3 .
r0.6000000000000001 0
r0.8999999999999999 2
b0000000000000000000000000000001100000000000000000000000011111100 4
b00000000000000000000000000000011 6
b00000000000000000000000000000110 7
b101 8
b110110 9
1:
b11 .
r0.3 /
r0.6000000000000001 1
r0.8999999999999999 3
b0000000000000000000000000000001100000000000000000000000011111100 5
b00000000000000000000000000000011 7
b00000000000000000000000000000110 8
b101 9
b110110 :
1;
#35
0:
0;
#40
b00000000000000000000000000000100 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0.4 .
r0.8 0
r1.2 2
b0000000000000000000000000000010000000000000000000000000011111011 4
b00000000000000000000000000000100 6
b00000000000000000000000000001000 7
b100 8
b101101 9
1:
b00 .
r0.4 /
r0.8 1
r1.2 3
b0000000000000000000000000000010000000000000000000000000011111011 5
b00000000000000000000000000000100 7
b00000000000000000000000000001000 8
b100 9
b101101 :
1;
#45
0:
0;
#50
b00000000000000000000000000000101 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 *
b1111 *
b11 +
b11 ,
b11 -
r0.5 .
r1 0
r1.5 2
b0000000000000000000000000000010100000000000000000000000011111010 4
b00000000000000000000000000000101 6
b00000000000000000000000000001010 7
b011 8
b100100 9
1:
b11 .
r0.5 /
r1 1
r1.5 3
b0000000000000000000000000000010100000000000000000000000011111010 5
b00000000000000000000000000000101 7
b00000000000000000000000000001010 8
b011 9
b100100 :
1;
#55
0:
0;
#60
b00000000000000000000000000000110 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0.6 .
r1.2 0
r1.8 2
b0000000000000000000000000000011000000000000000000000000011111001 4
b00000000000000000000000000000110 6
b00000000000000000000000000001100 7
b010 8
b011011 9
1:
b00 .
r0.6 /
r1.2 1
r1.8 3
b0000000000000000000000000000011000000000000000000000000011111001 5
b00000000000000000000000000000110 7
b00000000000000000000000000001100 8
b010 9
b011011 :
1;

View File

@ -1,5 +1,5 @@
$date
Sat Mar 14 09:16:46 2026
Tue Mar 31 17:14:34 2026
$end
$version
@ -18,106 +18,108 @@ $end
$var wire 1 " clk $end
$var integer 32 # cyc [31:0] $end
$var bit 2 $ v_strp [1:0] $end
$var bit 4 % v_strp_strp [3:0] $end
$var bit 2 & v_unip_strp [1:0] $end
$var bit 2 ' v_arrp [2:1] $end
$var bit 4 ( v_arrp_arrp [3:0] $end
$var bit 4 ) v_arrp_strp [3:0] $end
$var bit 2 % v_strp2 [1:0] $end
$var bit 4 & v_strp_strp [3:0] $end
$var bit 2 ' v_unip_strp [1:0] $end
$var bit 2 ( v_arrp [2:1] $end
$var bit 4 ) v_arrp_arrp [3:0] $end
$var bit 4 * v_arrp_strp [3:0] $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array v_arru $end
$var bit 1 * v_arru[2] $end
$var bit 1 + v_arru[1] $end
$var bit 1 + v_arru[2] $end
$var bit 1 , v_arru[1] $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_arru $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array [4] $end
$var bit 1 , v_arru_arru[4][2] $end
$var bit 1 - v_arru_arru[4][1] $end
$var bit 1 - v_arru_arru[4][2] $end
$var bit 1 . v_arru_arru[4][1] $end
$upscope $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array [3] $end
$var bit 1 . v_arru_arru[3][2] $end
$var bit 1 / v_arru_arru[3][1] $end
$var bit 1 / v_arru_arru[3][2] $end
$var bit 1 0 v_arru_arru[3][1] $end
$upscope $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_arrp $end
$var bit 2 0 v_arru_arrp[4] [2:1] $end
$var bit 2 1 v_arru_arrp[3] [2:1] $end
$var bit 2 1 v_arru_arrp[4] [2:1] $end
$var bit 2 2 v_arru_arrp[3] [2:1] $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_strp $end
$var bit 2 2 v_arru_strp[4] [1:0] $end
$var bit 2 3 v_arru_strp[3] [1:0] $end
$var bit 2 3 v_arru_strp[4] [1:0] $end
$var bit 2 4 v_arru_strp[3] [1:0] $end
$upscope $end
$var real 64 4 v_real $end
$var real 64 5 v_real $end
$attrbegin array unpacked bounds 1 $end
$scope sv_array v_arr_real $end
$var real 64 5 v_arr_real[0] $end
$var real 64 6 v_arr_real[1] $end
$var real 64 6 v_arr_real[0] $end
$var real 64 7 v_arr_real[1] $end
$upscope $end
$var longint 64 7 v_chandle [63:0] $end
$var logic 64 8 v_str32x2 [63:0] $end
$var longint 64 8 v_chandle [63:0] $end
$var logic 64 9 v_str32x2 [63:0] $end
$attrbegin misc 07 "" 1 $end
$var int 32 9 v_enumed [31:0] $end
$var int 32 : v_enumed [31:0] $end
$attrbegin misc 07 "" 1 $end
$var int 32 : v_enumed2 [31:0] $end
$var int 32 ; v_enumed2 [31:0] $end
$attrbegin misc 07 "" 2 $end
$var logic 3 ; v_enumb [2:0] $end
$var logic 6 < v_enumb2_str [5:0] $end
$var logic 3 < v_enumb [2:0] $end
$var logic 6 = v_enumb2_str [5:0] $end
$attrbegin array unpacked bounds -8589934592 $end
$scope sv_array unpacked_array $end
$var logic 8 = unpacked_array[-2] [7:0] $end
$var logic 8 > unpacked_array[-1] [7:0] $end
$var logic 8 ? unpacked_array[0] [7:0] $end
$var logic 8 > unpacked_array[-2] [7:0] $end
$var logic 8 ? unpacked_array[-1] [7:0] $end
$var logic 8 @ unpacked_array[0] [7:0] $end
$upscope $end
$var bit 1 @ LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$var bit 1 A LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$scope module a_module_instantiation_with_a_very_long_name_that_once_its_signals_get_concatenated_and_inlined_will_almost_certainly_result_in_them_getting_hashed $end
$var parameter 32 A PARAM [31:0] $end
$upscope $end
$scope module p2 $end
$var parameter 32 B PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$scope module p2 $end
$var parameter 32 C PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$var parameter 32 D PARAM [31:0] $end
$upscope $end
$upscope $end
$upscope $end
$enddefinitions $end
#0
$dumpvars
b00000000000000000000000000000011 C
b00000000000000000000000000000010 B
b00000000000000000000000000000100 A
0@
b00000000000000000000000000000011 D
b00000000000000000000000000000010 C
b00000000000000000000000000000100 B
0A
b00000000 @
b00000000 ?
b00000000 >
b00000000 =
b000000 <
b000 ;
b000000 =
b000 <
b00000000000000000000000000000000 ;
b00000000000000000000000000000000 :
b00000000000000000000000000000000 9
b0000000000000000000000000000000000000000000000000000000011111111 8
b0000000000000000000000000000000000000000000000000000000000000000 7
b0000000000000000000000000000000000000000000000000000000011111111 9
b0000000000000000000000000000000000000000000000000000000000000000 8
r0 7
r0 6
r0 5
r0 4
b00 4
b00 3
b00 2
b00 1
b00 0
00
0/
0.
0-
0,
0+
0*
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000000 #
0"
@ -127,135 +129,141 @@ $end
1"
b00000000000000000000000000000001 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 0
b1111 *
b11 1
b11 2
b11 3
r0.1 4
r0.2 5
r0.3 6
b0000000000000000000000000000000100000000000000000000000011111110 8
b00000000000000000000000000000001 9
b00000000000000000000000000000010 :
b111 ;
b11 4
r0.1 5
r0.2 6
r0.3 7
b0000000000000000000000000000000100000000000000000000000011111110 9
b00000000000000000000000000000001 :
b00000000000000000000000000000010 ;
b111 <
#15
0"
#20
1"
b110 ;
b00000000000000000000000000000100 :
b00000000000000000000000000000010 9
b0000000000000000000000000000001000000000000000000000000011111101 8
r0.6 6
r0.4 5
r0.2 4
b110 <
b00000000000000000000000000000100 ;
b00000000000000000000000000000010 :
b0000000000000000000000000000001000000000000000000000000011111101 9
r0.6 7
r0.4 6
r0.2 5
b00 4
b00 3
b00 2
b00 1
b00 0
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000010 #
b111111 <
b111111 =
#25
0"
#30
1"
b110110 <
b110110 =
b00000000000000000000000000000011 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 0
b1111 *
b11 1
b11 2
b11 3
r0.3 4
r0.6000000000000001 5
r0.8999999999999999 6
b0000000000000000000000000000001100000000000000000000000011111100 8
b00000000000000000000000000000011 9
b00000000000000000000000000000110 :
b101 ;
b11 4
r0.3 5
r0.6000000000000001 6
r0.8999999999999999 7
b0000000000000000000000000000001100000000000000000000000011111100 9
b00000000000000000000000000000011 :
b00000000000000000000000000000110 ;
b101 <
#35
0"
#40
1"
b100 ;
b00000000000000000000000000001000 :
b00000000000000000000000000000100 9
b0000000000000000000000000000010000000000000000000000000011111011 8
r1.2 6
r0.8 5
r0.4 4
b100 <
b00000000000000000000000000001000 ;
b00000000000000000000000000000100 :
b0000000000000000000000000000010000000000000000000000000011111011 9
r1.2 7
r0.8 6
r0.4 5
b00 4
b00 3
b00 2
b00 1
b00 0
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000100 #
b101101 <
b101101 =
#45
0"
#50
1"
b100100 <
b100100 =
b00000000000000000000000000000101 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 0
b1111 *
b11 1
b11 2
b11 3
r0.5 4
r1 5
r1.5 6
b0000000000000000000000000000010100000000000000000000000011111010 8
b00000000000000000000000000000101 9
b00000000000000000000000000001010 :
b011 ;
b11 4
r0.5 5
r1 6
r1.5 7
b0000000000000000000000000000010100000000000000000000000011111010 9
b00000000000000000000000000000101 :
b00000000000000000000000000001010 ;
b011 <
#55
0"
#60
1"
b010 ;
b00000000000000000000000000001100 :
b00000000000000000000000000000110 9
b0000000000000000000000000000011000000000000000000000000011111001 8
r1.8 6
r1.2 5
r0.6 4
b010 <
b00000000000000000000000000001100 ;
b00000000000000000000000000000110 :
b0000000000000000000000000000011000000000000000000000000011111001 9
r1.8 7
r1.2 6
r0.6 5
b00 4
b00 3
b00 2
b00 1
b00 0
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000110 #
b011011 <
b011011 =
#64

View File

@ -5,46 +5,47 @@ $timescale 1ps $end
$var wire 1 " global_bit $end
$upscope $end
$scope module t $end
$var wire 1 : clk $end
$var wire 1 ; clk $end
$var wire 32 # cyc [31:0] $end
$var wire 2 $ v_strp [1:0] $end
$var wire 4 % v_strp_strp [3:0] $end
$var wire 2 & v_unip_strp [1:0] $end
$var wire 2 ' v_arrp [2:1] $end
$var wire 4 ( v_arrp_arrp [3:0] $end
$var wire 4 ) v_arrp_strp [3:0] $end
$var wire 1 ; v_arru[2] $end
$var wire 1 < v_arru[1] $end
$var wire 1 = v_arru_arru[4][2] $end
$var wire 1 > v_arru_arru[4][1] $end
$var wire 1 ? v_arru_arru[3][2] $end
$var wire 1 @ v_arru_arru[3][1] $end
$var wire 2 * v_arru_arrp[4] [2:1] $end
$var wire 2 + v_arru_arrp[3] [2:1] $end
$var wire 2 , v_arru_strp[4] [1:0] $end
$var wire 2 - v_arru_strp[3] [1:0] $end
$var real 64 . v_real $end
$var real 64 0 v_arr_real[0] $end
$var real 64 2 v_arr_real[1] $end
$var wire 64 A v_chandle [63:0] $end
$var wire 64 4 v_str32x2 [63:0] $end
$var wire 32 6 v_enumed [31:0] $end
$var wire 32 7 v_enumed2 [31:0] $end
$var wire 3 8 v_enumb [2:0] $end
$var wire 6 9 v_enumb2_str [5:0] $end
$var wire 8 C unpacked_array[-2] [7:0] $end
$var wire 8 D unpacked_array[-1] [7:0] $end
$var wire 8 E unpacked_array[0] [7:0] $end
$var wire 1 F LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$var wire 2 % v_strp2 [1:0] $end
$var wire 4 & v_strp_strp [3:0] $end
$var wire 2 ' v_unip_strp [1:0] $end
$var wire 2 ( v_arrp [2:1] $end
$var wire 4 ) v_arrp_arrp [3:0] $end
$var wire 4 * v_arrp_strp [3:0] $end
$var wire 1 < v_arru[2] $end
$var wire 1 = v_arru[1] $end
$var wire 1 > v_arru_arru[4][2] $end
$var wire 1 ? v_arru_arru[4][1] $end
$var wire 1 @ v_arru_arru[3][2] $end
$var wire 1 A v_arru_arru[3][1] $end
$var wire 2 + v_arru_arrp[4] [2:1] $end
$var wire 2 , v_arru_arrp[3] [2:1] $end
$var wire 2 - v_arru_strp[4] [1:0] $end
$var wire 2 . v_arru_strp[3] [1:0] $end
$var real 64 / v_real $end
$var real 64 1 v_arr_real[0] $end
$var real 64 3 v_arr_real[1] $end
$var wire 64 B v_chandle [63:0] $end
$var wire 64 5 v_str32x2 [63:0] $end
$var wire 32 7 v_enumed [31:0] $end
$var wire 32 8 v_enumed2 [31:0] $end
$var wire 3 9 v_enumb [2:0] $end
$var wire 6 : v_enumb2_str [5:0] $end
$var wire 8 D unpacked_array[-2] [7:0] $end
$var wire 8 E unpacked_array[-1] [7:0] $end
$var wire 8 F unpacked_array[0] [7:0] $end
$var wire 1 G LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$scope module a_module_instantiation_with_a_very_long_name_that_once_its_signals_get_concatenated_and_inlined_will_almost_certainly_result_in_them_getting_hashed $end
$var wire 32 G PARAM [31:0] $end
$upscope $end
$scope module p2 $end
$var wire 32 H PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$scope module p2 $end
$var wire 32 I PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$var wire 32 J PARAM [31:0] $end
$upscope $end
$upscope $end
$upscope $end
$enddefinitions $end
@ -54,171 +55,178 @@ $enddefinitions $end
1"
b00000000000000000000000000000000 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0 .
r0 0
r0 2
b0000000000000000000000000000000000000000000000000000000011111111 4
b00000000000000000000000000000000 6
b00 .
r0 /
r0 1
r0 3
b0000000000000000000000000000000000000000000000000000000011111111 5
b00000000000000000000000000000000 7
b000 8
b000000 9
0:
b00000000000000000000000000000000 8
b000 9
b000000 :
0;
0<
0=
0>
0?
0@
b0000000000000000000000000000000000000000000000000000000000000000 A
b00000000 C
0A
b0000000000000000000000000000000000000000000000000000000000000000 B
b00000000 D
b00000000 E
0F
b00000000000000000000000000000100 G
b00000000000000000000000000000010 H
b00000000000000000000000000000011 I
b00000000 F
0G
b00000000000000000000000000000100 H
b00000000000000000000000000000010 I
b00000000000000000000000000000011 J
#10
b00000000000000000000000000000001 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 *
b1111 *
b11 +
b11 ,
b11 -
r0.1 .
r0.2 0
r0.3 2
b0000000000000000000000000000000100000000000000000000000011111110 4
b00000000000000000000000000000001 6
b00000000000000000000000000000010 7
b111 8
1:
b11 .
r0.1 /
r0.2 1
r0.3 3
b0000000000000000000000000000000100000000000000000000000011111110 5
b00000000000000000000000000000001 7
b00000000000000000000000000000010 8
b111 9
1;
#15
0:
0;
#20
b00000000000000000000000000000010 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0.2 .
r0.4 0
r0.6 2
b0000000000000000000000000000001000000000000000000000000011111101 4
b00000000000000000000000000000010 6
b00000000000000000000000000000100 7
b110 8
b111111 9
1:
b00 .
r0.2 /
r0.4 1
r0.6 3
b0000000000000000000000000000001000000000000000000000000011111101 5
b00000000000000000000000000000010 7
b00000000000000000000000000000100 8
b110 9
b111111 :
1;
#25
0:
0;
#30
b00000000000000000000000000000011 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 *
b1111 *
b11 +
b11 ,
b11 -
r0.3 .
r0.6000000000000001 0
r0.8999999999999999 2
b0000000000000000000000000000001100000000000000000000000011111100 4
b00000000000000000000000000000011 6
b00000000000000000000000000000110 7
b101 8
b110110 9
1:
b11 .
r0.3 /
r0.6000000000000001 1
r0.8999999999999999 3
b0000000000000000000000000000001100000000000000000000000011111100 5
b00000000000000000000000000000011 7
b00000000000000000000000000000110 8
b101 9
b110110 :
1;
#35
0:
0;
#40
b00000000000000000000000000000100 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0.4 .
r0.8 0
r1.2 2
b0000000000000000000000000000010000000000000000000000000011111011 4
b00000000000000000000000000000100 6
b00000000000000000000000000001000 7
b100 8
b101101 9
1:
b00 .
r0.4 /
r0.8 1
r1.2 3
b0000000000000000000000000000010000000000000000000000000011111011 5
b00000000000000000000000000000100 7
b00000000000000000000000000001000 8
b100 9
b101101 :
1;
#45
0:
0;
#50
b00000000000000000000000000000101 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 *
b1111 *
b11 +
b11 ,
b11 -
r0.5 .
r1 0
r1.5 2
b0000000000000000000000000000010100000000000000000000000011111010 4
b00000000000000000000000000000101 6
b00000000000000000000000000001010 7
b011 8
b100100 9
1:
b11 .
r0.5 /
r1 1
r1.5 3
b0000000000000000000000000000010100000000000000000000000011111010 5
b00000000000000000000000000000101 7
b00000000000000000000000000001010 8
b011 9
b100100 :
1;
#55
0:
0;
#60
b00000000000000000000000000000110 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0.6 .
r1.2 0
r1.8 2
b0000000000000000000000000000011000000000000000000000000011111001 4
b00000000000000000000000000000110 6
b00000000000000000000000000001100 7
b010 8
b011011 9
1:
b00 .
r0.6 /
r1.2 1
r1.8 3
b0000000000000000000000000000011000000000000000000000000011111001 5
b00000000000000000000000000000110 7
b00000000000000000000000000001100 8
b010 9
b011011 :
1;
#64

View File

@ -1,5 +1,5 @@
$date
Sat Mar 14 09:16:42 2026
Tue Mar 31 17:14:36 2026
$end
$version
@ -19,106 +19,108 @@ $end
$var wire 1 ! clk $end
$var integer 32 # cyc [31:0] $end
$var bit 2 $ v_strp [1:0] $end
$var bit 4 % v_strp_strp [3:0] $end
$var bit 2 & v_unip_strp [1:0] $end
$var bit 2 ' v_arrp [2:1] $end
$var bit 4 ( v_arrp_arrp [3:0] $end
$var bit 4 ) v_arrp_strp [3:0] $end
$var bit 2 % v_strp2 [1:0] $end
$var bit 4 & v_strp_strp [3:0] $end
$var bit 2 ' v_unip_strp [1:0] $end
$var bit 2 ( v_arrp [2:1] $end
$var bit 4 ) v_arrp_arrp [3:0] $end
$var bit 4 * v_arrp_strp [3:0] $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array v_arru $end
$var bit 1 * v_arru[2] $end
$var bit 1 + v_arru[1] $end
$var bit 1 + v_arru[2] $end
$var bit 1 , v_arru[1] $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_arru $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array [4] $end
$var bit 1 , v_arru_arru[4][2] $end
$var bit 1 - v_arru_arru[4][1] $end
$var bit 1 - v_arru_arru[4][2] $end
$var bit 1 . v_arru_arru[4][1] $end
$upscope $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array [3] $end
$var bit 1 . v_arru_arru[3][2] $end
$var bit 1 / v_arru_arru[3][1] $end
$var bit 1 / v_arru_arru[3][2] $end
$var bit 1 0 v_arru_arru[3][1] $end
$upscope $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_arrp $end
$var bit 2 0 v_arru_arrp[4] [2:1] $end
$var bit 2 1 v_arru_arrp[3] [2:1] $end
$var bit 2 1 v_arru_arrp[4] [2:1] $end
$var bit 2 2 v_arru_arrp[3] [2:1] $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_strp $end
$var bit 2 2 v_arru_strp[4] [1:0] $end
$var bit 2 3 v_arru_strp[3] [1:0] $end
$var bit 2 3 v_arru_strp[4] [1:0] $end
$var bit 2 4 v_arru_strp[3] [1:0] $end
$upscope $end
$var real 64 4 v_real $end
$var real 64 5 v_real $end
$attrbegin array unpacked bounds 1 $end
$scope sv_array v_arr_real $end
$var real 64 5 v_arr_real[0] $end
$var real 64 6 v_arr_real[1] $end
$var real 64 6 v_arr_real[0] $end
$var real 64 7 v_arr_real[1] $end
$upscope $end
$var longint 64 7 v_chandle [63:0] $end
$var logic 64 8 v_str32x2 [63:0] $end
$var longint 64 8 v_chandle [63:0] $end
$var logic 64 9 v_str32x2 [63:0] $end
$attrbegin misc 07 "" 1 $end
$var int 32 9 v_enumed [31:0] $end
$var int 32 : v_enumed [31:0] $end
$attrbegin misc 07 "" 1 $end
$var int 32 : v_enumed2 [31:0] $end
$var int 32 ; v_enumed2 [31:0] $end
$attrbegin misc 07 "" 2 $end
$var logic 3 ; v_enumb [2:0] $end
$var logic 6 < v_enumb2_str [5:0] $end
$var logic 3 < v_enumb [2:0] $end
$var logic 6 = v_enumb2_str [5:0] $end
$attrbegin array unpacked bounds -8589934592 $end
$scope sv_array unpacked_array $end
$var logic 8 = unpacked_array[-2] [7:0] $end
$var logic 8 > unpacked_array[-1] [7:0] $end
$var logic 8 ? unpacked_array[0] [7:0] $end
$var logic 8 > unpacked_array[-2] [7:0] $end
$var logic 8 ? unpacked_array[-1] [7:0] $end
$var logic 8 @ unpacked_array[0] [7:0] $end
$upscope $end
$var bit 1 @ LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$var bit 1 A LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$scope module a_module_instantiation_with_a_very_long_name_that_once_its_signals_get_concatenated_and_inlined_will_almost_certainly_result_in_them_getting_hashed $end
$var parameter 32 A PARAM [31:0] $end
$upscope $end
$scope module p2 $end
$var parameter 32 B PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$scope module p2 $end
$var parameter 32 C PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$var parameter 32 D PARAM [31:0] $end
$upscope $end
$upscope $end
$upscope $end
$enddefinitions $end
#0
$dumpvars
b00000000000000000000000000000011 C
b00000000000000000000000000000010 B
b00000000000000000000000000000100 A
0@
b00000000000000000000000000000011 D
b00000000000000000000000000000010 C
b00000000000000000000000000000100 B
0A
b00000000 @
b00000000 ?
b00000000 >
b00000000 =
b000000 <
b000 ;
b000000 =
b000 <
b00000000000000000000000000000000 ;
b00000000000000000000000000000000 :
b00000000000000000000000000000000 9
b0000000000000000000000000000000000000000000000000000000011111111 8
b0000000000000000000000000000000000000000000000000000000000000000 7
b0000000000000000000000000000000000000000000000000000000011111111 9
b0000000000000000000000000000000000000000000000000000000000000000 8
r0 7
r0 6
r0 5
r0 4
b00 4
b00 3
b00 2
b00 1
b00 0
00
0/
0.
0-
0,
0+
0*
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000000 #
1"
@ -128,134 +130,140 @@ $end
1!
b00000000000000000000000000000001 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 0
b1111 *
b11 1
b11 2
b11 3
r0.1 4
r0.2 5
r0.3 6
b0000000000000000000000000000000100000000000000000000000011111110 8
b00000000000000000000000000000001 9
b00000000000000000000000000000010 :
b111 ;
b11 4
r0.1 5
r0.2 6
r0.3 7
b0000000000000000000000000000000100000000000000000000000011111110 9
b00000000000000000000000000000001 :
b00000000000000000000000000000010 ;
b111 <
#15
0!
#20
1!
b110 ;
b00000000000000000000000000000100 :
b00000000000000000000000000000010 9
b0000000000000000000000000000001000000000000000000000000011111101 8
r0.6 6
r0.4 5
r0.2 4
b110 <
b00000000000000000000000000000100 ;
b00000000000000000000000000000010 :
b0000000000000000000000000000001000000000000000000000000011111101 9
r0.6 7
r0.4 6
r0.2 5
b00 4
b00 3
b00 2
b00 1
b00 0
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000010 #
b111111 <
b111111 =
#25
0!
#30
1!
b110110 <
b110110 =
b00000000000000000000000000000011 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 0
b1111 *
b11 1
b11 2
b11 3
r0.3 4
r0.6000000000000001 5
r0.8999999999999999 6
b0000000000000000000000000000001100000000000000000000000011111100 8
b00000000000000000000000000000011 9
b00000000000000000000000000000110 :
b101 ;
b11 4
r0.3 5
r0.6000000000000001 6
r0.8999999999999999 7
b0000000000000000000000000000001100000000000000000000000011111100 9
b00000000000000000000000000000011 :
b00000000000000000000000000000110 ;
b101 <
#35
0!
#40
1!
b100 ;
b00000000000000000000000000001000 :
b00000000000000000000000000000100 9
b0000000000000000000000000000010000000000000000000000000011111011 8
r1.2 6
r0.8 5
r0.4 4
b100 <
b00000000000000000000000000001000 ;
b00000000000000000000000000000100 :
b0000000000000000000000000000010000000000000000000000000011111011 9
r1.2 7
r0.8 6
r0.4 5
b00 4
b00 3
b00 2
b00 1
b00 0
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000100 #
b101101 <
b101101 =
#45
0!
#50
1!
b100100 <
b100100 =
b00000000000000000000000000000101 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 0
b1111 *
b11 1
b11 2
b11 3
r0.5 4
r1 5
r1.5 6
b0000000000000000000000000000010100000000000000000000000011111010 8
b00000000000000000000000000000101 9
b00000000000000000000000000001010 :
b011 ;
b11 4
r0.5 5
r1 6
r1.5 7
b0000000000000000000000000000010100000000000000000000000011111010 9
b00000000000000000000000000000101 :
b00000000000000000000000000001010 ;
b011 <
#55
0!
#60
1!
b010 ;
b00000000000000000000000000001100 :
b00000000000000000000000000000110 9
b0000000000000000000000000000011000000000000000000000000011111001 8
r1.8 6
r1.2 5
r0.6 4
b010 <
b00000000000000000000000000001100 ;
b00000000000000000000000000000110 :
b0000000000000000000000000000011000000000000000000000000011111001 9
r1.8 7
r1.2 6
r0.6 5
b00 4
b00 3
b00 2
b00 1
b00 0
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000110 #
b011011 <
b011011 =

View File

@ -52,6 +52,8 @@
(cyc\[31\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_strp\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_strp\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_strp2\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_strp2\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_strp_strp\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_strp_strp\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_strp_strp\[2\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
@ -68,20 +70,20 @@
(v_arrp_strp\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arrp_strp\[2\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arrp_strp\[3\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru[1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru[2] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[3][1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[3][2] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[4][1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru[1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[4][2] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arrp[3]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_arrp[3]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_arru[4][1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[3][2] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[3][1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arrp[4]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_arrp[4]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_strp[3]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_strp[3]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_arrp[3]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_arrp[3]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_strp[4]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_strp[4]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_strp[3]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_strp[3]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_real\[0\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_real\[1\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_real\[2\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))

View File

@ -1,51 +1,52 @@
$version Generated by VerilatedVcd $end
$timescale 1ps $end
$scope module top $end
$var wire 1 : clk $end
$var wire 1 ; clk $end
$scope module $unit $end
$var wire 1 " global_bit $end
$upscope $end
$scope module t $end
$var wire 1 : clk $end
$var wire 1 ; clk $end
$var wire 32 # cyc [31:0] $end
$var wire 2 $ v_strp [1:0] $end
$var wire 4 % v_strp_strp [3:0] $end
$var wire 2 & v_unip_strp [1:0] $end
$var wire 2 ' v_arrp [2:1] $end
$var wire 4 ( v_arrp_arrp [3:0] $end
$var wire 4 ) v_arrp_strp [3:0] $end
$var wire 1 ; v_arru[1] $end
$var wire 2 % v_strp2 [1:0] $end
$var wire 4 & v_strp_strp [3:0] $end
$var wire 2 ' v_unip_strp [1:0] $end
$var wire 2 ( v_arrp [2:1] $end
$var wire 4 ) v_arrp_arrp [3:0] $end
$var wire 4 * v_arrp_strp [3:0] $end
$var wire 1 < v_arru[2] $end
$var wire 1 = v_arru_arru[3][1] $end
$var wire 1 > v_arru_arru[3][2] $end
$var wire 1 = v_arru[1] $end
$var wire 1 > v_arru_arru[4][2] $end
$var wire 1 ? v_arru_arru[4][1] $end
$var wire 1 @ v_arru_arru[4][2] $end
$var wire 2 * v_arru_arrp[3] [2:1] $end
$var wire 1 @ v_arru_arru[3][2] $end
$var wire 1 A v_arru_arru[3][1] $end
$var wire 2 + v_arru_arrp[4] [2:1] $end
$var wire 2 , v_arru_strp[3] [1:0] $end
$var wire 2 , v_arru_arrp[3] [2:1] $end
$var wire 2 - v_arru_strp[4] [1:0] $end
$var real 64 . v_real $end
$var real 64 0 v_arr_real[0] $end
$var real 64 2 v_arr_real[1] $end
$var wire 64 A v_chandle [63:0] $end
$var wire 64 4 v_str32x2 [63:0] $end
$var wire 32 6 v_enumed [31:0] $end
$var wire 32 7 v_enumed2 [31:0] $end
$var wire 3 8 v_enumb [2:0] $end
$var wire 6 9 v_enumb2_str [5:0] $end
$var wire 8 C unpacked_array[-2] [7:0] $end
$var wire 8 D unpacked_array[-1] [7:0] $end
$var wire 8 E unpacked_array[0] [7:0] $end
$var wire 1 F LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$var wire 2 . v_arru_strp[3] [1:0] $end
$var real 64 / v_real $end
$var real 64 1 v_arr_real[0] $end
$var real 64 3 v_arr_real[1] $end
$var wire 64 B v_chandle [63:0] $end
$var wire 64 5 v_str32x2 [63:0] $end
$var wire 32 7 v_enumed [31:0] $end
$var wire 32 8 v_enumed2 [31:0] $end
$var wire 3 9 v_enumb [2:0] $end
$var wire 6 : v_enumb2_str [5:0] $end
$var wire 8 D unpacked_array[-2] [7:0] $end
$var wire 8 E unpacked_array[-1] [7:0] $end
$var wire 8 F unpacked_array[0] [7:0] $end
$var wire 1 G LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$scope module a_module_instantiation_with_a_very_long_name_that_once_its_signals_get_concatenated_and_inlined_will_almost_certainly_result_in_them_getting_hashed $end
$var wire 32 G PARAM [31:0] $end
$upscope $end
$scope module p2 $end
$var wire 32 H PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$scope module p2 $end
$var wire 32 I PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$var wire 32 J PARAM [31:0] $end
$upscope $end
$upscope $end
$upscope $end
$enddefinitions $end
@ -55,170 +56,177 @@ $enddefinitions $end
1"
b00000000000000000000000000000000 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0 .
r0 0
r0 2
b0000000000000000000000000000000000000000000000000000000011111111 4
b00000000000000000000000000000000 6
b00 .
r0 /
r0 1
r0 3
b0000000000000000000000000000000000000000000000000000000011111111 5
b00000000000000000000000000000000 7
b000 8
b000000 9
0:
b00000000000000000000000000000000 8
b000 9
b000000 :
0;
0<
0=
0>
0?
0@
b0000000000000000000000000000000000000000000000000000000000000000 A
b00000000 C
0A
b0000000000000000000000000000000000000000000000000000000000000000 B
b00000000 D
b00000000 E
0F
b00000000000000000000000000000100 G
b00000000000000000000000000000010 H
b00000000000000000000000000000011 I
b00000000 F
0G
b00000000000000000000000000000100 H
b00000000000000000000000000000010 I
b00000000000000000000000000000011 J
#10
b00000000000000000000000000000001 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 *
b1111 *
b11 +
b11 ,
b11 -
r0.1 .
r0.2 0
r0.3 2
b0000000000000000000000000000000100000000000000000000000011111110 4
b00000000000000000000000000000001 6
b00000000000000000000000000000010 7
b111 8
1:
b11 .
r0.1 /
r0.2 1
r0.3 3
b0000000000000000000000000000000100000000000000000000000011111110 5
b00000000000000000000000000000001 7
b00000000000000000000000000000010 8
b111 9
1;
#15
0:
0;
#20
b00000000000000000000000000000010 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0.2 .
r0.4 0
r0.6 2
b0000000000000000000000000000001000000000000000000000000011111101 4
b00000000000000000000000000000010 6
b00000000000000000000000000000100 7
b110 8
b111111 9
1:
b00 .
r0.2 /
r0.4 1
r0.6 3
b0000000000000000000000000000001000000000000000000000000011111101 5
b00000000000000000000000000000010 7
b00000000000000000000000000000100 8
b110 9
b111111 :
1;
#25
0:
0;
#30
b00000000000000000000000000000011 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 *
b1111 *
b11 +
b11 ,
b11 -
r0.3 .
r0.6000000000000001 0
r0.8999999999999999 2
b0000000000000000000000000000001100000000000000000000000011111100 4
b00000000000000000000000000000011 6
b00000000000000000000000000000110 7
b101 8
b110110 9
1:
b11 .
r0.3 /
r0.6000000000000001 1
r0.8999999999999999 3
b0000000000000000000000000000001100000000000000000000000011111100 5
b00000000000000000000000000000011 7
b00000000000000000000000000000110 8
b101 9
b110110 :
1;
#35
0:
0;
#40
b00000000000000000000000000000100 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0.4 .
r0.8 0
r1.2 2
b0000000000000000000000000000010000000000000000000000000011111011 4
b00000000000000000000000000000100 6
b00000000000000000000000000001000 7
b100 8
b101101 9
1:
b00 .
r0.4 /
r0.8 1
r1.2 3
b0000000000000000000000000000010000000000000000000000000011111011 5
b00000000000000000000000000000100 7
b00000000000000000000000000001000 8
b100 9
b101101 :
1;
#45
0:
0;
#50
b00000000000000000000000000000101 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 *
b1111 *
b11 +
b11 ,
b11 -
r0.5 .
r1 0
r1.5 2
b0000000000000000000000000000010100000000000000000000000011111010 4
b00000000000000000000000000000101 6
b00000000000000000000000000001010 7
b011 8
b100100 9
1:
b11 .
r0.5 /
r1 1
r1.5 3
b0000000000000000000000000000010100000000000000000000000011111010 5
b00000000000000000000000000000101 7
b00000000000000000000000000001010 8
b011 9
b100100 :
1;
#55
0:
0;
#60
b00000000000000000000000000000110 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0.6 .
r1.2 0
r1.8 2
b0000000000000000000000000000011000000000000000000000000011111001 4
b00000000000000000000000000000110 6
b00000000000000000000000000001100 7
b010 8
b011011 9
1:
b00 .
r0.6 /
r1.2 1
r1.8 3
b0000000000000000000000000000011000000000000000000000000011111001 5
b00000000000000000000000000000110 7
b00000000000000000000000000001100 8
b010 9
b011011 :
1;

View File

@ -1,5 +1,5 @@
$date
Sat Mar 14 09:17:23 2026
Tue Mar 31 17:14:39 2026
$end
$version
@ -18,106 +18,108 @@ $end
$var wire 1 " clk $end
$var integer 32 # cyc [31:0] $end
$var bit 2 $ v_strp [1:0] $end
$var bit 4 % v_strp_strp [3:0] $end
$var bit 2 & v_unip_strp [1:0] $end
$var bit 2 ' v_arrp [2:1] $end
$var bit 4 ( v_arrp_arrp [3:0] $end
$var bit 4 ) v_arrp_strp [3:0] $end
$var bit 2 % v_strp2 [1:0] $end
$var bit 4 & v_strp_strp [3:0] $end
$var bit 2 ' v_unip_strp [1:0] $end
$var bit 2 ( v_arrp [2:1] $end
$var bit 4 ) v_arrp_arrp [3:0] $end
$var bit 4 * v_arrp_strp [3:0] $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array v_arru $end
$var bit 1 * v_arru[2] $end
$var bit 1 + v_arru[1] $end
$var bit 1 + v_arru[2] $end
$var bit 1 , v_arru[1] $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_arru $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array [4] $end
$var bit 1 , v_arru_arru[4][2] $end
$var bit 1 - v_arru_arru[4][1] $end
$var bit 1 - v_arru_arru[4][2] $end
$var bit 1 . v_arru_arru[4][1] $end
$upscope $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array [3] $end
$var bit 1 . v_arru_arru[3][2] $end
$var bit 1 / v_arru_arru[3][1] $end
$var bit 1 / v_arru_arru[3][2] $end
$var bit 1 0 v_arru_arru[3][1] $end
$upscope $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_arrp $end
$var bit 2 0 v_arru_arrp[4] [2:1] $end
$var bit 2 1 v_arru_arrp[3] [2:1] $end
$var bit 2 1 v_arru_arrp[4] [2:1] $end
$var bit 2 2 v_arru_arrp[3] [2:1] $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_strp $end
$var bit 2 2 v_arru_strp[4] [1:0] $end
$var bit 2 3 v_arru_strp[3] [1:0] $end
$var bit 2 3 v_arru_strp[4] [1:0] $end
$var bit 2 4 v_arru_strp[3] [1:0] $end
$upscope $end
$var real 64 4 v_real $end
$var real 64 5 v_real $end
$attrbegin array unpacked bounds 1 $end
$scope sv_array v_arr_real $end
$var real 64 5 v_arr_real[0] $end
$var real 64 6 v_arr_real[1] $end
$var real 64 6 v_arr_real[0] $end
$var real 64 7 v_arr_real[1] $end
$upscope $end
$var longint 64 7 v_chandle [63:0] $end
$var logic 64 8 v_str32x2 [63:0] $end
$var longint 64 8 v_chandle [63:0] $end
$var logic 64 9 v_str32x2 [63:0] $end
$attrbegin misc 07 "" 1 $end
$var int 32 9 v_enumed [31:0] $end
$var int 32 : v_enumed [31:0] $end
$attrbegin misc 07 "" 1 $end
$var int 32 : v_enumed2 [31:0] $end
$var int 32 ; v_enumed2 [31:0] $end
$attrbegin misc 07 "" 2 $end
$var logic 3 ; v_enumb [2:0] $end
$var logic 6 < v_enumb2_str [5:0] $end
$var logic 3 < v_enumb [2:0] $end
$var logic 6 = v_enumb2_str [5:0] $end
$attrbegin array unpacked bounds -8589934592 $end
$scope sv_array unpacked_array $end
$var logic 8 = unpacked_array[-2] [7:0] $end
$var logic 8 > unpacked_array[-1] [7:0] $end
$var logic 8 ? unpacked_array[0] [7:0] $end
$var logic 8 > unpacked_array[-2] [7:0] $end
$var logic 8 ? unpacked_array[-1] [7:0] $end
$var logic 8 @ unpacked_array[0] [7:0] $end
$upscope $end
$var bit 1 @ LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$var bit 1 A LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$scope module a_module_instantiation_with_a_very_long_name_that_once_its_signals_get_concatenated_and_inlined_will_almost_certainly_result_in_them_getting_hashed $end
$var parameter 32 A PARAM [31:0] $end
$upscope $end
$scope module p2 $end
$var parameter 32 B PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$scope module p2 $end
$var parameter 32 C PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$var parameter 32 D PARAM [31:0] $end
$upscope $end
$upscope $end
$upscope $end
$enddefinitions $end
#0
$dumpvars
b00000000000000000000000000000011 C
b00000000000000000000000000000010 B
b00000000000000000000000000000100 A
0@
b00000000000000000000000000000011 D
b00000000000000000000000000000010 C
b00000000000000000000000000000100 B
0A
b00000000 @
b00000000 ?
b00000000 >
b00000000 =
b000000 <
b000 ;
b000000 =
b000 <
b00000000000000000000000000000000 ;
b00000000000000000000000000000000 :
b00000000000000000000000000000000 9
b0000000000000000000000000000000000000000000000000000000011111111 8
b0000000000000000000000000000000000000000000000000000000000000000 7
b0000000000000000000000000000000000000000000000000000000011111111 9
b0000000000000000000000000000000000000000000000000000000000000000 8
r0 7
r0 6
r0 5
r0 4
b00 4
b00 3
b00 2
b00 1
b00 0
00
0/
0.
0-
0,
0+
0*
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000000 #
0"
@ -127,135 +129,141 @@ $end
1"
b00000000000000000000000000000001 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 0
b1111 *
b11 1
b11 2
b11 3
r0.1 4
r0.2 5
r0.3 6
b0000000000000000000000000000000100000000000000000000000011111110 8
b00000000000000000000000000000001 9
b00000000000000000000000000000010 :
b111 ;
b11 4
r0.1 5
r0.2 6
r0.3 7
b0000000000000000000000000000000100000000000000000000000011111110 9
b00000000000000000000000000000001 :
b00000000000000000000000000000010 ;
b111 <
#15
0"
#20
1"
b110 ;
b00000000000000000000000000000100 :
b00000000000000000000000000000010 9
b0000000000000000000000000000001000000000000000000000000011111101 8
r0.6 6
r0.4 5
r0.2 4
b110 <
b00000000000000000000000000000100 ;
b00000000000000000000000000000010 :
b0000000000000000000000000000001000000000000000000000000011111101 9
r0.6 7
r0.4 6
r0.2 5
b00 4
b00 3
b00 2
b00 1
b00 0
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000010 #
b111111 <
b111111 =
#25
0"
#30
1"
b110110 <
b110110 =
b00000000000000000000000000000011 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 0
b1111 *
b11 1
b11 2
b11 3
r0.3 4
r0.6000000000000001 5
r0.8999999999999999 6
b0000000000000000000000000000001100000000000000000000000011111100 8
b00000000000000000000000000000011 9
b00000000000000000000000000000110 :
b101 ;
b11 4
r0.3 5
r0.6000000000000001 6
r0.8999999999999999 7
b0000000000000000000000000000001100000000000000000000000011111100 9
b00000000000000000000000000000011 :
b00000000000000000000000000000110 ;
b101 <
#35
0"
#40
1"
b100 ;
b00000000000000000000000000001000 :
b00000000000000000000000000000100 9
b0000000000000000000000000000010000000000000000000000000011111011 8
r1.2 6
r0.8 5
r0.4 4
b100 <
b00000000000000000000000000001000 ;
b00000000000000000000000000000100 :
b0000000000000000000000000000010000000000000000000000000011111011 9
r1.2 7
r0.8 6
r0.4 5
b00 4
b00 3
b00 2
b00 1
b00 0
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000100 #
b101101 <
b101101 =
#45
0"
#50
1"
b100100 <
b100100 =
b00000000000000000000000000000101 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 0
b1111 *
b11 1
b11 2
b11 3
r0.5 4
r1 5
r1.5 6
b0000000000000000000000000000010100000000000000000000000011111010 8
b00000000000000000000000000000101 9
b00000000000000000000000000001010 :
b011 ;
b11 4
r0.5 5
r1 6
r1.5 7
b0000000000000000000000000000010100000000000000000000000011111010 9
b00000000000000000000000000000101 :
b00000000000000000000000000001010 ;
b011 <
#55
0"
#60
1"
b010 ;
b00000000000000000000000000001100 :
b00000000000000000000000000000110 9
b0000000000000000000000000000011000000000000000000000000011111001 8
r1.8 6
r1.2 5
r0.6 4
b010 <
b00000000000000000000000000001100 ;
b00000000000000000000000000000110 :
b0000000000000000000000000000011000000000000000000000000011111001 9
r1.8 7
r1.2 6
r0.6 5
b00 4
b00 3
b00 2
b00 1
b00 0
b0000 *
b0000 )
b0000 (
b00 (
b00 '
b00 &
b0000 %
b0000 &
b00 %
b00 $
b00000000000000000000000000000110 #
b011011 <
b011011 =
#64

View File

@ -5,46 +5,47 @@ $timescale 1ps $end
$var wire 1 " global_bit $end
$upscope $end
$scope module t $end
$var wire 1 : clk $end
$var wire 1 ; clk $end
$var wire 32 # cyc [31:0] $end
$var wire 2 $ v_strp [1:0] $end
$var wire 4 % v_strp_strp [3:0] $end
$var wire 2 & v_unip_strp [1:0] $end
$var wire 2 ' v_arrp [2:1] $end
$var wire 4 ( v_arrp_arrp [3:0] $end
$var wire 4 ) v_arrp_strp [3:0] $end
$var wire 1 ; v_arru[2] $end
$var wire 1 < v_arru[1] $end
$var wire 1 = v_arru_arru[4][2] $end
$var wire 1 > v_arru_arru[4][1] $end
$var wire 1 ? v_arru_arru[3][2] $end
$var wire 1 @ v_arru_arru[3][1] $end
$var wire 2 * v_arru_arrp[4] [2:1] $end
$var wire 2 + v_arru_arrp[3] [2:1] $end
$var wire 2 , v_arru_strp[4] [1:0] $end
$var wire 2 - v_arru_strp[3] [1:0] $end
$var real 64 . v_real $end
$var real 64 0 v_arr_real[0] $end
$var real 64 2 v_arr_real[1] $end
$var wire 64 A v_chandle [63:0] $end
$var wire 64 4 v_str32x2 [63:0] $end
$var wire 32 6 v_enumed [31:0] $end
$var wire 32 7 v_enumed2 [31:0] $end
$var wire 3 8 v_enumb [2:0] $end
$var wire 6 9 v_enumb2_str [5:0] $end
$var wire 8 C unpacked_array[-2] [7:0] $end
$var wire 8 D unpacked_array[-1] [7:0] $end
$var wire 8 E unpacked_array[0] [7:0] $end
$var wire 1 F LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$var wire 2 % v_strp2 [1:0] $end
$var wire 4 & v_strp_strp [3:0] $end
$var wire 2 ' v_unip_strp [1:0] $end
$var wire 2 ( v_arrp [2:1] $end
$var wire 4 ) v_arrp_arrp [3:0] $end
$var wire 4 * v_arrp_strp [3:0] $end
$var wire 1 < v_arru[2] $end
$var wire 1 = v_arru[1] $end
$var wire 1 > v_arru_arru[4][2] $end
$var wire 1 ? v_arru_arru[4][1] $end
$var wire 1 @ v_arru_arru[3][2] $end
$var wire 1 A v_arru_arru[3][1] $end
$var wire 2 + v_arru_arrp[4] [2:1] $end
$var wire 2 , v_arru_arrp[3] [2:1] $end
$var wire 2 - v_arru_strp[4] [1:0] $end
$var wire 2 . v_arru_strp[3] [1:0] $end
$var real 64 / v_real $end
$var real 64 1 v_arr_real[0] $end
$var real 64 3 v_arr_real[1] $end
$var wire 64 B v_chandle [63:0] $end
$var wire 64 5 v_str32x2 [63:0] $end
$var wire 32 7 v_enumed [31:0] $end
$var wire 32 8 v_enumed2 [31:0] $end
$var wire 3 9 v_enumb [2:0] $end
$var wire 6 : v_enumb2_str [5:0] $end
$var wire 8 D unpacked_array[-2] [7:0] $end
$var wire 8 E unpacked_array[-1] [7:0] $end
$var wire 8 F unpacked_array[0] [7:0] $end
$var wire 1 G LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$scope module a_module_instantiation_with_a_very_long_name_that_once_its_signals_get_concatenated_and_inlined_will_almost_certainly_result_in_them_getting_hashed $end
$var wire 32 G PARAM [31:0] $end
$upscope $end
$scope module p2 $end
$var wire 32 H PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$scope module p2 $end
$var wire 32 I PARAM [31:0] $end
$upscope $end
$scope module p3 $end
$var wire 32 J PARAM [31:0] $end
$upscope $end
$upscope $end
$upscope $end
$enddefinitions $end
@ -54,171 +55,178 @@ $enddefinitions $end
1"
b00000000000000000000000000000000 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0 .
r0 0
r0 2
b0000000000000000000000000000000000000000000000000000000011111111 4
b00000000000000000000000000000000 6
b00 .
r0 /
r0 1
r0 3
b0000000000000000000000000000000000000000000000000000000011111111 5
b00000000000000000000000000000000 7
b000 8
b000000 9
0:
b00000000000000000000000000000000 8
b000 9
b000000 :
0;
0<
0=
0>
0?
0@
b0000000000000000000000000000000000000000000000000000000000000000 A
b00000000 C
0A
b0000000000000000000000000000000000000000000000000000000000000000 B
b00000000 D
b00000000 E
0F
b00000000000000000000000000000100 G
b00000000000000000000000000000010 H
b00000000000000000000000000000011 I
b00000000 F
0G
b00000000000000000000000000000100 H
b00000000000000000000000000000010 I
b00000000000000000000000000000011 J
#10
b00000000000000000000000000000001 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 *
b1111 *
b11 +
b11 ,
b11 -
r0.1 .
r0.2 0
r0.3 2
b0000000000000000000000000000000100000000000000000000000011111110 4
b00000000000000000000000000000001 6
b00000000000000000000000000000010 7
b111 8
1:
b11 .
r0.1 /
r0.2 1
r0.3 3
b0000000000000000000000000000000100000000000000000000000011111110 5
b00000000000000000000000000000001 7
b00000000000000000000000000000010 8
b111 9
1;
#15
0:
0;
#20
b00000000000000000000000000000010 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0.2 .
r0.4 0
r0.6 2
b0000000000000000000000000000001000000000000000000000000011111101 4
b00000000000000000000000000000010 6
b00000000000000000000000000000100 7
b110 8
b111111 9
1:
b00 .
r0.2 /
r0.4 1
r0.6 3
b0000000000000000000000000000001000000000000000000000000011111101 5
b00000000000000000000000000000010 7
b00000000000000000000000000000100 8
b110 9
b111111 :
1;
#25
0:
0;
#30
b00000000000000000000000000000011 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 *
b1111 *
b11 +
b11 ,
b11 -
r0.3 .
r0.6000000000000001 0
r0.8999999999999999 2
b0000000000000000000000000000001100000000000000000000000011111100 4
b00000000000000000000000000000011 6
b00000000000000000000000000000110 7
b101 8
b110110 9
1:
b11 .
r0.3 /
r0.6000000000000001 1
r0.8999999999999999 3
b0000000000000000000000000000001100000000000000000000000011111100 5
b00000000000000000000000000000011 7
b00000000000000000000000000000110 8
b101 9
b110110 :
1;
#35
0:
0;
#40
b00000000000000000000000000000100 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0.4 .
r0.8 0
r1.2 2
b0000000000000000000000000000010000000000000000000000000011111011 4
b00000000000000000000000000000100 6
b00000000000000000000000000001000 7
b100 8
b101101 9
1:
b00 .
r0.4 /
r0.8 1
r1.2 3
b0000000000000000000000000000010000000000000000000000000011111011 5
b00000000000000000000000000000100 7
b00000000000000000000000000001000 8
b100 9
b101101 :
1;
#45
0:
0;
#50
b00000000000000000000000000000101 #
b11 $
b1111 %
b11 &
b11 %
b1111 &
b11 '
b1111 (
b11 (
b1111 )
b11 *
b1111 *
b11 +
b11 ,
b11 -
r0.5 .
r1 0
r1.5 2
b0000000000000000000000000000010100000000000000000000000011111010 4
b00000000000000000000000000000101 6
b00000000000000000000000000001010 7
b011 8
b100100 9
1:
b11 .
r0.5 /
r1 1
r1.5 3
b0000000000000000000000000000010100000000000000000000000011111010 5
b00000000000000000000000000000101 7
b00000000000000000000000000001010 8
b011 9
b100100 :
1;
#55
0:
0;
#60
b00000000000000000000000000000110 #
b00 $
b0000 %
b00 &
b00 %
b0000 &
b00 '
b0000 (
b00 (
b0000 )
b00 *
b0000 *
b00 +
b00 ,
b00 -
r0.6 .
r1.2 0
r1.8 2
b0000000000000000000000000000011000000000000000000000000011111001 4
b00000000000000000000000000000110 6
b00000000000000000000000000001100 7
b010 8
b011011 9
1:
b00 .
r0.6 /
r1.2 1
r1.8 3
b0000000000000000000000000000011000000000000000000000000011111001 5
b00000000000000000000000000000110 7
b00000000000000000000000000001100 8
b010 9
b011011 :
1;
#64

View File

@ -1,5 +1,5 @@
$date
Sat Mar 14 09:17:04 2026
Tue Mar 31 17:14:42 2026
$end
$version
@ -24,150 +24,157 @@ $end
$var bit 1 % b0 $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct v_strp2 $end
$var bit 1 & b1 $end
$var bit 1 ' b0 $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct v_strp_strp $end
$attrbegin pack packed members 2 $end
$scope struct x1 $end
$var bit 1 & b1 $end
$var bit 1 ' b0 $end
$var bit 1 ( b1 $end
$var bit 1 ) b0 $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct x0 $end
$var bit 1 ( b1 $end
$var bit 1 ) b0 $end
$var bit 1 * b1 $end
$var bit 1 + b0 $end
$upscope $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope union v_unip_strp $end
$attrbegin pack packed members 2 $end
$scope struct x1 $end
$var bit 1 * b1 $end
$var bit 1 + b0 $end
$var bit 1 , b1 $end
$var bit 1 - b0 $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct x0 $end
$var bit 1 * b1 $end
$var bit 1 + b0 $end
$var bit 1 , b1 $end
$var bit 1 - b0 $end
$upscope $end
$upscope $end
$var bit 2 , v_arrp [2:1] $end
$var bit 2 . v_arrp [2:1] $end
$attrbegin array packed bounds 17179869187 $end
$scope sv_array v_arrp_arrp $end
$var bit 2 - v_arrp_arrp[4] [2:1] $end
$var bit 2 . v_arrp_arrp[3] [2:1] $end
$var bit 2 / v_arrp_arrp[4] [2:1] $end
$var bit 2 0 v_arrp_arrp[3] [2:1] $end
$upscope $end
$attrbegin array packed bounds 17179869187 $end
$scope sv_array v_arrp_strp $end
$attrbegin pack packed members 2 $end
$scope struct [4] $end
$var bit 1 / b1 $end
$var bit 1 0 b0 $end
$var bit 1 1 b1 $end
$var bit 1 2 b0 $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct [3] $end
$var bit 1 1 b1 $end
$var bit 1 2 b0 $end
$var bit 1 3 b1 $end
$var bit 1 4 b0 $end
$upscope $end
$upscope $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array v_arru $end
$var bit 1 3 v_arru[2] $end
$var bit 1 4 v_arru[1] $end
$var bit 1 5 v_arru[2] $end
$var bit 1 6 v_arru[1] $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_arru $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array [4] $end
$var bit 1 5 v_arru_arru[4][2] $end
$var bit 1 6 v_arru_arru[4][1] $end
$var bit 1 7 v_arru_arru[4][2] $end
$var bit 1 8 v_arru_arru[4][1] $end
$upscope $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array [3] $end
$var bit 1 7 v_arru_arru[3][2] $end
$var bit 1 8 v_arru_arru[3][1] $end
$var bit 1 9 v_arru_arru[3][2] $end
$var bit 1 : v_arru_arru[3][1] $end
$upscope $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_arrp $end
$var bit 2 9 v_arru_arrp[4] [2:1] $end
$var bit 2 : v_arru_arrp[3] [2:1] $end
$var bit 2 ; v_arru_arrp[4] [2:1] $end
$var bit 2 < v_arru_arrp[3] [2:1] $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_strp $end
$attrbegin pack packed members 2 $end
$scope struct [4] $end
$var bit 1 ; b1 $end
$var bit 1 < b0 $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct [3] $end
$var bit 1 = b1 $end
$var bit 1 > b0 $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct [3] $end
$var bit 1 ? b1 $end
$var bit 1 @ b0 $end
$upscope $end
$upscope $end
$var real 64 ? v_real $end
$var real 64 A v_real $end
$attrbegin array unpacked bounds 1 $end
$scope sv_array v_arr_real $end
$var real 64 @ v_arr_real[0] $end
$var real 64 A v_arr_real[1] $end
$var real 64 B v_arr_real[0] $end
$var real 64 C v_arr_real[1] $end
$upscope $end
$var longint 64 B v_chandle [63:0] $end
$var longint 64 D v_chandle [63:0] $end
$attrbegin array packed bounds 4294967296 $end
$scope sv_array v_str32x2 $end
$attrbegin pack packed members 1 $end
$scope struct [1] $end
$var logic 32 C data [31:0] $end
$var logic 32 E data [31:0] $end
$upscope $end
$attrbegin pack packed members 1 $end
$scope struct [0] $end
$var logic 32 D data [31:0] $end
$var logic 32 F data [31:0] $end
$upscope $end
$upscope $end
$attrbegin misc 07 "" 1 $end
$var int 32 E v_enumed [31:0] $end
$var int 32 G v_enumed [31:0] $end
$attrbegin misc 07 "" 1 $end
$var int 32 F v_enumed2 [31:0] $end
$var int 32 H v_enumed2 [31:0] $end
$attrbegin misc 07 "" 2 $end
$var logic 3 G v_enumb [2:0] $end
$var logic 3 I v_enumb [2:0] $end
$attrbegin pack packed members 2 $end
$scope struct v_enumb2_str $end
$attrbegin misc 07 "" 2 $end
$var logic 3 H a [2:0] $end
$var logic 3 J a [2:0] $end
$attrbegin misc 07 "" 2 $end
$var logic 3 I b [2:0] $end
$var logic 3 K b [2:0] $end
$upscope $end
$attrbegin array unpacked bounds -8589934592 $end
$scope sv_array unpacked_array $end
$var logic 8 J unpacked_array[-2] [7:0] $end
$var logic 8 K unpacked_array[-1] [7:0] $end
$var logic 8 L unpacked_array[0] [7:0] $end
$var logic 8 L unpacked_array[-2] [7:0] $end
$var logic 8 M unpacked_array[-1] [7:0] $end
$var logic 8 N unpacked_array[0] [7:0] $end
$upscope $end
$var bit 1 M LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$var bit 1 O LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$upscope $end
$upscope $end
$enddefinitions $end
#0
$dumpvars
0M
0O
b00000000 N
b00000000 M
b00000000 L
b00000000 K
b00000000 J
b000 K
b000 J
b000 I
b000 H
b000 G
b00000000000000000000000000000000 F
b00000000000000000000000000000000 H
b00000000000000000000000000000000 G
b00000000000000000000000011111111 F
b00000000000000000000000000000000 E
b00000000000000000000000011111111 D
b00000000000000000000000000000000 C
b0000000000000000000000000000000000000000000000000000000000000000 B
b0000000000000000000000000000000000000000000000000000000000000000 D
r0 C
r0 B
r0 A
r0 @
r0 ?
0@
0?
0>
0=
0<
0;
b00 :
b00 9
b00 <
b00 ;
0:
09
08
07
06
@ -176,11 +183,11 @@ b00 9
03
02
01
00
0/
b00 0
b00 /
b00 .
b00 -
b00 ,
0-
0,
0+
0*
0)
@ -204,52 +211,56 @@ b00000000000000000000000000000001 #
1)
1*
1+
b11 ,
b11 -
1,
1-
b11 .
1/
10
b11 /
b11 0
11
12
b11 9
b11 :
1;
1<
13
14
b11 ;
b11 <
1=
1>
r0.1 ?
r0.2 @
r0.3 A
b00000000000000000000000000000001 C
b00000000000000000000000011111110 D
1?
1@
r0.1 A
r0.2 B
r0.3 C
b00000000000000000000000000000001 E
b00000000000000000000000000000010 F
b111 G
b00000000000000000000000011111110 F
b00000000000000000000000000000001 G
b00000000000000000000000000000010 H
b111 I
#15
0!
#20
1!
b110 G
b00000000000000000000000000000100 F
b110 I
b00000000000000000000000000000100 H
b00000000000000000000000000000010 G
b00000000000000000000000011111101 F
b00000000000000000000000000000010 E
b00000000000000000000000011111101 D
b00000000000000000000000000000010 C
r0.6 A
r0.4 @
r0.2 ?
r0.6 C
r0.4 B
r0.2 A
0@
0?
0>
0=
0<
0;
b00 :
b00 9
b00 <
b00 ;
04
03
02
01
00
0/
b00 0
b00 /
b00 .
b00 -
b00 ,
0-
0,
0+
0*
0)
@ -259,14 +270,14 @@ b00 ,
0%
0$
b00000000000000000000000000000010 #
b111 H
b111 I
b111 J
b111 K
#25
0!
#30
1!
b110 I
b110 H
b110 K
b110 J
b00000000000000000000000000000011 #
1$
1%
@ -276,52 +287,56 @@ b00000000000000000000000000000011 #
1)
1*
1+
b11 ,
b11 -
1,
1-
b11 .
1/
10
b11 /
b11 0
11
12
b11 9
b11 :
1;
1<
13
14
b11 ;
b11 <
1=
1>
r0.3 ?
r0.6000000000000001 @
r0.8999999999999999 A
b00000000000000000000000000000011 C
b00000000000000000000000011111100 D
1?
1@
r0.3 A
r0.6000000000000001 B
r0.8999999999999999 C
b00000000000000000000000000000011 E
b00000000000000000000000000000110 F
b101 G
b00000000000000000000000011111100 F
b00000000000000000000000000000011 G
b00000000000000000000000000000110 H
b101 I
#35
0!
#40
1!
b100 G
b00000000000000000000000000001000 F
b100 I
b00000000000000000000000000001000 H
b00000000000000000000000000000100 G
b00000000000000000000000011111011 F
b00000000000000000000000000000100 E
b00000000000000000000000011111011 D
b00000000000000000000000000000100 C
r1.2 A
r0.8 @
r0.4 ?
r1.2 C
r0.8 B
r0.4 A
0@
0?
0>
0=
0<
0;
b00 :
b00 9
b00 <
b00 ;
04
03
02
01
00
0/
b00 0
b00 /
b00 .
b00 -
b00 ,
0-
0,
0+
0*
0)
@ -331,14 +346,14 @@ b00 ,
0%
0$
b00000000000000000000000000000100 #
b101 H
b101 I
b101 J
b101 K
#45
0!
#50
1!
b100 I
b100 H
b100 K
b100 J
b00000000000000000000000000000101 #
1$
1%
@ -348,52 +363,56 @@ b00000000000000000000000000000101 #
1)
1*
1+
b11 ,
b11 -
1,
1-
b11 .
1/
10
b11 /
b11 0
11
12
b11 9
b11 :
1;
1<
13
14
b11 ;
b11 <
1=
1>
r0.5 ?
r1 @
r1.5 A
b00000000000000000000000000000101 C
b00000000000000000000000011111010 D
1?
1@
r0.5 A
r1 B
r1.5 C
b00000000000000000000000000000101 E
b00000000000000000000000000001010 F
b011 G
b00000000000000000000000011111010 F
b00000000000000000000000000000101 G
b00000000000000000000000000001010 H
b011 I
#55
0!
#60
1!
b010 G
b00000000000000000000000000001100 F
b010 I
b00000000000000000000000000001100 H
b00000000000000000000000000000110 G
b00000000000000000000000011111001 F
b00000000000000000000000000000110 E
b00000000000000000000000011111001 D
b00000000000000000000000000000110 C
r1.8 A
r1.2 @
r0.6 ?
r1.8 C
r1.2 B
r0.6 A
0@
0?
0>
0=
0<
0;
b00 :
b00 9
b00 <
b00 ;
04
03
02
01
00
0/
b00 0
b00 /
b00 .
b00 -
b00 ,
0-
0,
0+
0*
0)
@ -403,5 +422,5 @@ b00 ,
0%
0$
b00000000000000000000000000000110 #
b011 H
b011 I
b011 J
b011 K

View File

@ -52,20 +52,20 @@
(cyc\[31\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arrp\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arrp\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arrp_arrp[3]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arrp_arrp[3]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arrp_arrp[4]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arrp_arrp[4]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru[1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arrp_arrp[3]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arrp_arrp[3]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru[2] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[3][1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[3][2] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[4][1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru[1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[4][2] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arrp[3]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_arrp[3]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_arru[4][1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[3][2] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arru[3][1] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_arru_arrp[4]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_arrp[4]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_arrp[3]\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_arru_arrp[3]\[1\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(v_real\[0\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_real\[1\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(v_real\[2\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
@ -421,6 +421,12 @@
(b0 (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
)
)
(INSTANCE v_strp2
(NET
(b1 (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(b0 (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
)
)
(INSTANCE v_strp_strp
(INSTANCE x1
(NET
@ -449,19 +455,13 @@
)
)
)
(INSTANCE v_arrp_strp[3]
(NET
(b1 (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(b0 (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
)
)
(INSTANCE v_arrp_strp[4]
(NET
(b1 (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(b0 (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
)
)
(INSTANCE v_arru_strp[3]
(INSTANCE v_arrp_strp[3]
(NET
(b1 (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(b0 (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
@ -473,16 +473,22 @@
(b0 (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
)
)
(INSTANCE v_str32x2[0]
(INSTANCE v_arru_strp[3]
(NET
(data\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 7))
(data\[1\] (T0 20) (T1 40) (TZ 0) (TX 0) (TB 0) (TC 4))
(data\[2\] (T0 20) (T1 40) (TZ 0) (TX 0) (TB 0) (TC 2))
(data\[3\] (T0 0) (T1 60) (TZ 0) (TX 0) (TB 0) (TC 1))
(data\[4\] (T0 0) (T1 60) (TZ 0) (TX 0) (TB 0) (TC 1))
(data\[5\] (T0 0) (T1 60) (TZ 0) (TX 0) (TB 0) (TC 1))
(data\[6\] (T0 0) (T1 60) (TZ 0) (TX 0) (TB 0) (TC 1))
(data\[7\] (T0 0) (T1 60) (TZ 0) (TX 0) (TB 0) (TC 1))
(b1 (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(b0 (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
)
)
(INSTANCE v_str32x2[1]
(NET
(data\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(data\[1\] (T0 40) (T1 20) (TZ 0) (TX 0) (TB 0) (TC 3))
(data\[2\] (T0 40) (T1 20) (TZ 0) (TX 0) (TB 0) (TC 1))
(data\[3\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(data\[4\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(data\[5\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(data\[6\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(data\[7\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(data\[8\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(data\[9\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(data\[10\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
@ -509,16 +515,16 @@
(data\[31\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
)
)
(INSTANCE v_str32x2[1]
(INSTANCE v_str32x2[0]
(NET
(data\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(data\[1\] (T0 40) (T1 20) (TZ 0) (TX 0) (TB 0) (TC 3))
(data\[2\] (T0 40) (T1 20) (TZ 0) (TX 0) (TB 0) (TC 1))
(data\[3\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(data\[4\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(data\[5\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(data\[6\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(data\[7\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(data\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 7))
(data\[1\] (T0 20) (T1 40) (TZ 0) (TX 0) (TB 0) (TC 4))
(data\[2\] (T0 20) (T1 40) (TZ 0) (TX 0) (TB 0) (TC 2))
(data\[3\] (T0 0) (T1 60) (TZ 0) (TX 0) (TB 0) (TC 1))
(data\[4\] (T0 0) (T1 60) (TZ 0) (TX 0) (TB 0) (TC 1))
(data\[5\] (T0 0) (T1 60) (TZ 0) (TX 0) (TB 0) (TC 1))
(data\[6\] (T0 0) (T1 60) (TZ 0) (TX 0) (TB 0) (TC 1))
(data\[7\] (T0 0) (T1 60) (TZ 0) (TX 0) (TB 0) (TC 1))
(data\[8\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(data\[9\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(data\[10\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))

View File

@ -1,85 +1,89 @@
$version Generated by VerilatedVcd $end
$timescale 1ps $end
$scope module top $end
$var wire 1 F clk $end
$var wire 1 H clk $end
$scope module $unit $end
$var wire 1 " global_bit $end
$upscope $end
$scope module t $end
$var wire 1 F clk $end
$var wire 1 H clk $end
$var wire 32 # cyc [31:0] $end
$scope module v_strp $end
$var wire 1 $ b1 $end
$var wire 1 % b0 $end
$upscope $end
$scope module v_strp2 $end
$var wire 1 & b1 $end
$var wire 1 ' b0 $end
$upscope $end
$scope module v_strp_strp $end
$scope module x1 $end
$var wire 1 & b1 $end
$var wire 1 ' b0 $end
$upscope $end
$scope module x0 $end
$var wire 1 ( b1 $end
$var wire 1 ) b0 $end
$upscope $end
$scope module x0 $end
$var wire 1 * b1 $end
$var wire 1 + b0 $end
$upscope $end
$upscope $end
$scope module v_unip_strp $end
$scope module x1 $end
$var wire 1 * b1 $end
$var wire 1 + b0 $end
$var wire 1 , b1 $end
$var wire 1 - b0 $end
$upscope $end
$scope module x0 $end
$var wire 1 * b1 $end
$var wire 1 + b0 $end
$var wire 1 , b1 $end
$var wire 1 - b0 $end
$upscope $end
$upscope $end
$var wire 2 , v_arrp [2:1] $end
$var wire 2 - v_arrp_arrp[3] [2:1] $end
$var wire 2 . v_arrp_arrp[4] [2:1] $end
$scope module v_arrp_strp[3] $end
$var wire 1 / b1 $end
$var wire 1 0 b0 $end
$upscope $end
$var wire 2 . v_arrp [2:1] $end
$var wire 2 / v_arrp_arrp[4] [2:1] $end
$var wire 2 0 v_arrp_arrp[3] [2:1] $end
$scope module v_arrp_strp[4] $end
$var wire 1 1 b1 $end
$var wire 1 2 b0 $end
$upscope $end
$var wire 1 G v_arru[1] $end
$var wire 1 H v_arru[2] $end
$var wire 1 I v_arru_arru[3][1] $end
$var wire 1 J v_arru_arru[3][2] $end
$var wire 1 K v_arru_arru[4][1] $end
$var wire 1 L v_arru_arru[4][2] $end
$var wire 2 3 v_arru_arrp[3] [2:1] $end
$var wire 2 4 v_arru_arrp[4] [2:1] $end
$scope module v_arru_strp[3] $end
$var wire 1 5 b1 $end
$var wire 1 6 b0 $end
$scope module v_arrp_strp[3] $end
$var wire 1 3 b1 $end
$var wire 1 4 b0 $end
$upscope $end
$var wire 1 I v_arru[2] $end
$var wire 1 J v_arru[1] $end
$var wire 1 K v_arru_arru[4][2] $end
$var wire 1 L v_arru_arru[4][1] $end
$var wire 1 M v_arru_arru[3][2] $end
$var wire 1 N v_arru_arru[3][1] $end
$var wire 2 5 v_arru_arrp[4] [2:1] $end
$var wire 2 6 v_arru_arrp[3] [2:1] $end
$scope module v_arru_strp[4] $end
$var wire 1 7 b1 $end
$var wire 1 8 b0 $end
$upscope $end
$var real 64 9 v_real $end
$var real 64 ; v_arr_real[0] $end
$var real 64 = v_arr_real[1] $end
$var wire 64 M v_chandle [63:0] $end
$scope module v_str32x2[0] $end
$var wire 32 ? data [31:0] $end
$scope module v_arru_strp[3] $end
$var wire 1 9 b1 $end
$var wire 1 : b0 $end
$upscope $end
$var real 64 ; v_real $end
$var real 64 = v_arr_real[0] $end
$var real 64 ? v_arr_real[1] $end
$var wire 64 O v_chandle [63:0] $end
$scope module v_str32x2[1] $end
$var wire 32 @ data [31:0] $end
$var wire 32 A data [31:0] $end
$upscope $end
$var wire 32 A v_enumed [31:0] $end
$var wire 32 B v_enumed2 [31:0] $end
$var wire 3 C v_enumb [2:0] $end
$scope module v_str32x2[0] $end
$var wire 32 B data [31:0] $end
$upscope $end
$var wire 32 C v_enumed [31:0] $end
$var wire 32 D v_enumed2 [31:0] $end
$var wire 3 E v_enumb [2:0] $end
$scope module v_enumb2_str $end
$var wire 3 D a [2:0] $end
$var wire 3 E b [2:0] $end
$var wire 3 F a [2:0] $end
$var wire 3 G b [2:0] $end
$upscope $end
$var wire 8 O unpacked_array[-2] [7:0] $end
$var wire 8 P unpacked_array[-1] [7:0] $end
$var wire 8 Q unpacked_array[0] [7:0] $end
$var wire 1 R LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$var wire 8 Q unpacked_array[-2] [7:0] $end
$var wire 8 R unpacked_array[-1] [7:0] $end
$var wire 8 S unpacked_array[0] [7:0] $end
$var wire 1 T LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$upscope $end
$upscope $end
$enddefinitions $end
@ -96,41 +100,43 @@ b00000000000000000000000000000000 #
0)
0*
0+
b00 ,
b00 -
0,
0-
b00 .
0/
00
b00 /
b00 0
01
02
b00 3
b00 4
05
06
03
04
b00 5
b00 6
07
08
r0 9
09
0:
r0 ;
r0 =
b00000000000000000000000011111111 ?
b00000000000000000000000000000000 @
r0 ?
b00000000000000000000000000000000 A
b00000000000000000000000000000000 B
b000 C
b000 D
b00000000000000000000000011111111 B
b00000000000000000000000000000000 C
b00000000000000000000000000000000 D
b000 E
0F
0G
b000 F
b000 G
0H
0I
0J
0K
0L
b0000000000000000000000000000000000000000000000000000000000000000 M
b00000000 O
b00000000 P
0M
0N
b0000000000000000000000000000000000000000000000000000000000000000 O
b00000000 Q
0R
b00000000 R
b00000000 S
0T
#10
b00000000000000000000000000000001 #
1$
@ -141,30 +147,32 @@ b00000000000000000000000000000001 #
1)
1*
1+
b11 ,
b11 -
1,
1-
b11 .
1/
10
b11 /
b11 0
11
12
b11 3
b11 4
15
16
13
14
b11 5
b11 6
17
18
r0.1 9
r0.2 ;
r0.3 =
b00000000000000000000000011111110 ?
b00000000000000000000000000000001 @
19
1:
r0.1 ;
r0.2 =
r0.3 ?
b00000000000000000000000000000001 A
b00000000000000000000000000000010 B
b111 C
1F
b00000000000000000000000011111110 B
b00000000000000000000000000000001 C
b00000000000000000000000000000010 D
b111 E
1H
#15
0F
0H
#20
b00000000000000000000000000000010 #
0$
@ -175,32 +183,34 @@ b00000000000000000000000000000010 #
0)
0*
0+
b00 ,
b00 -
0,
0-
b00 .
0/
00
b00 /
b00 0
01
02
b00 3
b00 4
05
06
03
04
b00 5
b00 6
07
08
r0.2 9
r0.4 ;
r0.6 =
b00000000000000000000000011111101 ?
b00000000000000000000000000000010 @
09
0:
r0.2 ;
r0.4 =
r0.6 ?
b00000000000000000000000000000010 A
b00000000000000000000000000000100 B
b110 C
b111 D
b111 E
1F
b00000000000000000000000011111101 B
b00000000000000000000000000000010 C
b00000000000000000000000000000100 D
b110 E
b111 F
b111 G
1H
#25
0F
0H
#30
b00000000000000000000000000000011 #
1$
@ -211,32 +221,34 @@ b00000000000000000000000000000011 #
1)
1*
1+
b11 ,
b11 -
1,
1-
b11 .
1/
10
b11 /
b11 0
11
12
b11 3
b11 4
15
16
13
14
b11 5
b11 6
17
18
r0.3 9
r0.6000000000000001 ;
r0.8999999999999999 =
b00000000000000000000000011111100 ?
b00000000000000000000000000000011 @
19
1:
r0.3 ;
r0.6000000000000001 =
r0.8999999999999999 ?
b00000000000000000000000000000011 A
b00000000000000000000000000000110 B
b101 C
b110 D
b110 E
1F
b00000000000000000000000011111100 B
b00000000000000000000000000000011 C
b00000000000000000000000000000110 D
b101 E
b110 F
b110 G
1H
#35
0F
0H
#40
b00000000000000000000000000000100 #
0$
@ -247,32 +259,34 @@ b00000000000000000000000000000100 #
0)
0*
0+
b00 ,
b00 -
0,
0-
b00 .
0/
00
b00 /
b00 0
01
02
b00 3
b00 4
05
06
03
04
b00 5
b00 6
07
08
r0.4 9
r0.8 ;
r1.2 =
b00000000000000000000000011111011 ?
b00000000000000000000000000000100 @
09
0:
r0.4 ;
r0.8 =
r1.2 ?
b00000000000000000000000000000100 A
b00000000000000000000000000001000 B
b100 C
b101 D
b101 E
1F
b00000000000000000000000011111011 B
b00000000000000000000000000000100 C
b00000000000000000000000000001000 D
b100 E
b101 F
b101 G
1H
#45
0F
0H
#50
b00000000000000000000000000000101 #
1$
@ -283,32 +297,34 @@ b00000000000000000000000000000101 #
1)
1*
1+
b11 ,
b11 -
1,
1-
b11 .
1/
10
b11 /
b11 0
11
12
b11 3
b11 4
15
16
13
14
b11 5
b11 6
17
18
r0.5 9
r1 ;
r1.5 =
b00000000000000000000000011111010 ?
b00000000000000000000000000000101 @
19
1:
r0.5 ;
r1 =
r1.5 ?
b00000000000000000000000000000101 A
b00000000000000000000000000001010 B
b011 C
b100 D
b100 E
1F
b00000000000000000000000011111010 B
b00000000000000000000000000000101 C
b00000000000000000000000000001010 D
b011 E
b100 F
b100 G
1H
#55
0F
0H
#60
b00000000000000000000000000000110 #
0$
@ -319,27 +335,29 @@ b00000000000000000000000000000110 #
0)
0*
0+
b00 ,
b00 -
0,
0-
b00 .
0/
00
b00 /
b00 0
01
02
b00 3
b00 4
05
06
03
04
b00 5
b00 6
07
08
r0.6 9
r1.2 ;
r1.8 =
b00000000000000000000000011111001 ?
b00000000000000000000000000000110 @
09
0:
r0.6 ;
r1.2 =
r1.8 ?
b00000000000000000000000000000110 A
b00000000000000000000000000001100 B
b010 C
b011 D
b011 E
1F
b00000000000000000000000011111001 B
b00000000000000000000000000000110 C
b00000000000000000000000000001100 D
b010 E
b011 F
b011 G
1H

View File

@ -1,5 +1,5 @@
$date
Sat Mar 14 09:16:58 2026
Tue Mar 31 17:14:45 2026
$end
$version
@ -23,150 +23,157 @@ $end
$var bit 1 % b0 $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct v_strp2 $end
$var bit 1 & b1 $end
$var bit 1 ' b0 $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct v_strp_strp $end
$attrbegin pack packed members 2 $end
$scope struct x1 $end
$var bit 1 & b1 $end
$var bit 1 ' b0 $end
$var bit 1 ( b1 $end
$var bit 1 ) b0 $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct x0 $end
$var bit 1 ( b1 $end
$var bit 1 ) b0 $end
$var bit 1 * b1 $end
$var bit 1 + b0 $end
$upscope $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope union v_unip_strp $end
$attrbegin pack packed members 2 $end
$scope struct x1 $end
$var bit 1 * b1 $end
$var bit 1 + b0 $end
$var bit 1 , b1 $end
$var bit 1 - b0 $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct x0 $end
$var bit 1 * b1 $end
$var bit 1 + b0 $end
$var bit 1 , b1 $end
$var bit 1 - b0 $end
$upscope $end
$upscope $end
$var bit 2 , v_arrp [2:1] $end
$var bit 2 . v_arrp [2:1] $end
$attrbegin array packed bounds 17179869187 $end
$scope sv_array v_arrp_arrp $end
$var bit 2 - v_arrp_arrp[4] [2:1] $end
$var bit 2 . v_arrp_arrp[3] [2:1] $end
$var bit 2 / v_arrp_arrp[4] [2:1] $end
$var bit 2 0 v_arrp_arrp[3] [2:1] $end
$upscope $end
$attrbegin array packed bounds 17179869187 $end
$scope sv_array v_arrp_strp $end
$attrbegin pack packed members 2 $end
$scope struct [4] $end
$var bit 1 / b1 $end
$var bit 1 0 b0 $end
$var bit 1 1 b1 $end
$var bit 1 2 b0 $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct [3] $end
$var bit 1 1 b1 $end
$var bit 1 2 b0 $end
$var bit 1 3 b1 $end
$var bit 1 4 b0 $end
$upscope $end
$upscope $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array v_arru $end
$var bit 1 3 v_arru[2] $end
$var bit 1 4 v_arru[1] $end
$var bit 1 5 v_arru[2] $end
$var bit 1 6 v_arru[1] $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_arru $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array [4] $end
$var bit 1 5 v_arru_arru[4][2] $end
$var bit 1 6 v_arru_arru[4][1] $end
$var bit 1 7 v_arru_arru[4][2] $end
$var bit 1 8 v_arru_arru[4][1] $end
$upscope $end
$attrbegin array unpacked bounds 8589934593 $end
$scope sv_array [3] $end
$var bit 1 7 v_arru_arru[3][2] $end
$var bit 1 8 v_arru_arru[3][1] $end
$var bit 1 9 v_arru_arru[3][2] $end
$var bit 1 : v_arru_arru[3][1] $end
$upscope $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_arrp $end
$var bit 2 9 v_arru_arrp[4] [2:1] $end
$var bit 2 : v_arru_arrp[3] [2:1] $end
$var bit 2 ; v_arru_arrp[4] [2:1] $end
$var bit 2 < v_arru_arrp[3] [2:1] $end
$upscope $end
$attrbegin array unpacked bounds 17179869187 $end
$scope sv_array v_arru_strp $end
$attrbegin pack packed members 2 $end
$scope struct [4] $end
$var bit 1 ; b1 $end
$var bit 1 < b0 $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct [3] $end
$var bit 1 = b1 $end
$var bit 1 > b0 $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct [3] $end
$var bit 1 ? b1 $end
$var bit 1 @ b0 $end
$upscope $end
$upscope $end
$var real 64 ? v_real $end
$var real 64 A v_real $end
$attrbegin array unpacked bounds 1 $end
$scope sv_array v_arr_real $end
$var real 64 @ v_arr_real[0] $end
$var real 64 A v_arr_real[1] $end
$var real 64 B v_arr_real[0] $end
$var real 64 C v_arr_real[1] $end
$upscope $end
$var longint 64 B v_chandle [63:0] $end
$var longint 64 D v_chandle [63:0] $end
$attrbegin array packed bounds 4294967296 $end
$scope sv_array v_str32x2 $end
$attrbegin pack packed members 1 $end
$scope struct [1] $end
$var logic 32 C data [31:0] $end
$var logic 32 E data [31:0] $end
$upscope $end
$attrbegin pack packed members 1 $end
$scope struct [0] $end
$var logic 32 D data [31:0] $end
$var logic 32 F data [31:0] $end
$upscope $end
$upscope $end
$attrbegin misc 07 "" 1 $end
$var int 32 E v_enumed [31:0] $end
$var int 32 G v_enumed [31:0] $end
$attrbegin misc 07 "" 1 $end
$var int 32 F v_enumed2 [31:0] $end
$var int 32 H v_enumed2 [31:0] $end
$attrbegin misc 07 "" 2 $end
$var logic 3 G v_enumb [2:0] $end
$var logic 3 I v_enumb [2:0] $end
$attrbegin pack packed members 2 $end
$scope struct v_enumb2_str $end
$attrbegin misc 07 "" 2 $end
$var logic 3 H a [2:0] $end
$var logic 3 J a [2:0] $end
$attrbegin misc 07 "" 2 $end
$var logic 3 I b [2:0] $end
$var logic 3 K b [2:0] $end
$upscope $end
$attrbegin array unpacked bounds -8589934592 $end
$scope sv_array unpacked_array $end
$var logic 8 J unpacked_array[-2] [7:0] $end
$var logic 8 K unpacked_array[-1] [7:0] $end
$var logic 8 L unpacked_array[0] [7:0] $end
$var logic 8 L unpacked_array[-2] [7:0] $end
$var logic 8 M unpacked_array[-1] [7:0] $end
$var logic 8 N unpacked_array[0] [7:0] $end
$upscope $end
$var bit 1 M LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$var bit 1 O LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$upscope $end
$upscope $end
$enddefinitions $end
#0
$dumpvars
0M
0O
b00000000 N
b00000000 M
b00000000 L
b00000000 K
b00000000 J
b000 K
b000 J
b000 I
b000 H
b000 G
b00000000000000000000000000000000 F
b00000000000000000000000000000000 H
b00000000000000000000000000000000 G
b00000000000000000000000011111111 F
b00000000000000000000000000000000 E
b00000000000000000000000011111111 D
b00000000000000000000000000000000 C
b0000000000000000000000000000000000000000000000000000000000000000 B
b0000000000000000000000000000000000000000000000000000000000000000 D
r0 C
r0 B
r0 A
r0 @
r0 ?
0@
0?
0>
0=
0<
0;
b00 :
b00 9
b00 <
b00 ;
0:
09
08
07
06
@ -175,11 +182,11 @@ b00 9
03
02
01
00
0/
b00 0
b00 /
b00 .
b00 -
b00 ,
0-
0,
0+
0*
0)
@ -203,52 +210,56 @@ b00000000000000000000000000000001 #
1)
1*
1+
b11 ,
b11 -
1,
1-
b11 .
1/
10
b11 /
b11 0
11
12
b11 9
b11 :
1;
1<
13
14
b11 ;
b11 <
1=
1>
r0.1 ?
r0.2 @
r0.3 A
b00000000000000000000000000000001 C
b00000000000000000000000011111110 D
1?
1@
r0.1 A
r0.2 B
r0.3 C
b00000000000000000000000000000001 E
b00000000000000000000000000000010 F
b111 G
b00000000000000000000000011111110 F
b00000000000000000000000000000001 G
b00000000000000000000000000000010 H
b111 I
#15
0"
#20
1"
b110 G
b00000000000000000000000000000100 F
b110 I
b00000000000000000000000000000100 H
b00000000000000000000000000000010 G
b00000000000000000000000011111101 F
b00000000000000000000000000000010 E
b00000000000000000000000011111101 D
b00000000000000000000000000000010 C
r0.6 A
r0.4 @
r0.2 ?
r0.6 C
r0.4 B
r0.2 A
0@
0?
0>
0=
0<
0;
b00 :
b00 9
b00 <
b00 ;
04
03
02
01
00
0/
b00 0
b00 /
b00 .
b00 -
b00 ,
0-
0,
0+
0*
0)
@ -258,14 +269,14 @@ b00 ,
0%
0$
b00000000000000000000000000000010 #
b111 H
b111 I
b111 J
b111 K
#25
0"
#30
1"
b110 I
b110 H
b110 K
b110 J
b00000000000000000000000000000011 #
1$
1%
@ -275,52 +286,56 @@ b00000000000000000000000000000011 #
1)
1*
1+
b11 ,
b11 -
1,
1-
b11 .
1/
10
b11 /
b11 0
11
12
b11 9
b11 :
1;
1<
13
14
b11 ;
b11 <
1=
1>
r0.3 ?
r0.6000000000000001 @
r0.8999999999999999 A
b00000000000000000000000000000011 C
b00000000000000000000000011111100 D
1?
1@
r0.3 A
r0.6000000000000001 B
r0.8999999999999999 C
b00000000000000000000000000000011 E
b00000000000000000000000000000110 F
b101 G
b00000000000000000000000011111100 F
b00000000000000000000000000000011 G
b00000000000000000000000000000110 H
b101 I
#35
0"
#40
1"
b100 G
b00000000000000000000000000001000 F
b100 I
b00000000000000000000000000001000 H
b00000000000000000000000000000100 G
b00000000000000000000000011111011 F
b00000000000000000000000000000100 E
b00000000000000000000000011111011 D
b00000000000000000000000000000100 C
r1.2 A
r0.8 @
r0.4 ?
r1.2 C
r0.8 B
r0.4 A
0@
0?
0>
0=
0<
0;
b00 :
b00 9
b00 <
b00 ;
04
03
02
01
00
0/
b00 0
b00 /
b00 .
b00 -
b00 ,
0-
0,
0+
0*
0)
@ -330,14 +345,14 @@ b00 ,
0%
0$
b00000000000000000000000000000100 #
b101 H
b101 I
b101 J
b101 K
#45
0"
#50
1"
b100 I
b100 H
b100 K
b100 J
b00000000000000000000000000000101 #
1$
1%
@ -347,52 +362,56 @@ b00000000000000000000000000000101 #
1)
1*
1+
b11 ,
b11 -
1,
1-
b11 .
1/
10
b11 /
b11 0
11
12
b11 9
b11 :
1;
1<
13
14
b11 ;
b11 <
1=
1>
r0.5 ?
r1 @
r1.5 A
b00000000000000000000000000000101 C
b00000000000000000000000011111010 D
1?
1@
r0.5 A
r1 B
r1.5 C
b00000000000000000000000000000101 E
b00000000000000000000000000001010 F
b011 G
b00000000000000000000000011111010 F
b00000000000000000000000000000101 G
b00000000000000000000000000001010 H
b011 I
#55
0"
#60
1"
b010 G
b00000000000000000000000000001100 F
b010 I
b00000000000000000000000000001100 H
b00000000000000000000000000000110 G
b00000000000000000000000011111001 F
b00000000000000000000000000000110 E
b00000000000000000000000011111001 D
b00000000000000000000000000000110 C
r1.8 A
r1.2 @
r0.6 ?
r1.8 C
r1.2 B
r0.6 A
0@
0?
0>
0=
0<
0;
b00 :
b00 9
b00 <
b00 ;
04
03
02
01
00
0/
b00 0
b00 /
b00 .
b00 -
b00 ,
0-
0,
0+
0*
0)
@ -402,6 +421,6 @@ b00 ,
0%
0$
b00000000000000000000000000000110 #
b011 H
b011 I
b011 J
b011 K
#64

View File

@ -5,80 +5,84 @@ $timescale 1ps $end
$var wire 1 " global_bit $end
$upscope $end
$scope module t $end
$var wire 1 F clk $end
$var wire 1 H clk $end
$var wire 32 # cyc [31:0] $end
$scope module v_strp $end
$var wire 1 $ b1 $end
$var wire 1 % b0 $end
$upscope $end
$scope module v_strp2 $end
$var wire 1 & b1 $end
$var wire 1 ' b0 $end
$upscope $end
$scope module v_strp_strp $end
$scope module x1 $end
$var wire 1 & b1 $end
$var wire 1 ' b0 $end
$upscope $end
$scope module x0 $end
$var wire 1 ( b1 $end
$var wire 1 ) b0 $end
$upscope $end
$scope module x0 $end
$var wire 1 * b1 $end
$var wire 1 + b0 $end
$upscope $end
$upscope $end
$scope module v_unip_strp $end
$scope module x1 $end
$var wire 1 * b1 $end
$var wire 1 + b0 $end
$var wire 1 , b1 $end
$var wire 1 - b0 $end
$upscope $end
$scope module x0 $end
$var wire 1 * b1 $end
$var wire 1 + b0 $end
$var wire 1 , b1 $end
$var wire 1 - b0 $end
$upscope $end
$upscope $end
$var wire 2 , v_arrp [2:1] $end
$var wire 2 - v_arrp_arrp[4] [2:1] $end
$var wire 2 . v_arrp_arrp[3] [2:1] $end
$var wire 2 . v_arrp [2:1] $end
$var wire 2 / v_arrp_arrp[4] [2:1] $end
$var wire 2 0 v_arrp_arrp[3] [2:1] $end
$scope module v_arrp_strp[4] $end
$var wire 1 / b1 $end
$var wire 1 0 b0 $end
$upscope $end
$scope module v_arrp_strp[3] $end
$var wire 1 1 b1 $end
$var wire 1 2 b0 $end
$upscope $end
$var wire 1 G v_arru[2] $end
$var wire 1 H v_arru[1] $end
$var wire 1 I v_arru_arru[4][2] $end
$var wire 1 J v_arru_arru[4][1] $end
$var wire 1 K v_arru_arru[3][2] $end
$var wire 1 L v_arru_arru[3][1] $end
$var wire 2 3 v_arru_arrp[4] [2:1] $end
$var wire 2 4 v_arru_arrp[3] [2:1] $end
$scope module v_arru_strp[4] $end
$var wire 1 5 b1 $end
$var wire 1 6 b0 $end
$scope module v_arrp_strp[3] $end
$var wire 1 3 b1 $end
$var wire 1 4 b0 $end
$upscope $end
$scope module v_arru_strp[3] $end
$var wire 1 I v_arru[2] $end
$var wire 1 J v_arru[1] $end
$var wire 1 K v_arru_arru[4][2] $end
$var wire 1 L v_arru_arru[4][1] $end
$var wire 1 M v_arru_arru[3][2] $end
$var wire 1 N v_arru_arru[3][1] $end
$var wire 2 5 v_arru_arrp[4] [2:1] $end
$var wire 2 6 v_arru_arrp[3] [2:1] $end
$scope module v_arru_strp[4] $end
$var wire 1 7 b1 $end
$var wire 1 8 b0 $end
$upscope $end
$var real 64 9 v_real $end
$var real 64 ; v_arr_real[0] $end
$var real 64 = v_arr_real[1] $end
$var wire 64 M v_chandle [63:0] $end
$scope module v_arru_strp[3] $end
$var wire 1 9 b1 $end
$var wire 1 : b0 $end
$upscope $end
$var real 64 ; v_real $end
$var real 64 = v_arr_real[0] $end
$var real 64 ? v_arr_real[1] $end
$var wire 64 O v_chandle [63:0] $end
$scope module v_str32x2[1] $end
$var wire 32 ? data [31:0] $end
$var wire 32 A data [31:0] $end
$upscope $end
$scope module v_str32x2[0] $end
$var wire 32 @ data [31:0] $end
$var wire 32 B data [31:0] $end
$upscope $end
$var wire 32 A v_enumed [31:0] $end
$var wire 32 B v_enumed2 [31:0] $end
$var wire 3 C v_enumb [2:0] $end
$var wire 32 C v_enumed [31:0] $end
$var wire 32 D v_enumed2 [31:0] $end
$var wire 3 E v_enumb [2:0] $end
$scope module v_enumb2_str $end
$var wire 3 D a [2:0] $end
$var wire 3 E b [2:0] $end
$var wire 3 F a [2:0] $end
$var wire 3 G b [2:0] $end
$upscope $end
$var wire 8 O unpacked_array[-2] [7:0] $end
$var wire 8 P unpacked_array[-1] [7:0] $end
$var wire 8 Q unpacked_array[0] [7:0] $end
$var wire 1 R LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$var wire 8 Q unpacked_array[-2] [7:0] $end
$var wire 8 R unpacked_array[-1] [7:0] $end
$var wire 8 S unpacked_array[0] [7:0] $end
$var wire 1 T LONGSTART_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_a_very_long_name_which_will_get_hashed_LONGEND $end
$upscope $end
$upscope $end
$enddefinitions $end
@ -95,41 +99,43 @@ b00000000000000000000000000000000 #
0)
0*
0+
b00 ,
b00 -
0,
0-
b00 .
0/
00
b00 /
b00 0
01
02
b00 3
b00 4
05
06
03
04
b00 5
b00 6
07
08
r0 9
09
0:
r0 ;
r0 =
b00000000000000000000000000000000 ?
b00000000000000000000000011111111 @
r0 ?
b00000000000000000000000000000000 A
b00000000000000000000000000000000 B
b000 C
b000 D
b00000000000000000000000011111111 B
b00000000000000000000000000000000 C
b00000000000000000000000000000000 D
b000 E
0F
0G
b000 F
b000 G
0H
0I
0J
0K
0L
b0000000000000000000000000000000000000000000000000000000000000000 M
b00000000 O
b00000000 P
0M
0N
b0000000000000000000000000000000000000000000000000000000000000000 O
b00000000 Q
0R
b00000000 R
b00000000 S
0T
#10
b00000000000000000000000000000001 #
1$
@ -140,30 +146,32 @@ b00000000000000000000000000000001 #
1)
1*
1+
b11 ,
b11 -
1,
1-
b11 .
1/
10
b11 /
b11 0
11
12
b11 3
b11 4
15
16
13
14
b11 5
b11 6
17
18
r0.1 9
r0.2 ;
r0.3 =
b00000000000000000000000000000001 ?
b00000000000000000000000011111110 @
19
1:
r0.1 ;
r0.2 =
r0.3 ?
b00000000000000000000000000000001 A
b00000000000000000000000000000010 B
b111 C
1F
b00000000000000000000000011111110 B
b00000000000000000000000000000001 C
b00000000000000000000000000000010 D
b111 E
1H
#15
0F
0H
#20
b00000000000000000000000000000010 #
0$
@ -174,32 +182,34 @@ b00000000000000000000000000000010 #
0)
0*
0+
b00 ,
b00 -
0,
0-
b00 .
0/
00
b00 /
b00 0
01
02
b00 3
b00 4
05
06
03
04
b00 5
b00 6
07
08
r0.2 9
r0.4 ;
r0.6 =
b00000000000000000000000000000010 ?
b00000000000000000000000011111101 @
09
0:
r0.2 ;
r0.4 =
r0.6 ?
b00000000000000000000000000000010 A
b00000000000000000000000000000100 B
b110 C
b111 D
b111 E
1F
b00000000000000000000000011111101 B
b00000000000000000000000000000010 C
b00000000000000000000000000000100 D
b110 E
b111 F
b111 G
1H
#25
0F
0H
#30
b00000000000000000000000000000011 #
1$
@ -210,32 +220,34 @@ b00000000000000000000000000000011 #
1)
1*
1+
b11 ,
b11 -
1,
1-
b11 .
1/
10
b11 /
b11 0
11
12
b11 3
b11 4
15
16
13
14
b11 5
b11 6
17
18
r0.3 9
r0.6000000000000001 ;
r0.8999999999999999 =
b00000000000000000000000000000011 ?
b00000000000000000000000011111100 @
19
1:
r0.3 ;
r0.6000000000000001 =
r0.8999999999999999 ?
b00000000000000000000000000000011 A
b00000000000000000000000000000110 B
b101 C
b110 D
b110 E
1F
b00000000000000000000000011111100 B
b00000000000000000000000000000011 C
b00000000000000000000000000000110 D
b101 E
b110 F
b110 G
1H
#35
0F
0H
#40
b00000000000000000000000000000100 #
0$
@ -246,32 +258,34 @@ b00000000000000000000000000000100 #
0)
0*
0+
b00 ,
b00 -
0,
0-
b00 .
0/
00
b00 /
b00 0
01
02
b00 3
b00 4
05
06
03
04
b00 5
b00 6
07
08
r0.4 9
r0.8 ;
r1.2 =
b00000000000000000000000000000100 ?
b00000000000000000000000011111011 @
09
0:
r0.4 ;
r0.8 =
r1.2 ?
b00000000000000000000000000000100 A
b00000000000000000000000000001000 B
b100 C
b101 D
b101 E
1F
b00000000000000000000000011111011 B
b00000000000000000000000000000100 C
b00000000000000000000000000001000 D
b100 E
b101 F
b101 G
1H
#45
0F
0H
#50
b00000000000000000000000000000101 #
1$
@ -282,32 +296,34 @@ b00000000000000000000000000000101 #
1)
1*
1+
b11 ,
b11 -
1,
1-
b11 .
1/
10
b11 /
b11 0
11
12
b11 3
b11 4
15
16
13
14
b11 5
b11 6
17
18
r0.5 9
r1 ;
r1.5 =
b00000000000000000000000000000101 ?
b00000000000000000000000011111010 @
19
1:
r0.5 ;
r1 =
r1.5 ?
b00000000000000000000000000000101 A
b00000000000000000000000000001010 B
b011 C
b100 D
b100 E
1F
b00000000000000000000000011111010 B
b00000000000000000000000000000101 C
b00000000000000000000000000001010 D
b011 E
b100 F
b100 G
1H
#55
0F
0H
#60
b00000000000000000000000000000110 #
0$
@ -318,28 +334,30 @@ b00000000000000000000000000000110 #
0)
0*
0+
b00 ,
b00 -
0,
0-
b00 .
0/
00
b00 /
b00 0
01
02
b00 3
b00 4
05
06
03
04
b00 5
b00 6
07
08
r0.6 9
r1.2 ;
r1.8 =
b00000000000000000000000000000110 ?
b00000000000000000000000011111001 @
09
0:
r0.6 ;
r1.2 =
r1.8 ?
b00000000000000000000000000000110 A
b00000000000000000000000000001100 B
b010 C
b011 D
b011 E
1F
b00000000000000000000000011111001 B
b00000000000000000000000000000110 C
b00000000000000000000000000001100 D
b010 E
b011 F
b011 G
1H
#64

View File

@ -0,0 +1,23 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2024 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
import vltest_bootstrap
test.scenarios("vlt_all")
test.compile(v_flags2=[
"--trace-vcd --trace-max-width 0 --trace-max-array 0 --output-split-ctrace 10 --trace-structs"
])
trace_files = glob.glob(test.obj_dir + "/*Trace*.cpp")
if len(trace_files) < 10:
test.error("Too few trace files")
test.execute()
test.passes()

View File

@ -0,0 +1,29 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2026 Wilson Snyder
// SPDX-License-Identifier: CC0-1.0
module t (/*AUTOARG*/
// Inputs
clk
);
input clk;
int cyc = 0;
localparam max = 1000;
logic [31:0] foo [max:0];
logic [max:0] [15:0] [31:0] bar;
always_ff @(posedge clk) begin
cyc <= cyc + 1;
foo[0] <= cyc;
for (int i = 1; i <= max; i++) foo[i] <= foo[i-1];
bar <= (bar << 32) | type(bar)'(cyc);
if (cyc == 10) begin
$write("*-* All Finished *-*\n");
$finish;
end
end
endmodule

View File

@ -0,0 +1,45 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2026 Wilson Snyder
// SPDX-License-Identifier: CC0-1.0
// Test that when struct fields are driven from different clocks,
// no trace_chg_dtype function is created (fields must be traced individually).
bit global_bit;
module t (clk, clk2);
input clk;
input clk2;
integer cyc = 0;
typedef struct packed {
bit b1;
bit b0;
} strp_t;
strp_t v_strp, v_strp2;
logic foo;
logic [7:0] unpacked_array[-7:0];
always @ (posedge clk) begin
cyc <= cyc + 1;
foo <= ~foo;
v_strp.b0 <= cyc[0];
v_strp2.b0 <= cyc[2];
unpacked_array[0] = cyc[8:1];
if (cyc == 5) begin
$write("*-* All Finished *-*\n");
$finish;
end
end
always @(posedge clk2) begin
v_strp.b1 <= cyc[1];
v_strp2.b1 <= cyc[3];
for (int i = -1; i > -8; i--)
unpacked_array[i] = cyc[7:0];
end
endmodule

View File

@ -0,0 +1,107 @@
$date
Tue Mar 31 17:23:31 2026
$end
$version
Generated by VerilatedFst
$end
$timescale
1ps
$end
$scope module top $end
$var wire 1 ! clk $end
$var wire 1 " clk2 $end
$scope module $unit $end
$var bit 1 # global_bit $end
$upscope $end
$scope module t $end
$var wire 1 ! clk $end
$var wire 1 " clk2 $end
$var integer 32 $ cyc [31:0] $end
$attrbegin pack packed members 2 $end
$scope struct v_strp $end
$var bit 1 % b1 $end
$var bit 1 & b0 $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct v_strp2 $end
$var bit 1 ' b1 $end
$var bit 1 ( b0 $end
$upscope $end
$var logic 1 ) foo $end
$attrbegin array unpacked bounds -30064771072 $end
$scope sv_array unpacked_array $end
$var logic 8 * unpacked_array[-7] [7:0] $end
$var logic 8 + unpacked_array[-6] [7:0] $end
$var logic 8 , unpacked_array[-5] [7:0] $end
$var logic 8 - unpacked_array[-4] [7:0] $end
$var logic 8 . unpacked_array[-3] [7:0] $end
$var logic 8 / unpacked_array[-2] [7:0] $end
$var logic 8 0 unpacked_array[-1] [7:0] $end
$var logic 8 1 unpacked_array[0] [7:0] $end
$upscope $end
$upscope $end
$upscope $end
$enddefinitions $end
#0
$dumpvars
b00000000 1
b00000000 0
b00000000 /
b00000000 .
b00000000 -
b00000000 ,
b00000000 +
b00000000 *
0)
0(
0'
0&
0%
b00000000000000000000000000000000 $
0#
0"
0!
$end
#10
1!
b00000000000000000000000000000001 $
1)
#15
0!
#20
1!
0)
b00000000000000000000000000000010 $
1&
#25
0!
#30
1!
0&
b00000000000000000000000000000011 $
1)
b00000001 1
#35
0!
#40
1!
0)
b00000000000000000000000000000100 $
1&
#45
0!
#50
1!
0&
b00000000000000000000000000000101 $
1)
b00000010 1
1(
#55
0!
#60
1!
0)
b00000000000000000000000000000110 $
1&

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
import vltest_bootstrap
import trace_split_struct_common
test.scenarios('vlt_all')
trace_split_struct_common.run(test)

View File

@ -0,0 +1,135 @@
// Generated by verilated_saif
(SAIFILE
(SAIFVERSION "2.0")
(DIRECTION "backward")
(PROGRAM_NAME "Verilator")
(DIVIDER / )
(TIMESCALE 1ps)
(DURATION 60)
(INSTANCE top
(NET
(clk (T0 35) (T1 25) (TZ 0) (TX 0) (TB 0) (TC 11))
(clk2 (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
)
(INSTANCE $unit
(NET
(global_bit (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
)
)
(INSTANCE t
(NET
(clk (T0 35) (T1 25) (TZ 0) (TX 0) (TB 0) (TC 11))
(clk2 (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[0\] (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(cyc\[1\] (T0 40) (T1 20) (TZ 0) (TX 0) (TB 0) (TC 3))
(cyc\[2\] (T0 40) (T1 20) (TZ 0) (TX 0) (TB 0) (TC 1))
(cyc\[3\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[4\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[5\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[6\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[7\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[8\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[9\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[10\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[11\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[12\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[13\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[14\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[15\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[16\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[17\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[18\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[19\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[20\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[21\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[22\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[23\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[24\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[25\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[26\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[27\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[28\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[29\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[30\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(cyc\[31\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(foo (T0 30) (T1 30) (TZ 0) (TX 0) (TB 0) (TC 6))
(unpacked_array[-7]\[0\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-7]\[1\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-7]\[2\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-7]\[3\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-7]\[4\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-7]\[5\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-7]\[6\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-7]\[7\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-6]\[0\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-6]\[1\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-6]\[2\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-6]\[3\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-6]\[4\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-6]\[5\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-6]\[6\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-6]\[7\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-5]\[0\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-5]\[1\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-5]\[2\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-5]\[3\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-5]\[4\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-5]\[5\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-5]\[6\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-5]\[7\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-4]\[0\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-4]\[1\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-4]\[2\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-4]\[3\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-4]\[4\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-4]\[5\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-4]\[6\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-4]\[7\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-3]\[0\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-3]\[1\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-3]\[2\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-3]\[3\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-3]\[4\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-3]\[5\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-3]\[6\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-3]\[7\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-2]\[0\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-2]\[1\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-2]\[2\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-2]\[3\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-2]\[4\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-2]\[5\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-2]\[6\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-2]\[7\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-1]\[0\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-1]\[1\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-1]\[2\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-1]\[3\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-1]\[4\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-1]\[5\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-1]\[6\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[-1]\[7\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[0]\[0\] (T0 40) (T1 20) (TZ 0) (TX 0) (TB 0) (TC 2))
(unpacked_array[0]\[1\] (T0 50) (T1 10) (TZ 0) (TX 0) (TB 0) (TC 1))
(unpacked_array[0]\[2\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[0]\[3\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[0]\[4\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[0]\[5\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[0]\[6\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(unpacked_array[0]\[7\] (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
)
(INSTANCE v_strp
(NET
(b1 (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(b0 (T0 40) (T1 20) (TZ 0) (TX 0) (TB 0) (TC 5))
)
)
(INSTANCE v_strp2
(NET
(b1 (T0 60) (T1 0) (TZ 0) (TX 0) (TB 0) (TC 0))
(b0 (T0 50) (T1 10) (TZ 0) (TX 0) (TB 0) (TC 1))
)
)
)
)
)

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
import vltest_bootstrap
import trace_split_struct_common
test.scenarios('vlt_all')
trace_split_struct_common.run(test)

View File

@ -0,0 +1,94 @@
$version Generated by VerilatedVcd $end
$timescale 1ps $end
$scope module top $end
$var wire 1 - clk $end
$var wire 1 . clk2 $end
$scope module $unit $end
$var wire 1 2 global_bit $end
$upscope $end
$scope module t $end
$var wire 1 - clk $end
$var wire 1 . clk2 $end
$var wire 32 / cyc [31:0] $end
$scope module v_strp $end
$var wire 1 0 b1 $end
$var wire 1 " b0 $end
$upscope $end
$scope module v_strp2 $end
$var wire 1 1 b1 $end
$var wire 1 # b0 $end
$upscope $end
$var wire 1 $ foo $end
$var wire 8 % unpacked_array[-7] [7:0] $end
$var wire 8 & unpacked_array[-6] [7:0] $end
$var wire 8 ' unpacked_array[-5] [7:0] $end
$var wire 8 ( unpacked_array[-4] [7:0] $end
$var wire 8 ) unpacked_array[-3] [7:0] $end
$var wire 8 * unpacked_array[-2] [7:0] $end
$var wire 8 + unpacked_array[-1] [7:0] $end
$var wire 8 , unpacked_array[0] [7:0] $end
$upscope $end
$upscope $end
$enddefinitions $end
#0
0"
0#
0$
b00000000 %
b00000000 &
b00000000 '
b00000000 (
b00000000 )
b00000000 *
b00000000 +
b00000000 ,
0-
0.
b00000000000000000000000000000000 /
00
01
02
#10
1$
1-
b00000000000000000000000000000001 /
#15
0-
#20
1"
0$
1-
b00000000000000000000000000000010 /
#25
0-
#30
0"
1$
b00000001 ,
1-
b00000000000000000000000000000011 /
#35
0-
#40
1"
0$
1-
b00000000000000000000000000000100 /
#45
0-
#50
0"
1#
1$
b00000010 ,
1-
b00000000000000000000000000000101 /
#55
0-
#60
1"
0$
1-
b00000000000000000000000000000110 /

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
import vltest_bootstrap
import trace_split_struct_common
test.scenarios('vlt_all')
trace_split_struct_common.run(test)

View File

@ -0,0 +1,47 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2026 Wilson Snyder
// SPDX-License-Identifier: CC0-1.0
module t (/*AUTOARG*/
// Inputs
clk
);
input clk;
int cyc;
typedef struct packed {
logic [7:0] a;
logic [7:0] b;
} strp_t;
strp_t s1;
strp_t s2;
strp_t s3;
logic [7:0] alias_of_s3a;
assign alias_of_s3a = s3.a;
strp_t s4;
strp_t s5;
assign s5 = s4;
logic [7:0] source_val;
strp_t s6;
assign s6.a = source_val;
always @(posedge clk) begin
cyc <= cyc + 1;
s1 <= {8'(cyc), 8'(cyc + 1)};
s2 <= {8'(cyc + 2), 8'(cyc + 3)};
s3 <= {8'(cyc + 4), 8'(cyc + 5)};
s4 <= {8'(cyc + 6), 8'(cyc + 7)};
source_val <= 8'(cyc + 8);
s6.b <= 8'(cyc + 9);
if (cyc == 9) begin
$write("*-* All Finished *-*\n");
$finish;
end
end
endmodule

View File

@ -0,0 +1,212 @@
$date
Tue Mar 31 17:14:59 2026
$end
$version
Generated by VerilatedFst
$end
$timescale
1ps
$end
$scope module top $end
$var wire 1 ! clk $end
$scope module t $end
$var wire 1 ! clk $end
$var int 32 " cyc [31:0] $end
$attrbegin pack packed members 2 $end
$scope struct s1 $end
$var logic 8 # a [7:0] $end
$var logic 8 $ b [7:0] $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct s2 $end
$var logic 8 % a [7:0] $end
$var logic 8 & b [7:0] $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct s3 $end
$var logic 8 ' a [7:0] $end
$var logic 8 ( b [7:0] $end
$upscope $end
$var logic 8 ' alias_of_s3a [7:0] $end
$attrbegin pack packed members 2 $end
$scope struct s4 $end
$var logic 8 ) a [7:0] $end
$var logic 8 * b [7:0] $end
$upscope $end
$attrbegin pack packed members 2 $end
$scope struct s5 $end
$var logic 8 ) a [7:0] $end
$var logic 8 * b [7:0] $end
$upscope $end
$var logic 8 + source_val [7:0] $end
$attrbegin pack packed members 2 $end
$scope struct s6 $end
$var logic 8 + a [7:0] $end
$var logic 8 , b [7:0] $end
$upscope $end
$upscope $end
$upscope $end
$enddefinitions $end
#0
$dumpvars
b00000000 ,
b00000000 +
b00000000 *
b00000000 )
b00000000 (
b00000000 '
b00000000 &
b00000000 %
b00000000 $
b00000000 #
b00000000000000000000000000000000 "
0!
$end
#10
1!
b00000000000000000000000000000001 "
b00000001 $
b00000010 %
b00000011 &
b00000100 '
b00000101 (
b00000110 )
b00000111 *
b00001000 +
b00001001 ,
#15
0!
#20
1!
b00001010 ,
b00001001 +
b00001000 *
b00000111 )
b00000110 (
b00000101 '
b00000100 &
b00000011 %
b00000010 $
b00000000000000000000000000000010 "
b00000001 #
#25
0!
#30
1!
b00000010 #
b00000000000000000000000000000011 "
b00000011 $
b00000100 %
b00000101 &
b00000110 '
b00000111 (
b00001000 )
b00001001 *
b00001010 +
b00001011 ,
#35
0!
#40
1!
b00001100 ,
b00001011 +
b00001010 *
b00001001 )
b00001000 (
b00000111 '
b00000110 &
b00000101 %
b00000100 $
b00000000000000000000000000000100 "
b00000011 #
#45
0!
#50
1!
b00000100 #
b00000000000000000000000000000101 "
b00000101 $
b00000110 %
b00000111 &
b00001000 '
b00001001 (
b00001010 )
b00001011 *
b00001100 +
b00001101 ,
#55
0!
#60
1!
b00001110 ,
b00001101 +
b00001100 *
b00001011 )
b00001010 (
b00001001 '
b00001000 &
b00000111 %
b00000110 $
b00000000000000000000000000000110 "
b00000101 #
#65
0!
#70
1!
b00000110 #
b00000000000000000000000000000111 "
b00000111 $
b00001000 %
b00001001 &
b00001010 '
b00001011 (
b00001100 )
b00001101 *
b00001110 +
b00001111 ,
#75
0!
#80
1!
b00010000 ,
b00001111 +
b00001110 *
b00001101 )
b00001100 (
b00001011 '
b00001010 &
b00001001 %
b00001000 $
b00000000000000000000000000001000 "
b00000111 #
#85
0!
#90
1!
b00001000 #
b00000000000000000000000000001001 "
b00001001 $
b00001010 %
b00001011 &
b00001100 '
b00001101 (
b00001110 )
b00001111 *
b00010000 +
b00010001 ,
#95
0!
#100
1!
b00010010 ,
b00010001 +
b00010000 *
b00001111 )
b00001110 (
b00001101 '
b00001100 &
b00001011 %
b00001010 $
b00000000000000000000000000001010 "
b00001001 #

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
import vltest_bootstrap
import trace_struct_alias_common
test.scenarios('vlt_all')
trace_struct_alias_common.run(test)

View File

@ -0,0 +1,198 @@
$version Generated by VerilatedVcd $end
$timescale 1ps $end
$scope module top $end
$var wire 1 - clk $end
$scope module t $end
$var wire 1 - clk $end
$var wire 32 " cyc [31:0] $end
$scope module s1 $end
$var wire 8 # a [7:0] $end
$var wire 8 $ b [7:0] $end
$upscope $end
$scope module s2 $end
$var wire 8 % a [7:0] $end
$var wire 8 & b [7:0] $end
$upscope $end
$scope module s3 $end
$var wire 8 ' a [7:0] $end
$var wire 8 ( b [7:0] $end
$upscope $end
$var wire 8 ' alias_of_s3a [7:0] $end
$scope module s4 $end
$var wire 8 ) a [7:0] $end
$var wire 8 * b [7:0] $end
$upscope $end
$scope module s5 $end
$var wire 8 ) a [7:0] $end
$var wire 8 * b [7:0] $end
$upscope $end
$var wire 8 + source_val [7:0] $end
$scope module s6 $end
$var wire 8 + a [7:0] $end
$var wire 8 , b [7:0] $end
$upscope $end
$upscope $end
$upscope $end
$enddefinitions $end
#0
b00000000000000000000000000000000 "
b00000000 #
b00000000 $
b00000000 %
b00000000 &
b00000000 '
b00000000 (
b00000000 )
b00000000 *
b00000000 +
b00000000 ,
0-
#10
b00000000000000000000000000000001 "
b00000001 $
b00000010 %
b00000011 &
b00000100 '
b00000101 (
b00000110 )
b00000111 *
b00001000 +
b00001001 ,
1-
#15
0-
#20
b00000000000000000000000000000010 "
b00000001 #
b00000010 $
b00000011 %
b00000100 &
b00000101 '
b00000110 (
b00000111 )
b00001000 *
b00001001 +
b00001010 ,
1-
#25
0-
#30
b00000000000000000000000000000011 "
b00000010 #
b00000011 $
b00000100 %
b00000101 &
b00000110 '
b00000111 (
b00001000 )
b00001001 *
b00001010 +
b00001011 ,
1-
#35
0-
#40
b00000000000000000000000000000100 "
b00000011 #
b00000100 $
b00000101 %
b00000110 &
b00000111 '
b00001000 (
b00001001 )
b00001010 *
b00001011 +
b00001100 ,
1-
#45
0-
#50
b00000000000000000000000000000101 "
b00000100 #
b00000101 $
b00000110 %
b00000111 &
b00001000 '
b00001001 (
b00001010 )
b00001011 *
b00001100 +
b00001101 ,
1-
#55
0-
#60
b00000000000000000000000000000110 "
b00000101 #
b00000110 $
b00000111 %
b00001000 &
b00001001 '
b00001010 (
b00001011 )
b00001100 *
b00001101 +
b00001110 ,
1-
#65
0-
#70
b00000000000000000000000000000111 "
b00000110 #
b00000111 $
b00001000 %
b00001001 &
b00001010 '
b00001011 (
b00001100 )
b00001101 *
b00001110 +
b00001111 ,
1-
#75
0-
#80
b00000000000000000000000000001000 "
b00000111 #
b00001000 $
b00001001 %
b00001010 &
b00001011 '
b00001100 (
b00001101 )
b00001110 *
b00001111 +
b00010000 ,
1-
#85
0-
#90
b00000000000000000000000000001001 "
b00001000 #
b00001001 $
b00001010 %
b00001011 &
b00001100 '
b00001101 (
b00001110 )
b00001111 *
b00010000 +
b00010001 ,
1-
#95
0-
#100
b00000000000000000000000000001010 "
b00001001 #
b00001010 $
b00001011 %
b00001100 &
b00001101 '
b00001110 (
b00001111 )
b00010000 *
b00010001 +
b00010010 ,
1-

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
import vltest_bootstrap
import trace_struct_alias_common
test.scenarios('vlt_all')
trace_struct_alias_common.run(test)

View File

@ -0,0 +1,18 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2024 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
import vltest_bootstrap
test.scenarios("vlt_all")
test.compile(v_flags2=["--trace-vcd --trace-structs"])
test.execute()
test.passes()

View File

@ -0,0 +1,46 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2026 Wilson Snyder
// SPDX-License-Identifier: CC0-1.0
module Sub #(
parameter int data_width
)(
input clk,
output logic [data_width-1:0] read_data
);
logic [0:0][data_width-1:0] read_data_2d;
always_ff @(posedge clk) read_data_2d <= $random;
always_comb read_data = read_data_2d[0];
endmodule
module t ();
typedef struct packed {
logic [7:0] field_a;
logic [7:0] field_b;
logic [7:0] field_c;
logic field_d;
logic field_e;
logic field_f;
logic field_g;
logic field_h;
logic field_i;
logic field_j;
logic field_k;
} struct_t;
struct_t the_struct;
logic clk;
Sub #(
.data_width ($bits(struct_t))
) the_sub(
.clk,
.read_data (the_struct)
);
initial begin
$write("*-* All Finished *-*\n");
$finish;
end
endmodule

View File

@ -0,0 +1,185 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2026 Wilson Snyder
// SPDX-License-Identifier: CC0-1.0
`ifndef LAST_CYC
`define LAST_CYC 9
`endif
`ifndef NUM_SUBS
`define NUM_SUBS 4
`endif
module t (/*AUTOARG*/
// Inputs
clk
);
input clk;
int cyc;
logic [`NUM_SUBS - 1:0] x;
initial cyc = 0;
always_ff @(posedge clk) begin
cyc <= cyc + 1;
if (cyc == `LAST_CYC) begin
if (~|x) $stop;
$write("*-* All Finished *-*\n");
$finish;
end
end
for (genvar i = 0; i < `NUM_SUBS; i++) begin : gen_loop
int loop_cyc;
always_comb loop_cyc = cyc + i;
sub #(
.data_t (pkg::some_struct_t)
)
the_sub (
.a (loop_cyc[i%32]),
.b (loop_cyc[(i+1)%32]),
.x (x[i]),
.out_2d_unpacked (),
.data (),
.cyc (loop_cyc),
.clk
);
end
intf
the_intf_a (.*),
the_intf_b (.*);
for (genvar m = 0; m < 4; m++) begin : gen_intf_loop
always_comb begin
the_intf_a.data[m] = cyc[7:0] + m + 7'd1;
the_intf_b.data[m] = cyc[7:0] + m + 7'd2;
end
end
endmodule
package pkg;
typedef struct packed {
logic field_a;
logic [5:0] field_b;
logic [9:0] field_c;
} some_sub_struct_t;
typedef struct packed {
logic foo;
logic [3:0] [31:0] bar;
logic [15:0] baz;
logic [127:0] qux;
some_sub_struct_t sub_struct;
} some_struct_t;
parameter some_sub_struct_t SUB_ONES = '1;
parameter some_sub_struct_t SUB_ZEROS = '0;
endpackage
module sub #(
parameter type data_t = bit
)(
input a,
input b,
output logic x,
output out_2d_unpacked [3][4],
output data_t data,
input int cyc,
input clk
);
pkg::some_struct_t the_struct;
pkg::some_struct_t the_structs [3:0];
pkg::some_struct_t [2:0] the_packed_structs;
typedef struct packed {
logic abc;
logic def;
logic xyz;
} some_struct_t;
some_struct_t the_local_struct;
localparam some_struct_t const_struct = 3'b101;
typedef some_struct_t typedefed_struct_t;
typedefed_struct_t the_typedefed_struct;
typedef struct {
logic field_a;
logic field_b;
logic field_c;
} some_unpacked_struct_t;
some_unpacked_struct_t the_local_unpacked_struct;
typedef union packed {
struct packed {
logic [7:0] field_0;
} union_a;
struct packed {
logic [3:0] field_1;
logic [3:0] field_2;
} union_b;
struct packed {
logic [1:0] field_3;
logic [5:0] field_4;
} union_c;
} some_union_t;
some_union_t the_local_union;
typedef logic [1:0] [31:0] logic_array_t;
typedef logic [1:0] [31:0] logic_array_2_t;
logic_array_t the_logic_array;
logic_array_2_t the_other_logic_array;
logic [15:0] the_unpacked_array [5];
logic the_2d_unpacked [3][4];
typedef logic [3:0] four_bit_t;
typedef four_bit_t [1:0] two_fours_t;
localparam two_fours_t two_fours = 8'hab;
two_fours_t two_fours_var;
always_ff @(posedge clk) begin
x <= a ^ b;
the_struct <= '{
foo : cyc[0],
bar : '{cyc, cyc+1, cyc+2, cyc+3},
baz : cyc[15:0],
qux : 128'(cyc),
sub_struct : '{
field_a : cyc[0],
field_b : cyc[5:0],
field_c : cyc[9:0]
}
};
for (int i = 0; i < 4; i++) the_structs[i] <= {$bits(pkg::some_struct_t){cyc[i]}};
the_local_struct <= cyc[2:0];
the_typedefed_struct <= cyc[3:1];
the_local_unpacked_struct <= '{
field_a : cyc[0],
field_b : cyc[1],
field_c : cyc[2]
};
the_local_union <= cyc[7:0];
for (int i = 0; i < 2; i++) begin
the_logic_array[i] <= cyc + i;
the_other_logic_array[i] <= cyc + i + 123;
end
for (int i = 0; i < 5; i++) the_unpacked_array[i] <= cyc[15:0];
for (int i = 0; i < 3; i++)
for (int j = 0; j < 4; j++) begin
the_2d_unpacked [i][j] <= ~(cyc[i] ^ cyc[j]);
out_2d_unpacked [i][j] <= cyc[i] ^ cyc[j];
end
end
always_comb data = the_struct;
endmodule
interface intf
(input wire clk);
logic [3:0] [7:0] data;
int data_typed;
always_comb data_typed = data;
endinterface

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
import vltest_bootstrap
import trace_type_dupes_common
test.scenarios('vlt_all')
trace_type_dupes_common.run(test)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
import vltest_bootstrap
import trace_type_dupes_common
test.scenarios('vlt_all')
trace_type_dupes_common.run(test)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
import vltest_bootstrap
import trace_type_dupes_common
test.scenarios('vlt_all')
trace_type_dupes_common.run(test)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
import vltest_bootstrap
import trace_type_dupes_common
test.scenarios('vlt_all')
trace_type_dupes_common.run(test)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
import vltest_bootstrap
import trace_type_dupes_common
test.scenarios('vlt_all')
trace_type_dupes_common.run(test)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
import vltest_bootstrap
import trace_type_dupes_common
test.scenarios('vlt_all')
trace_type_dupes_common.run(test)

View File

@ -34,6 +34,10 @@ def run(test, *, verilator_flags2=()):
# Run test
test.compile(verilator_flags2=flags)
if variant == "structs":
trace_cpp = test.obj_dir + "/" + test.vm_prefix + "__Trace__0.cpp"
test.file_grep(trace_cpp, r"^ *Vt_.*trace_chg_dtype.*v_strp2")
test.execute()
test.trace_identical(test.trace_filename, test.golden_filename)

View File

@ -0,0 +1,29 @@
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
def run(test):
(fmt, ) = test.parse_name(r"t_trace_split_struct_([a-z]+)")
test.top_filename = "t/t_trace_split_struct.v"
test.golden_filename = test.py_filename.rpartition(fmt)[0] + fmt + ".out"
flags = ["--cc", f"--trace-{fmt}", "--trace-structs", "--no-trace-params"]
test.compile(verilator_flags2=flags)
# When struct fields are driven from different clocks, the dtype
# optimization cannot be applied -- no trace_chg_dtype functions should exist
trace_cpp = test.obj_dir + "/" + test.vm_prefix + "__Trace__0.cpp"
test.file_grep_count(trace_cpp, r"^ *Vt_.*trace_chg_dtype", 0)
test.execute()
test.trace_identical(test.trace_filename, test.golden_filename)
test.passes()

View File

@ -0,0 +1,36 @@
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
def run(test):
(fmt, ) = test.parse_name(r"t_trace_struct_alias_([a-z]+)")
test.top_filename = "t/t_trace_struct_alias.v"
test.golden_filename = test.py_filename.rpartition(fmt)[0] + fmt + ".out"
flags = ["--cc", f"--trace-{fmt}", "--trace-structs"]
test.compile(verilator_flags2=flags)
test.execute()
if fmt == "vcd":
codes = test.vcd_extract_codes(test.trace_filename)
test.vcd_check_not_aliased(codes, "top.t.s1.a", "top.t.s2.a")
test.vcd_check_aliased(codes, "top.t.s3.a", "top.t.alias_of_s3a")
test.vcd_check_aliased(codes, "top.t.s4.a", "top.t.s5.a")
test.vcd_check_aliased(codes, "top.t.s4.b", "top.t.s5.b")
test.vcd_check_aliased(codes, "top.t.s6.a", "top.t.source_val")
test.trace_identical(test.trace_filename, test.golden_filename)
test.passes()

View File

@ -0,0 +1,31 @@
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of either the GNU Lesser General Public License Version 3
# or the Perl Artistic License Version 2.0.
# SPDX-FileCopyrightText: 2026 Wilson Snyder
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
def run(test):
variant, fmt = test.parse_name(r"t_trace_type_dupes_([a-z]+)_([a-z]+)")
test.top_filename = "t/t_trace_type_dupes.v"
test.golden_filename = test.py_filename.rpartition(fmt)[0] + fmt + ".out"
flags = ["--cc", f"--trace-{fmt}"]
match variant:
case "default":
pass
case "structs":
flags.extend(["--trace-structs", "--output-split-ctrace 10"])
case _:
test.error(f"Unhandled test variant '{variant}'")
test.compile(verilator_flags2=flags)
test.execute()
test.trace_identical(test.trace_filename, test.golden_filename)
test.passes()