Skip to content

Commit 6ba58a3

Browse files
committed
[FIRRTL] Fix getBitWidth to handle AnalogType
Signed-off-by: unlsycn <unlsycn@unlsycn.com>
1 parent 2867b37 commit 6ba58a3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Dialect/FIRRTL/FIRRTLTypes.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3035,6 +3035,7 @@ std::optional<int64_t> firrtl::getBitWidth(FIRRTLBaseType type,
30353035
return *w * vector.getNumElements();
30363036
})
30373037
.Case<IntType>([&](IntType iType) { return iType.getWidth(); })
3038+
.Case<AnalogType>([&](AnalogType aType) { return aType.getWidth(); })
30383039
.Case<ClockType, ResetType, AsyncResetType>([](Type) { return 1; })
30393040
.Default([&](auto t) { return std::nullopt; });
30403041
};

0 commit comments

Comments
 (0)