mirror of
https://github.com/verilator/verilator.git
synced 2025-01-31 18:54:03 +00:00
Don't constant prop public signals
git-svn-id: file://localhost/svn/verilator/trunk/verilator@890 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
parent
24c3424e51
commit
f8680cf5c2
2
Changes
2
Changes
@ -7,6 +7,8 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Try all +libext's in the exact order given. [Michael Shinkarovsky]
|
**** Try all +libext's in the exact order given. [Michael Shinkarovsky]
|
||||||
|
|
||||||
|
**** Fix elimination of public signals assigned to constants. [Eugene Weber]
|
||||||
|
|
||||||
**** Fix internal error when public for loop has empty body. [David Addison]
|
**** Fix internal error when public for loop has empty body. [David Addison]
|
||||||
|
|
||||||
* Verilator 3.633 2/7/2007
|
* Verilator 3.633 2/7/2007
|
||||||
|
@ -757,7 +757,8 @@ private:
|
|||||||
nodep->varp()->initp()->iterateAndNext(*this);
|
nodep->varp()->initp()->iterateAndNext(*this);
|
||||||
if (operandConst(nodep->varp()->initp())
|
if (operandConst(nodep->varp()->initp())
|
||||||
&& !nodep->lvalue()
|
&& !nodep->lvalue()
|
||||||
&& ((v3Global.opt.oConst() && !m_params) // Can reduce constant wires into equations
|
&& ((v3Global.opt.oConst() && !m_params // Can reduce constant wires into equations
|
||||||
|
&& !nodep->varp()->isSigPublic())
|
||||||
|| nodep->varp()->isParam())) {
|
|| nodep->varp()->isParam())) {
|
||||||
AstConst* constp = nodep->varp()->initp()->castConst();
|
AstConst* constp = nodep->varp()->initp()->castConst();
|
||||||
const V3Number& num = constp->num();
|
const V3Number& num = constp->num();
|
||||||
|
@ -301,12 +301,12 @@ void V3PreProcImp::comment(const string& text) {
|
|||||||
if (commentTokenMatch(cmd/*ref*/, "parallel_case")) {
|
if (commentTokenMatch(cmd/*ref*/, "parallel_case")) {
|
||||||
insertUnreadback ("/*verilator parallel_case*/");
|
insertUnreadback ("/*verilator parallel_case*/");
|
||||||
}
|
}
|
||||||
if (commentTokenMatch(cmd/*ref*/, "one_hot")) {
|
//if (commentTokenMatch(cmd/*ref*/, "one_hot")) {
|
||||||
insertUnreadback ("/*verilator one_hot*/ "+cmd+";");
|
// insertUnreadback ("/*verilator one_hot*/ "+cmd+";");
|
||||||
}
|
//}
|
||||||
if (commentTokenMatch(cmd/*ref*/, "one_cold")) {
|
//if (commentTokenMatch(cmd/*ref*/, "one_cold")) {
|
||||||
insertUnreadback ("/*verilator one_cold*/ "+cmd+";");
|
// insertUnreadback ("/*verilator one_cold*/ "+cmd+";");
|
||||||
}
|
//}
|
||||||
// else ignore the comment we don't recognize
|
// else ignore the comment we don't recognize
|
||||||
} // else no assertions
|
} // else no assertions
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user