Fix ordering of , msg1229.
This commit is contained in:
parent
d6e8b0263c
commit
bcba5075e8
3
Changes
3
Changes
|
|
@ -7,12 +7,13 @@ indicates the contributor was also the author of the fix; Thanks!
|
||||||
|
|
||||||
*** Support named function and task arguments. [Chris Randall]
|
*** Support named function and task arguments. [Chris Randall]
|
||||||
|
|
||||||
|
**** Fix ordering of $fgetc, msg1229. [Frederic Requin]
|
||||||
|
|
||||||
**** Fix --output-split-cfunc to count internal functions. [Chris Randall]
|
**** Fix --output-split-cfunc to count internal functions. [Chris Randall]
|
||||||
|
|
||||||
**** Fix crash on 32-bit Ubuntu, bug670. [Mark Jackson Pulver]
|
**** Fix crash on 32-bit Ubuntu, bug670. [Mark Jackson Pulver]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* Verilator 3.851 2013-08-15
|
* Verilator 3.851 2013-08-15
|
||||||
|
|
||||||
*** Fix ordering of clock enables with delayed assigns, bug613. [Jeremy Bennett]
|
*** Fix ordering of clock enables with delayed assigns, bug613. [Jeremy Bennett]
|
||||||
|
|
|
||||||
|
|
@ -3378,6 +3378,7 @@ struct AstFEof : public AstNodeUniop {
|
||||||
virtual bool cleanOut() {return true;} virtual bool cleanLhs() {return true;}
|
virtual bool cleanOut() {return true;} virtual bool cleanLhs() {return true;}
|
||||||
virtual bool sizeMattersLhs() {return false;}
|
virtual bool sizeMattersLhs() {return false;}
|
||||||
virtual int instrCount() const { return widthInstrs()*16; }
|
virtual int instrCount() const { return widthInstrs()*16; }
|
||||||
|
virtual bool isPure() const { return false; } // SPECIAL: $display has 'visual' ordering
|
||||||
AstNode* filep() const { return lhsp(); }
|
AstNode* filep() const { return lhsp(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -3391,6 +3392,7 @@ struct AstFGetC : public AstNodeUniop {
|
||||||
virtual bool cleanOut() {return false;} virtual bool cleanLhs() {return true;}
|
virtual bool cleanOut() {return false;} virtual bool cleanLhs() {return true;}
|
||||||
virtual bool sizeMattersLhs() {return false;}
|
virtual bool sizeMattersLhs() {return false;}
|
||||||
virtual int instrCount() const { return widthInstrs()*64; }
|
virtual int instrCount() const { return widthInstrs()*64; }
|
||||||
|
virtual bool isPure() const { return false; } // SPECIAL: $display has 'visual' ordering
|
||||||
AstNode* filep() const { return lhsp(); }
|
AstNode* filep() const { return lhsp(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -815,9 +815,10 @@ private:
|
||||||
|
|
||||||
bool varNotReferenced(AstNode* nodep, AstVar* varp, int level=0) {
|
bool varNotReferenced(AstNode* nodep, AstVar* varp, int level=0) {
|
||||||
// Return true if varp never referenced under node.
|
// Return true if varp never referenced under node.
|
||||||
// Return false if referenced, or tree too deep to be worth it
|
// Return false if referenced, or tree too deep to be worth it, or side effects
|
||||||
if (!nodep) return true;
|
if (!nodep) return true;
|
||||||
if (level>2) return false;
|
if (level>2) return false;
|
||||||
|
if (nodep->isPure()) return false; // For example a $fgetc can't be reordered
|
||||||
if (nodep->castNodeVarRef() && nodep->castNodeVarRef()->varp()==varp) return false;
|
if (nodep->castNodeVarRef() && nodep->castNodeVarRef()->varp()==varp) return false;
|
||||||
return (varNotReferenced (nodep->nextp(),varp,level+1)
|
return (varNotReferenced (nodep->nextp(),varp,level+1)
|
||||||
&& varNotReferenced(nodep->op1p(),varp,level+1)
|
&& varNotReferenced(nodep->op1p(),varp,level+1)
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,10 @@ module t;
|
||||||
reg [16*8:1] letterz;
|
reg [16*8:1] letterz;
|
||||||
real r;
|
real r;
|
||||||
|
|
||||||
|
reg [7:0] v_a,v_b,v_c,v_d;
|
||||||
|
reg [31:0] v_worda;
|
||||||
|
reg [31:0] v_wordb;
|
||||||
|
|
||||||
`ifdef TEST_VERBOSE
|
`ifdef TEST_VERBOSE
|
||||||
`define verbose 1'b1
|
`define verbose 1'b1
|
||||||
`else
|
`else
|
||||||
|
|
@ -174,6 +178,22 @@ module t;
|
||||||
if (chars != 1) $stop;
|
if (chars != 1) $stop;
|
||||||
if (letterl != "\n") $stop;
|
if (letterl != "\n") $stop;
|
||||||
|
|
||||||
|
// msg1229
|
||||||
|
v_a = $fgetc(file);
|
||||||
|
v_b = $fgetc(file);
|
||||||
|
v_c = $fgetc(file);
|
||||||
|
v_d = $fgetc(file);
|
||||||
|
v_worda = { v_d, v_c, v_b, v_a };
|
||||||
|
if (v_worda != "4321") $stop;
|
||||||
|
|
||||||
|
v_wordb[7:0] = $fgetc(file);
|
||||||
|
v_wordb[15:8] = $fgetc(file);
|
||||||
|
v_wordb[23:16] = $fgetc(file);
|
||||||
|
v_wordb[31:24] = $fgetc(file);
|
||||||
|
if (v_wordb != "9876") $stop;
|
||||||
|
|
||||||
|
if ($fgetc(file) != "\n") $stop;
|
||||||
|
|
||||||
$fclose(file);
|
$fclose(file);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,3 +6,4 @@ widestuff
|
||||||
*oa=23 ob=12563
|
*oa=23 ob=12563
|
||||||
*d=-236123
|
*d=-236123
|
||||||
*fredfishblah
|
*fredfishblah
|
||||||
|
12346789
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue