-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathmethod_fcall_ref.sv
361 lines (317 loc) · 8.35 KB
/
method_fcall_ref.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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
//==============================================================================
//
// The code is generated by Intel Compiler for SystemC, version 1.5.15
// see more information at https://github.com/intel/systemc-compiler
//
//==============================================================================
//==============================================================================
//
// Module: B_top ()
//
module B_top // "b_mod"
(
input logic clk
);
// Variables generated for SystemC signals
logic s1;
logic s2;
//------------------------------------------------------------------------------
// Child module instances
A a_mod
(
.clk(clk),
.out(s2),
.p(s1)
);
endmodule
//==============================================================================
//
// Module: A (test_fcall_ref.cpp:409:5)
//
module A // "b_mod.a_mod"
(
input logic clk,
output logic out,
output logic p
);
// Variables generated for SystemC signals
logic [3:0] sig;
logic [3:0] si;
logic [7:0] sig2;
logic [3:0] sig3;
logic [3:0] sig_arr[3];
logic [7:0] sig_arr2[3];
//------------------------------------------------------------------------------
// Method process: const_reference (test_fcall_ref.cpp:130:5)
always_comb
begin : const_reference // test_fcall_ref.cpp:130:5
end
//------------------------------------------------------------------------------
// Method process: const_reference_sc (test_fcall_ref.cpp:136:5)
always_comb
begin : const_reference_sc // test_fcall_ref.cpp:136:5
logic [1:0] i;
logic [3:0] j;
i = 1;
i = 1;
i = 3;
i = 2;
i = 3;
j = 5;
i = 2;
i = 3;
end
//------------------------------------------------------------------------------
// Method process: const_reference_noninit (test_fcall_ref.cpp:152:5)
always_comb
begin : const_reference_noninit // test_fcall_ref.cpp:152:5
integer k_1;
integer TMP_0;
integer j;
integer m_1;
// Call const_ref() begin
j = k_1;
TMP_0 = j;
// Call const_ref() end
m_1 = 1;
end
//------------------------------------------------------------------------------
// Method process: const_reference_expr (test_fcall_ref.cpp:162:5)
always_comb
begin : const_reference_expr // test_fcall_ref.cpp:162:5
logic [3:0] TMP_0;
logic [3:0] j;
logic [1:0] TMP_1;
logic [1:0] val;
logic [1:0] j_1;
// Call const_ref() begin
j = si;
TMP_0 = j;
// Call const_ref() end
val = 2'(si[1 : 0]);
// Call const_ref() begin
j_1 = val;
TMP_1 = j_1;
// Call const_ref() end
end
//------------------------------------------------------------------------------
// Method process: const_reference_sig (test_fcall_ref.cpp:176:5)
always_comb
begin : const_reference_sig // test_fcall_ref.cpp:176:5
logic [1:0] TMP_0;
logic [1:0] j;
logic [1:0] TMP_1;
logic [1:0] TMP_2;
logic [3:0] val;
logic [1:0] TMP_3;
logic [1:0] TMP_4;
logic [3:0] l;
// Call const_ref2() begin
j = sig[1 : 0];
TMP_0 = j + 1;
// Call const_ref2() end
// Call const_ref2() begin
j = sig[1 : 0];
TMP_1 = j + 1;
// Call const_ref2() end
val = sig + 1;
// Call const_ref2() begin
j = val[1 : 0];
TMP_2 = j + 1;
// Call const_ref2() end
val = sig2;
// Call const_ref2() begin
j = val[1 : 0];
TMP_3 = j + 1;
// Call const_ref2() end
val = sig3;
// Call const_ref2() begin
j = val[1 : 0];
TMP_4 = j + 1;
// Call const_ref2() end
// Call const_ref_sig() begin
l = sig;
// Call const_ref_sig() end
end
//------------------------------------------------------------------------------
// Method process: const_reference_sig_arr (test_fcall_ref.cpp:192:5)
always_comb
begin : const_reference_sig_arr // test_fcall_ref.cpp:192:5
logic [1:0] TMP_0;
logic [1:0] j;
logic [1:0] TMP_1;
logic [1:0] TMP_2;
logic [3:0] val;
logic [1:0] TMP_3;
// Call const_ref2() begin
j = sig_arr[1][1 : 0];
TMP_0 = j + 1;
// Call const_ref2() end
// Call const_ref2() begin
j = sig_arr[sig][1 : 0];
TMP_1 = j + 1;
// Call const_ref2() end
val = sig_arr2[1];
// Call const_ref2() begin
j = val[1 : 0];
TMP_2 = j + 1;
// Call const_ref2() end
val = sig_arr2[sig];
// Call const_ref2() begin
j = val[1 : 0];
TMP_3 = j + 1;
// Call const_ref2() end
end
//------------------------------------------------------------------------------
// Method process: scint_reference (test_fcall_ref.cpp:205:5)
always_comb
begin : scint_reference // test_fcall_ref.cpp:205:5
logic [2:0] x;
logic [1:0] k_1;
integer j;
logic [1:0] a;
x = 1;
// Call ref() begin
k_1 = x[2 : 1];
x = k_1 + 1;
// Call ref() end
x[2 : 1] = 1;
j = x[0];
// Call ref_par() begin
a = x[1 : 0];
// Call ref_par() end
end
//------------------------------------------------------------------------------
// Method process: reference_inner_call (test_fcall_ref.cpp:234:5)
always_comb
begin : reference_inner_call // test_fcall_ref.cpp:234:5
logic [2:0] x;
logic [1:0] k_1;
logic [1:0] TMP_0;
logic [3:0] par;
logic [1:0] a;
x = 2;
// Call ref_with_call() begin
// Call ref() begin
k_1 = x[2 : 1];
x = k_1 + 1;
// Call ref() end
// Call ref_with_call() end
par = 3;
// Call const_ref_with_call() begin
a = 0 + 1;
TMP_0 = a;
// Call const_ref_with_call() end
end
//------------------------------------------------------------------------------
// Method process: pointer_param (test_fcall_ref.cpp:284:5)
// Process-local variables
logic signed [31:0] q;
logic [2:0] s1;
logic r;
always_comb
begin : pointer_param // test_fcall_ref.cpp:284:5
integer i;
integer TMP_2;
integer i_1;
q = 1;
i = 2; // Call of ptr1()
q = i;
i = 0; // Call of ptr2()
// Call ptr3() begin
i_1 = s1[2 : 1];
s1 = 1;
TMP_2 = i_1;
// Call ptr3() end
i = TMP_2;
end
//------------------------------------------------------------------------------
// Method process: pointer_param_modfied (test_fcall_ref.cpp:299:5)
// Process-local variables
logic signed [31:0] m;
logic signed [31:0] q1;
always_comb
begin : pointer_param_modfied // test_fcall_ref.cpp:299:5
integer i;
m = 1;
// Call ptr4() begin
i = m + 1;
m = i;
// Call ptr4() end
q1 = 1;
// Call ptr4() begin
i = q1 + 1;
q1 = i;
// Call ptr4() end
end
//------------------------------------------------------------------------------
// Method process: pointer_inner_call (test_fcall_ref.cpp:316:5)
// Process-local variables
logic [2:0] s;
logic [2:0] n;
always_comb
begin : pointer_inner_call // test_fcall_ref.cpp:316:5
integer i;
integer TMP_0;
integer i_1;
integer TMP_1;
s = 2;
// Call ptr_with_call() begin
i = s;
// Call ptr3() begin
i_1 = s[2 : 1];
s = 1;
TMP_0 = i_1;
// Call ptr3() end
// Call ptr_with_call() end
n = 2;
// Call ptr_with_call() begin
i = n;
// Call ptr3() begin
i_1 = n[2 : 1];
n = 1;
TMP_1 = i_1;
// Call ptr3() end
// Call ptr_with_call() end
end
//------------------------------------------------------------------------------
// Method process: recursive_ref (test_fcall_ref.cpp:339:5)
always_comb
begin : recursive_ref // test_fcall_ref.cpp:339:5
logic [3:0] x;
logic [3:0] TMP_0;
integer res;
x = sig;
// Call rec_ref() begin
// Call rec_ref_() begin
x++;
// Call rec_ref_() end
TMP_0 = x + 1;
// Call rec_ref() end
res = TMP_0;
end
//------------------------------------------------------------------------------
// Method process: recursive_ref_const (test_fcall_ref.cpp:358:5)
always_comb
begin : recursive_ref_const // test_fcall_ref.cpp:358:5
logic [3:0] TMP_0;
integer TMP_1;
integer res;
// Call rec_ref_const() begin
// Call rec_ref_const_() begin
TMP_1 = sig + 1;
// Call rec_ref_const_() end
TMP_0 = TMP_1 + 1;
// Call rec_ref_const() end
res = TMP_0;
end
//------------------------------------------------------------------------------
// Method process: reference_init_func (test_fcall_ref.cpp:389:5)
always_comb
begin : reference_init_func // test_fcall_ref.cpp:389:5
integer m_1;
integer x;
m_1 = 1;
x = 3; // Call of ref_const_call()
end
endmodule