返回介绍

A.2 声明

发布于 2020-09-09 22:56:05 字数 9268 浏览 925 评论 0 收藏 0

主题

描述

A.2.1 声明类型

A.2.2 Declaration data types

A.2.3 Declaration lists

list_of_defparam_assignments ::= defparam_assignment { , defparam_assignment }
list_of_genvar_identifiers ::= genvar_identifier { , genvar_identifier }
list_of_interface_identifiers ::= interface_identifier { unpacked_dimension }
{ , interface_identifier { unpacked_dimension } }
list_of_net_decl_assignments ::= net_decl_assignment { , net_decl_assignment }
list_of_net_identifiers ::= net_identifier { unpacked_dimension }
{ , net_identifier { unpacked_dimension } }
list_of_param_assignments ::= param_assignment { , param_assignment }
list_of_port_identifiers ::= port_identifier { unpacked_dimension }
{ , port_identifier { unpacked_dimension } }
list_of_udp_port_identifiers ::= port_identifier { , port_identifier }
list_of_specparam_assignments ::= specparam_assignment { , specparam_assignment }
list_of_tf_variable_identifiers ::= port_identifier variable_dimension [ = expression ]
{ , port_identifier variable_dimension [ = expression ] }
list_of_type_assignments ::=... more

A.2.4 Declaration assignments

defparam_assignment ::= hierarchical_parameter_identifier = constant_mintypmax_expression
net_decl_assignment ::= net_identifier { unpacked_dimension } [ = expression ]
param_assignment ::= parameter_identifier { unpacked_dimension } = constant_param_expression
specparam_assignment ::=
specparam_identifier = constant_mintypmax_expression
| pulse_control_specparam
type_assignment ::= type_identifier = data_type
pulse_control_specparam ::=
PATHPULSE$ = ( reject_limit_value [ , error_limit_value ] ) ;
| PATHPULSE$specify_input_terminal_descriptor$specify_output_terminal_descriptor
= ( reject_limit_value [ , error_limit_value ] ) ;
error_limit_value ::= limit_value
reject_limit_value ::= limit_value
limit_value ::= constant_mintypmax_expression
variable_decl_assignment ::=
variable_identifier variable_dimension [ = expression ]
| dynamic_array_variable_identifier [ ] [ = dynamic_array_new ]
| class_variable_identifier [ = class_new ]
| [ covergroup_variable_identifier ] = new [ ( list_of_arguments ) ]16... more

A.2.5 Declaration ranges

unpacked_dimension ::= [ constant_range ]
| [ constant_expression ]
packed_dimension11 ::=
[ constant_range ]
| unsized_dimension
associative_dimension ::=
[ data_type ]
| [ * ]
variable_dimension12 ::=
{ sized_or_unsized_dimension }
| associative_dimension
| queue_dimension
queue_dimension ::= [ $ [ : constant_expression ] ]
unsized_dimension11 ::= [ ]
sized_or_unsized_dimension ::= unpacked_dimension | unsized_dimension

A.2.6 Function declarations

function_data_type ::= data_type | void
function_data_type_or_implicit ::=
function_data_type
| [ signing ] { packed_dimension }
function_declaration ::= function [ lifetime ] function_body_declaration
function_body_declaration ::=
function_data_type_or_implicit
[ interface_identifier . | class_scope ] function_identifier ;
{ tf_item_declaration }
{ function_statement_or_null }
endfunction [ : function_identifier ]
| function_data_type_or_implicit
[ interface_identifier . | class_scope ] function_identifier ( [ tf_port_list ] ) ;
{ block_item_declaration }
{ function_statement_or_null }
endfunction [ : function_identifier ]
function_prototype ::= function function_data_type function_identifier ( [ tf_port_list ] )
dpi_import_export ::=
import "DPI" [ dpi_function_import_property ] [ c_identifier = ] dpi_function_proto ;
| import "DPI" [ dpi_task_import_property ] [... more

A.2.7 Task declarations

task_declaration ::= task [ lifetime ] task_body_declaration
task_body_declaration ::=
[ interface_identifier . | class_scope ] task_identifier ;
{ tf_item_declaration }
{ statement_or_null }
endtask [ : task_identifier ]
| [ interface_identifier . | class_scope ] task_identifier ( [ tf_port_list ] ) ;
{ block_item_declaration }
{ statement_or_null }
endtask [ : task_identifier ]
tf_item_declaration ::=
block_item_declaration
| tf_port_declaration
tf_port_list ::=
tf_port_item { , tf_port_item }
tf_port_item ::=
{ attribute_instance }
[ tf_port_direction ] data_type_or_implicit
port_identifier variable_dimension [ = expression ]
tf_port_direction ::= port_direction | const ref
tf_port_declaration ::=
{ attribute_instance } tf_port_direction data_type_or_implicit list_of_tf_variable_identifiers ;
task_prototype ::= task task_identifier (... more

A.2.8 Block item declarations

block_item_declaration ::=
{ attribute_instance } data_declaration
| { attribute_instance } local_parameter_declaration
| { attribute_instance } parameter_declaration ;
| { attribute_instance } overload_declaration
overload_declaration ::=
bind overload_operator function data_type function_identifier ( overload_proto_formals ) ;
overload_operator ::= + | ++ | – | – – | * | ** | / | % | == | != | < | <= | > | >= | =
overload_proto_formals ::= data_type {, data_type}

A.2.9 Interface declarations

virtual_interface_declaration ::=
virtual [ interface ] interface_identifier list_of_virtual_interface_decl ;
modport_declaration ::= modport modport_item { , modport_item } ;
modport_item ::= modport_identifier ( modport_ports_declaration { , modport_ports_declaration } )
modport_ports_declaration ::=
{ attribute_instance } modport_simple_ports_declaration
| { attribute_instance } modport_hierarchical_ports_declaration
| { attribute_instance } modport_tf_ports_declaration
| { attribute_instance } modport_clocking_declaration
modport_clocking_declaration ::= clocking clocking_identifier
modport_simple_ports_declaration ::=
port_direction modport_simple_port { , modport_simple_port }
modport_simple_port ::=
port_identifier
| . port_identifier ( [ expression ] )
modport_hierarchical_ports_declaration ::=
interface_instance_identifier [ [ constant_expression ] ] . modport_identifier
modport_tf_ports_declaration ::=
import_export modport_tf_port { , modport_tf_port }
modport_tf_port ::=
method_prototype
| tf_identifier
import_export ::= import | export... more

A.2.10 Assertion declarations

concurrent_assertion_item ::= [ block_identifier : ] concurrent_assertion_statement
concurrent_assertion_statement ::=
assert_property_statement
| assume_property_statement
| cover_property_statement
assert_property_statement::=
assert property ( property_spec ) action_block
assume_property_statement::=
assume property ( property_spec ) ;
cover_property_statement::=
cover property ( property_spec ) statement_or_null
expect_property_statement ::=
expect ( property_spec ) action_block
property_instance ::=
ps_property_identifier [ ( [ actual_arg_list ] ) ]
concurrent_assertion_item_declaration ::=
property_declaration
| sequence_declaration
property_declaration ::=
property property_identifier [ ( [ list_of_formals ] ) ] ;
{ assertion_variable_declaration }
property_spec ;
endproperty [ : property_identifier ]
property_spec ::=
[clocking_event ] [ disable iff ( expression_or_dist ) ] property_expr
property_expr ::=
sequence_expr
| ( property_expr )
| not... more

A.2.11 Covergroup declarations

covergroup_declaration ::=
covergroup covergroup_identifier [ ( [ tf_port_list ] ) ] [ coverage_event ] ;
{ coverage_spec_or_option ; }
endgroup [ : covergroup_identifier ]
coverage_spec_or_option ::=
{attribute_instance} coverage_spec
| {attribute_instance} coverage_option ;
coverage_option ::=
option.member_identifier = expression
| type_option.member_identifier = expression
coverage_spec ::=
cover_point
| cover_cross
coverage_event ::=
clocking_event
| @@( block_event_expression )
block_event_expression :: =
block_event_expression or block_event_expression
| begin hierarchical_btf_identifier
| end hierarchical_btf_identifier
hierarchical_btf_identifier :: =
hierarchical_tf_identifier
| hierarchical_block_identifier
| hierarchical _identifier [ class_scope ] method_identifier
cover_point ::= [ cover_point_identifer : ] coverpoint expression [ iff ( expression ) ] bins_or_empty
bins_or_empty ::=
{ {attribute_instance} { bins_or_options ;... more

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文