Project

General

Profile

Icarus Verilog Bugs » History » Version 8

Sergey Smolov, 05/04/2018 12:29 PM

1 1 Sergey Smolov
h1. Icarus Verilog Bugs
2
3 6 Sergey Smolov
The bugs are listed here can be reproduced on tests for Verilog Translator project (so called "ieee-tests").
4 1 Sergey Smolov
5
# test_03_08_01_1.v
6
<pre>
7
test_03_08_01_1.v:25: syntax error
8
test_03_08_01_1.v:27: error: malformed statement
9
test_03_08_01_1.v:28: syntax error
10
test_03_08_01_1.v:33: error: malformed statement
11
test_03_08_01_1.v:34: syntax error
12
test_03_08_01_1.v:39: error: malformed statement
13
test_03_08_01_1.v:40: syntax error
14
</pre>
15 4 Sergey Smolov
*Cause*: attributes for "case" statement branches like "(* full_case, parallel_case *)" are unsupported.
16 2 Sergey Smolov
# test_03_08_01_2.v
17
<pre>
18
test_03_08_01_2.v:25: syntax error
19
test_03_08_01_2.v:27: error: malformed statement
20
test_03_08_01_2.v:28: syntax error
21
test_03_08_01_2.v:32: error: malformed statement
22
test_03_08_01_2.v:33: syntax error
23
</pre>
24 4 Sergey Smolov
*Cause*: attributes for "case" statement branches like "(* full_case *)" are unsupported.
25 3 Sergey Smolov
# test_03_08_01_6.v
26
<pre>
27
test_03_08_01_6.v:25: syntax error
28
test_03_08_01_6.v:25: error: malformed statement
29
</pre>
30 4 Sergey Smolov
*Cause*: attributes for assignments like "a = b + (* mode = "cla" *) c;" are unsupported.
31 1 Sergey Smolov
# test_03_08_01_7.v
32
<pre>
33
test_03_08_01_7.v:25: syntax error
34
test_03_08_01_7.v:25: error: malformed statement
35
</pre>
36 4 Sergey Smolov
*Cause*: attributes for assignments like "a = add (* mode = "cla" *) (b, c);" are unsupported.
37 3 Sergey Smolov
# test_03_08_01_8.v
38
<pre>
39
test_03_08_01_8.v:25: syntax error
40
test_03_08_01_8.v:25: error: malformed statement
41
</pre>
42 4 Sergey Smolov
*Cause*: attributes for assignments like "a = b ? (* no_glitch *) c : d;" are unsupported.
43 1 Sergey Smolov
# test_04_03_01_1.v
44
<pre>
45
test_04_03_01_1.v:24: sorry: trireg nets not supported.
46
</pre>
47 4 Sergey Smolov
*Cause*: cannot parse "trireg (small) storeit;"
48 1 Sergey Smolov
# test_04_03_02_1.v
49
<pre>
50
test_04_03_02_1.v:22: syntax error
51
test_04_03_02_1.v:22: error: invalid module item.
52
test_04_03_02_1.v:23: syntax error
53
test_04_03_02_1.v:23: error: invalid module item.
54
</pre>
55 4 Sergey Smolov
*Cause*: cannot parse "tri1 scalared [63:0] bus64;"
56 1 Sergey Smolov
# test_04_04_01_1.v
57
<pre>
58
test_04_04_01_1.v:22: sorry: trireg nets not supported.
59
test_04_04_01_1.v:23: sorry: trireg nets not supported.
60
test_04_04_01_1.v:25: syntax error
61
test_04_04_01_1.v:25: error: invalid module item.
62
</pre>
63 4 Sergey Smolov
*Cause*: cannot parse "trireg a;"
64 3 Sergey Smolov
# test_04_09_03_1_1.v
65
<pre>
66
test_04_09_03_1_1.v:26: sorry: only 1 dimensional arrays are currently supported.
67
test_04_09_03_1_1.v:28: sorry: only 1 dimensional arrays are currently supported.
68
</pre>
69 4 Sergey Smolov
*Cause*: cannot parse "reg arrayb[7:0][0:255];"
70 3 Sergey Smolov
# test_04_09_03_1_2.v
71
<pre>
72
test_04_09_03_1_2.v:26: sorry: only 1 dimensional arrays are currently supported.
73
test_04_09_03_1_2.v:28: sorry: only 1 dimensional arrays are currently supported.
74
</pre>
75 4 Sergey Smolov
*Cause*: cannot parse "reg arrayb[7:0][0:255];"
76 3 Sergey Smolov
# test_04_10_03_2.v
77
<pre>
78
test_04_10_03_2.v:23: syntax error
79
test_04_10_03_2.v:23: error: invalid module item.
80
test_04_10_03_2.v:24: syntax error
81
test_04_10_03_2.v:24: error: invalid module item.
82
</pre>
83 4 Sergey Smolov
*Cause*: the "specparam" is unsupported.
84 3 Sergey Smolov
# test_05_01_14_1.v
85
<pre>
86
test_05_01_14_1.v:30: error: Array b['sd3:'sd0] cannot be indexed by a range.
87
</pre>
88 4 Sergey Smolov
*Cause*: cannot parse "result = {a, b[3:0], w, 3'b101};"
89 1 Sergey Smolov
# test_05_02_01_4.v
90
<pre>
91
test_05_02_01_4.v:54: error: Unable to bind wire/reg/memory `x' in `test'
92
test_05_02_01_4.v:58: error: Unable to bind wire/reg/memory `z' in `test'
93
</pre>
94 4 Sergey Smolov
*Cause*: cannot parse "addr = x;"
95 3 Sergey Smolov
# test_05_02_02_2.v
96
<pre>
97
test_05_02_02_2.v:25: sorry: only 1 dimensional arrays are currently supported.
98
test_05_02_02_2.v:26: sorry: only 1 dimensional arrays are currently supported.
99
</pre>
100 4 Sergey Smolov
*Cause*: cnnot parse "wire threed_array[0:255][0:255][0:7];"
101 1 Sergey Smolov
# test_05_03_00_1.v
102
<pre>
103
test_05_03_00_1.v:25: warning: choosing typ expression.
104
</pre>
105 4 Sergey Smolov
*Cause*: "parameter val = (32'd 50: 32'd 75: 32'd 100);"
106 1 Sergey Smolov
# test_06_01_03_1.v
107
<pre>
108
test_06_01_03_1.v:24: sorry: net delays not supported.
109
</pre>
110 4 Sergey Smolov
*Cause*: "wire #10 wireA;"
111 3 Sergey Smolov
# test_07_14_01_1.v
112 1 Sergey Smolov
<pre>
113
test_07_14_01_1.v:25: warning: choosing typ expression.
114
test_07_14_01_1.v:25: warning: choosing typ expression.
115
test_07_14_01_1.v:25: warning: choosing typ expression.
116
test_07_14_01_1.v:26: warning: choosing typ expression.
117
test_07_14_01_1.v:26: warning: choosing typ expression.
118
test_07_14_01_1.v:26: warning: choosing typ expression.
119
</pre>
120 6 Sergey Smolov
*Cause*: "bufif0 #(5:7:9, 8:10:12, 15:18:21) b1 (io1, io2, dir);"
121 1 Sergey Smolov
# test_07_14_01_2.v
122
<pre>
123
test_07_14_01_2.v:26: warning: choosing typ expression.
124
test_07_14_01_2.v:27: warning: choosing typ expression.
125
</pre>
126 6 Sergey Smolov
*Cause*: " #(95:100:105) clk = 1;"
127 1 Sergey Smolov
# test_07_14_02_2_1.v
128
<pre>
129
test_07_14_02_2_1.v:25: sorry: trireg nets not supported.
130
</pre>
131 6 Sergey Smolov
*Cause*: "trireg ( large ) #(0,0,50) cap1;"
132 1 Sergey Smolov
# test_07_14_02_2_2.v
133
<pre>
134
test_07_14_02_2_2.v:26: sorry: trireg nets not supported.
135
</pre>
136 6 Sergey Smolov
*Cause*: "trireg ( large ) #(0,0,50) cap1;"
137 1 Sergey Smolov
# test_08_06_00_1.v
138
<pre>
139
test_08_06_00_1.v:46: syntax error
140
test_08_06_00_1.v:46: error: syntax error in parameter value assignment list.
141
test_08_06_00_1.v:46: error: Invalid module instantiation
142 6 Sergey Smolov
*Cause*: "d_edge_ff #p3 d_inst (q, clock, data);"
143 1 Sergey Smolov
</pre>
144 3 Sergey Smolov
# test_08_07_00_1.v
145 1 Sergey Smolov
<pre>
146
test_08_07_00_1.v:30: syntax error
147
</pre>
148 6 Sergey Smolov
*Cause*: "    ?     ?? 01 : ? : 1 ;"
149 3 Sergey Smolov
# test_09_06_00_1.v
150 1 Sergey Smolov
<pre>
151 3 Sergey Smolov
test_09_06_00_1.v:27: syntax error
152
test_09_06_00_1.v:28: error: invalid module item.
153
test_09_06_00_1.v:29: syntax error
154
test_09_06_00_1.v:29: error: Invalid module instantiation
155
test_09_06_00_1.v:30: error: Invalid module instantiation
156
test_09_06_00_1.v:31: error: Invalid module instantiation
157 1 Sergey Smolov
test_09_06_00_1.v:34: error: invalid module item.
158 3 Sergey Smolov
test_09_06_00_1.v:35: syntax error
159
test_09_06_00_1.v:35: error: Invalid module instantiation
160
test_09_06_00_1.v:36: error: Invalid module instantiation
161
</pre>
162 6 Sergey Smolov
*Cause*: "begin : mult"
163 3 Sergey Smolov
# test_09_06_00_2.v
164 1 Sergey Smolov
<pre>
165 3 Sergey Smolov
test_09_06_00_2.v:23: syntax error
166
test_09_06_00_2.v:24: error: invalid module item.
167
test_09_06_00_2.v:25: syntax error
168
test_09_06_00_2.v:25: error: Invalid module instantiation
169 1 Sergey Smolov
test_09_06_00_2.v:26: error: Invalid module instantiation
170 3 Sergey Smolov
test_09_06_00_2.v:29: error: invalid module item.
171
test_09_06_00_2.v:30: syntax error
172
test_09_06_00_2.v:30: error: Invalid module instantiation
173
</pre>
174 6 Sergey Smolov
*Cause*: "begin : count1s"
175 1 Sergey Smolov
# test_09_07_05_4.v
176
<pre>
177 3 Sergey Smolov
test_09_07_05_4.v:33: internal error: NetProc::nex_input not implemented
178 6 Sergey Smolov
</pre>
179 7 Sergey Smolov
*Cause*: "@*            // equivalent to @(c  or  d)
180
      x = c ^ d;"
181 3 Sergey Smolov
# test_09_07_07_1.v
182 6 Sergey Smolov
<pre>
183 3 Sergey Smolov
test_09_07_07_1.v:32: syntax error
184
</pre>
185 7 Sergey Smolov
*Cause*: "repeat  (-3) @ (posedge clk)"
186 3 Sergey Smolov
# test_10_03_00_5.v
187
<pre>
188 7 Sergey Smolov
test_10_03_00_5.v:44: syntax error
189
test_10_03_00_5.v:45: error: malformed statement
190
test_10_03_00_5.v:48: syntax error
191
test_10_03_00_5.v:49: error: malformed statement
192 3 Sergey Smolov
</pre>
193 7 Sergey Smolov
*Cause*: "begin : posedge(clk)"
194 3 Sergey Smolov
# test_12_02_00_1.v
195
<pre>
196 7 Sergey Smolov
test_12_02_00_1.v:57: error: Range expressions must be constant.
197
test_12_02_00_1.v:57       : This MSB expression violates the rule: LOG2(DEPTH)
198 3 Sergey Smolov
</pre>
199 7 Sergey Smolov
*Cause*: "reg [LOG2(DEPTH):0] depth;"
200 6 Sergey Smolov
# test_12_03_07_1.v
201 3 Sergey Smolov
<pre>
202
test_12_03_07_1.v:29: error: Scalar port ``net_r'' has a vectored net declaration [64:1].
203 7 Sergey Smolov
test_12_03_07_1.v:26: error: no wire/reg net_r in module driver.
204
test_12_03_07_1.v:33: error: Scalar port ``net_r'' has a vectored net declaration [64:1].
205
test_12_03_07_1.v:32: error: no wire/reg net_r in module receiver.
206
test_12_03_07_1.v:29: error: Net net_r is not defined in this context.
207 6 Sergey Smolov
test_12_03_07_1.v:36: error: Unable to bind wire/reg/memory `net_r' in `receiver'
208 3 Sergey Smolov
</pre>
209 7 Sergey Smolov
*Cause*:
210 3 Sergey Smolov
<pre>
211 7 Sergey Smolov
26: module driver (net_r);
212
27:   output net_r;
213
28:   real r;
214
29:   wire [64:1] net_r = $realtobits(r);
215
30: endmodule
216
31: 
217
32: module receiver (net_r);
218
33:   input net_r;
219
34:   wire [64:1] net_r;
220
35:   real r;
221
36:   initial assign r = $bitstoreal (net_r);
222
37: endmodule
223 3 Sergey Smolov
</pre>
224
# test_12_04_02_1.v
225
<pre>
226
test_12_04_02_1.v:46: syntax error
227
test_12_04_02_1.v:46: error: invalid module item.
228
</pre>
229 7 Sergey Smolov
*Cause*: "else;"
230 8 Sergey Smolov
# test_14_03_00_1.v
231
<pre>
232
test_14_03_00_1.v:30: warning: choosing typ expression.
233
test_14_03_00_1.v:30: warning: choosing typ expression.
234
test_14_03_00_1.v:31: warning: choosing typ expression.
235
test_14_03_00_1.v:31: warning: choosing typ expression.
236
</pre>
237
*Cause*:
238
<pre>
239
specparam  tRise_clk_q = 45:150:270, tFall_clk_q=60:200:350;
240
specparam  tRise_Control = 35:40:45, tFall_control=40:50:65;
241
</pre>
242
# test_14_03_01_1.v
243
<pre>
244
test_14_03_01_1.v:29: syntax error
245
test_14_03_01_1.v:26: error: syntax error in specify block
246
</pre>
247
*Cause*:
248
<pre>
249
(C => Q) = 20;
250
(C => Q) = 10:14:20;
251
</pre>
252
# test_15_05_00_2.v
253
<pre>
254
test_15_05_00_2.v:58: warning: choosing typ expression.
255
test_15_05_00_2.v:58: warning: choosing typ expression.
256
test_15_05_00_2.v:59: warning: choosing typ expression.
257
test_15_05_00_2.v:59: warning: choosing typ expression.
258
</pre>
259
*Cause*:
260
<pre>
261
specparam tPLHc = 4:6:9, tPHLc = 5:8:11;
262
specparam tPLHpc = 3:5:6, tPHLpc = 4:7:9;
263
</pre>
264
# test_15_05_01_3.v
265
<pre>
266
test_15_05_01_3.v:32: warning: timing checks are not supported and delayed signal "del_CLK" will not be driven.
267
test_15_05_01_3.v:32: warning: timing checks are not supported and delayed signal "del_DATA1" will not be driven.
268
</pre>
269
*Cause*:
270
<pre>
271
$setuphold (posedge CLK, DATA1, -10, 20,,,, del_CLK, del_DATA1);
272
</pre>
273
# test_15_05_01_4.v
274
<pre>
275
test_15_05_01_4.v:30: syntax error
276
test_15_05_01_4.v:30: Invalid simple path
277
test_15_05_01_4.v:31: warning: timing checks are not supported and delayed signal "dCLK" will not be driven.
278
test_15_05_01_4.v:31: warning: timing checks are not supported and delayed signal "dD" will not be driven.
279
test_15_05_01_4.v:32: warning: timing checks are not supported and delayed signal "dCLK" will not be driven.
280
test_15_05_01_4.v:32: warning: timing checks are not supported and delayed signal "dD" will not be driven.
281
</pre>
282
*Cause*:
283
<pre>
284
(CLK = Q) = 6;
285
$setuphold (posedge CLK, posedge D, -3,  8, , , , dCLK, dD);
286
$setuphold (posedge CLK, negedge D, -7, 13, , , , dCLK, dD);
287
</pre>
288
# test_15_05_02_3.v
289
<pre>
290
test_15_05_02_3.v:33: warning: timing checks are not supported and delayed signal "dCP" will not be driven.
291
test_15_05_02_3.v:33: warning: timing checks are not supported and delayed signal "dD" will not be driven.
292
test_15_05_02_3.v:34: warning: timing checks are not supported and delayed signal "dCP" will not be driven.
293
test_15_05_02_3.v:34: warning: timing checks are not supported and delayed signal "dTI" will not be driven.
294
test_15_05_02_3.v:35: warning: timing checks are not supported and delayed signal "dCP" will not be driven.
295
test_15_05_02_3.v:35: warning: timing checks are not supported and delayed signal "dTE" will not be driven.
296
</pre>
297
*Cause*:
298
<pre>
299
$setuphold(posedge CP, D, -10,  20, notifier, ,TE_cond_D,  dCP, dD);
300
$setuphold(posedge CP, TI, 20, -10, notifier, ,TE_cond_TI, dCP, dTI);
301
$setuphold(posedge CP, TE, -4,   8, notifier, ,DXTI_cond,  dCP, dTE);
302
</pre>
303
# test_15_07_00_1.v
304
<pre>
305
test_15_07_00_1.v:29: error: Q is not a valid l-value in DFF.
306
test_15_07_00_1.v:26:      : Q is declared here as wire.
307
</pre>
308
*Cause*:
309
<pre>
310
module DFF (Q, CLK, DAT);
311
  input CLK;
312
  input [7:0] DAT;
313
  output [7:0] Q;
314
315
  always @(posedge clk)
316
    Q = DAT;
317
  specify
318
    $setup (DAT, posedge CLK, 10);
319
  endspecify
320
endmodule
321
</pre>
322
# test_16_02_03_1.v
323
<pre>
324
test_16_02_03_1.v:25: syntax error
325
test_16_02_03_1.v:25: error: invalid module item.
326
test_16_02_03_1.v:35: syntax error
327
test_16_02_03_1.v:35: error: invalid module item.
328
</pre>
329
*Cause*:
330
<pre>
331
22:module clock(clk);
332
23:  output clk;
333
24:  reg clk;
334
25:  specparam dhigh=0, dlow=0;
335
26:
336
27:  initial clk = 0;
337
28:
338
29:  always
339
30:    begin
340
31:      #dhigh clk = 1; // Clock remains low for time dlow
341
32:                      // before transitioning to 1
342
33:      #dlow  clk = 0; // Clock remains high for time dhigh
343
34:                      // before transitioning to 0
344
35:    end;
345
36:endmodule
346
</pre>
347
# test_17_02_04_4_1.v
348
<pre>
349
test_17_02_04_4_1.v:40: syntax error
350
test_17_02_04_4_1.v:40: error: malformed statement
351
</pre>
352
*Cause*:
353
<pre>
354
code = $fread (mem, fd, , count);
355
</pre>
356
# test_17_05_01_1.v
357
<pre>
358
test_17_05_01_1.v:31: syntax error
359
test_17_05_01_1.v:31: error: invalid module item.
360
test_17_05_01_1.v:34: syntax error
361
test_17_05_01_1.v:34: error: invalid module item.
362
test_17_05_01_1.v:37: syntax error
363
test_17_05_01_1.v:37: error: invalid module item.
364
</pre>
365
*Cause*:
366
<pre>
367
$async$and$array (mem, {a1,a2,a3,a4,a5,a6,a7}, {b1,b2,b3});
368
369
// is equivalent
370
$async$and$array (mem, awire, breg);
371
372
// An example of a synchronous system call is as follows
373
$sync$or$plane (mem, {a1,a2,a3,a4,a5,a6,a7}, {b1,b2,b3});
374
</pre>
375
# 17_05_02_1.v
376
<pre>
377
test_17_05_02_1.v:28: syntax error
378
test_17_05_02_1.v:28: error: invalid module item.
379
test_17_05_02_1.v:31: syntax error
380
test_17_05_02_1.v:31: error: invalid module item.
381
</pre>
382
*Cause*:
383
<pre>
384
$async$nor$plane (mem,{a1,a2,a3,a4,a5,a6,a7},{b1,b2,b3});
385
386
// An example of a nand plane system call is as follows:
387
$sync$nand$plane (mem,{a1,a2,a3,a4,a5,a6,a7}, {b1,b2,b3});
388
</pre>
389
# test_17_08_00_1.v
390
<pre>
391
test_17_08_00_1.v:26: error: Scalar port ``net_r'' has a vectored net declaration [64:1].
392
test_17_08_00_1.v:31: error: Scalar port ``net_r'' has a vectored net declaration [64:1].
393
test_17_08_00_1.v:33: error: Unable to bind wire/reg/memory `net_r' in `receiver'
394
</pre>
395
*Cause*:
396
<pre>
397
23: module driver (net_r);
398
24:   output net_r;
399
25:   real r;
400
26:   wire [64:1] net_r = $realtobits (r);
401
27: endmodule
402
28: 
403
29: module receiver (net_r);
404
30:   input net_r;
405
31:   wire [64:1] net_r;
406
32:   real r;
407
33:   initial assign r = $bitstoreal (net_r);
408
34: endmodule
409
</pre>