mirror of
https://github.com/verilator/verilator.git
synced 2026-10-07 18:42:58 +02:00
Internals: Rename dtypeChg to dtypeSet. No functional change
This commit is contained in:
+28
-28
@@ -245,10 +245,10 @@ private:
|
||||
virtual void visit(AstRealToBits* nodep, AstNUser* vup) { visit_Ou64_Lr(nodep,vup); }
|
||||
|
||||
// Widths: Constant, terminal
|
||||
virtual void visit(AstTime* nodep, AstNUser*) { nodep->dtypeChgUInt64(); }
|
||||
virtual void visit(AstTimeD* nodep, AstNUser*) { nodep->dtypeChgDouble(); }
|
||||
virtual void visit(AstTestPlusArgs* nodep, AstNUser*) { nodep->dtypeChgSigned32(); }
|
||||
virtual void visit(AstScopeName* nodep, AstNUser*) { nodep->dtypeChgUInt64(); } // A pointer, but not that it matters
|
||||
virtual void visit(AstTime* nodep, AstNUser*) { nodep->dtypeSetUInt64(); }
|
||||
virtual void visit(AstTimeD* nodep, AstNUser*) { nodep->dtypeSetDouble(); }
|
||||
virtual void visit(AstTestPlusArgs* nodep, AstNUser*) { nodep->dtypeSetSigned32(); }
|
||||
virtual void visit(AstScopeName* nodep, AstNUser*) { nodep->dtypeSetUInt64(); } // A pointer, but not that it matters
|
||||
|
||||
// Special cases. So many....
|
||||
virtual void visit(AstNodeCond* nodep, AstNUser* vup) {
|
||||
@@ -271,7 +271,7 @@ private:
|
||||
if (nodep->expr1p()->isDouble() || nodep->expr2p()->isDouble()) {
|
||||
spliceCvtD(nodep->expr1p());
|
||||
spliceCvtD(nodep->expr2p());
|
||||
nodep->dtypeChgDouble();
|
||||
nodep->dtypeSetDouble();
|
||||
} else {
|
||||
int width = max(vup->c()->width(), max(nodep->expr1p()->width(), nodep->expr2p()->width()));
|
||||
int mwidth = max(vup->c()->widthMin(), max(nodep->expr1p()->widthMin(), nodep->expr2p()->widthMin()));
|
||||
@@ -382,7 +382,7 @@ private:
|
||||
AstConst* widthConstp = nodep->widthp()->castConst();
|
||||
if (!widthConstp) {
|
||||
nodep->v3error("Width of bit extract isn't a constant");
|
||||
nodep->dtypeChgLogicBool(); return;
|
||||
nodep->dtypeSetLogicBool(); return;
|
||||
}
|
||||
int width = nodep->widthConst();
|
||||
nodep->width(width,width);
|
||||
@@ -542,7 +542,7 @@ private:
|
||||
}
|
||||
virtual void visit(AstRand* nodep, AstNUser* vup) {
|
||||
if (vup->c()->prelim()) {
|
||||
nodep->dtypeChgSigned32(); // Says the spec
|
||||
nodep->dtypeSetSigned32(); // Says the spec
|
||||
}
|
||||
}
|
||||
virtual void visit(AstUCFunc* nodep, AstNUser* vup) {
|
||||
@@ -562,7 +562,7 @@ private:
|
||||
if (vup->c()->prelim()) {
|
||||
nodep->lhsp()->iterateAndNext(*this,WidthVP(ANYSIZE,0,BOTH).p());
|
||||
checkCvtUS(nodep->lhsp());
|
||||
nodep->dtypeChgSigned32();
|
||||
nodep->dtypeSetSigned32();
|
||||
}
|
||||
}
|
||||
virtual void visit(AstPow* nodep, AstNUser* vup) {
|
||||
@@ -710,8 +710,8 @@ private:
|
||||
// we want the init numbers to retain their width/minwidth until parameters are replaced.
|
||||
// This prevents width warnings at the location the parameter is substituted in
|
||||
if (nodep->valuep()->isDouble()) {
|
||||
nodep->dtypeChgDouble(); bdtypep=NULL;
|
||||
nodep->dtypep()->dtypeChgDouble(); bdtypep=NULL;
|
||||
nodep->dtypeSetDouble(); bdtypep=NULL;
|
||||
nodep->dtypep()->dtypeSetDouble(); bdtypep=NULL;
|
||||
nodep->valuep()->iterateAndNext(*this,WidthVP(width,0,FINAL).p());
|
||||
} else {
|
||||
nodep->valuep()->iterateAndNext(*this,WidthVP(width,0,FINAL).p());
|
||||
@@ -839,7 +839,7 @@ private:
|
||||
widthCheckReduce(nodep,"Disable",nodep->disablep(),1,1); // it's like an if() condition.
|
||||
}
|
||||
widthCheckReduce(nodep,"Property",nodep->propp(),1,1); // it's like an if() condition.
|
||||
nodep->dtypeChgLogicBool();
|
||||
nodep->dtypeSetLogicBool();
|
||||
}
|
||||
|
||||
//--------------------
|
||||
@@ -1014,7 +1014,7 @@ private:
|
||||
nodep->filep()->iterateAndNext(*this,WidthVP(32,32,BOTH).p());
|
||||
nodep->strgp()->iterateAndNext(*this,WidthVP(ANYSIZE,0,BOTH).p());
|
||||
if (vup->c()->prelim()) {
|
||||
nodep->dtypeChgSigned32(); // Spec says integer return
|
||||
nodep->dtypeSetSigned32(); // Spec says integer return
|
||||
}
|
||||
widthCheck(nodep,"file_descriptor",nodep->filep(),32,32);
|
||||
}
|
||||
@@ -1022,7 +1022,7 @@ private:
|
||||
nodep->filep()->iterateAndNext(*this,WidthVP(32,32,BOTH).p());
|
||||
nodep->exprsp()->iterateAndNext(*this,WidthVP(ANYSIZE,0,BOTH).p());
|
||||
if (vup->c()->prelim()) {
|
||||
nodep->dtypeChgSigned32(); // Spec says integer return
|
||||
nodep->dtypeSetSigned32(); // Spec says integer return
|
||||
}
|
||||
widthCheck(nodep,"file_descriptor",nodep->filep(),32,32);
|
||||
}
|
||||
@@ -1030,7 +1030,7 @@ private:
|
||||
nodep->fromp()->iterateAndNext(*this,WidthVP(ANYSIZE,0,BOTH).p());
|
||||
nodep->exprsp()->iterateAndNext(*this,WidthVP(ANYSIZE,0,BOTH).p());
|
||||
if (vup->c()->prelim()) {
|
||||
nodep->dtypeChgSigned32(); // Spec says integer return
|
||||
nodep->dtypeSetSigned32(); // Spec says integer return
|
||||
}
|
||||
}
|
||||
virtual void visit(AstSysIgnore* nodep, AstNUser* vup) {
|
||||
@@ -1038,7 +1038,7 @@ private:
|
||||
}
|
||||
virtual void visit(AstSystemF* nodep, AstNUser*) {
|
||||
nodep->lhsp()->iterateAndNext(*this,WidthVP(ANYSIZE,0,BOTH).p());
|
||||
nodep->dtypeChgSigned32(); // Spec says integer return
|
||||
nodep->dtypeSetSigned32(); // Spec says integer return
|
||||
}
|
||||
virtual void visit(AstSystemT* nodep, AstNUser*) {
|
||||
nodep->lhsp()->iterateAndNext(*this,WidthVP(ANYSIZE,0,BOTH).p());
|
||||
@@ -1051,7 +1051,7 @@ private:
|
||||
}
|
||||
virtual void visit(AstValuePlusArgs* nodep, AstNUser* vup) {
|
||||
nodep->exprsp()->iterateAndNext(*this,WidthVP(ANYSIZE,0,BOTH).p());
|
||||
nodep->dtypeChgSigned32(); // Spec says integer return
|
||||
nodep->dtypeSetSigned32(); // Spec says integer return
|
||||
}
|
||||
virtual void visit(AstUCStmt* nodep, AstNUser*) {
|
||||
// TOP LEVEL NODE
|
||||
@@ -1160,7 +1160,7 @@ private:
|
||||
UINFO(5," FTASK "<<nodep<<endl);
|
||||
if (nodep->doingWidth()) {
|
||||
nodep->v3error("Unsupported: Recursive function or task call");
|
||||
nodep->dtypeChgLogicBool();
|
||||
nodep->dtypeSetLogicBool();
|
||||
nodep->didWidth(true);
|
||||
return;
|
||||
}
|
||||
@@ -1295,7 +1295,7 @@ private:
|
||||
if (vup->c()->prelim()) { // First stage evaluation
|
||||
nodep->lhsp()->iterateAndNext(*this,WidthVP(ANYSIZE,0,BOTH).p());
|
||||
checkCvtUS(nodep->lhsp());
|
||||
nodep->dtypeChgDouble();
|
||||
nodep->dtypeSetDouble();
|
||||
widthCheck(nodep,"LHS",nodep->lhsp(),64,64);
|
||||
}
|
||||
}
|
||||
@@ -1305,7 +1305,7 @@ private:
|
||||
if (vup->c()->prelim()) { // First stage evaluation
|
||||
nodep->lhsp()->iterateAndNext(*this,WidthVP(ANYSIZE,0,BOTH).p());
|
||||
checkCvtUS(nodep->lhsp());
|
||||
nodep->dtypeChgDouble();
|
||||
nodep->dtypeSetDouble();
|
||||
widthCheck(nodep,"LHS",nodep->lhsp(),32,32);
|
||||
}
|
||||
}
|
||||
@@ -1315,7 +1315,7 @@ private:
|
||||
if (vup->c()->prelim()) { // First stage evaluation
|
||||
nodep->lhsp()->iterateAndNext(*this,WidthVP(ANYSIZE,0,BOTH).p());
|
||||
checkCvtD(nodep->lhsp());
|
||||
nodep->dtypeChgSigned32();
|
||||
nodep->dtypeSetSigned32();
|
||||
}
|
||||
}
|
||||
void visit_Ou64_Lr(AstNodeUniop* nodep, AstNUser* vup) {
|
||||
@@ -1324,7 +1324,7 @@ private:
|
||||
if (vup->c()->prelim()) { // First stage evaluation
|
||||
nodep->lhsp()->iterateAndNext(*this,WidthVP(ANYSIZE,0,BOTH).p());
|
||||
checkCvtD(nodep->lhsp());
|
||||
nodep->dtypeChgUInt64();
|
||||
nodep->dtypeSetUInt64();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1341,7 +1341,7 @@ private:
|
||||
nodep->op1p()->iterateAndNext(*this,WidthVP(1,0,BOTH).p());
|
||||
spliceCvtCmpD0(nodep->op1p());
|
||||
}
|
||||
nodep->dtypeChgLogicBool();
|
||||
nodep->dtypeSetLogicBool();
|
||||
if (vup->c()->final()) {
|
||||
widthCheckReduce(nodep,"LHS",nodep->op1p(),1,1);
|
||||
}
|
||||
@@ -1355,7 +1355,7 @@ private:
|
||||
spliceCvtCmpD0(nodep->lhsp());
|
||||
spliceCvtCmpD0(nodep->rhsp());
|
||||
}
|
||||
nodep->dtypeChgLogicBool();
|
||||
nodep->dtypeSetLogicBool();
|
||||
if (vup->c()->final()) {
|
||||
widthCheckReduce(nodep,"LHS",nodep->lhsp(),1,1);
|
||||
widthCheckReduce(nodep,"RHS",nodep->rhsp(),1,1);
|
||||
@@ -1370,7 +1370,7 @@ private:
|
||||
nodep->lhsp()->iterateAndNext(*this,WidthVP(ANYSIZE,0,BOTH).p());
|
||||
}
|
||||
if (!realok) checkCvtUS(nodep->lhsp());
|
||||
nodep->dtypeChgLogicBool();
|
||||
nodep->dtypeSetLogicBool();
|
||||
}
|
||||
void visit_cmp_O1_DSreplace(AstNodeBiop* nodep, AstNUser* vup) {
|
||||
// CALLER: AstEq, AstGt, ..., AstLtS
|
||||
@@ -1396,7 +1396,7 @@ private:
|
||||
}
|
||||
int width = max(nodep->lhsp()->width(), nodep->rhsp()->width());
|
||||
int ewidth = max(nodep->lhsp()->widthMin(), nodep->rhsp()->widthMin());
|
||||
nodep->dtypeChgLogicBool();
|
||||
nodep->dtypeSetLogicBool();
|
||||
if (vup->c()->final()) {
|
||||
nodep->lhsp()->iterateAndNext(*this,WidthVP(width,ewidth,FINAL).p());
|
||||
nodep->rhsp()->iterateAndNext(*this,WidthVP(width,ewidth,FINAL).p());
|
||||
@@ -1424,7 +1424,7 @@ private:
|
||||
}
|
||||
int width = max(nodep->lhsp()->width(), nodep->rhsp()->width());
|
||||
int ewidth = max(nodep->lhsp()->widthMin(), nodep->rhsp()->widthMin());
|
||||
nodep->dtypeChgLogicBool();
|
||||
nodep->dtypeSetLogicBool();
|
||||
if (vup->c()->final()) {
|
||||
nodep->lhsp()->iterateAndNext(*this,WidthVP(width,ewidth,FINAL).p());
|
||||
nodep->rhsp()->iterateAndNext(*this,WidthVP(width,ewidth,FINAL).p());
|
||||
@@ -1620,7 +1620,7 @@ private:
|
||||
nodep->rhsp()->iterateAndNext(*this,WidthVP(ANYSIZE,0,BOTH).p());
|
||||
checkCvtD(nodep->lhsp());
|
||||
checkCvtD(nodep->rhsp());
|
||||
nodep->dtypeChgDouble();
|
||||
nodep->dtypeSetDouble();
|
||||
}
|
||||
}
|
||||
void visit_math_Or_Lr(AstNodeUniop* nodep, AstNUser* vup) {
|
||||
@@ -1628,7 +1628,7 @@ private:
|
||||
if (vup->c()->prelim()) { // First stage evaluation
|
||||
nodep->lhsp()->iterateAndNext(*this,WidthVP(ANYSIZE,0,BOTH).p());
|
||||
checkCvtD(nodep->lhsp());
|
||||
nodep->dtypeChgDouble();
|
||||
nodep->dtypeSetDouble();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user