-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathmethod_array_param.sv
140 lines (117 loc) · 3.23 KB
/
method_array_param.sv
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
//==============================================================================
//
// The code is generated by Intel Compiler for SystemC, version 1.5.12
// see more information at https://github.com/intel/systemc-compiler
//
//==============================================================================
//==============================================================================
//
// Module: B_top ()
//
module B_top // "b_mod"
(
);
//------------------------------------------------------------------------------
// Child module instances
A a_mod
(
);
endmodule
//==============================================================================
//
// Module: A (test_array_param.cpp:174:5)
//
module A // "b_mod.a_mod"
(
);
// Variables generated for SystemC signals
logic signed [31:0] s;
//------------------------------------------------------------------------------
// Method process: array_in_func (test_array_param.cpp:81:5)
always_comb
begin : array_in_func // test_array_param.cpp:81:5
integer arr[3];
integer i;
integer i_1;
integer i_2;
logic [2:0] arr_sc[3];
logic [2:0] i_3;
arr[0] = 1;
arr[1] = 2;
arr[2] = 3;
// Call arr_func1() begin
i = arr[0];
i = arr[s];
// Call arr_func1() end
// Call arr_func2() begin
i_1 = arr[0];
i_1 = arr[s];
// Call arr_func2() end
// Call arr_func3() begin
i_2 = arr[0];
i_2 = arr[s];
// Call arr_func3() end
arr_sc[0] = 0; arr_sc[1] = 0; arr_sc[2] = 0;
arr_sc[0] = 1;
arr_sc[1] = 2;
arr_sc[2] = 3;
// Call arr_sc_func() begin
i_3 = 0;
i_3 = arr_sc[0];
// Call arr_sc_func() end
end
//------------------------------------------------------------------------------
// Method process: array_2d_in_func (test_array_param.cpp:115:5)
always_comb
begin : array_2d_in_func // test_array_param.cpp:115:5
integer arr[3][2];
integer i;
integer i_1;
arr[0][0] = 1;
arr[1][1] = 2;
arr[2][1] = 3;
// Call arr_2D_func1() begin
i = arr[1][1];
i = arr[s][s + 1];
// Call arr_2D_func1() end
// Call arr_2D_func2() begin
i_1 = arr[1][1];
i_1 = arr[s][s + 1];
// Call arr_2D_func2() end
end
//------------------------------------------------------------------------------
// Method process: array_pointers_in_func (test_array_param.cpp:143:5)
// Process-local variables
logic signed [31:0] ap[3][2];
always_comb
begin : array_pointers_in_func // test_array_param.cpp:143:5
integer i;
integer i_1;
ap[0][0] = 1;
ap[1][1] = 2;
ap[2][1] = 3;
// Call arr_ptr_func1() begin
i = ap[1][1];
i = ap[s][s + 1];
// Call arr_ptr_func1() end
// Call arr_ptr_func2() begin
i_1 = ap[1][1];
i_1 = ap[s][s + 1];
// Call arr_ptr_func2() end
end
//------------------------------------------------------------------------------
// Method process: double_pointers_in_func (test_array_param.cpp:162:5)
// Process-local variables
logic signed [31:0] pp[3][2];
always_comb
begin : double_pointers_in_func // test_array_param.cpp:162:5
integer i;
pp[0][0] = 1;
pp[1][1] = 2;
pp[2][1] = 3;
// Call dbl_ptr_func1() begin
i = pp[1][1];
i = pp[s][s + 1];
// Call dbl_ptr_func1() end
end
endmodule