-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathmethod_array_in_if.sv
260 lines (221 loc) · 5.96 KB
/
method_array_in_if.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
//==============================================================================
//
// The code is generated by Intel Compiler for SystemC, version 1.5.13
// 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_in_if.cpp:212:5)
//
module A // "b_mod.a_mod"
(
);
// Variables generated for SystemC signals
logic block_access[3];
logic signed [31:0] s;
logic [1:0] sleep_idle_cntr[3];
logic ms_pwrin_nenable[3];
logic signed [31:0] t0;
logic signed [31:0] t1;
logic signed [31:0] t2;
logic signed [31:0] t3;
logic signed [31:0] t4;
logic signed [31:0] t5;
logic signed [31:0] t6;
logic signed [31:0] t7;
logic signed [31:0] t8;
// Local parameters generated for C++ constants
localparam logic [31:0] BLOCK_NUM0 = 3;
//------------------------------------------------------------------------------
// Method process: func_in_if1 (test_array_in_if.cpp:64:5)
always_comb
begin : func_in_if1 // test_array_in_if.cpp:64:5
integer i;
logic TMP_0;
logic k;
// Call f() begin
TMP_0 = k;
// Call f() end
if (TMP_0 || |i)
begin
i = 1;
end
end
//------------------------------------------------------------------------------
// Method process: func_in_if2 (test_array_in_if.cpp:72:5)
always_comb
begin : func_in_if2 // test_array_in_if.cpp:72:5
integer i;
logic TMP_0;
logic k;
logic TMP_1;
integer i_1;
// Call f() begin
TMP_0 = k;
// Call f() end
i_1 = i;
// Call g() begin
TMP_1 = |i_1;
// Call g() end
if (TMP_0 || TMP_1)
begin
i = 1;
end
end
//------------------------------------------------------------------------------
// Method process: func_in_if_const1 (test_array_in_if.cpp:81:5)
always_comb
begin : func_in_if_const1 // test_array_in_if.cpp:81:5
integer i;
t0 = i;
end
//------------------------------------------------------------------------------
// Method process: func_in_if_const2 (test_array_in_if.cpp:91:5)
always_comb
begin : func_in_if_const2 // test_array_in_if.cpp:91:5
integer i;
i = 1;
t1 = i;
end
//------------------------------------------------------------------------------
// Method process: func_in_if_const3 (test_array_in_if.cpp:101:5)
always_comb
begin : func_in_if_const3 // test_array_in_if.cpp:101:5
integer i;
logic TMP_0;
logic k;
// Call f() begin
TMP_0 = k;
// Call f() end
i = 1;
t2 = i;
end
//------------------------------------------------------------------------------
// Method process: func_in_if_const4 (test_array_in_if.cpp:111:5)
always_comb
begin : func_in_if_const4 // test_array_in_if.cpp:111:5
integer i;
logic TMP_0;
integer i_1;
i_1 = i;
// Call g() begin
TMP_0 = |i_1;
// Call g() end
if (0 || TMP_0)
begin
i = 1;
end
t3 = i;
end
//------------------------------------------------------------------------------
// Method process: chan_array_in_if1 (test_array_in_if.cpp:121:5)
always_comb
begin : chan_array_in_if1 // test_array_in_if.cpp:121:5
integer i;
if (ms_pwrin_nenable[i] || |i)
begin
i = 1;
end
t4 = i;
end
//------------------------------------------------------------------------------
// Method process: chan_array_in_if2 (test_array_in_if.cpp:133:5)
always_comb
begin : chan_array_in_if2 // test_array_in_if.cpp:133:5
for (integer i = 0; i < BLOCK_NUM0; i++)
begin
if (block_access[i] || ms_pwrin_nenable[i])
begin
sleep_idle_cntr[i] = 0;
end
end
end
//------------------------------------------------------------------------------
// Method process: mem_array_in_if (test_array_in_if.cpp:145:5)
// Process-local variables
logic [33:0] arr[5];
logic arr2[4][3];
always_comb
begin : mem_array_in_if // test_array_in_if.cpp:145:5
integer k;
k = 0;
for (integer i = 0; i < 4; i++)
begin
if (arr[i] == s && arr2[i][k])
begin
k++;
end
end
t5 = k;
end
//------------------------------------------------------------------------------
// Method process: loc_array_in_if (test_array_in_if.cpp:157:5)
always_comb
begin : loc_array_in_if // test_array_in_if.cpp:157:5
logic signed [9:0] larr[3];
integer unsigned larr2[1][4];
integer k;
larr[0] = 1; larr[1] = 2; larr[2] = 3;
t6 = 0;
if (larr[s] == larr2[s][1])
begin
k = 1;
t6 = k;
end
end
//------------------------------------------------------------------------------
// Method process: decl_array_in_if1 (test_array_in_if.cpp:170:5)
always_comb
begin : decl_array_in_if1 // test_array_in_if.cpp:170:5
logic signed [9:0] larr[3];
integer larr2[3][3];
t7 = 0;
if (|s)
begin
larr[0] = 1; larr[1] = 2; larr[2] = 3;
larr2[s][s] = larr[1];
if (s == 3)
begin
larr[0] = 0;
end
t7 = larr[s] + larr2[s][s];
end
end
//------------------------------------------------------------------------------
// Method process: decl_array_in_if2 (test_array_in_if.cpp:187:5)
always_comb
begin : decl_array_in_if2 // test_array_in_if.cpp:187:5
integer a;
logic signed [9:0] ll[3];
logic signed [9:0] ll_1[3];
a = 0;
if (|s)
begin
ll[0] = 0; ll[1] = 0; ll[2] = 0;
ll[1] = 1;
a = a + ll[s];
if (s == 1)
begin
ll_1[0] = 0; ll_1[1] = 0; ll_1[2] = 0;
ll_1[1] = 2;
a = a + ll_1[s];
end
a = a + ll[s + 1];
end
t8 = a;
end
endmodule