3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-04 10:20:24 +00:00

fmt,cxxrtl: support {,PLUS_,SPACE_}MINUS integer formats.

The first two were already supported with the `plus` boolean flag.
The third one is a new specifier, which is allocated the ` ` character.
In addition, `MINUS` is now allocated the `-` character, but old format
where there is no `+`, `-`, or `-` in the respective position is also
accepted for compatibility.
This commit is contained in:
Catherine 2024-03-28 06:59:23 +00:00 committed by Marcelina Kościelnicka
parent 8388846e3a
commit 6d6b138607
3 changed files with 50 additions and 16 deletions

View file

@ -76,7 +76,11 @@ struct FmtPart {
// INTEGER type
unsigned base = 10;
bool signed_ = false;
bool plus = false;
enum {
MINUS = 0,
PLUS_MINUS = 1,
SPACE_MINUS = 2,
} sign = MINUS;
bool hex_upper = false;
// VLOG_TIME type