Add support for SVA "final" keyword
authorClifford Wolf <clifford@clifford.at>
Sat, 4 May 2019 07:25:32 +0000 (09:25 +0200)
committerClifford Wolf <clifford@clifford.at>
Sat, 4 May 2019 07:25:32 +0000 (09:25 +0200)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
frontends/verilog/verilog_lexer.l
frontends/verilog/verilog_parser.y

index 6ef38252a1f03beeee65e0fa3fb6da9f300cf3b9..e9763266390b70a62a2e3f691b2a6f74a137417e 100644 (file)
@@ -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); }
 
index 40968d17a12bcaf7052b00b0ca53b62e1b1a3b89..9edb61a399110386015e22d1704917a478e773c9 100644 (file)
@@ -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;
        };