3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-24 13:18:56 +00:00

fmt,cxxrtl: add option to print numeric base (0x, etc).

The option is serialized to RTLIL as `#` (to match Python's and Rust's
option with the same symbol), and sets the `show_base` flag. Because
the flag is called `show_base` and not e.g. `alternate_format` (which
is what Python and Rust call it), in addition to the prefixes `0x`,
`0X`, `0o`, `0b`, the RTLIL option also prints the `0d` prefix.
This commit is contained in:
Catherine 2024-03-28 08:33:29 +00:00 committed by Marcelina Kościelnicka
parent bf5a960668
commit 7b94599162
3 changed files with 21 additions and 0 deletions

View file

@ -84,6 +84,7 @@ struct FmtPart {
SPACE_MINUS = 2,
} sign = MINUS;
bool hex_upper = false;
bool show_base = false;
// VLOG_TIME type
bool realtime = false;