diff --git a/src/verilog.y b/src/verilog.y index 28832375d..d78b1a078 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -5788,12 +5788,12 @@ system_timing_check: // ==IEEE: system_timing_check ; setuphold_timing_check: // ==IEEE: $setuphold_timing_check - yD_SETUPHOLD '(' timing_check_event ',' timing_check_event ',' expr ',' expr ')' ';' { $$ = nullptr; } - | yD_SETUPHOLD '(' timing_check_event ',' timing_check_event ',' expr ',' expr ',' idAnyE ')' ';' { $$ = nullptr; } - | yD_SETUPHOLD '(' timing_check_event ',' timing_check_event ',' expr ',' expr ',' idAnyE ',' minTypMaxE ')' ';' { $$ = nullptr; } - | yD_SETUPHOLD '(' timing_check_event ',' timing_check_event ',' expr ',' expr ',' idAnyE ',' minTypMaxE ',' minTypMaxE ')' ';' { $$ = nullptr; } - | yD_SETUPHOLD '(' timing_check_event ',' timing_check_event ',' expr ',' expr ',' idAnyE ',' minTypMaxE ',' minTypMaxE ',' delayed_referenceE ')' ';' { $$ = new AstSetuphold{$1, $3, $5, $17}; } - | yD_SETUPHOLD '(' timing_check_event ',' timing_check_event ',' expr ',' expr ',' idAnyE ',' minTypMaxE ',' minTypMaxE ',' delayed_referenceE ',' delayed_referenceE ')' ';' { $$ = new AstSetuphold{$1, $3, $5, $17, $19}; } + yD_SETUPHOLD '(' timing_check_event ',' timing_check_event ',' timing_check_limit ',' timing_check_limit ')' ';' { $$ = nullptr; } + | yD_SETUPHOLD '(' timing_check_event ',' timing_check_event ',' timing_check_limit ',' timing_check_limit ',' idAnyE ')' ';' { $$ = nullptr; } + | yD_SETUPHOLD '(' timing_check_event ',' timing_check_event ',' timing_check_limit ',' timing_check_limit ',' idAnyE ',' minTypMaxE ')' ';' { $$ = nullptr; } + | yD_SETUPHOLD '(' timing_check_event ',' timing_check_event ',' timing_check_limit ',' timing_check_limit ',' idAnyE ',' minTypMaxE ',' minTypMaxE ')' ';' { $$ = nullptr; } + | yD_SETUPHOLD '(' timing_check_event ',' timing_check_event ',' timing_check_limit ',' timing_check_limit ',' idAnyE ',' minTypMaxE ',' minTypMaxE ',' delayed_referenceE ')' ';' { $$ = new AstSetuphold{$1, $3, $5, $17}; } + | yD_SETUPHOLD '(' timing_check_event ',' timing_check_event ',' timing_check_limit ',' timing_check_limit ',' idAnyE ',' minTypMaxE ',' minTypMaxE ',' delayed_referenceE ',' delayed_referenceE ')' ';' { $$ = new AstSetuphold{$1, $3, $5, $17, $19}; } ; timing_check_event: // ==IEEE: $timing_check_event @@ -5807,6 +5807,11 @@ timing_check_event: // ==IEEE: $timing_check_event | yEDGE terminal_identifier yP_ANDANDAND expr { $$ = $2; } ; +timing_check_limit: + expr { $$ = $1; } + | expr ':' expr ':' expr { $$ = $3; } + ; + delayed_referenceE: /*empty*/ { $$ = nullptr; } | terminal_identifier { $$ = $1; } diff --git a/test_regress/t/t_setuphold.v b/test_regress/t/t_setuphold.v index 451ae4b44..c25bdd90a 100644 --- a/test_regress/t/t_setuphold.v +++ b/test_regress/t/t_setuphold.v @@ -32,6 +32,7 @@ module t (/*AUTOARG*/ $setuphold (posedge sh1, negedge sh3, 0, 0, notifier,,, sh2, sh4); $setuphold (posedge clk, negedge d, 0, 0); $setuphold (posedge clk, negedge d, (0:0:0), (0:0:0)); + $setuphold (posedge clk, negedge d, 0:0:0, 0:0:0); $setuphold (posedge clk, negedge d, 0, 0,,,,,); $setuphold (posedge clk &&& sh1, BL_X[0], 0, 0, ,,,delayed_CLK, BL_0); $setuphold (posedge clk &&& sh1, BL_1, 0, 0, ,,,delayed_CLK, BL_X2[4:1]);