mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Support negative bit indexes.
Allow arbitrary characters in symbols (to make '-' work.) Final merge from negative_lsb branch.
This commit is contained in:
@@ -111,6 +111,14 @@ string AstNode::encodeName(const string& namein) {
|
||||
return out;
|
||||
}
|
||||
|
||||
string AstNode::encodeNumber(vlsint64_t num) {
|
||||
if (num < 0) {
|
||||
return "__2D"+cvtToStr(-num); // 2D=-
|
||||
} else {
|
||||
return cvtToStr(num);
|
||||
}
|
||||
}
|
||||
|
||||
string AstNode::shortName() const {
|
||||
string pretty = name();
|
||||
string::size_type pos;
|
||||
|
||||
Reference in New Issue
Block a user