3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-12 17:06:15 +00:00

sv: extended support for integer types

- Standard data declarations can now use any integer type
- Parameters and localparams can now use any integer type
- Function returns types can now use any integer type
- Fix `parameter logic`, `localparam reg`, etc. to be 1 bit (previously 32 bits)
- Added longint type (64 bits)
- Unified parser source for integer type widths
This commit is contained in:
Zachary Snow 2021-02-28 15:49:16 -05:00
parent d882b6fe3c
commit 0f5b646ab8
6 changed files with 148 additions and 39 deletions

View file

@ -267,6 +267,7 @@ static bool isUserType(std::string &s)
"int" { SV_KEYWORD(TOK_INT); }
"byte" { SV_KEYWORD(TOK_BYTE); }
"shortint" { SV_KEYWORD(TOK_SHORTINT); }
"longint" { SV_KEYWORD(TOK_LONGINT); }
"eventually" { if (formal_mode) return TOK_EVENTUALLY; SV_KEYWORD(TOK_EVENTUALLY); }
"s_eventually" { if (formal_mode) return TOK_EVENTUALLY; SV_KEYWORD(TOK_EVENTUALLY); }