mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Make 'bit', 'logic' and 'time' types unsigned by default
IEEE 1800-2017 6.11.3 says these types are unsigned. Until now these types were treated as not having a signedness (NOSIGN), and nodes having these types were later resolved by V3Width to be unsigned. This is a bit problematic when creating nodes of these types after V3Width. Treating these types as unsigned from the get go is fine, and actually improves generated code slightly.
This commit is contained in:
+2
-1
@@ -504,7 +504,8 @@ public:
|
||||
}
|
||||
bool isUnsigned() const {
|
||||
return m_e == CHANDLE || m_e == EVENTVALUE || m_e == STRING || m_e == SCOPEPTR
|
||||
|| m_e == CHARPTR || m_e == UINT32 || m_e == UINT64;
|
||||
|| m_e == CHARPTR || m_e == UINT32 || m_e == UINT64 || m_e == BIT || m_e == LOGIC
|
||||
|| m_e == TIME;
|
||||
}
|
||||
bool isFourstate() const {
|
||||
return m_e == INTEGER || m_e == LOGIC || m_e == LOGIC_IMPLICIT || m_e == TIME;
|
||||
|
||||
Reference in New Issue
Block a user