@@ -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,73 @@ procedural_timing_control:
3754
3764
// System Verilog standard 1800-2017
3755
3765
// A.6.11 Clocking block
3756
3766
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
+
3757
3786
clocking_event:
3758
3787
' @' identifier
3759
3788
| ' @' ' (' event_expression ' )'
3760
3789
;
3761
3790
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
+
3762
3834
cycle_delay:
3763
3835
" ##" number
3764
3836
{ init ($$, ID_verilog_cycle_delay); mto ($$, $2 ); }
@@ -4297,6 +4369,8 @@ class_identifier: TOK_NON_TYPE_IDENTIFIER;
4297
4369
4298
4370
constraint_identifier: TOK_NON_TYPE_IDENTIFIER;
4299
4371
4372
+ edge_identifier: identifier;
4373
+
4300
4374
formal_port_identifier: identifier;
4301
4375
4302
4376
genvar_identifier: identifier;
@@ -4335,6 +4409,8 @@ memory_identifier: identifier;
4335
4409
4336
4410
method_identifier: identifier;
4337
4411
4412
+ signal_identifier: identifier;
4413
+
4338
4414
type_identifier: TOK_TYPE_IDENTIFIER
4339
4415
{
4340
4416
init ($$, ID_typedef_type);
0 commit comments