File: t_debug_emitv.out

package info (click to toggle)
verilator 5.038-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 162,552 kB
  • sloc: cpp: 139,204; python: 20,931; ansic: 10,222; yacc: 6,000; lex: 1,925; makefile: 1,260; sh: 494; perl: 282; fortran: 22
file content (412 lines) | stat: -rw-r--r-- 11,343 bytes parent folder | download
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
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
module Vt_debug_emitv_t;
    input logic clk;
    input logic in;
    typedef enum logic [2:0] {
        ZERO = 3'h0,
        ONE = 3'h1
    } e_t;
    typedef struct packed {
        logic [2:0]  a;
    } ps_t;
    typedef struct {
        logic signed [2:0]  a;
    } us_t;
    typedef union {
        logic a;
    } union_t;
    const struct packed {
        logic [2:0]  a;
    } ps[0:2];
    struct {
        logic signed [2:0]  a;
    } us;
    union {
        logic a;
    } unu;
    integer signed i1;
    int signed array[0:2];
    initial begin
        array = '{0:32'sh1, 1:32'sh2, 2:32'sh3};
    end
    logic [63:32]  downto_32;
    downto_32 = 32'h0;
    function ident;
        input int signed value;
        begin : label0
            ident = value;
            disable label0;
        end
    endfunction
    Iface the_ifaces[3:0] ();
    initial begin
        begin
            if ($test$plusargs(40'h48454c4c4f)) begin
                $display("Hello argument found.");
            end
            if ((Pkg::FOO == 'sh0)) begin
                $write("");
            end
            if ((ZERO == 'sh0)) begin
                $write("");
            end
            if ($value$plusargs(56'h544553543d2564i1)) begin
                $display("value was %~", i1);
            end
            else begin
                $display("+TEST= not found");
            end
            if (downto_32[33]) begin
                $write("");
            end
            if (downto_32[(ident('sh21) - 'h20)[5:0] + 32
                +:1]]) begin
                $write("");
            end
            if ((| downto_32[48:40])) begin
                $write("");
            end
            if ((| downto_32[57:55])) begin
                $write("");
            end
            if ((| downto_32[60:54])) begin
                $write("");
            end
            if (the_ifaces[2].ifsig) begin
                $write("");
            end
        end
    end
    bit [6:5] [4:3] [2:1]  arraymanyd[10:11][12:13][14:15];
    logic [15:0]  pubflat;
    logic [15:0]  pubflat_r;
    logic [15:0]  pubflat_w;
    assign pubflat_w = pubflat;
    int signed fd;
    int signed i;
    int signed q[$];
    int signed qb[$:'sh3];
    int signed assoc[string];
    int signed assocassoc[string][real];
    int signed dyn[];
    typedef struct packed {
        logic nn1;
    } nested_named_t;
    typedef struct packed {
        struct packed {
            logic nn2;
        } nested_anonymous;
        struct packed {
            logic nn1;
        } nested_named;
        logic [11:10]  nn3;
    } nibble_t;
    struct packed {
        struct packed {
            logic nn2;
        } nested_anonymous;
        struct packed {
            logic nn1;
        } nested_named;
        logic [11:10]  nn3;
    } [5:4] nibblearray[3:2];
    task t;
        $display("stmt");
    endtask
    function f;
        input int signed v;
        begin : label0
            $display("stmt");
            f = ((v == 'sh0) ? 'sh63 : ((~ v) + 'sh1));
            disable label0;
        end
    endfunction
    initial begin
        begin : unnamedblk1
            int signed other;
            begin
                begin : unnamedblk2
                    int signed i;
                    i = 'sh0;
                    while ((i < 'sh3)) begin
                        begin
                            other = f(i);
                            $display("stmt %~ %~", 
                                     i, other);
                            t();
                        end
                        i = (i + 'h1);
                    end
                end
            end
            begin : named
                $display("stmt");
            end
        end
    end
    final begin
        begin
            $display("stmt");
        end
    end
    always @( in) begin
        begin
            $display("stmt");
        end
    end
    always @(posedge clk) begin
        begin
            $display("posedge clk");
            pubflat_r <= pubflat_w;
        end
    end
    always @(negedge clk) begin
        begin
            $display("negedge clk, pfr = %x", pubflat_r);
        end
    end
    int signed cyc;
    int signed fo;
    int signed sum;
    real r;
    string str;
    int signed mod_val;
    int signed mod_res;
    always @(posedge clk) begin
        begin
            cyc <= (cyc + 'sh1);
            r <= (r + 0.01);
            fo = cyc;
            sub.inc(fosum);
            sum = sub.f(sum);
            $display("[%0t] sum = %~", $time, sum);
            $display("a?= %d", ($c('sh1) ? $c('sh14)
                                 : $c('sh1e)));
            $c(;);
            $display("%d", $c(0));
            fd = $fopen(72'h2f6465762f6e756c6c);
            ;
            $fclose(fd);
            fd = $fopen(72'h2f6465762f6e756c6c, 8'h72);
            ;
            $fgetc(fd);
            $fflush(fd);
            $fscanf(fd, "%d", sum);
            ;
            $fdisplay(32'h69203d20, "%~", sum);
            $fwrite(fd, "hello");
            $readmemh(fd, array);
            $readmemh(fd, array, 'sh0);
            $readmemh(fd, array, 'sh0, 'sh0);
            sum = 'sh0;
            begin : unnamedblk3
                int signed i;
                i = 'sh0;
                begin : label0
                    while ((i < cyc)) begin
                        begin
                            sum = (sum + i);
                            if ((sum > 'sha)) begin
                                disable label0;
                            end
                            else begin
                                sum = (sum + 'sh1);
                            end
                        end
                        i = (i + 'h1);
                    end
                end
            end
            if ((cyc == 'sh63)) begin
                $finish;
            end
            if ((cyc == 'sh64)) begin
                $stop;
            end
            case (in)
                 // synopsys full_case parallel_case'sh1: begin $display("1");
                end
                default: begin $display("default");
                end
            endcase
            priority case (in)
                'sh1: begin $display("1");
                end
                default: begin $display("default");
                end
            endcase
            unique case (in)
                'sh1: begin $display("1");
                end
                default: begin $display("default");
                end
            endcase
            unique0 case (in)
                'sh1: begin $display("1");
                end
                default: begin $display("default");
                end
            endcase
            if (in) begin
                $display("1");
            end
            else begin
                $display("0");
            end
            priority if (in) begin
                $display("1");
            end
            else begin
                $display("0");
            end
            unique if (in) begin
                $display("1");
            end
            else begin
                $display("0");
            end
            unique0 if (in) begin
                $display("1");
            end
            else begin
                $display("0");
            end
            $display("%~%~", $past(cyc), $past(cyc, 
                                               'sh1));
            str = $sformatf("cyc=%~", cyc);
            ;
            $display("str = %@", str);
            $display("%% [%t] [%^] to=%o td=%d", $time, 
                     $realtime, $time, $time);
            $sscanf(40'h666f6f3d35, "foo=%d", i);
            ;
            $printtimescale;
            if ((i != 'sh5)) begin
                $stop;
            end
            sum = $random();
            sum = $random('sha);
            sum = $urandom();
            sum = $urandom('sha);
            if ((PKG_PARAM != 'sh1)) begin
                $stop;
            end
            sub.r = 62.0;
            mod_res = (mod_val % 'sh5);
            $display("%g", $log10(r));
            $display("%g", $ln(r));
            $display("%g", $exp(r));
            $display("%g", $sqrt(r));
            $display("%g", $floor(r));
            $display("%g", $ceil(r));
            $display("%g", $sin(r));
            $display("%g", $cos(r));
            $display("%g", $tan(r));
            $display("%g", $asin(r));
            $display("%g", $acos(r));
            $display("%g", $atan(r));
            $display("%g", $sinh(r));
            $display("%g", $cosh(r));
            $display("%g", $tanh(r));
            $display("%g", $asinh(r));
            $display("%g", $acosh(r));
            $display("%g", $atanh(r));
            if ($sampled(cyc[1])) begin
                $write("");
            end
            if ($rose(cyc)) begin
                $write("");
            end
            if ($fell(cyc)) begin
                $write("");
            end
            if ($stable(cyc)) begin
                $write("");
            end
            if ((! $stable(cyc))) begin
                $write("");
            end
            if ($past(cyc[1])) begin
                $write("");
            end
            if ($rose(cyc, @( clk))) begin
                $write("");
            end
            if ($fell(cyc, @( clk))) begin
                $write("");
            end
            if ($stable(cyc, @( clk))) begin
                $write("");
            end
            if ((! $stable(cyc, @( clk)))) begin
                $write("");
            end
            if ($past(cyc[1], 'sh5)) begin
                $write("");
            end
            force sum = 'sha;
            begin : unnamedblk1_1
                integer signed __Vrepeat0;
                __Vrepeat0 = 'sh2;
                while ((__Vrepeat0 > 32'h0)) begin
                    if ((sum != 'sha)) begin
                        $stop;
                    end
                    __Vrepeat0 = (__Vrepeat0 - 32'h1);
                end
            end
            release sum;
        end
    end
    /*verilator public_flat_rw @(posedge clk) pubflat*/
endmodule
package Vt_debug_emitv___024unit;
    class Vt_debug_emitv_Cls;
        int signed member;
        member = 'sh1;
        task method;
            if ((this != this)) begin
                $stop;
            end
        endtask
        function new;
        endfunction
    endclass
endpackage
interface Vt_debug_emitv_Iface;
    input logic clk;
    logic ifsig;
    modport mp (
        input logic ifsig
    );
endinterface
module Vt_debug_emitv_sub;
    input logic clk;
    task inc;
        input int signed i;
        output int signed o;
        o = ({32'h1{{1'h0, i[31:1]}}} + 32'h1);
    endtask
    function f;
        input int signed v;
        begin : label0
            if ((v == 'sh0)) begin
                f = 'sh21;
                disable label0;
            end
            f = ({32'h1{{31'h0, v[2]}}} + 32'h1);
            disable label0;
        end
    endfunction
    real r;
endmodule
package Vt_debug_emitv_p;
    logic pkgvar;
endpackage
package Vt_debug_emitv_Pkg;
    logic signed [31:0]  PKG_PARAM;
    typedef enum int signed{
        FOO = 32'h0,
        BAR = 32'h1,
        BAZ = 32'h2
    } enum_t;
endpackage