mirror of
https://github.com/verilator/verilator.git
synced 2025-01-06 06:37:45 +00:00
Internals:Cleanup dpiTypesToStringConverter. No functional change is intended. (#2698)
This commit is contained in:
parent
457d1a66f2
commit
13e88106da
@ -463,21 +463,22 @@ public:
|
||||
}
|
||||
virtual string primitive(const AstVar* varp) const {
|
||||
string type;
|
||||
if (varp->basicp()->keyword().isDpiUnsignable() && !varp->basicp()->isSigned()) {
|
||||
type = "unsigned ";
|
||||
}
|
||||
type += varp->basicp()->keyword().dpiType();
|
||||
const AstBasicDTypeKwd keyword = varp->basicp()->keyword();
|
||||
if (keyword.isDpiUnsignable() && !varp->basicp()->isSigned()) type = "unsigned ";
|
||||
type += keyword.dpiType();
|
||||
return type;
|
||||
}
|
||||
string convert(const AstVar* varp) const {
|
||||
if (varp->isDpiOpenArray()) {
|
||||
return openArray(varp);
|
||||
} else if (!varp->basicp()) {
|
||||
return "UNKNOWN";
|
||||
} else if (varp->basicp()->isDpiBitVec() || varp->basicp()->isDpiLogicVec()) {
|
||||
return bitLogicVector(varp, varp->basicp()->isDpiBitVec());
|
||||
} else if (const AstBasicDType* basicp = varp->basicp()) {
|
||||
if (basicp->isDpiBitVec() || basicp->isDpiLogicVec()) {
|
||||
return bitLogicVector(varp, basicp->isDpiBitVec());
|
||||
} else {
|
||||
return primitive(varp);
|
||||
}
|
||||
} else {
|
||||
return primitive(varp);
|
||||
return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user