Fix DPI import false BLKSEQ warnings.

This commit is contained in:
Wilson Snyder 2011-10-07 20:04:15 -04:00
parent e080b9d565
commit beb7c58375
3 changed files with 16 additions and 1 deletions

View File

@ -15,6 +15,8 @@ indicates the contributor was also the author of the fix; Thanks!
**** Fix DPI import output of 64 bits, bug398. [Mike Denio]
**** Fix DPI import false BLKSEQ warnings. [Alex Solomatnikov]
**** Fix MSVC compile warning with trunc/round, bug394. [Amir Gonnen]
**** Fix autoconf and Makefile warnings, bug396. [Ruben Diez]

View File

@ -408,6 +408,7 @@ private:
AstAssign* assp = new AstAssign (pinp->fileline(),
pinp,
new AstVarRef(outvscp->fileline(), outvscp, false));
assp->fileline()->modifyWarnOff(V3ErrorCode::BLKSEQ, true); // Ok if in <= block
// Put assignment BEHIND of all other statements
beginp->addNext(assp);
}
@ -418,6 +419,7 @@ private:
AstAssign* assp = new AstAssign (pinp->fileline(),
new AstVarRef(inVscp->fileline(), inVscp, true),
pinp);
assp->fileline()->modifyWarnOff(V3ErrorCode::BLKSEQ, true); // Ok if in <= block
// Put assignment in FRONT of all other statements
if (AstNode* afterp = beginp->nextp()) {
afterp->unlinkFrBackWithNext();
@ -507,6 +509,7 @@ private:
AstAssign* assp = new AstAssign (pinp->fileline(),
pinp,
new AstVarRef(outvscp->fileline(), outvscp, false));
assp->fileline()->modifyWarnOff(V3ErrorCode::BLKSEQ, true); // Ok if in <= block
// Put assignment BEHIND of all other statements
beginp->addNext(assp);
}

View File

@ -15,7 +15,11 @@
`define NO_SHORTREAL
`endif
module t ();
module t (/*AUTOARG*/
// Inputs
clk
);
input clk;
// Allowed import return types:
// void, byte, shortint, int, longint, real, shortreal, chandle, and string
@ -194,4 +198,10 @@ module t ();
$finish;
end
always @ (posedge clk) begin
i_b <= ~i_b;
// This once mis-threw a BLKSEQ warning
dpii_v_bit (i_b,o_b); if (o_b !== ~i_b) $stop;
end
endmodule