diff options
author | Clifford Wolf <clifford@clifford.at> | 2017-02-08 14:38:15 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2017-02-08 14:38:15 +0100 |
commit | ef4a28e112be10d3d62395f68e53e8b7e42dbf68 (patch) | |
tree | c993cbb2d319288c7561c12264babda628a38b3d /frontends/verilog/verilog_lexer.l | |
parent | 1d1f56a3617dcee6d856a29d1d8576969bf8dce5 (diff) | |
download | yosys-ef4a28e112be10d3d62395f68e53e8b7e42dbf68.tar.gz yosys-ef4a28e112be10d3d62395f68e53e8b7e42dbf68.tar.bz2 yosys-ef4a28e112be10d3d62395f68e53e8b7e42dbf68.zip |
Add SV "rand" and "const rand" support
Diffstat (limited to 'frontends/verilog/verilog_lexer.l')
-rw-r--r-- | frontends/verilog/verilog_lexer.l | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/frontends/verilog/verilog_lexer.l b/frontends/verilog/verilog_lexer.l index 4d040e3d1..97af0ae2d 100644 --- a/frontends/verilog/verilog_lexer.l +++ b/frontends/verilog/verilog_lexer.l @@ -180,6 +180,8 @@ YOSYS_NAMESPACE_END "cover" { if (formal_mode) return TOK_COVER; SV_KEYWORD(TOK_COVER); } "restrict" { if (formal_mode) return TOK_RESTRICT; SV_KEYWORD(TOK_RESTRICT); } "property" { if (formal_mode) return TOK_PROPERTY; SV_KEYWORD(TOK_PROPERTY); } +"rand" { if (formal_mode) return TOK_RAND; SV_KEYWORD(TOK_RAND); } +"const" { if (formal_mode) return TOK_CONST; SV_KEYWORD(TOK_CONST); } "logic" { SV_KEYWORD(TOK_REG); } "bit" { SV_KEYWORD(TOK_REG); } @@ -198,12 +200,12 @@ YOSYS_NAMESPACE_END [0-9][0-9_]* { frontend_verilog_yylval.string = new std::string(yytext); - return TOK_CONST; + return TOK_CONSTVAL; } [0-9]*[ \t]*\'s?[bodhBODH][ \t\r\n]*[0-9a-fA-FzxZX?_]+ { frontend_verilog_yylval.string = new std::string(yytext); - return TOK_CONST; + return TOK_CONSTVAL; } [0-9][0-9_]*\.[0-9][0-9_]*([eE][-+]?[0-9_]+)? { |