diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-05-04 09:25:32 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2019-05-04 09:25:32 +0200 |
commit | 66d6ca2de2e31d7c0460ae314b61136e42ded8c5 (patch) | |
tree | efbfdb67d5861ce653d76bfaef3d1d911879f506 /frontends | |
parent | c2e29ab809c5eb3ac89d50868d0e88d831c33d52 (diff) | |
download | yosys-66d6ca2de2e31d7c0460ae314b61136e42ded8c5.tar.gz yosys-66d6ca2de2e31d7c0460ae314b61136e42ded8c5.tar.bz2 yosys-66d6ca2de2e31d7c0460ae314b61136e42ded8c5.zip |
Add support for SVA "final" keyword
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/verilog/verilog_lexer.l | 1 | ||||
-rw-r--r-- | frontends/verilog/verilog_parser.y | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/frontends/verilog/verilog_lexer.l b/frontends/verilog/verilog_lexer.l index 6ef38252a..e97632663 100644 --- a/frontends/verilog/verilog_lexer.l +++ b/frontends/verilog/verilog_lexer.l @@ -206,6 +206,7 @@ YOSYS_NAMESPACE_END "const" { if (formal_mode) return TOK_CONST; SV_KEYWORD(TOK_CONST); } "checker" { if (formal_mode) return TOK_CHECKER; SV_KEYWORD(TOK_CHECKER); } "endchecker" { if (formal_mode) return TOK_ENDCHECKER; SV_KEYWORD(TOK_ENDCHECKER); } +"final" { SV_KEYWORD(TOK_FINAL); } "logic" { SV_KEYWORD(TOK_LOGIC); } "bit" { SV_KEYWORD(TOK_REG); } diff --git a/frontends/verilog/verilog_parser.y b/frontends/verilog/verilog_parser.y index 40968d17a..9edb61a39 100644 --- a/frontends/verilog/verilog_parser.y +++ b/frontends/verilog/verilog_parser.y @@ -106,7 +106,7 @@ static void free_attr(std::map<std::string, AstNode*> *al) } %token <string> TOK_STRING TOK_ID TOK_CONSTVAL TOK_REALVAL TOK_PRIMITIVE TOK_SVA_LABEL -%token TOK_ASSERT TOK_ASSUME TOK_RESTRICT TOK_COVER +%token TOK_ASSERT TOK_ASSUME TOK_RESTRICT TOK_COVER TOK_FINAL %token ATTR_BEGIN ATTR_END DEFATTR_BEGIN DEFATTR_END %token TOK_MODULE TOK_ENDMODULE TOK_PARAMETER TOK_LOCALPARAM TOK_DEFPARAM %token TOK_PACKAGE TOK_ENDPACKAGE TOK_PACKAGESEP @@ -1341,6 +1341,9 @@ opt_property: TOK_PROPERTY { $$ = true; } | + TOK_FINAL { + $$ = false; + } | /* empty */ { $$ = false; }; |