forked from github/verilator
Fix interface reference tracing, bug1595.
This commit is contained in:
parent
11a1b201a9
commit
4480938b25
2
Changes
2
Changes
@ -40,6 +40,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
||||
|
||||
**** Fix assertion on dotted parameter arrayed function, bug1620. [Rich Porter]
|
||||
|
||||
**** Fix interface reference tracing, bug1595. [Todd Strader]
|
||||
|
||||
|
||||
* Verilator 4.022 2019-11-10
|
||||
|
||||
|
@ -1900,19 +1900,19 @@ void Verilated::profThreadsFilenamep(const char* flagp) VL_MT_SAFE {
|
||||
}
|
||||
|
||||
|
||||
const char* Verilated::catName(const char* n1, const char* n2) VL_MT_SAFE {
|
||||
const char* Verilated::catName(const char* n1, const char* n2, const char* delimiter) VL_MT_SAFE {
|
||||
// Returns new'ed data
|
||||
// Used by symbol table creation to make module names
|
||||
static VL_THREAD_LOCAL char* strp = NULL;
|
||||
static VL_THREAD_LOCAL size_t len = 0;
|
||||
size_t newlen = strlen(n1)+strlen(n2)+2;
|
||||
size_t newlen = strlen(n1)+strlen(n2)+strlen(delimiter)+1;
|
||||
if (!strp || newlen > len) {
|
||||
if (strp) delete [] strp;
|
||||
strp = new char[newlen];
|
||||
len = newlen;
|
||||
}
|
||||
strcpy(strp, n1);
|
||||
if (*n1) strcat(strp, ".");
|
||||
if (*n1) strcat(strp, delimiter);
|
||||
strcat(strp, n2);
|
||||
return strp;
|
||||
}
|
||||
|
@ -501,7 +501,8 @@ public:
|
||||
public:
|
||||
// METHODS - INTERNAL USE ONLY (but public due to what uses it)
|
||||
// Internal: Create a new module name by concatenating two strings
|
||||
static const char* catName(const char* n1, const char* n2); // Returns static data
|
||||
static const char* catName(const char* n1, const char* n2,
|
||||
const char* delimiter="."); // Returns static data
|
||||
|
||||
// Internal: Throw signal assertion
|
||||
static void overWidthError(const char* signame) VL_MT_SAFE;
|
||||
|
@ -2060,6 +2060,17 @@ public:
|
||||
AstNode* varsp() const { return op1p(); } // op1 = List of Vars
|
||||
};
|
||||
|
||||
class AstIntfRef : public AstNode {
|
||||
// An interface reference
|
||||
private:
|
||||
string m_name; // Name of the reference
|
||||
public:
|
||||
AstIntfRef(FileLine* fl, const string& name)
|
||||
: AstNode(fl), m_name(name) { }
|
||||
virtual string name() const { return m_name; }
|
||||
ASTNODE_NODE_FUNCS(IntfRef)
|
||||
};
|
||||
|
||||
class AstCell : public AstNode {
|
||||
// A instantiation cell or interface call (don't know which until link)
|
||||
private:
|
||||
@ -2096,9 +2107,11 @@ public:
|
||||
AstPin* pinsp() const { return VN_CAST(op1p(), Pin); } // op1 = List of cell ports
|
||||
AstPin* paramsp() const { return VN_CAST(op2p(), Pin); } // op2 = List of parameter #(##) values
|
||||
AstRange* rangep() const { return VN_CAST(op3p(), Range); } // op3 = Range of arrayed instants (NULL=not ranged)
|
||||
AstIntfRef* intfRefp() const { return VN_CAST(op4p(), IntfRef); } // op4 = List of interface references
|
||||
AstNodeModule* modp() const { return m_modp; } // [AfterLink] = Pointer to module instantiated
|
||||
void addPinsp(AstPin* nodep) { addOp1p(nodep); }
|
||||
void addParamsp(AstPin* nodep) { addOp2p(nodep); }
|
||||
void addIntfRefp(AstIntfRef* nodep) { addOp4p(nodep); }
|
||||
void modp(AstNodeModule* nodep) { m_modp = nodep; }
|
||||
bool hasIfaceVar() const { return m_hasIfaceVar; }
|
||||
void hasIfaceVar(bool flag) { m_hasIfaceVar = flag; }
|
||||
@ -3867,13 +3880,16 @@ private:
|
||||
AstVarType m_varType; // Type of variable (for localparam vs. param)
|
||||
AstBasicDTypeKwd m_declKwd; // Keyword at declaration time
|
||||
VDirection m_declDirection; // Declared direction input/output etc
|
||||
bool m_isScoped; // Uses run-time scope (for interfaces)
|
||||
public:
|
||||
AstTraceDecl(FileLine* fl, const string& showname,
|
||||
AstVar* varp, // For input/output state etc
|
||||
AstNode* valuep,
|
||||
const VNumRange& bitRange, const VNumRange& arrayRange)
|
||||
const VNumRange& bitRange, const VNumRange& arrayRange,
|
||||
bool isScoped)
|
||||
: AstNodeStmt(fl)
|
||||
, m_showname(showname), m_bitRange(bitRange), m_arrayRange(arrayRange) {
|
||||
, m_showname(showname), m_bitRange(bitRange), m_arrayRange(arrayRange)
|
||||
, m_isScoped(isScoped) {
|
||||
dtypeFrom(valuep);
|
||||
m_code = 0;
|
||||
m_codeInc = ((arrayRange.ranged() ? arrayRange.elements() : 1)
|
||||
@ -3898,6 +3914,7 @@ public:
|
||||
AstVarType varType() const { return m_varType; }
|
||||
AstBasicDTypeKwd declKwd() const { return m_declKwd; }
|
||||
VDirection declDirection() const { return m_declDirection; }
|
||||
bool isScoped() const { return m_isScoped; }
|
||||
};
|
||||
|
||||
class AstTraceInc : public AstNodeStmt {
|
||||
|
@ -284,6 +284,10 @@ private:
|
||||
insureCleanAndNext(nodep->pinsp());
|
||||
setClean(nodep, true);
|
||||
}
|
||||
virtual void visit(AstIntfRef* nodep) {
|
||||
iterateChildren(nodep);
|
||||
setClean(nodep, true); // generates a string, so not relevant
|
||||
}
|
||||
|
||||
//--------------------
|
||||
// Default: Just iterate
|
||||
|
@ -274,6 +274,10 @@ public:
|
||||
UASSERT_OBJ(!nodep->isStatement() || VN_IS(nodep->dtypep(), VoidDType),
|
||||
nodep, "Statement of non-void data type");
|
||||
}
|
||||
virtual void visit(AstIntfRef* nodep) {
|
||||
putsQuoted(VIdProtect::protectWordsIf(AstNode::vcdName(nodep->name()),
|
||||
nodep->protect()));
|
||||
}
|
||||
virtual void visit(AstNodeCase* nodep) {
|
||||
// In V3Case...
|
||||
nodep->v3fatalSrc("Case statements should have been reduced out");
|
||||
@ -2990,7 +2994,13 @@ class EmitCTrace : EmitCStmts {
|
||||
puts("(c+"+cvtToStr(nodep->code()));
|
||||
if (nodep->arrayRange().ranged()) puts("+i*"+cvtToStr(nodep->widthWords()));
|
||||
puts(",");
|
||||
if (nodep->isScoped()) {
|
||||
puts("Verilated::catName(scopep,");
|
||||
}
|
||||
putsQuoted(VIdProtect::protectWordsIf(nodep->showname(), nodep->protect()));
|
||||
if (nodep->isScoped()) {
|
||||
puts(",\" \")");
|
||||
}
|
||||
// Direction
|
||||
if (v3Global.opt.traceFormat().fstFlavor()) {
|
||||
puts(","+cvtToStr(enumNum));
|
||||
|
106
src/V3Inline.cpp
106
src/V3Inline.cpp
@ -613,6 +613,109 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
// Track interface references under the Cell they reference
|
||||
|
||||
class InlineIntfRefVisitor : public AstNVisitor {
|
||||
private:
|
||||
// NODE STATE
|
||||
// AstVar::user1p() // AstCell which this Var points to
|
||||
|
||||
AstUser2InUse m_inuser2;
|
||||
|
||||
string m_scope; // Scope name
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
|
||||
// VISITORS
|
||||
virtual void visit(AstNetlist* nodep) {
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
|
||||
virtual void visit(AstModule* nodep) {
|
||||
if (nodep->isTop()) {
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void visit(AstCell* nodep) {
|
||||
string oldScope = m_scope;
|
||||
if (m_scope.empty()) {
|
||||
m_scope = nodep->name();
|
||||
} else {
|
||||
m_scope += "__DOT__" + nodep->name();
|
||||
}
|
||||
|
||||
if (AstModule* modp = VN_CAST(nodep->modp(), Module)) {
|
||||
// Pass Cell pointers down to the next module
|
||||
for (AstPin* pinp = nodep->pinsp(); pinp; pinp=VN_CAST(pinp->nextp(), Pin)) {
|
||||
AstVar* varp = pinp->modVarp();
|
||||
AstVarRef* varrefp = VN_CAST(pinp->exprp(), VarRef);
|
||||
if (!varrefp) continue;
|
||||
AstVar* fromVarp = varrefp->varp();
|
||||
AstIfaceRefDType* irdtp = VN_CAST(fromVarp->dtypep(), IfaceRefDType);
|
||||
if (!irdtp) continue;
|
||||
|
||||
AstCell* cellp;
|
||||
if ((cellp = VN_CAST(fromVarp->user1p(), Cell))
|
||||
|| (cellp = irdtp->cellp())) {
|
||||
varp->user1p(cellp);
|
||||
string alias = m_scope + "__DOT__" + pinp->name();
|
||||
cellp->addIntfRefp(new AstIntfRef(pinp->fileline(), alias));
|
||||
}
|
||||
}
|
||||
|
||||
iterateChildren(modp);
|
||||
} else if (VN_IS(nodep->modp(), Iface)) {
|
||||
nodep->addIntfRefp(new AstIntfRef(nodep->fileline(), m_scope));
|
||||
// No need to iterate on interface cells
|
||||
}
|
||||
|
||||
m_scope = oldScope;
|
||||
}
|
||||
|
||||
virtual void visit(AstAssignVarScope* nodep) {
|
||||
// Reference
|
||||
AstVarRef* reflp = VN_CAST(nodep->lhsp(), VarRef);
|
||||
// What the reference refers to
|
||||
AstVarRef* refrp = VN_CAST(nodep->rhsp(), VarRef);
|
||||
if (!(reflp && refrp)) return;
|
||||
|
||||
AstVar* varlp = reflp->varp();
|
||||
AstVar* varrp = refrp->varp();
|
||||
if (!(varlp && varrp)) return;
|
||||
|
||||
AstCell* cellp = VN_CAST(varrp->user1p(), Cell);
|
||||
if (!cellp) {
|
||||
AstIfaceRefDType* irdtp = VN_CAST(varrp->dtypep(), IfaceRefDType);
|
||||
if (!irdtp) return;
|
||||
|
||||
cellp = irdtp->cellp();
|
||||
}
|
||||
if (!cellp) return;
|
||||
string alias;
|
||||
if (!m_scope.empty()) alias = m_scope + "__DOT__";
|
||||
alias += varlp->name();
|
||||
cellp->addIntfRefp(new AstIntfRef(varlp->fileline(), alias));
|
||||
}
|
||||
|
||||
//--------------------
|
||||
virtual void visit(AstNodeMath*) {} // Accelerate
|
||||
virtual void visit(AstNodeStmt*) {} // Accelerate
|
||||
virtual void visit(AstNode* nodep) {
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit InlineIntfRefVisitor(AstNode* nodep) {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~InlineIntfRefVisitor() {
|
||||
}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
// Inline class functions
|
||||
|
||||
@ -637,5 +740,8 @@ void V3Inline::inlineAll(AstNetlist* nodep) {
|
||||
modp->unlinkFrBack()->deleteTree(); VL_DANGLING(modp);
|
||||
}
|
||||
}
|
||||
{
|
||||
InlineIntfRefVisitor crvisitor (nodep);
|
||||
}
|
||||
V3Global::dumpCheckGlobalTree("inline", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ private:
|
||||
AstVarScope* m_traVscp; // Signal being trace constructed
|
||||
AstNode* m_traValuep; // Signal being traced's value to trace in it
|
||||
string m_traShowname; // Signal being traced's component name
|
||||
string m_ifShowname; // Interface reference being traced's scope name
|
||||
bool m_interface; // Currently tracing an interface
|
||||
|
||||
VDouble0 m_statSigs; // Statistic tracking
|
||||
VDouble0 m_statIgnSigs; // Statistic tracking
|
||||
@ -83,25 +83,32 @@ private:
|
||||
AstCFunc* newCFunc(AstCFuncType type, const string& name, bool slow) {
|
||||
AstCFunc* funcp = new AstCFunc(m_scopetopp->fileline(), name, m_scopetopp);
|
||||
funcp->slow(slow);
|
||||
funcp->argTypes(EmitCBaseVisitor::symClassVar()+", "+v3Global.opt.traceClassBase()+"* vcdp, uint32_t code");
|
||||
string argTypes(EmitCBaseVisitor::symClassVar()+", "+v3Global.opt.traceClassBase()
|
||||
+"* vcdp, uint32_t code");
|
||||
if (m_interface) argTypes += ", const char* scopep";
|
||||
funcp->argTypes(argTypes);
|
||||
funcp->funcType(type);
|
||||
funcp->symProlog(true);
|
||||
m_scopetopp->addActivep(funcp);
|
||||
UINFO(5," Newfunc "<<funcp<<endl);
|
||||
return funcp;
|
||||
}
|
||||
void callCFuncSub(AstCFunc* basep, AstCFunc* funcp, AstIntfRef* irp) {
|
||||
AstCCall* callp = new AstCCall(funcp->fileline(), funcp);
|
||||
callp->argTypes("vlSymsp, vcdp, code");
|
||||
if (irp) callp->addArgsp(irp->unlinkFrBack());
|
||||
basep->addStmtsp(callp);
|
||||
}
|
||||
AstCFunc* newCFuncSub(AstCFunc* basep) {
|
||||
string name = basep->name()+"__"+cvtToStr(++m_funcNum);
|
||||
AstCFunc* funcp = NULL;
|
||||
if (basep->funcType()==AstCFuncType::TRACE_INIT) {
|
||||
if (basep->funcType()==AstCFuncType::TRACE_INIT
|
||||
|| basep->funcType()==AstCFuncType::TRACE_INIT_SUB) {
|
||||
funcp = newCFunc(AstCFuncType::TRACE_INIT_SUB, name, basep->slow());
|
||||
} else {
|
||||
basep->v3fatalSrc("Strange base function type");
|
||||
}
|
||||
// cppcheck-suppress nullPointer // above fatal prevents it
|
||||
AstCCall* callp = new AstCCall(funcp->fileline(), funcp);
|
||||
callp->argTypes("vlSymsp, vcdp, code");
|
||||
basep->addStmtsp(callp);
|
||||
if (!m_interface) callCFuncSub(basep, funcp, NULL);
|
||||
return funcp;
|
||||
}
|
||||
void addTraceDecl(const VNumRange& arrayRange,
|
||||
@ -112,10 +119,10 @@ private:
|
||||
else if (bdtypep) bitRange = bdtypep->nrange();
|
||||
AstTraceDecl* declp = new AstTraceDecl(m_traVscp->fileline(), m_traShowname,
|
||||
m_traVscp->varp(), m_traValuep,
|
||||
bitRange, arrayRange);
|
||||
bitRange, arrayRange, m_interface);
|
||||
UINFO(9,"Decl "<<declp<<endl);
|
||||
|
||||
if (m_initSubStmts && v3Global.opt.outputSplitCTrace()
|
||||
if (!m_interface && v3Global.opt.outputSplitCTrace()
|
||||
&& m_initSubStmts > v3Global.opt.outputSplitCTrace()) {
|
||||
m_initSubFuncp = newCFuncSub(m_initFuncp);
|
||||
m_initSubStmts = 0;
|
||||
@ -147,6 +154,44 @@ private:
|
||||
// And find variables
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
virtual void visit(AstScope* nodep) {
|
||||
AstCell* cellp = VN_CAST(nodep->aboveCellp(), Cell);
|
||||
if (cellp && VN_IS(cellp->modp(), Iface)) {
|
||||
AstCFunc* origSubFunc = m_initSubFuncp;
|
||||
int origSubStmts = m_initSubStmts;
|
||||
{
|
||||
m_interface = true;
|
||||
m_initSubFuncp = newCFuncSub(origSubFunc);
|
||||
string scopeName = nodep->prettyName();
|
||||
size_t lastDot = scopeName.find_last_of('.');
|
||||
UASSERT_OBJ(lastDot != string::npos, nodep,
|
||||
"Expected an interface scope name to have at least one dot");
|
||||
scopeName = scopeName.substr(0, lastDot+1);
|
||||
size_t scopeLen = scopeName.length();
|
||||
|
||||
AstIntfRef* nextIrp = cellp->intfRefp();
|
||||
// While instead of for loop because interface references will
|
||||
// be unlinked as we go
|
||||
while (nextIrp) {
|
||||
AstIntfRef* irp = nextIrp;
|
||||
nextIrp = VN_CAST(irp->nextp(), IntfRef);
|
||||
|
||||
string irpName = irp->prettyName();
|
||||
if (scopeLen > irpName.length()) continue;
|
||||
string intfScopeName = irpName.substr(0, scopeLen);
|
||||
if (scopeName != intfScopeName) continue;
|
||||
callCFuncSub(origSubFunc, m_initSubFuncp, irp);
|
||||
++origSubStmts;
|
||||
}
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
m_initSubFuncp = origSubFunc;
|
||||
m_initSubStmts = origSubStmts;
|
||||
m_interface = false;
|
||||
} else {
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
}
|
||||
virtual void visit(AstVarScope* nodep) {
|
||||
iterateChildren(nodep);
|
||||
// Prefilter - things that get through this if will either get
|
||||
@ -161,11 +206,11 @@ private:
|
||||
// Compute show name
|
||||
// This code assumes SPTRACEVCDC_VERSION >= 1330;
|
||||
// it uses spaces to separate hierarchy components.
|
||||
if (m_ifShowname.empty()) {
|
||||
if (m_interface) {
|
||||
m_traShowname = AstNode::vcdName(varp->name());
|
||||
} else {
|
||||
m_traShowname = AstNode::vcdName(scopep->name() + " " + varp->name());
|
||||
if (m_traShowname.substr(0, 4) == "TOP ") m_traShowname.replace(0, 4, "");
|
||||
} else {
|
||||
m_traShowname = AstNode::vcdName(m_ifShowname + " " + varp->name());
|
||||
}
|
||||
UASSERT_OBJ(m_initSubFuncp, nodep, "NULL");
|
||||
|
||||
@ -200,24 +245,6 @@ private:
|
||||
iterate(nodep->subDTypep()->skipRefp());
|
||||
}
|
||||
}
|
||||
virtual void visit(AstIfaceRefDType* nodep) {
|
||||
if (m_traVscp && nodep->ifacep()) {
|
||||
// Stash the signal state because we're going to go through another VARSCOPE
|
||||
AstVarScope* traVscp = m_traVscp;
|
||||
AstNode* traValuep = m_traValuep;
|
||||
{
|
||||
m_traVscp = NULL;
|
||||
m_traValuep = NULL;
|
||||
m_ifShowname = m_traShowname;
|
||||
m_traShowname = "";
|
||||
iterate(nodep->ifacep());
|
||||
m_traShowname = m_ifShowname;
|
||||
m_ifShowname = "";
|
||||
}
|
||||
m_traVscp = traVscp;
|
||||
m_traValuep = traValuep;
|
||||
}
|
||||
}
|
||||
virtual void visit(AstUnpackArrayDType* nodep) {
|
||||
// Note more specific dtypes above
|
||||
if (m_traVscp) {
|
||||
@ -346,6 +373,7 @@ public:
|
||||
m_funcNum = 0;
|
||||
m_traVscp = NULL;
|
||||
m_traValuep = NULL;
|
||||
m_interface = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~TraceDeclVisitor() {
|
||||
|
@ -22,34 +22,20 @@ module t (/*AUTOARG*/
|
||||
ifc itop();
|
||||
|
||||
sub c1 (.isub(itop),
|
||||
.i_value(cyc));
|
||||
|
||||
sub2 c2 (.isub2(itop),
|
||||
.i_value(cyc));
|
||||
|
||||
always @(*) itop.hidden_from_isub = cyc + 1;
|
||||
.i_value(4));
|
||||
|
||||
always @ (posedge clk) begin
|
||||
cyc <= cyc + 1;
|
||||
if (cyc==20) begin
|
||||
if (itop.value != 20) $stop;
|
||||
if (itop.hidden_from_isub != 21) $stop;
|
||||
if (itop.value != 4) $stop;
|
||||
itop.hidden_from_isub = 20;
|
||||
if (itop.hidden_from_isub != 20) $stop;
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
end
|
||||
endmodule
|
||||
|
||||
module sub2
|
||||
(
|
||||
ifc.out_modport isub2,
|
||||
input integer i_value
|
||||
);
|
||||
|
||||
sub c3 (.isub(isub2),
|
||||
.i_value(i_value));
|
||||
endmodule
|
||||
|
||||
module sub
|
||||
`ifdef NANSI // bug868
|
||||
(
|
||||
|
@ -1,183 +0,0 @@
|
||||
$version Generated by VerilatedVcd $end
|
||||
$date Thu Nov 7 18:07:03 2019
|
||||
$end
|
||||
$timescale 1ns $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 c1 $end
|
||||
$var wire 32 # i_value [31:0] $end
|
||||
$scope module isub $end
|
||||
$var wire 32 $ hidden_from_isub [31:0] $end
|
||||
$var wire 32 % value [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module c2 $end
|
||||
$var wire 32 # i_value [31:0] $end
|
||||
$scope module c3 $end
|
||||
$var wire 32 # i_value [31:0] $end
|
||||
$scope module isub $end
|
||||
$var wire 32 $ hidden_from_isub [31:0] $end
|
||||
$var wire 32 % value [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module isub2 $end
|
||||
$var wire 32 $ hidden_from_isub [31:0] $end
|
||||
$var wire 32 % value [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module itop $end
|
||||
$var wire 32 $ hidden_from_isub [31:0] $end
|
||||
$var wire 32 % value [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$enddefinitions $end
|
||||
|
||||
|
||||
#0
|
||||
b00000000000000000000000000000001 #
|
||||
b00000000000000000000000000000010 $
|
||||
b00000000000000000000000000000001 %
|
||||
0&
|
||||
#10
|
||||
b00000000000000000000000000000010 #
|
||||
b00000000000000000000000000000011 $
|
||||
b00000000000000000000000000000010 %
|
||||
1&
|
||||
#15
|
||||
0&
|
||||
#20
|
||||
b00000000000000000000000000000011 #
|
||||
b00000000000000000000000000000100 $
|
||||
b00000000000000000000000000000011 %
|
||||
1&
|
||||
#25
|
||||
0&
|
||||
#30
|
||||
b00000000000000000000000000000100 #
|
||||
b00000000000000000000000000000101 $
|
||||
b00000000000000000000000000000100 %
|
||||
1&
|
||||
#35
|
||||
0&
|
||||
#40
|
||||
b00000000000000000000000000000101 #
|
||||
b00000000000000000000000000000110 $
|
||||
b00000000000000000000000000000101 %
|
||||
1&
|
||||
#45
|
||||
0&
|
||||
#50
|
||||
b00000000000000000000000000000110 #
|
||||
b00000000000000000000000000000111 $
|
||||
b00000000000000000000000000000110 %
|
||||
1&
|
||||
#55
|
||||
0&
|
||||
#60
|
||||
b00000000000000000000000000000111 #
|
||||
b00000000000000000000000000001000 $
|
||||
b00000000000000000000000000000111 %
|
||||
1&
|
||||
#65
|
||||
0&
|
||||
#70
|
||||
b00000000000000000000000000001000 #
|
||||
b00000000000000000000000000001001 $
|
||||
b00000000000000000000000000001000 %
|
||||
1&
|
||||
#75
|
||||
0&
|
||||
#80
|
||||
b00000000000000000000000000001001 #
|
||||
b00000000000000000000000000001010 $
|
||||
b00000000000000000000000000001001 %
|
||||
1&
|
||||
#85
|
||||
0&
|
||||
#90
|
||||
b00000000000000000000000000001010 #
|
||||
b00000000000000000000000000001011 $
|
||||
b00000000000000000000000000001010 %
|
||||
1&
|
||||
#95
|
||||
0&
|
||||
#100
|
||||
b00000000000000000000000000001011 #
|
||||
b00000000000000000000000000001100 $
|
||||
b00000000000000000000000000001011 %
|
||||
1&
|
||||
#105
|
||||
0&
|
||||
#110
|
||||
b00000000000000000000000000001100 #
|
||||
b00000000000000000000000000001101 $
|
||||
b00000000000000000000000000001100 %
|
||||
1&
|
||||
#115
|
||||
0&
|
||||
#120
|
||||
b00000000000000000000000000001101 #
|
||||
b00000000000000000000000000001110 $
|
||||
b00000000000000000000000000001101 %
|
||||
1&
|
||||
#125
|
||||
0&
|
||||
#130
|
||||
b00000000000000000000000000001110 #
|
||||
b00000000000000000000000000001111 $
|
||||
b00000000000000000000000000001110 %
|
||||
1&
|
||||
#135
|
||||
0&
|
||||
#140
|
||||
b00000000000000000000000000001111 #
|
||||
b00000000000000000000000000010000 $
|
||||
b00000000000000000000000000001111 %
|
||||
1&
|
||||
#145
|
||||
0&
|
||||
#150
|
||||
b00000000000000000000000000010000 #
|
||||
b00000000000000000000000000010001 $
|
||||
b00000000000000000000000000010000 %
|
||||
1&
|
||||
#155
|
||||
0&
|
||||
#160
|
||||
b00000000000000000000000000010001 #
|
||||
b00000000000000000000000000010010 $
|
||||
b00000000000000000000000000010001 %
|
||||
1&
|
||||
#165
|
||||
0&
|
||||
#170
|
||||
b00000000000000000000000000010010 #
|
||||
b00000000000000000000000000010011 $
|
||||
b00000000000000000000000000010010 %
|
||||
1&
|
||||
#175
|
||||
0&
|
||||
#180
|
||||
b00000000000000000000000000010011 #
|
||||
b00000000000000000000000000010100 $
|
||||
b00000000000000000000000000010011 %
|
||||
1&
|
||||
#185
|
||||
0&
|
||||
#190
|
||||
b00000000000000000000000000010100 #
|
||||
b00000000000000000000000000010101 $
|
||||
b00000000000000000000000000010100 %
|
||||
1&
|
||||
#195
|
||||
0&
|
||||
#200
|
||||
b00000000000000000000000000010101 #
|
||||
b00000000000000000000000000010110 $
|
||||
b00000000000000000000000000010101 %
|
||||
1&
|
@ -19,8 +19,5 @@ execute(
|
||||
check_finished => 1,
|
||||
);
|
||||
|
||||
vcd_identical($Self->trace_filename,
|
||||
$Self->{golden_filename});
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
@ -1,186 +0,0 @@
|
||||
$date
|
||||
Fri Nov 8 06:41:16 2019
|
||||
|
||||
$end
|
||||
$version
|
||||
fstWriter
|
||||
$end
|
||||
$timescale
|
||||
1ns
|
||||
$end
|
||||
$scope module top $end
|
||||
$var wire 1 ! clk $end
|
||||
$scope module t $end
|
||||
$var wire 1 ! clk $end
|
||||
$var integer 32 " cyc $end
|
||||
$scope module c1 $end
|
||||
$scope module isub $end
|
||||
$var integer 32 # hidden_from_isub $end
|
||||
$var integer 32 $ value $end
|
||||
$upscope $end
|
||||
$var wire 32 " i_value $end
|
||||
$upscope $end
|
||||
$scope module c2 $end
|
||||
$scope module isub2 $end
|
||||
$var integer 32 # hidden_from_isub $end
|
||||
$var integer 32 $ value $end
|
||||
$upscope $end
|
||||
$var wire 32 " i_value $end
|
||||
$scope module c3 $end
|
||||
$scope module isub $end
|
||||
$var integer 32 # hidden_from_isub $end
|
||||
$var integer 32 $ value $end
|
||||
$upscope $end
|
||||
$var wire 32 " i_value $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module itop $end
|
||||
$var integer 32 # hidden_from_isub $end
|
||||
$var integer 32 $ value $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$enddefinitions $end
|
||||
$dumpvars
|
||||
0!
|
||||
b00000000000000000000000000000001 "
|
||||
b00000000000000000000000000000010 #
|
||||
b00000000000000000000000000000001 $
|
||||
#10
|
||||
b00000000000000000000000000000010 $
|
||||
b00000000000000000000000000000011 #
|
||||
b00000000000000000000000000000010 "
|
||||
1!
|
||||
#15
|
||||
0!
|
||||
#20
|
||||
1!
|
||||
b00000000000000000000000000000011 "
|
||||
b00000000000000000000000000000100 #
|
||||
b00000000000000000000000000000011 $
|
||||
#25
|
||||
0!
|
||||
#30
|
||||
1!
|
||||
b00000000000000000000000000000100 $
|
||||
b00000000000000000000000000000101 #
|
||||
b00000000000000000000000000000100 "
|
||||
#35
|
||||
0!
|
||||
#40
|
||||
1!
|
||||
b00000000000000000000000000000101 "
|
||||
b00000000000000000000000000000110 #
|
||||
b00000000000000000000000000000101 $
|
||||
#45
|
||||
0!
|
||||
#50
|
||||
1!
|
||||
b00000000000000000000000000000110 $
|
||||
b00000000000000000000000000000111 #
|
||||
b00000000000000000000000000000110 "
|
||||
#55
|
||||
0!
|
||||
#60
|
||||
1!
|
||||
b00000000000000000000000000000111 "
|
||||
b00000000000000000000000000001000 #
|
||||
b00000000000000000000000000000111 $
|
||||
#65
|
||||
0!
|
||||
#70
|
||||
1!
|
||||
b00000000000000000000000000001000 $
|
||||
b00000000000000000000000000001001 #
|
||||
b00000000000000000000000000001000 "
|
||||
#75
|
||||
0!
|
||||
#80
|
||||
1!
|
||||
b00000000000000000000000000001001 "
|
||||
b00000000000000000000000000001010 #
|
||||
b00000000000000000000000000001001 $
|
||||
#85
|
||||
0!
|
||||
#90
|
||||
1!
|
||||
b00000000000000000000000000001010 $
|
||||
b00000000000000000000000000001011 #
|
||||
b00000000000000000000000000001010 "
|
||||
#95
|
||||
0!
|
||||
#100
|
||||
1!
|
||||
b00000000000000000000000000001011 "
|
||||
b00000000000000000000000000001100 #
|
||||
b00000000000000000000000000001011 $
|
||||
#105
|
||||
0!
|
||||
#110
|
||||
1!
|
||||
b00000000000000000000000000001100 $
|
||||
b00000000000000000000000000001101 #
|
||||
b00000000000000000000000000001100 "
|
||||
#115
|
||||
0!
|
||||
#120
|
||||
1!
|
||||
b00000000000000000000000000001101 "
|
||||
b00000000000000000000000000001110 #
|
||||
b00000000000000000000000000001101 $
|
||||
#125
|
||||
0!
|
||||
#130
|
||||
1!
|
||||
b00000000000000000000000000001110 $
|
||||
b00000000000000000000000000001111 #
|
||||
b00000000000000000000000000001110 "
|
||||
#135
|
||||
0!
|
||||
#140
|
||||
1!
|
||||
b00000000000000000000000000001111 "
|
||||
b00000000000000000000000000010000 #
|
||||
b00000000000000000000000000001111 $
|
||||
#145
|
||||
0!
|
||||
#150
|
||||
1!
|
||||
b00000000000000000000000000010000 $
|
||||
b00000000000000000000000000010001 #
|
||||
b00000000000000000000000000010000 "
|
||||
#155
|
||||
0!
|
||||
#160
|
||||
1!
|
||||
b00000000000000000000000000010001 "
|
||||
b00000000000000000000000000010010 #
|
||||
b00000000000000000000000000010001 $
|
||||
#165
|
||||
0!
|
||||
#170
|
||||
1!
|
||||
b00000000000000000000000000010010 $
|
||||
b00000000000000000000000000010011 #
|
||||
b00000000000000000000000000010010 "
|
||||
#175
|
||||
0!
|
||||
#180
|
||||
1!
|
||||
b00000000000000000000000000010011 "
|
||||
b00000000000000000000000000010100 #
|
||||
b00000000000000000000000000010011 $
|
||||
#185
|
||||
0!
|
||||
#190
|
||||
1!
|
||||
b00000000000000000000000000010100 $
|
||||
b00000000000000000000000000010101 #
|
||||
b00000000000000000000000000010100 "
|
||||
#195
|
||||
0!
|
||||
#200
|
||||
1!
|
||||
b00000000000000000000000000010101 "
|
||||
b00000000000000000000000000010110 #
|
||||
b00000000000000000000000000010101 $
|
593
test_regress/t/t_interface_ref_trace.out
Normal file
593
test_regress/t/t_interface_ref_trace.out
Normal file
@ -0,0 +1,593 @@
|
||||
$version Generated by VerilatedVcd $end
|
||||
$date Wed Dec 4 07:47:51 2019
|
||||
$end
|
||||
$timescale 1ns $end
|
||||
|
||||
$scope module top $end
|
||||
$var wire 1 0 clk $end
|
||||
$scope module t $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$scope module a $end
|
||||
$scope module ac1 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 $ value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 % val100 [31:0] $end
|
||||
$var wire 32 & val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module ac2 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 ' value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 ( val100 [31:0] $end
|
||||
$var wire 32 ) val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module ac3 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 * value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 + val100 [31:0] $end
|
||||
$var wire 32 , val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module as3 $end
|
||||
$scope module intf_for_struct $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 * value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 + val100 [31:0] $end
|
||||
$var wire 32 , val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module intf_in_sub_all $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 * value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 + val100 [31:0] $end
|
||||
$var wire 32 , val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module intf_one $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 $ value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 % val100 [31:0] $end
|
||||
$var wire 32 & val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module intf_two $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 ' value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 ( val100 [31:0] $end
|
||||
$var wire 32 ) val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module abcdefghijklmnopqrstuvwxyz $end
|
||||
$scope module ac1 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 ' value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 ( val100 [31:0] $end
|
||||
$var wire 32 ) val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module ac2 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 $ value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 % val100 [31:0] $end
|
||||
$var wire 32 & val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module ac3 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 - value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 . val100 [31:0] $end
|
||||
$var wire 32 / val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module as3 $end
|
||||
$scope module intf_for_struct $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 - value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 . val100 [31:0] $end
|
||||
$var wire 32 / val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module intf_in_sub_all $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 - value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 . val100 [31:0] $end
|
||||
$var wire 32 / val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module intf_one $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 ' value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 ( val100 [31:0] $end
|
||||
$var wire 32 ) val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module intf_two $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 $ value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 % val100 [31:0] $end
|
||||
$var wire 32 & val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module c1 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 $ value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 % val100 [31:0] $end
|
||||
$var wire 32 & val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module c2 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 ' value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 ( val100 [31:0] $end
|
||||
$var wire 32 ) val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module intf_1 $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 $ value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 % val100 [31:0] $end
|
||||
$var wire 32 & val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module intf_2 $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 ' value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 ( val100 [31:0] $end
|
||||
$var wire 32 ) val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module s1 $end
|
||||
$scope module intf_for_struct $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 $ value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 % val100 [31:0] $end
|
||||
$var wire 32 & val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module s2 $end
|
||||
$scope module intf_for_struct $end
|
||||
$var wire 1 0 clk $end
|
||||
$var wire 32 # cyc [31:0] $end
|
||||
$var wire 32 ' value [31:0] $end
|
||||
$scope module the_struct $end
|
||||
$var wire 32 ( val100 [31:0] $end
|
||||
$var wire 32 ) val200 [31:0] $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$enddefinitions $end
|
||||
|
||||
|
||||
#0
|
||||
b00000000000000000000000000000000 #
|
||||
b00000000000000000000000000000001 $
|
||||
b00000000000000000000000001100101 %
|
||||
b00000000000000000000000011001001 &
|
||||
b00000000000000000000000000000010 '
|
||||
b00000000000000000000000001100110 (
|
||||
b00000000000000000000000011001010 )
|
||||
b00000000000000000000001111101001 *
|
||||
b00000000000000000000010001001101 +
|
||||
b00000000000000000000010010110001 ,
|
||||
b00000000000000000000001111101010 -
|
||||
b00000000000000000000010001001110 .
|
||||
b00000000000000000000010010110010 /
|
||||
00
|
||||
#10
|
||||
b00000000000000000000000000000001 #
|
||||
b00000000000000000000000000000010 $
|
||||
b00000000000000000000000001100110 %
|
||||
b00000000000000000000000011001010 &
|
||||
b00000000000000000000000000000011 '
|
||||
b00000000000000000000000001100111 (
|
||||
b00000000000000000000000011001011 )
|
||||
b00000000000000000000001111101010 *
|
||||
b00000000000000000000010001001110 +
|
||||
b00000000000000000000010010110010 ,
|
||||
b00000000000000000000001111101011 -
|
||||
b00000000000000000000010001001111 .
|
||||
b00000000000000000000010010110011 /
|
||||
10
|
||||
#15
|
||||
00
|
||||
#20
|
||||
b00000000000000000000000000000010 #
|
||||
b00000000000000000000000000000011 $
|
||||
b00000000000000000000000001100111 %
|
||||
b00000000000000000000000011001011 &
|
||||
b00000000000000000000000000000100 '
|
||||
b00000000000000000000000001101000 (
|
||||
b00000000000000000000000011001100 )
|
||||
b00000000000000000000001111101011 *
|
||||
b00000000000000000000010001001111 +
|
||||
b00000000000000000000010010110011 ,
|
||||
b00000000000000000000001111101100 -
|
||||
b00000000000000000000010001010000 .
|
||||
b00000000000000000000010010110100 /
|
||||
10
|
||||
#25
|
||||
00
|
||||
#30
|
||||
b00000000000000000000000000000011 #
|
||||
b00000000000000000000000000000100 $
|
||||
b00000000000000000000000001101000 %
|
||||
b00000000000000000000000011001100 &
|
||||
b00000000000000000000000000000101 '
|
||||
b00000000000000000000000001101001 (
|
||||
b00000000000000000000000011001101 )
|
||||
b00000000000000000000001111101100 *
|
||||
b00000000000000000000010001010000 +
|
||||
b00000000000000000000010010110100 ,
|
||||
b00000000000000000000001111101101 -
|
||||
b00000000000000000000010001010001 .
|
||||
b00000000000000000000010010110101 /
|
||||
10
|
||||
#35
|
||||
00
|
||||
#40
|
||||
b00000000000000000000000000000100 #
|
||||
b00000000000000000000000000000101 $
|
||||
b00000000000000000000000001101001 %
|
||||
b00000000000000000000000011001101 &
|
||||
b00000000000000000000000000000110 '
|
||||
b00000000000000000000000001101010 (
|
||||
b00000000000000000000000011001110 )
|
||||
b00000000000000000000001111101101 *
|
||||
b00000000000000000000010001010001 +
|
||||
b00000000000000000000010010110101 ,
|
||||
b00000000000000000000001111101110 -
|
||||
b00000000000000000000010001010010 .
|
||||
b00000000000000000000010010110110 /
|
||||
10
|
||||
#45
|
||||
00
|
||||
#50
|
||||
b00000000000000000000000000000101 #
|
||||
b00000000000000000000000000000110 $
|
||||
b00000000000000000000000001101010 %
|
||||
b00000000000000000000000011001110 &
|
||||
b00000000000000000000000000000111 '
|
||||
b00000000000000000000000001101011 (
|
||||
b00000000000000000000000011001111 )
|
||||
b00000000000000000000001111101110 *
|
||||
b00000000000000000000010001010010 +
|
||||
b00000000000000000000010010110110 ,
|
||||
b00000000000000000000001111101111 -
|
||||
b00000000000000000000010001010011 .
|
||||
b00000000000000000000010010110111 /
|
||||
10
|
||||
#55
|
||||
00
|
||||
#60
|
||||
b00000000000000000000000000000110 #
|
||||
b00000000000000000000000000000111 $
|
||||
b00000000000000000000000001101011 %
|
||||
b00000000000000000000000011001111 &
|
||||
b00000000000000000000000000001000 '
|
||||
b00000000000000000000000001101100 (
|
||||
b00000000000000000000000011010000 )
|
||||
b00000000000000000000001111101111 *
|
||||
b00000000000000000000010001010011 +
|
||||
b00000000000000000000010010110111 ,
|
||||
b00000000000000000000001111110000 -
|
||||
b00000000000000000000010001010100 .
|
||||
b00000000000000000000010010111000 /
|
||||
10
|
||||
#65
|
||||
00
|
||||
#70
|
||||
b00000000000000000000000000000111 #
|
||||
b00000000000000000000000000001000 $
|
||||
b00000000000000000000000001101100 %
|
||||
b00000000000000000000000011010000 &
|
||||
b00000000000000000000000000001001 '
|
||||
b00000000000000000000000001101101 (
|
||||
b00000000000000000000000011010001 )
|
||||
b00000000000000000000001111110000 *
|
||||
b00000000000000000000010001010100 +
|
||||
b00000000000000000000010010111000 ,
|
||||
b00000000000000000000001111110001 -
|
||||
b00000000000000000000010001010101 .
|
||||
b00000000000000000000010010111001 /
|
||||
10
|
||||
#75
|
||||
00
|
||||
#80
|
||||
b00000000000000000000000000001000 #
|
||||
b00000000000000000000000000001001 $
|
||||
b00000000000000000000000001101101 %
|
||||
b00000000000000000000000011010001 &
|
||||
b00000000000000000000000000001010 '
|
||||
b00000000000000000000000001101110 (
|
||||
b00000000000000000000000011010010 )
|
||||
b00000000000000000000001111110001 *
|
||||
b00000000000000000000010001010101 +
|
||||
b00000000000000000000010010111001 ,
|
||||
b00000000000000000000001111110010 -
|
||||
b00000000000000000000010001010110 .
|
||||
b00000000000000000000010010111010 /
|
||||
10
|
||||
#85
|
||||
00
|
||||
#90
|
||||
b00000000000000000000000000001001 #
|
||||
b00000000000000000000000000001010 $
|
||||
b00000000000000000000000001101110 %
|
||||
b00000000000000000000000011010010 &
|
||||
b00000000000000000000000000001011 '
|
||||
b00000000000000000000000001101111 (
|
||||
b00000000000000000000000011010011 )
|
||||
b00000000000000000000001111110010 *
|
||||
b00000000000000000000010001010110 +
|
||||
b00000000000000000000010010111010 ,
|
||||
b00000000000000000000001111110011 -
|
||||
b00000000000000000000010001010111 .
|
||||
b00000000000000000000010010111011 /
|
||||
10
|
||||
#95
|
||||
00
|
||||
#100
|
||||
b00000000000000000000000000001010 #
|
||||
b00000000000000000000000000001011 $
|
||||
b00000000000000000000000001101111 %
|
||||
b00000000000000000000000011010011 &
|
||||
b00000000000000000000000000001100 '
|
||||
b00000000000000000000000001110000 (
|
||||
b00000000000000000000000011010100 )
|
||||
b00000000000000000000001111110011 *
|
||||
b00000000000000000000010001010111 +
|
||||
b00000000000000000000010010111011 ,
|
||||
b00000000000000000000001111110100 -
|
||||
b00000000000000000000010001011000 .
|
||||
b00000000000000000000010010111100 /
|
||||
10
|
||||
#105
|
||||
00
|
||||
#110
|
||||
b00000000000000000000000000001011 #
|
||||
b00000000000000000000000000001100 $
|
||||
b00000000000000000000000001110000 %
|
||||
b00000000000000000000000011010100 &
|
||||
b00000000000000000000000000001101 '
|
||||
b00000000000000000000000001110001 (
|
||||
b00000000000000000000000011010101 )
|
||||
b00000000000000000000001111110100 *
|
||||
b00000000000000000000010001011000 +
|
||||
b00000000000000000000010010111100 ,
|
||||
b00000000000000000000001111110101 -
|
||||
b00000000000000000000010001011001 .
|
||||
b00000000000000000000010010111101 /
|
||||
10
|
||||
#115
|
||||
00
|
||||
#120
|
||||
b00000000000000000000000000001100 #
|
||||
b00000000000000000000000000001101 $
|
||||
b00000000000000000000000001110001 %
|
||||
b00000000000000000000000011010101 &
|
||||
b00000000000000000000000000001110 '
|
||||
b00000000000000000000000001110010 (
|
||||
b00000000000000000000000011010110 )
|
||||
b00000000000000000000001111110101 *
|
||||
b00000000000000000000010001011001 +
|
||||
b00000000000000000000010010111101 ,
|
||||
b00000000000000000000001111110110 -
|
||||
b00000000000000000000010001011010 .
|
||||
b00000000000000000000010010111110 /
|
||||
10
|
||||
#125
|
||||
00
|
||||
#130
|
||||
b00000000000000000000000000001101 #
|
||||
b00000000000000000000000000001110 $
|
||||
b00000000000000000000000001110010 %
|
||||
b00000000000000000000000011010110 &
|
||||
b00000000000000000000000000001111 '
|
||||
b00000000000000000000000001110011 (
|
||||
b00000000000000000000000011010111 )
|
||||
b00000000000000000000001111110110 *
|
||||
b00000000000000000000010001011010 +
|
||||
b00000000000000000000010010111110 ,
|
||||
b00000000000000000000001111110111 -
|
||||
b00000000000000000000010001011011 .
|
||||
b00000000000000000000010010111111 /
|
||||
10
|
||||
#135
|
||||
00
|
||||
#140
|
||||
b00000000000000000000000000001110 #
|
||||
b00000000000000000000000000001111 $
|
||||
b00000000000000000000000001110011 %
|
||||
b00000000000000000000000011010111 &
|
||||
b00000000000000000000000000010000 '
|
||||
b00000000000000000000000001110100 (
|
||||
b00000000000000000000000011011000 )
|
||||
b00000000000000000000001111110111 *
|
||||
b00000000000000000000010001011011 +
|
||||
b00000000000000000000010010111111 ,
|
||||
b00000000000000000000001111111000 -
|
||||
b00000000000000000000010001011100 .
|
||||
b00000000000000000000010011000000 /
|
||||
10
|
||||
#145
|
||||
00
|
||||
#150
|
||||
b00000000000000000000000000001111 #
|
||||
b00000000000000000000000000010000 $
|
||||
b00000000000000000000000001110100 %
|
||||
b00000000000000000000000011011000 &
|
||||
b00000000000000000000000000010001 '
|
||||
b00000000000000000000000001110101 (
|
||||
b00000000000000000000000011011001 )
|
||||
b00000000000000000000001111111000 *
|
||||
b00000000000000000000010001011100 +
|
||||
b00000000000000000000010011000000 ,
|
||||
b00000000000000000000001111111001 -
|
||||
b00000000000000000000010001011101 .
|
||||
b00000000000000000000010011000001 /
|
||||
10
|
||||
#155
|
||||
00
|
||||
#160
|
||||
b00000000000000000000000000010000 #
|
||||
b00000000000000000000000000010001 $
|
||||
b00000000000000000000000001110101 %
|
||||
b00000000000000000000000011011001 &
|
||||
b00000000000000000000000000010010 '
|
||||
b00000000000000000000000001110110 (
|
||||
b00000000000000000000000011011010 )
|
||||
b00000000000000000000001111111001 *
|
||||
b00000000000000000000010001011101 +
|
||||
b00000000000000000000010011000001 ,
|
||||
b00000000000000000000001111111010 -
|
||||
b00000000000000000000010001011110 .
|
||||
b00000000000000000000010011000010 /
|
||||
10
|
||||
#165
|
||||
00
|
||||
#170
|
||||
b00000000000000000000000000010001 #
|
||||
b00000000000000000000000000010010 $
|
||||
b00000000000000000000000001110110 %
|
||||
b00000000000000000000000011011010 &
|
||||
b00000000000000000000000000010011 '
|
||||
b00000000000000000000000001110111 (
|
||||
b00000000000000000000000011011011 )
|
||||
b00000000000000000000001111111010 *
|
||||
b00000000000000000000010001011110 +
|
||||
b00000000000000000000010011000010 ,
|
||||
b00000000000000000000001111111011 -
|
||||
b00000000000000000000010001011111 .
|
||||
b00000000000000000000010011000011 /
|
||||
10
|
||||
#175
|
||||
00
|
||||
#180
|
||||
b00000000000000000000000000010010 #
|
||||
b00000000000000000000000000010011 $
|
||||
b00000000000000000000000001110111 %
|
||||
b00000000000000000000000011011011 &
|
||||
b00000000000000000000000000010100 '
|
||||
b00000000000000000000000001111000 (
|
||||
b00000000000000000000000011011100 )
|
||||
b00000000000000000000001111111011 *
|
||||
b00000000000000000000010001011111 +
|
||||
b00000000000000000000010011000011 ,
|
||||
b00000000000000000000001111111100 -
|
||||
b00000000000000000000010001100000 .
|
||||
b00000000000000000000010011000100 /
|
||||
10
|
||||
#185
|
||||
00
|
||||
#190
|
||||
b00000000000000000000000000010011 #
|
||||
b00000000000000000000000000010100 $
|
||||
b00000000000000000000000001111000 %
|
||||
b00000000000000000000000011011100 &
|
||||
b00000000000000000000000000010101 '
|
||||
b00000000000000000000000001111001 (
|
||||
b00000000000000000000000011011101 )
|
||||
b00000000000000000000001111111100 *
|
||||
b00000000000000000000010001100000 +
|
||||
b00000000000000000000010011000100 ,
|
||||
b00000000000000000000001111111101 -
|
||||
b00000000000000000000010001100001 .
|
||||
b00000000000000000000010011000101 /
|
||||
10
|
||||
#195
|
||||
00
|
||||
#200
|
||||
b00000000000000000000000000010100 #
|
||||
b00000000000000000000000000010101 $
|
||||
b00000000000000000000000001111001 %
|
||||
b00000000000000000000000011011101 &
|
||||
b00000000000000000000000000010110 '
|
||||
b00000000000000000000000001111010 (
|
||||
b00000000000000000000000011011110 )
|
||||
b00000000000000000000001111111101 *
|
||||
b00000000000000000000010001100001 +
|
||||
b00000000000000000000010011000101 ,
|
||||
b00000000000000000000001111111110 -
|
||||
b00000000000000000000010001100010 .
|
||||
b00000000000000000000010011000110 /
|
||||
10
|
||||
#205
|
||||
00
|
||||
#210
|
||||
b00000000000000000000000000010101 #
|
||||
b00000000000000000000000000010110 $
|
||||
b00000000000000000000000001111010 %
|
||||
b00000000000000000000000011011110 &
|
||||
b00000000000000000000000000010111 '
|
||||
b00000000000000000000000001111011 (
|
||||
b00000000000000000000000011011111 )
|
||||
b00000000000000000000001111111110 *
|
||||
b00000000000000000000010001100010 +
|
||||
b00000000000000000000010011000110 ,
|
||||
b00000000000000000000001111111111 -
|
||||
b00000000000000000000010001100011 .
|
||||
b00000000000000000000010011000111 /
|
||||
10
|
24
test_regress/t/t_interface_ref_trace.pl
Executable file
24
test_regress/t/t_interface_ref_trace.pl
Executable file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2009 by Wilson Snyder. 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.
|
||||
|
||||
scenarios(simulator => 1);
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ['--trace-structs --trace'],
|
||||
);
|
||||
|
||||
execute(
|
||||
check_finished => 1,
|
||||
);
|
||||
|
||||
vcd_identical($Self->trace_filename,
|
||||
$Self->{golden_filename});
|
||||
|
||||
ok(1);
|
||||
1;
|
105
test_regress/t/t_interface_ref_trace.v
Normal file
105
test_regress/t/t_interface_ref_trace.v
Normal file
@ -0,0 +1,105 @@
|
||||
// DESCRIPTION: Verilator: Verilog Test module
|
||||
//
|
||||
// This file ONLY is placed into the Public Domain, for any use,
|
||||
// without warranty, 2019 by Todd Strader.
|
||||
|
||||
// Test for trace file interface aliasing
|
||||
|
||||
typedef struct packed {
|
||||
integer val100;
|
||||
integer val200;
|
||||
} struct_t;
|
||||
|
||||
interface ifc (input logic clk,
|
||||
input integer cyc);
|
||||
integer value;
|
||||
struct_t the_struct;
|
||||
endinterface
|
||||
|
||||
module t (/*AUTOARG*/
|
||||
// Inputs
|
||||
clk
|
||||
);
|
||||
|
||||
input clk;
|
||||
integer cyc=0;
|
||||
|
||||
ifc intf_1(.*);
|
||||
ifc intf_2(.*);
|
||||
|
||||
always @(*) begin
|
||||
intf_1.value = cyc + 1;
|
||||
intf_2.value = cyc + 2;
|
||||
end
|
||||
|
||||
sub_struct s1 (.intf_for_struct(intf_1));
|
||||
sub_struct s2 (.intf_for_struct(intf_2));
|
||||
sub_check c1 (.intf_for_check(intf_1));
|
||||
sub_check c2 (.intf_for_check(intf_2));
|
||||
sub_all a (.intf_one(intf_1),
|
||||
.intf_two(intf_2));
|
||||
// Intentionally longer scope name
|
||||
sub_all abcdefghijklmnopqrstuvwxyz (.intf_one(intf_2),
|
||||
.intf_two(intf_1));
|
||||
|
||||
always @ (posedge clk) begin
|
||||
cyc <= cyc + 1;
|
||||
if (cyc==20) begin
|
||||
if (intf_1.value != 21) $stop;
|
||||
if (intf_2.value != 22) $stop;
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
end
|
||||
endmodule
|
||||
|
||||
module sub_struct
|
||||
(
|
||||
ifc intf_for_struct
|
||||
);
|
||||
|
||||
always @(*) begin
|
||||
intf_for_struct.the_struct.val100 = intf_for_struct.value + 100;
|
||||
intf_for_struct.the_struct.val200 = intf_for_struct.value + 200;
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
||||
module sub_check
|
||||
(
|
||||
ifc intf_for_check
|
||||
);
|
||||
|
||||
`ifdef NO_INLINE_A
|
||||
//verilator no_inline_module
|
||||
`endif
|
||||
|
||||
always @(posedge intf_for_check.clk) begin
|
||||
if (intf_for_check.the_struct.val100 != intf_for_check.value + 100) $stop;
|
||||
if (intf_for_check.the_struct.val200 != intf_for_check.value + 200) $stop;
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
||||
module sub_all
|
||||
(
|
||||
ifc intf_one,
|
||||
ifc intf_two
|
||||
);
|
||||
|
||||
`ifdef NO_INLINE_B
|
||||
//verilator no_inline_module
|
||||
`endif
|
||||
|
||||
ifc intf_in_sub_all (
|
||||
.clk(intf_one.clk),
|
||||
.cyc(intf_one.cyc)
|
||||
);
|
||||
assign intf_in_sub_all.value = intf_one.value + 1000;
|
||||
|
||||
sub_check ac1 (.intf_for_check(intf_one));
|
||||
sub_check ac2 (.intf_for_check(intf_two));
|
||||
sub_struct as3 (.intf_for_struct(intf_in_sub_all));
|
||||
sub_check ac3 (.intf_for_check(intf_in_sub_all));
|
||||
|
||||
endmodule
|
604
test_regress/t/t_interface_ref_trace_fst.out
Normal file
604
test_regress/t/t_interface_ref_trace_fst.out
Normal file
@ -0,0 +1,604 @@
|
||||
$date
|
||||
Wed Dec 4 07:48:29 2019
|
||||
|
||||
$end
|
||||
$version
|
||||
fstWriter
|
||||
$end
|
||||
$timescale
|
||||
1ns
|
||||
$end
|
||||
$scope module top $end
|
||||
$var wire 1 ! clk $end
|
||||
$scope module t $end
|
||||
$var wire 1 ! clk $end
|
||||
$var integer 32 " cyc $end
|
||||
$scope module intf_1 $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 # value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 $ val100 $end
|
||||
$var logic 32 % val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module s1 $end
|
||||
$scope module intf_for_struct $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 # value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 $ val100 $end
|
||||
$var logic 32 % val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module c1 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 # value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 $ val100 $end
|
||||
$var logic 32 % val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module a $end
|
||||
$scope module intf_one $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 # value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 $ val100 $end
|
||||
$var logic 32 % val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module ac1 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 # value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 $ val100 $end
|
||||
$var logic 32 % val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module abcdefghijklmnopqrstuvwxyz $end
|
||||
$scope module intf_two $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 # value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 $ val100 $end
|
||||
$var logic 32 % val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module ac2 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 # value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 $ val100 $end
|
||||
$var logic 32 % val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module intf_2 $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 & value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 ' val100 $end
|
||||
$var logic 32 ( val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module s2 $end
|
||||
$scope module intf_for_struct $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 & value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 ' val100 $end
|
||||
$var logic 32 ( val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module c2 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 & value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 ' val100 $end
|
||||
$var logic 32 ( val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module a $end
|
||||
$scope module intf_two $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 & value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 ' val100 $end
|
||||
$var logic 32 ( val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module ac2 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 & value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 ' val100 $end
|
||||
$var logic 32 ( val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module abcdefghijklmnopqrstuvwxyz $end
|
||||
$scope module intf_one $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 & value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 ' val100 $end
|
||||
$var logic 32 ( val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module ac1 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 & value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 ' val100 $end
|
||||
$var logic 32 ( val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module a $end
|
||||
$scope module intf_in_sub_all $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 ) value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 * val100 $end
|
||||
$var logic 32 + val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module as3 $end
|
||||
$scope module intf_for_struct $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 ) value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 * val100 $end
|
||||
$var logic 32 + val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module ac3 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 ) value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 * val100 $end
|
||||
$var logic 32 + val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module abcdefghijklmnopqrstuvwxyz $end
|
||||
$scope module intf_in_sub_all $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 , value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 - val100 $end
|
||||
$var logic 32 . val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module as3 $end
|
||||
$scope module intf_for_struct $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 , value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 - val100 $end
|
||||
$var logic 32 . val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$scope module ac3 $end
|
||||
$scope module intf_for_check $end
|
||||
$var wire 1 ! clk $end
|
||||
$var wire 32 " cyc $end
|
||||
$var integer 32 , value $end
|
||||
$scope module the_struct $end
|
||||
$var logic 32 - val100 $end
|
||||
$var logic 32 . val200 $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$upscope $end
|
||||
$enddefinitions $end
|
||||
$dumpvars
|
||||
0!
|
||||
b00000000000000000000000000000000 "
|
||||
b00000000000000000000000000000001 #
|
||||
b00000000000000000000000001100101 $
|
||||
b00000000000000000000000011001001 %
|
||||
b00000000000000000000000000000010 &
|
||||
b00000000000000000000000001100110 '
|
||||
b00000000000000000000000011001010 (
|
||||
b00000000000000000000001111101001 )
|
||||
b00000000000000000000010001001101 *
|
||||
b00000000000000000000010010110001 +
|
||||
b00000000000000000000001111101010 ,
|
||||
b00000000000000000000010001001110 -
|
||||
b00000000000000000000010010110010 .
|
||||
#10
|
||||
b00000000000000000000010010110011 .
|
||||
b00000000000000000000010001001111 -
|
||||
b00000000000000000000001111101011 ,
|
||||
b00000000000000000000010010110010 +
|
||||
b00000000000000000000010001001110 *
|
||||
b00000000000000000000001111101010 )
|
||||
b00000000000000000000000011001011 (
|
||||
b00000000000000000000000001100111 '
|
||||
b00000000000000000000000000000011 &
|
||||
b00000000000000000000000011001010 %
|
||||
b00000000000000000000000001100110 $
|
||||
b00000000000000000000000000000010 #
|
||||
b00000000000000000000000000000001 "
|
||||
1!
|
||||
#15
|
||||
0!
|
||||
#20
|
||||
1!
|
||||
b00000000000000000000000000000010 "
|
||||
b00000000000000000000000000000011 #
|
||||
b00000000000000000000000001100111 $
|
||||
b00000000000000000000000011001011 %
|
||||
b00000000000000000000000000000100 &
|
||||
b00000000000000000000000001101000 '
|
||||
b00000000000000000000000011001100 (
|
||||
b00000000000000000000001111101011 )
|
||||
b00000000000000000000010001001111 *
|
||||
b00000000000000000000010010110011 +
|
||||
b00000000000000000000001111101100 ,
|
||||
b00000000000000000000010001010000 -
|
||||
b00000000000000000000010010110100 .
|
||||
#25
|
||||
0!
|
||||
#30
|
||||
1!
|
||||
b00000000000000000000010010110101 .
|
||||
b00000000000000000000010001010001 -
|
||||
b00000000000000000000001111101101 ,
|
||||
b00000000000000000000010010110100 +
|
||||
b00000000000000000000010001010000 *
|
||||
b00000000000000000000001111101100 )
|
||||
b00000000000000000000000011001101 (
|
||||
b00000000000000000000000001101001 '
|
||||
b00000000000000000000000000000101 &
|
||||
b00000000000000000000000011001100 %
|
||||
b00000000000000000000000001101000 $
|
||||
b00000000000000000000000000000100 #
|
||||
b00000000000000000000000000000011 "
|
||||
#35
|
||||
0!
|
||||
#40
|
||||
1!
|
||||
b00000000000000000000000000000100 "
|
||||
b00000000000000000000000000000101 #
|
||||
b00000000000000000000000001101001 $
|
||||
b00000000000000000000000011001101 %
|
||||
b00000000000000000000000000000110 &
|
||||
b00000000000000000000000001101010 '
|
||||
b00000000000000000000000011001110 (
|
||||
b00000000000000000000001111101101 )
|
||||
b00000000000000000000010001010001 *
|
||||
b00000000000000000000010010110101 +
|
||||
b00000000000000000000001111101110 ,
|
||||
b00000000000000000000010001010010 -
|
||||
b00000000000000000000010010110110 .
|
||||
#45
|
||||
0!
|
||||
#50
|
||||
1!
|
||||
b00000000000000000000010010110111 .
|
||||
b00000000000000000000010001010011 -
|
||||
b00000000000000000000001111101111 ,
|
||||
b00000000000000000000010010110110 +
|
||||
b00000000000000000000010001010010 *
|
||||
b00000000000000000000001111101110 )
|
||||
b00000000000000000000000011001111 (
|
||||
b00000000000000000000000001101011 '
|
||||
b00000000000000000000000000000111 &
|
||||
b00000000000000000000000011001110 %
|
||||
b00000000000000000000000001101010 $
|
||||
b00000000000000000000000000000110 #
|
||||
b00000000000000000000000000000101 "
|
||||
#55
|
||||
0!
|
||||
#60
|
||||
1!
|
||||
b00000000000000000000000000000110 "
|
||||
b00000000000000000000000000000111 #
|
||||
b00000000000000000000000001101011 $
|
||||
b00000000000000000000000011001111 %
|
||||
b00000000000000000000000000001000 &
|
||||
b00000000000000000000000001101100 '
|
||||
b00000000000000000000000011010000 (
|
||||
b00000000000000000000001111101111 )
|
||||
b00000000000000000000010001010011 *
|
||||
b00000000000000000000010010110111 +
|
||||
b00000000000000000000001111110000 ,
|
||||
b00000000000000000000010001010100 -
|
||||
b00000000000000000000010010111000 .
|
||||
#65
|
||||
0!
|
||||
#70
|
||||
1!
|
||||
b00000000000000000000010010111001 .
|
||||
b00000000000000000000010001010101 -
|
||||
b00000000000000000000001111110001 ,
|
||||
b00000000000000000000010010111000 +
|
||||
b00000000000000000000010001010100 *
|
||||
b00000000000000000000001111110000 )
|
||||
b00000000000000000000000011010001 (
|
||||
b00000000000000000000000001101101 '
|
||||
b00000000000000000000000000001001 &
|
||||
b00000000000000000000000011010000 %
|
||||
b00000000000000000000000001101100 $
|
||||
b00000000000000000000000000001000 #
|
||||
b00000000000000000000000000000111 "
|
||||
#75
|
||||
0!
|
||||
#80
|
||||
1!
|
||||
b00000000000000000000000000001000 "
|
||||
b00000000000000000000000000001001 #
|
||||
b00000000000000000000000001101101 $
|
||||
b00000000000000000000000011010001 %
|
||||
b00000000000000000000000000001010 &
|
||||
b00000000000000000000000001101110 '
|
||||
b00000000000000000000000011010010 (
|
||||
b00000000000000000000001111110001 )
|
||||
b00000000000000000000010001010101 *
|
||||
b00000000000000000000010010111001 +
|
||||
b00000000000000000000001111110010 ,
|
||||
b00000000000000000000010001010110 -
|
||||
b00000000000000000000010010111010 .
|
||||
#85
|
||||
0!
|
||||
#90
|
||||
1!
|
||||
b00000000000000000000010010111011 .
|
||||
b00000000000000000000010001010111 -
|
||||
b00000000000000000000001111110011 ,
|
||||
b00000000000000000000010010111010 +
|
||||
b00000000000000000000010001010110 *
|
||||
b00000000000000000000001111110010 )
|
||||
b00000000000000000000000011010011 (
|
||||
b00000000000000000000000001101111 '
|
||||
b00000000000000000000000000001011 &
|
||||
b00000000000000000000000011010010 %
|
||||
b00000000000000000000000001101110 $
|
||||
b00000000000000000000000000001010 #
|
||||
b00000000000000000000000000001001 "
|
||||
#95
|
||||
0!
|
||||
#100
|
||||
1!
|
||||
b00000000000000000000000000001010 "
|
||||
b00000000000000000000000000001011 #
|
||||
b00000000000000000000000001101111 $
|
||||
b00000000000000000000000011010011 %
|
||||
b00000000000000000000000000001100 &
|
||||
b00000000000000000000000001110000 '
|
||||
b00000000000000000000000011010100 (
|
||||
b00000000000000000000001111110011 )
|
||||
b00000000000000000000010001010111 *
|
||||
b00000000000000000000010010111011 +
|
||||
b00000000000000000000001111110100 ,
|
||||
b00000000000000000000010001011000 -
|
||||
b00000000000000000000010010111100 .
|
||||
#105
|
||||
0!
|
||||
#110
|
||||
1!
|
||||
b00000000000000000000010010111101 .
|
||||
b00000000000000000000010001011001 -
|
||||
b00000000000000000000001111110101 ,
|
||||
b00000000000000000000010010111100 +
|
||||
b00000000000000000000010001011000 *
|
||||
b00000000000000000000001111110100 )
|
||||
b00000000000000000000000011010101 (
|
||||
b00000000000000000000000001110001 '
|
||||
b00000000000000000000000000001101 &
|
||||
b00000000000000000000000011010100 %
|
||||
b00000000000000000000000001110000 $
|
||||
b00000000000000000000000000001100 #
|
||||
b00000000000000000000000000001011 "
|
||||
#115
|
||||
0!
|
||||
#120
|
||||
1!
|
||||
b00000000000000000000000000001100 "
|
||||
b00000000000000000000000000001101 #
|
||||
b00000000000000000000000001110001 $
|
||||
b00000000000000000000000011010101 %
|
||||
b00000000000000000000000000001110 &
|
||||
b00000000000000000000000001110010 '
|
||||
b00000000000000000000000011010110 (
|
||||
b00000000000000000000001111110101 )
|
||||
b00000000000000000000010001011001 *
|
||||
b00000000000000000000010010111101 +
|
||||
b00000000000000000000001111110110 ,
|
||||
b00000000000000000000010001011010 -
|
||||
b00000000000000000000010010111110 .
|
||||
#125
|
||||
0!
|
||||
#130
|
||||
1!
|
||||
b00000000000000000000010010111111 .
|
||||
b00000000000000000000010001011011 -
|
||||
b00000000000000000000001111110111 ,
|
||||
b00000000000000000000010010111110 +
|
||||
b00000000000000000000010001011010 *
|
||||
b00000000000000000000001111110110 )
|
||||
b00000000000000000000000011010111 (
|
||||
b00000000000000000000000001110011 '
|
||||
b00000000000000000000000000001111 &
|
||||
b00000000000000000000000011010110 %
|
||||
b00000000000000000000000001110010 $
|
||||
b00000000000000000000000000001110 #
|
||||
b00000000000000000000000000001101 "
|
||||
#135
|
||||
0!
|
||||
#140
|
||||
1!
|
||||
b00000000000000000000000000001110 "
|
||||
b00000000000000000000000000001111 #
|
||||
b00000000000000000000000001110011 $
|
||||
b00000000000000000000000011010111 %
|
||||
b00000000000000000000000000010000 &
|
||||
b00000000000000000000000001110100 '
|
||||
b00000000000000000000000011011000 (
|
||||
b00000000000000000000001111110111 )
|
||||
b00000000000000000000010001011011 *
|
||||
b00000000000000000000010010111111 +
|
||||
b00000000000000000000001111111000 ,
|
||||
b00000000000000000000010001011100 -
|
||||
b00000000000000000000010011000000 .
|
||||
#145
|
||||
0!
|
||||
#150
|
||||
1!
|
||||
b00000000000000000000010011000001 .
|
||||
b00000000000000000000010001011101 -
|
||||
b00000000000000000000001111111001 ,
|
||||
b00000000000000000000010011000000 +
|
||||
b00000000000000000000010001011100 *
|
||||
b00000000000000000000001111111000 )
|
||||
b00000000000000000000000011011001 (
|
||||
b00000000000000000000000001110101 '
|
||||
b00000000000000000000000000010001 &
|
||||
b00000000000000000000000011011000 %
|
||||
b00000000000000000000000001110100 $
|
||||
b00000000000000000000000000010000 #
|
||||
b00000000000000000000000000001111 "
|
||||
#155
|
||||
0!
|
||||
#160
|
||||
1!
|
||||
b00000000000000000000000000010000 "
|
||||
b00000000000000000000000000010001 #
|
||||
b00000000000000000000000001110101 $
|
||||
b00000000000000000000000011011001 %
|
||||
b00000000000000000000000000010010 &
|
||||
b00000000000000000000000001110110 '
|
||||
b00000000000000000000000011011010 (
|
||||
b00000000000000000000001111111001 )
|
||||
b00000000000000000000010001011101 *
|
||||
b00000000000000000000010011000001 +
|
||||
b00000000000000000000001111111010 ,
|
||||
b00000000000000000000010001011110 -
|
||||
b00000000000000000000010011000010 .
|
||||
#165
|
||||
0!
|
||||
#170
|
||||
1!
|
||||
b00000000000000000000010011000011 .
|
||||
b00000000000000000000010001011111 -
|
||||
b00000000000000000000001111111011 ,
|
||||
b00000000000000000000010011000010 +
|
||||
b00000000000000000000010001011110 *
|
||||
b00000000000000000000001111111010 )
|
||||
b00000000000000000000000011011011 (
|
||||
b00000000000000000000000001110111 '
|
||||
b00000000000000000000000000010011 &
|
||||
b00000000000000000000000011011010 %
|
||||
b00000000000000000000000001110110 $
|
||||
b00000000000000000000000000010010 #
|
||||
b00000000000000000000000000010001 "
|
||||
#175
|
||||
0!
|
||||
#180
|
||||
1!
|
||||
b00000000000000000000000000010010 "
|
||||
b00000000000000000000000000010011 #
|
||||
b00000000000000000000000001110111 $
|
||||
b00000000000000000000000011011011 %
|
||||
b00000000000000000000000000010100 &
|
||||
b00000000000000000000000001111000 '
|
||||
b00000000000000000000000011011100 (
|
||||
b00000000000000000000001111111011 )
|
||||
b00000000000000000000010001011111 *
|
||||
b00000000000000000000010011000011 +
|
||||
b00000000000000000000001111111100 ,
|
||||
b00000000000000000000010001100000 -
|
||||
b00000000000000000000010011000100 .
|
||||
#185
|
||||
0!
|
||||
#190
|
||||
1!
|
||||
b00000000000000000000010011000101 .
|
||||
b00000000000000000000010001100001 -
|
||||
b00000000000000000000001111111101 ,
|
||||
b00000000000000000000010011000100 +
|
||||
b00000000000000000000010001100000 *
|
||||
b00000000000000000000001111111100 )
|
||||
b00000000000000000000000011011101 (
|
||||
b00000000000000000000000001111001 '
|
||||
b00000000000000000000000000010101 &
|
||||
b00000000000000000000000011011100 %
|
||||
b00000000000000000000000001111000 $
|
||||
b00000000000000000000000000010100 #
|
||||
b00000000000000000000000000010011 "
|
||||
#195
|
||||
0!
|
||||
#200
|
||||
1!
|
||||
b00000000000000000000000000010100 "
|
||||
b00000000000000000000000000010101 #
|
||||
b00000000000000000000000001111001 $
|
||||
b00000000000000000000000011011101 %
|
||||
b00000000000000000000000000010110 &
|
||||
b00000000000000000000000001111010 '
|
||||
b00000000000000000000000011011110 (
|
||||
b00000000000000000000001111111101 )
|
||||
b00000000000000000000010001100001 *
|
||||
b00000000000000000000010011000101 +
|
||||
b00000000000000000000001111111110 ,
|
||||
b00000000000000000000010001100010 -
|
||||
b00000000000000000000010011000110 .
|
||||
#205
|
||||
0!
|
||||
#210
|
||||
1!
|
||||
b00000000000000000000010011000111 .
|
||||
b00000000000000000000010001100011 -
|
||||
b00000000000000000000001111111111 ,
|
||||
b00000000000000000000010011000110 +
|
||||
b00000000000000000000010001100010 *
|
||||
b00000000000000000000001111111110 )
|
||||
b00000000000000000000000011011111 (
|
||||
b00000000000000000000000001111011 '
|
||||
b00000000000000000000000000010111 &
|
||||
b00000000000000000000000011011110 %
|
||||
b00000000000000000000000001111010 $
|
||||
b00000000000000000000000000010110 #
|
||||
b00000000000000000000000000010101 "
|
@ -9,10 +9,10 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
||||
|
||||
scenarios(simulator => 1);
|
||||
|
||||
top_filename("t/t_interface1_modport.v");
|
||||
top_filename("t/t_interface_ref_trace.v");
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ['--trace-fst'],
|
||||
verilator_flags2 => ['--trace-structs --trace-fst'],
|
||||
);
|
||||
|
||||
execute(
|
28
test_regress/t/t_interface_ref_trace_inla.pl
Executable file
28
test_regress/t/t_interface_ref_trace_inla.pl
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2009 by Wilson Snyder. 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.
|
||||
|
||||
scenarios(simulator => 1);
|
||||
|
||||
top_filename("t/t_interface_ref_trace.v");
|
||||
$Self->{golden_filename} = "t/t_interface_ref_trace.out";
|
||||
|
||||
compile(
|
||||
v_flags2 => ['+define+NO_INLINE_A'],
|
||||
verilator_flags2 => ['--trace-structs --trace'],
|
||||
);
|
||||
|
||||
execute(
|
||||
check_finished => 1,
|
||||
);
|
||||
|
||||
vcd_identical($Self->trace_filename,
|
||||
$Self->{golden_filename});
|
||||
|
||||
ok(1);
|
||||
1;
|
28
test_regress/t/t_interface_ref_trace_inlab.pl
Executable file
28
test_regress/t/t_interface_ref_trace_inlab.pl
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2009 by Wilson Snyder. 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.
|
||||
|
||||
scenarios(simulator => 1);
|
||||
|
||||
top_filename("t/t_interface_ref_trace.v");
|
||||
$Self->{golden_filename} = "t/t_interface_ref_trace.out";
|
||||
|
||||
compile(
|
||||
v_flags2 => ['+define+NO_INLINE_A +define+NO_INLINE_B'],
|
||||
verilator_flags2 => ['--trace-structs --trace'],
|
||||
);
|
||||
|
||||
execute(
|
||||
check_finished => 1,
|
||||
);
|
||||
|
||||
vcd_identical($Self->trace_filename,
|
||||
$Self->{golden_filename});
|
||||
|
||||
ok(1);
|
||||
1;
|
28
test_regress/t/t_interface_ref_trace_inlb.pl
Executable file
28
test_regress/t/t_interface_ref_trace_inlb.pl
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2009 by Wilson Snyder. 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.
|
||||
|
||||
scenarios(simulator => 1);
|
||||
|
||||
top_filename("t/t_interface_ref_trace.v");
|
||||
$Self->{golden_filename} = "t/t_interface_ref_trace.out";
|
||||
|
||||
compile(
|
||||
v_flags2 => ['+define+NO_INLINE_B'],
|
||||
verilator_flags2 => ['--trace-structs --trace'],
|
||||
);
|
||||
|
||||
execute(
|
||||
check_finished => 1,
|
||||
);
|
||||
|
||||
vcd_identical($Self->trace_filename,
|
||||
$Self->{golden_filename});
|
||||
|
||||
ok(1);
|
||||
1;
|
@ -3,6 +3,11 @@
|
||||
// This file ONLY is placed into the Public Domain, for any use,
|
||||
// without warranty, 2019 by Wilson Snyder.
|
||||
|
||||
interface secret_intf();
|
||||
logic secret_a;
|
||||
integer secret_b;
|
||||
endinterface
|
||||
|
||||
module t (/*AUTOARG*/
|
||||
// Inputs
|
||||
clk
|
||||
@ -58,4 +63,6 @@ module secret_other
|
||||
end
|
||||
end
|
||||
|
||||
secret_intf secret_interface();
|
||||
|
||||
endmodule
|
||||
|
Loading…
Reference in New Issue
Block a user