Internals: Move VLVF flags to common function. No functional change.

This commit is contained in:
Wilson Snyder 2017-12-16 10:07:15 -05:00
parent 9a2a5d3155
commit bf3f111ca4
2 changed files with 9 additions and 6 deletions

View File

@ -275,15 +275,20 @@ string AstVar::vlEnumType() const {
} }
string AstVar::vlEnumDir() const { string AstVar::vlEnumDir() const {
string out;
if (isInout()) { if (isInout()) {
return "VLVD_INOUT"; out = "VLVD_INOUT";
} else if (isInOnly()) { } else if (isInOnly()) {
return "VLVD_IN"; out = "VLVD_IN";
} else if (isOutOnly()) { } else if (isOutOnly()) {
return "VLVD_OUT"; out = "VLVD_OUT";
} else { } else {
return "VLVD_NODIR"; out = "VLVD_NODIR";
} }
//
if (isSigUserRWPublic()) out += "|VLVF_PUB_RW";
else if (isSigUserRdPublic()) out += "|VLVF_PUB_RD";
return out;
} }
string AstVar::cPubArgType(bool named, bool forReturn) const { string AstVar::cPubArgType(bool named, bool forReturn) const {

View File

@ -509,8 +509,6 @@ void EmitCSyms::emitSymImp() {
puts(varp->vlEnumType()); // VLVT_UINT32 etc puts(varp->vlEnumType()); // VLVT_UINT32 etc
puts(","); puts(",");
puts(varp->vlEnumDir()); // VLVD_IN etc puts(varp->vlEnumDir()); // VLVD_IN etc
if (varp->isSigUserRWPublic()) puts("|VLVF_PUB_RW");
else if (varp->isSigUserRdPublic()) puts("|VLVF_PUB_RD");
puts(","); puts(",");
puts(cvtToStr(pdim+udim)); puts(cvtToStr(pdim+udim));
puts(bounds); puts(bounds);