forked from github/verilator
Fix queues as statements, bug1641.
This commit is contained in:
parent
53c6b7df63
commit
d738501c01
2
Changes
2
Changes
@ -22,6 +22,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
||||
|
||||
**** Fix little endian cell ranges, bug1631. [Julien Margetts]
|
||||
|
||||
**** Fix queues as statements, bug1641. [Peter Monsson, Stefan Wallentowitz]
|
||||
|
||||
|
||||
* Verilator 4.024 2019-12-08
|
||||
|
||||
|
@ -2051,6 +2051,9 @@ private:
|
||||
newp->dtypeFrom(adtypep->subDTypep());
|
||||
newp->protect(false);
|
||||
newp->didWidth(true);
|
||||
if (!nodep->firstAbovep()) {
|
||||
newp->makeStatement();
|
||||
}
|
||||
} else if (nodep->name() == "push_back"
|
||||
|| nodep->name() == "push_front") {
|
||||
methodOkArguments(nodep, 1, 1);
|
||||
|
@ -60,7 +60,7 @@ module t (/*AUTOARG*/
|
||||
//v = q[0]; `checks(v, "ins0");
|
||||
//v = q[3]; `checks(v, "ins3");
|
||||
|
||||
v = q.pop_front(); `checks(v, "f2");
|
||||
q.pop_front();
|
||||
v = q.pop_front(); `checks(v, "f1");
|
||||
v = q.pop_back(); `checks(v, "b2");
|
||||
v = q.pop_back(); `checks(v, "b1");
|
||||
@ -73,7 +73,7 @@ module t (/*AUTOARG*/
|
||||
v = q.pop_front(); `checks(v, ""); // Was empty, optional warning
|
||||
v = q.pop_back(); `checks(v, ""); // Was empty, optional warning
|
||||
|
||||
// COnversion of insert/delete with zero to operator
|
||||
// Conversion of insert/delete with zero to operator
|
||||
q.push_front("front");
|
||||
q.insert(0, "newfront");
|
||||
i = q.size(); `checkh(i, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user