Tests: Additional display merge tests. No functional change.
This commit is contained in:
parent
10e0d34140
commit
eb65984368
|
|
@ -67,7 +67,7 @@ private:
|
||||||
timesp->unlinkFrBackWithNext();
|
timesp->unlinkFrBackWithNext();
|
||||||
timenewp->addNext(timesp);
|
timenewp->addNext(timesp);
|
||||||
}
|
}
|
||||||
nodep->fmtp()->exprsp(timenewp);
|
nodep->fmtp()->addExprsp(timenewp);
|
||||||
if (!nodep->fmtp()->scopeNamep() && nodep->fmtp()->formatScopeTracking()) {
|
if (!nodep->fmtp()->scopeNamep() && nodep->fmtp()->formatScopeTracking()) {
|
||||||
nodep->fmtp()->scopeNamep(new AstScopeName(nodep->fileline()));
|
nodep->fmtp()->scopeNamep(new AstScopeName(nodep->fileline()));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2397,7 +2397,7 @@ public:
|
||||||
virtual bool hasDType() const { return true; }
|
virtual bool hasDType() const { return true; }
|
||||||
virtual bool same(AstNode* samep) const { return text()==samep->castSFormatF()->text(); }
|
virtual bool same(AstNode* samep) const { return text()==samep->castSFormatF()->text(); }
|
||||||
virtual string verilogKwd() const { return "$sformatf"; }
|
virtual string verilogKwd() const { return "$sformatf"; }
|
||||||
void exprsp(AstNode* nodep) { addOp1p(nodep); } // op1 = Expressions to output
|
void addExprsp(AstNode* nodep) { addOp1p(nodep); } // op1 = Expressions to output
|
||||||
AstNode* exprsp() const { return op1p(); } // op1 = Expressions to output
|
AstNode* exprsp() const { return op1p(); } // op1 = Expressions to output
|
||||||
string text() const { return m_text; } // * = Text to display
|
string text() const { return m_text; } // * = Text to display
|
||||||
void text(const string& text) { m_text=text; }
|
void text(const string& text) { m_text=text; }
|
||||||
|
|
|
||||||
|
|
@ -1943,6 +1943,8 @@ private:
|
||||||
|| !prevp->filep()->sameTree(nodep->filep())) return false;
|
|| !prevp->filep()->sameTree(nodep->filep())) return false;
|
||||||
if (!prevp->fmtp() || prevp->fmtp()->nextp()
|
if (!prevp->fmtp() || prevp->fmtp()->nextp()
|
||||||
|| !nodep->fmtp() || nodep->fmtp()->nextp()) return false;
|
|| !nodep->fmtp() || nodep->fmtp()->nextp()) return false;
|
||||||
|
// We don't merge scopeNames as might be different scopes (late in process)
|
||||||
|
// We don't merge arguments as might need to later print warnings with right line numbers
|
||||||
AstSFormatF* pformatp = prevp->fmtp();
|
AstSFormatF* pformatp = prevp->fmtp();
|
||||||
if (!pformatp || pformatp->exprsp() || pformatp->scopeNamep()) return false;
|
if (!pformatp || pformatp->exprsp() || pformatp->scopeNamep()) return false;
|
||||||
AstSFormatF* nformatp = nodep->fmtp();
|
AstSFormatF* nformatp = nodep->fmtp();
|
||||||
|
|
|
||||||
|
|
@ -16,12 +16,28 @@ execute (
|
||||||
expect=> (quotemeta(
|
expect=> (quotemeta(
|
||||||
'Merge:
|
'Merge:
|
||||||
This should merge
|
This should merge
|
||||||
|
f
|
||||||
|
a=top.t
|
||||||
|
b=top.t
|
||||||
|
pre
|
||||||
|
t=0
|
||||||
|
t2=0
|
||||||
|
post
|
||||||
|
t3=0
|
||||||
|
t4=0 t5=00000000000000000
|
||||||
|
m
|
||||||
|
t=0 t2=0 t3=0 t4=0 t5=0
|
||||||
|
t=0 t2=0 t3=0 t4=0 t5=0
|
||||||
|
mm
|
||||||
|
|
||||||
|
f a=top.t b=top.t pre t=0 t2=0 post t3=0 t4=0 t5=00000000000000000m t=0 t2=0 t3=0 t4=0 t5=0 t=0 t2=0 t3=0 t4=0 t5=0mm
|
||||||
|
|
||||||
*-* All Finished *-*')
|
*-* All Finished *-*')
|
||||||
.'.*')
|
.'.*')
|
||||||
);
|
);
|
||||||
|
|
||||||
file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}__stats.txt",
|
file_grep ("$Self->{obj_dir}/$Self->{VM_PREFIX}__stats.txt",
|
||||||
qr/Node count, DISPLAY \s+ 5 \s+ 1 \s+ 1 \s+ 1/);
|
qr/Node count, DISPLAY \s+ 32 \s+ 25 \s+ 25 \s+ 25/);
|
||||||
|
|
||||||
ok(1);
|
ok(1);
|
||||||
1;
|
1;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,37 @@ module t (/*AUTOARG*/);
|
||||||
$write("This ");
|
$write("This ");
|
||||||
$write("should ");
|
$write("should ");
|
||||||
$display("merge");
|
$display("merge");
|
||||||
$write("*-* All Finished *-*\n");
|
|
||||||
|
$display("f");
|
||||||
|
$display(" a=%m");
|
||||||
|
$display(" b=%m");
|
||||||
|
$display(" pre");
|
||||||
|
$display(" t=%0d",$time);
|
||||||
|
$display(" t2=%0d",$time);
|
||||||
|
$display(" post");
|
||||||
|
$display(" t3=%0d",$time);
|
||||||
|
$display(" t4=%0d t5=%0d",$time,$time,$time);
|
||||||
|
$display("m");
|
||||||
|
$display(" t=%0d t2=%0d t3=%0d t4=%0d t5=%0d",$time,$time,$time,$time,$time);
|
||||||
|
$display(" t=%0d t2=%0d t3=%0d t4=%0d t5=%0d",$time,$time,$time,$time,$time);
|
||||||
|
$display("mm");
|
||||||
|
$display("");
|
||||||
|
|
||||||
|
$write("f");
|
||||||
|
$write(" a=%m");
|
||||||
|
$write(" b=%m");
|
||||||
|
$write(" pre");
|
||||||
|
$write(" t=%0d",$time);
|
||||||
|
$write(" t2=%0d",$time);
|
||||||
|
$write(" post");
|
||||||
|
$write(" t3=%0d",$time);
|
||||||
|
$write(" t4=%0d t5=%0d",$time,$time,$time);
|
||||||
|
$write("m");
|
||||||
|
$write(" t=%0d t2=%0d t3=%0d t4=%0d t5=%0d",$time,$time,$time,$time,$time);
|
||||||
|
$write(" t=%0d t2=%0d t3=%0d t4=%0d t5=%0d",$time,$time,$time,$time,$time);
|
||||||
|
$display("mm");
|
||||||
|
|
||||||
|
$write("\n*-* All Finished *-*\n");
|
||||||
$finish;
|
$finish;
|
||||||
end
|
end
|
||||||
endmodule
|
endmodule
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue