-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathfunction.txt
46 lines (39 loc) · 1.65 KB
/
function.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
============================================
function - declaration
============================================
function int foo(string bar, type1 baz);
endfunction
----
(source_file (package_or_generate_item_declaration
(function_declaration (function_body_declaration
(function_data_type_or_implicit1 (data_type_or_void (data_type (integer_atom_type))))
(function_identifier (function_identifier (simple_identifier)))
(tf_port_list
(tf_port_item1 (data_type_or_implicit1 (data_type)) (port_identifier (simple_identifier)))
(tf_port_item1 (data_type_or_implicit1 (data_type (simple_identifier))) (port_identifier (simple_identifier)))
)
))
))
============================================
function - assign to bitslice
============================================
function int foo;
foo[7:0] = 8'd0;
endfunction
----
(source_file (package_or_generate_item_declaration
(function_declaration (function_body_declaration
(function_data_type_or_implicit1 (data_type_or_void (data_type (integer_atom_type))))
(function_identifier (function_identifier (simple_identifier)))
(function_statement_or_null (function_statement (statement (statement_item
(blocking_assignment (operator_assignment
(variable_lvalue (simple_identifier)
(select1 (constant_range
(constant_expression (constant_primary (primary_literal (integral_number (decimal_number (unsigned_number))))))
(constant_expression (constant_primary (primary_literal (integral_number (decimal_number (unsigned_number)))))))))
(assignment_operator)
(expression (primary (primary_literal (integral_number (decimal_number)))))
))
))))
))
))