@@ -1024,6 +1024,9 @@ module_or_generate_item:
10241024module_or_generate_item_declaration:
10251025 package_or_generate_item_declaration
10261026 | genvar_declaration
1027+ | clocking_declaration
1028+ | TOK_DEFAULT TOK_CLOCKING clocking_identifier ' ;'
1029+ | TOK_DEFAULT TOK_DISABLE TOK_IFF expression_or_dist ' ;'
10271030 ;
10281031
10291032non_port_module_item:
@@ -1106,6 +1109,7 @@ checker_or_generate_item_declaration:
11061109 | assertion_item_declaration
11071110 | covergroup_declaration
11081111 | genvar_declaration
1112+ | clocking_declaration
11091113 | TOK_DEFAULT TOK_CLOCKING clocking_identifier ' ;'
11101114 | TOK_DEFAULT TOK_DISABLE TOK_IFF expression_or_dist ' ;'
11111115 | ' ;'
@@ -3483,6 +3487,12 @@ delay_or_event_control:
34833487 { init ($$, ID_repeat); }
34843488 ;
34853489
3490+
3491+ delay_control_opt:
3492+ /* Optional */
3493+ | delay_control
3494+ ;
3495+
34863496delay_control:
34873497 ' #' delay_value
34883498 { init ($$, ID_delay); mto ($$, $2 ); }
@@ -3754,11 +3764,73 @@ procedural_timing_control:
37543764// System Verilog standard 1800-2017
37553765// A.6.11 Clocking block
37563766
3767+ clocking_declaration:
3768+ TOK_DEFAULT TOK_CLOCKING clocking_identifier_opt clocking_event ' ;'
3769+ clocking_item_brace
3770+ TOK_ENDCLOCKING
3771+ { init ($$, ID_verilog_clocking); }
3772+ | TOK_CLOCKING clocking_identifier_opt clocking_event ' ;'
3773+ clocking_item_brace
3774+ TOK_ENDCLOCKING
3775+ { init ($$, ID_verilog_clocking); }
3776+ | TOK_GLOBAL TOK_CLOCKING clocking_identifier_opt clocking_event ' ;'
3777+ TOK_ENDCLOCKING
3778+ { init ($$, ID_verilog_clocking); }
3779+ ;
3780+
3781+ clocking_identifier_opt:
3782+ /* Optional */
3783+ | clocking_identifier
3784+ ;
3785+
37573786clocking_event:
37583787 ' @' identifier
37593788 | ' @' ' (' event_expression ' )'
37603789 ;
37613790
3791+ clocking_item_brace:
3792+ /* Optional */
3793+ | clocking_item_brace clocking_item
3794+ ;
3795+
3796+ clocking_item:
3797+ TOK_DEFAULT default_skew ' ;'
3798+ | attribute_instance_brace assertion_item_declaration
3799+ ;
3800+
3801+ default_skew:
3802+ TOK_INPUT clocking_skew
3803+ | TOK_OUTPUT clocking_skew
3804+ | TOK_INPUT clocking_skew TOK_OUTPUT clocking_skew
3805+ ;
3806+
3807+ clocking_direction:
3808+ TOK_INPUT clocking_skew_opt
3809+ | TOK_OUTPUT clocking_skew_opt
3810+ | TOK_INPUT clocking_skew_opt TOK_OUTPUT clocking_skew_opt
3811+ | TOK_INOUT
3812+ ;
3813+
3814+ list_of_clocking_decl_assign:
3815+ clocking_decl_assign
3816+ | list_of_clocking_decl_assign ' ,' clocking_decl_assign
3817+ ;
3818+
3819+ clocking_decl_assign:
3820+ signal_identifier
3821+ | signal_identifier ' =' expression
3822+ ;
3823+
3824+ clocking_skew_opt:
3825+ /* Optional */
3826+ | clocking_skew
3827+ ;
3828+
3829+ clocking_skew:
3830+ edge_identifier delay_control_opt
3831+ | delay_control
3832+ ;
3833+
37623834cycle_delay:
37633835 " ##" number
37643836 { init ($$, ID_verilog_cycle_delay); mto ($$, $2 ); }
@@ -4297,6 +4369,8 @@ class_identifier: TOK_NON_TYPE_IDENTIFIER;
42974369
42984370constraint_identifier: TOK_NON_TYPE_IDENTIFIER;
42994371
4372+ edge_identifier: identifier;
4373+
43004374formal_port_identifier: identifier;
43014375
43024376genvar_identifier: identifier;
@@ -4335,6 +4409,8 @@ memory_identifier: identifier;
43354409
43364410method_identifier: identifier;
43374411
4412+ signal_identifier: identifier;
4413+
43384414type_identifier: TOK_TYPE_IDENTIFIER
43394415 {
43404416 init ($$, ID_typedef_type);
0 commit comments