From: Clifford Wolf Date: Fri, 7 Jun 2019 10:08:42 +0000 (+0200) Subject: Merge branch 'pr_elab_sys_tasks' of https://github.com/udif/yosys into clifford/pr983 X-Git-Tag: yosys-0.9~80^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a3bbc5365bc8ed411ab437a6baea5596531933a8;p=yosys.git Merge branch 'pr_elab_sys_tasks' of https://github.com/udif/yosys into clifford/pr983 --- a3bbc5365bc8ed411ab437a6baea5596531933a8 diff --cc frontends/verilog/verilog_lexer.l index 9558bbfb9,1c6810b47..3c612472d --- a/frontends/verilog/verilog_lexer.l +++ b/frontends/verilog/verilog_lexer.l @@@ -305,12 -301,11 +305,17 @@@ supply1 { return TOK_SUPPLY1; return TOK_ID; } +"$"(setup|hold|setuphold|removal|recovery|recrem|skew|timeskew|fullskew|nochange) { + if (!specify_mode) REJECT; + frontend_verilog_yylval.string = new std::string(yytext); + return TOK_ID; +} + + "$"(info|warning|error|fatal) { + frontend_verilog_yylval.string = new std::string(yytext); + return TOK_ELAB_TASK; + } + "$signed" { return TOK_TO_SIGNED; } "$unsigned" { return TOK_TO_UNSIGNED; } diff --cc frontends/verilog/verilog_parser.y index 6d3afed0e,1965f090e..a034f9601 --- a/frontends/verilog/verilog_parser.y +++ b/frontends/verilog/verilog_parser.y @@@ -125,16 -102,11 +125,16 @@@ struct specify_rise_fall std::string *string; struct YOSYS_NAMESPACE_PREFIX AST::AstNode *ast; std::map *al; + struct specify_target *specify_target_ptr; + struct specify_triple *specify_triple_ptr; + struct specify_rise_fall *specify_rise_fall_ptr; bool boolean; + char ch; } -%token TOK_STRING TOK_ID TOK_CONSTVAL TOK_REALVAL TOK_PRIMITIVE TOK_SVA_LABEL TOK_ELAB_TASK -%token TOK_ASSERT TOK_ASSUME TOK_RESTRICT TOK_COVER +%token TOK_STRING TOK_ID TOK_CONSTVAL TOK_REALVAL TOK_PRIMITIVE - %token TOK_SVA_LABEL TOK_SPECIFY_OPER ++%token TOK_SVA_LABEL TOK_SPECIFY_OPER TOK_ELAB_TASK +%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