Internals: Fix VFlagBitPacked giving 4-state types.

This commit is contained in:
Wilson Snyder 2019-11-01 20:10:45 -04:00
parent ff0dd26fe5
commit 8a5b8d5f38
2 changed files with 3 additions and 1 deletions

View File

@ -1410,6 +1410,8 @@ public:
void dtypeChgWidthSigned(int width, int widthMin, AstNumeric numeric);
void dtypeSetBitUnsized(int width, int widthMin, AstNumeric numeric) {
dtypep(findBitDType(width, widthMin, numeric)); }
void dtypeSetBitSized(int width, AstNumeric numeric) {
dtypep(findBitDType(width, width, numeric)); } // Since sized, widthMin is width
void dtypeSetLogicUnsized(int width, int widthMin, AstNumeric numeric) {
dtypep(findLogicDType(width, widthMin, numeric)); }
void dtypeSetLogicSized(int width, AstNumeric numeric) {

View File

@ -1234,7 +1234,7 @@ public:
, m_name(name), m_origName(name) {
init();
combineType(type);
dtypeSetLogicSized(wantwidth, AstNumeric::UNSIGNED);
dtypeSetBitSized(wantwidth, AstNumeric::UNSIGNED);
m_declKwd = AstBasicDTypeKwd::BIT;
}
AstVar(FileLine* fl, AstVarType type, const string& name, AstVar* examplep)