@@ -1024,6 +1024,9 @@ module_or_generate_item:
1024
1024
module_or_generate_item_declaration:
1025
1025
package_or_generate_item_declaration
1026
1026
| genvar_declaration
1027
+ | clocking_declaration
1028
+ | TOK_DEFAULT TOK_CLOCKING clocking_identifier ' ;'
1029
+ | TOK_DEFAULT TOK_DISABLE TOK_IFF expression_or_dist ' ;'
1027
1030
;
1028
1031
1029
1032
non_port_module_item:
@@ -1106,6 +1109,7 @@ checker_or_generate_item_declaration:
1106
1109
| assertion_item_declaration
1107
1110
| covergroup_declaration
1108
1111
| genvar_declaration
1112
+ | clocking_declaration
1109
1113
| TOK_DEFAULT TOK_CLOCKING clocking_identifier ' ;'
1110
1114
| TOK_DEFAULT TOK_DISABLE TOK_IFF expression_or_dist ' ;'
1111
1115
| ' ;'
@@ -3483,6 +3487,12 @@ delay_or_event_control:
3483
3487
{ init ($$, ID_repeat); }
3484
3488
;
3485
3489
3490
+
3491
+ delay_control_opt:
3492
+ /* Optional */
3493
+ | delay_control
3494
+ ;
3495
+
3486
3496
delay_control:
3487
3497
' #' delay_value
3488
3498
{ init ($$, ID_delay); mto ($$, $2 ); }
@@ -3754,11 +3764,74 @@ procedural_timing_control:
3754
3764
// System Verilog standard 1800-2017
3755
3765
// A.6.11 Clocking block
3756
3766
3767
+ clocking_declaration:
3768
+ TOK_CLOCKING clocking_identifier_opt clocking_event ' ;'
3769
+ clocking_item_brace
3770
+ TOK_ENDCLOCKING
3771
+ { init ($$, ID_verilog_clocking); }
3772
+ | TOK_GLOBAL TOK_CLOCKING clocking_identifier_opt clocking_event ' ;'
3773
+ TOK_ENDCLOCKING
3774
+ { init ($$, ID_verilog_clocking); }
3775
+ ;
3776
+
3777
+ clocking_identifier_opt:
3778
+ /* Optional */
3779
+ | clocking_identifier
3780
+ ;
3781
+
3782
+ default_opt:
3783
+ /* Optional */
3784
+ | TOK_DEFAULT
3785
+ ;
3786
+
3757
3787
clocking_event:
3758
3788
' @' identifier
3759
3789
| ' @' ' (' event_expression ' )'
3760
3790
;
3761
3791
3792
+ clocking_item_brace:
3793
+ /* Optional */
3794
+ | clocking_item_brace clocking_item
3795
+ ;
3796
+
3797
+ clocking_item:
3798
+ TOK_DEFAULT default_skew ' ;'
3799
+ | attribute_instance_brace assertion_item_declaration
3800
+ ;
3801
+
3802
+ default_skew:
3803
+ TOK_INPUT clocking_skew
3804
+ | TOK_OUTPUT clocking_skew
3805
+ | TOK_INPUT clocking_skew TOK_OUTPUT clocking_skew
3806
+ ;
3807
+
3808
+ clocking_direction:
3809
+ TOK_INPUT clocking_skew_opt
3810
+ | TOK_OUTPUT clocking_skew_opt
3811
+ | TOK_INPUT clocking_skew_opt TOK_OUTPUT clocking_skew_opt
3812
+ | TOK_INOUT
3813
+ ;
3814
+
3815
+ list_of_clocking_decl_assign:
3816
+ clocking_decl_assign
3817
+ | list_of_clocking_decl_assign ' ,' clocking_decl_assign
3818
+ ;
3819
+
3820
+ clocking_decl_assign:
3821
+ signal_identifier
3822
+ | signal_identifier ' =' expression
3823
+ ;
3824
+
3825
+ clocking_skew_opt:
3826
+ /* Optional */
3827
+ | clocking_skew
3828
+ ;
3829
+
3830
+ clocking_skew:
3831
+ edge_identifier delay_control_opt
3832
+ | delay_control
3833
+ ;
3834
+
3762
3835
cycle_delay:
3763
3836
" ##" number
3764
3837
{ init ($$, ID_verilog_cycle_delay); mto ($$, $2 ); }
@@ -4297,6 +4370,8 @@ class_identifier: TOK_NON_TYPE_IDENTIFIER;
4297
4370
4298
4371
constraint_identifier: TOK_NON_TYPE_IDENTIFIER;
4299
4372
4373
+ edge_identifier: identifier;
4374
+
4300
4375
formal_port_identifier: identifier;
4301
4376
4302
4377
genvar_identifier: identifier;
@@ -4335,6 +4410,8 @@ memory_identifier: identifier;
4335
4410
4336
4411
method_identifier: identifier;
4337
4412
4413
+ signal_identifier: identifier;
4414
+
4338
4415
type_identifier: TOK_TYPE_IDENTIFIER
4339
4416
{
4340
4417
init ($$, ID_typedef_type);
0 commit comments