Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / ghdl / ghdl / testsuite / gna / bug16782 / bug.json @ 2051e520

History | View | Annotate | Download (20.8 KB)

1
{
2
  "DESIGN_FILE" : {
3
    "design_units" : [{
4
      "contexts" : [], "library" : ["ENTITY_DECLARATION", {
5
        "name" : ["IDENTIFIER", "bug"], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
6
      ]}
7
    , {
8
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
9
        "name" : ["IDENTIFIER", "arch"], "entity" : ["IDENTIFIER", "bug"], "ARCHITECTURE_DECLARATIVE_PART" : [{
10
          "declaration" : ["COMPONENT_DECLARATION", {
11
            "name" : ["IDENTIFIER", "comp"], "ports" : [{
12
              "names" : [["IDENTIFIER", "a"]], "mode" : ["in"], "typ" : {
13
                "name" : ["SIMPLE_NAME", "bit_vector"]}
14
              }
15
            ]}
16
          ]}
17
        , {
18
          "declaration" : ["CONSTANT_DECLARATION", {
19
            "names" : [["IDENTIFIER", "DATAPATH"]], "typ" : {
20
              "name" : ["SIMPLE_NAME", "natural"]}
21
            , "init_val" : ["EXPRESSION", {
22
              "args" : [["EXPRESSION", {
23
                "args" : [["EXPRESSION", {
24
                  "args" : [["EXPRESSION", {
25
                    "args" : [["CONSTANT_VALUE", {
26
                      "value" : ["CST_LITERAL", "16"]}
27
                    ]]}
28
                  ]]}
29
                ]]}
30
              ]]}
31
            ]}
32
          ]}
33
        , {
34
          "declaration" : ["SIGNAL_DECLARATION", {
35
            "names" : [["IDENTIFIER", "a"]], "typ" : {
36
              "name" : ["SIMPLE_NAME", "bit_vector"], "const" : ["INDEX_CONSTRAINT", {
37
                "ranges" : [["RANGE_WITH_DIRECTION", {
38
                  "direction" : "downto", "from" : ["EXPRESSION", {
39
                    "args" : [["EXPRESSION", {
40
                      "id" : "-", "args" : [["EXPRESSION", {
41
                        "args" : [["CALL", ["SIMPLE_NAME", "DATAPATH"]]]}
42
                      ], ["EXPRESSION", {
43
                        "args" : [["CONSTANT_VALUE", {
44
                          "value" : ["CST_LITERAL", "1"]}
45
                        ]]}
46
                      ]]}
47
                    ]]}
48
                  ], "_to" : ["EXPRESSION", {
49
                    "args" : [["EXPRESSION", {
50
                      "args" : [["CONSTANT_VALUE", {
51
                        "value" : ["CST_LITERAL", "0"]}
52
                      ]]}
53
                    ]]}
54
                  ]}
55
                ]]}
56
              ]}
57
            }
58
          ]}
59
        ], "ARCHITECTURE_STATEMENT_PART" : [["COMPONENT_INSTANTIATION_STATEMENT", {
60
          "name" : ["IDENTIFIER", "i_comp"], "inst_unit" : ["SIMPLE_NAME", "comp"], "port_map" : [{
61
            "actual_designator" : ["SIMPLE_NAME", "a"]}
62
          ]}
63
        ]]}
64
      ]}
65
    , {
66
      "contexts" : [], "library" : ["ENTITY_DECLARATION", {
67
        "name" : ["IDENTIFIER", "comp"], "ports" : [{
68
          "names" : [["IDENTIFIER", "a"]], "mode" : ["in"], "typ" : {
69
            "name" : ["SIMPLE_NAME", "bit_vector"]}
70
          }
71
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
72
      ]}
73
    , {
74
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
75
        "name" : ["IDENTIFIER", "arch"], "entity" : ["IDENTIFIER", "comp"], "ARCHITECTURE_DECLARATIVE_PART" : [{
76
          "declaration" : ["CONSTANT_DECLARATION", {
77
            "names" : [["IDENTIFIER", "DATAPATH"]], "typ" : {
78
              "name" : ["SIMPLE_NAME", "natural"]}
79
            , "init_val" : ["EXPRESSION", {
80
              "args" : [["EXPRESSION", {
81
                "args" : [["EXPRESSION", {
82
                  "args" : [["EXPRESSION", {
83
                    "args" : [["CALL", ["ATTRIBUTE_NAME", {
84
                      "id" : ["SIMPLE_NAME", "a"], "designator" : ["SIMPLE_NAME", "length"]}
85
                    ]]]}
86
                  ]]}
87
                ]]}
88
              ]]}
89
            ]}
90
          ]}
91
        , {
92
          "declaration" : ["SIGNAL_DECLARATION", {
93
            "names" : [["IDENTIFIER", "state"]], "typ" : {
94
              "name" : ["SIMPLE_NAME", "natural"]}
95
            }
96
          ]}
97
        , {
98
          "declaration" : ["SIGNAL_DECLARATION", {
99
            "names" : [["IDENTIFIER", "tmp"]], "typ" : {
100
              "name" : ["SIMPLE_NAME", "bit_vector"], "const" : ["INDEX_CONSTRAINT", {
101
                "ranges" : [["RANGE_WITH_DIRECTION", {
102
                  "direction" : "downto", "from" : ["EXPRESSION", {
103
                    "args" : [["EXPRESSION", {
104
                      "args" : [["CONSTANT_VALUE", {
105
                        "value" : ["CST_LITERAL", "31"]}
106
                      ]]}
107
                    ]]}
108
                  ], "_to" : ["EXPRESSION", {
109
                    "args" : [["EXPRESSION", {
110
                      "args" : [["CONSTANT_VALUE", {
111
                        "value" : ["CST_LITERAL", "0"]}
112
                      ]]}
113
                    ]]}
114
                  ]}
115
                ]]}
116
              ]}
117
            }
118
          ]}
119
        ], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
120
          "active_sigs" : [["SIMPLE_NAME", "a"]], "PROCESS_STATEMENT_PART" : [["CASE_STATEMENT_TREE", {
121
            "guard" : ["EXPRESSION", {
122
              "args" : [["EXPRESSION", {
123
                "args" : [["EXPRESSION", {
124
                  "args" : [["EXPRESSION", {
125
                    "args" : [["CALL", ["SIMPLE_NAME", "DATAPATH"]]]}
126
                  ]]}
127
                ]]}
128
              ]]}
129
            ], "branches" : [{
130
              "when_cond" : [["EXPRESSION", {
131
                "args" : [["EXPRESSION", {
132
                  "args" : [["CONSTANT_VALUE", {
133
                    "value" : ["CST_LITERAL", "8"]}
134
                  ]]}
135
                ]]}
136
              ]], "when_stmt" : [["CASE_STATEMENT_TREE", {
137
                "guard" : ["EXPRESSION", {
138
                  "args" : [["EXPRESSION", {
139
                    "args" : [["EXPRESSION", {
140
                      "args" : [["EXPRESSION", {
141
                        "args" : [["CALL", ["SIMPLE_NAME", "state"]]]}
142
                      ]]}
143
                    ]]}
144
                  ]]}
145
                ], "branches" : [{
146
                  "when_cond" : [["EXPRESSION", {
147
                    "args" : [["EXPRESSION", {
148
                      "args" : [["CONSTANT_VALUE", {
149
                        "value" : ["CST_LITERAL", "0"]}
150
                      ]]}
151
                    ]]}
152
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
153
                    "lhs" : ["SLICE_NAME", {
154
                      "id" : ["SIMPLE_NAME", "tmp"], "range" : ["RANGE_WITH_DIRECTION", {
155
                        "direction" : "downto", "from" : ["EXPRESSION", {
156
                          "args" : [["EXPRESSION", {
157
                            "id" : "-", "args" : [["EXPRESSION", {
158
                              "id" : "*", "args" : [["EXPRESSION", {
159
                                "args" : [["CONSTANT_VALUE", {
160
                                  "value" : ["CST_LITERAL", "1"]}
161
                                ]]}
162
                              ], ["EXPRESSION", {
163
                                "args" : [["CALL", ["SIMPLE_NAME", "DATAPATH"]]]}
164
                              ]]}
165
                            ], ["EXPRESSION", {
166
                              "args" : [["CONSTANT_VALUE", {
167
                                "value" : ["CST_LITERAL", "1"]}
168
                              ]]}
169
                            ]]}
170
                          ]]}
171
                        ], "_to" : ["EXPRESSION", {
172
                          "args" : [["EXPRESSION", {
173
                            "id" : "*", "args" : [["EXPRESSION", {
174
                              "args" : [["CONSTANT_VALUE", {
175
                                "value" : ["CST_LITERAL", "0"]}
176
                              ]]}
177
                            ], ["EXPRESSION", {
178
                              "args" : [["CALL", ["SIMPLE_NAME", "DATAPATH"]]]}
179
                            ]]}
180
                          ]]}
181
                        ]}
182
                      ]}
183
                    ], "rhs" : [{
184
                      "value" : ["EXPRESSION", {
185
                        "args" : [["EXPRESSION", {
186
                          "args" : [["EXPRESSION", {
187
                            "args" : [["EXPRESSION", {
188
                              "args" : [["CALL", ["SIMPLE_NAME", "a"]]]}
189
                            ]]}
190
                          ]]}
191
                        ]]}
192
                      ]}
193
                    ]}
194
                  ]]}
195
                , {
196
                  "when_cond" : [["EXPRESSION", {
197
                    "args" : [["EXPRESSION", {
198
                      "args" : [["CONSTANT_VALUE", {
199
                        "value" : ["CST_LITERAL", "1"]}
200
                      ]]}
201
                    ]]}
202
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
203
                    "lhs" : ["SLICE_NAME", {
204
                      "id" : ["SIMPLE_NAME", "tmp"], "range" : ["RANGE_WITH_DIRECTION", {
205
                        "direction" : "downto", "from" : ["EXPRESSION", {
206
                          "args" : [["EXPRESSION", {
207
                            "id" : "-", "args" : [["EXPRESSION", {
208
                              "id" : "*", "args" : [["EXPRESSION", {
209
                                "args" : [["CONSTANT_VALUE", {
210
                                  "value" : ["CST_LITERAL", "2"]}
211
                                ]]}
212
                              ], ["EXPRESSION", {
213
                                "args" : [["CALL", ["SIMPLE_NAME", "DATAPATH"]]]}
214
                              ]]}
215
                            ], ["EXPRESSION", {
216
                              "args" : [["CONSTANT_VALUE", {
217
                                "value" : ["CST_LITERAL", "1"]}
218
                              ]]}
219
                            ]]}
220
                          ]]}
221
                        ], "_to" : ["EXPRESSION", {
222
                          "args" : [["EXPRESSION", {
223
                            "id" : "*", "args" : [["EXPRESSION", {
224
                              "args" : [["CONSTANT_VALUE", {
225
                                "value" : ["CST_LITERAL", "1"]}
226
                              ]]}
227
                            ], ["EXPRESSION", {
228
                              "args" : [["CALL", ["SIMPLE_NAME", "DATAPATH"]]]}
229
                            ]]}
230
                          ]]}
231
                        ]}
232
                      ]}
233
                    ], "rhs" : [{
234
                      "value" : ["EXPRESSION", {
235
                        "args" : [["EXPRESSION", {
236
                          "args" : [["EXPRESSION", {
237
                            "args" : [["EXPRESSION", {
238
                              "args" : [["CALL", ["SIMPLE_NAME", "a"]]]}
239
                            ]]}
240
                          ]]}
241
                        ]]}
242
                      ]}
243
                    ]}
244
                  ]]}
245
                , {
246
                  "when_cond" : [["EXPRESSION", {
247
                    "args" : [["EXPRESSION", {
248
                      "args" : [["CONSTANT_VALUE", {
249
                        "value" : ["CST_LITERAL", "2"]}
250
                      ]]}
251
                    ]]}
252
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
253
                    "lhs" : ["SLICE_NAME", {
254
                      "id" : ["SIMPLE_NAME", "tmp"], "range" : ["RANGE_WITH_DIRECTION", {
255
                        "direction" : "downto", "from" : ["EXPRESSION", {
256
                          "args" : [["EXPRESSION", {
257
                            "id" : "-", "args" : [["EXPRESSION", {
258
                              "id" : "*", "args" : [["EXPRESSION", {
259
                                "args" : [["CONSTANT_VALUE", {
260
                                  "value" : ["CST_LITERAL", "3"]}
261
                                ]]}
262
                              ], ["EXPRESSION", {
263
                                "args" : [["CALL", ["SIMPLE_NAME", "DATAPATH"]]]}
264
                              ]]}
265
                            ], ["EXPRESSION", {
266
                              "args" : [["CONSTANT_VALUE", {
267
                                "value" : ["CST_LITERAL", "1"]}
268
                              ]]}
269
                            ]]}
270
                          ]]}
271
                        ], "_to" : ["EXPRESSION", {
272
                          "args" : [["EXPRESSION", {
273
                            "id" : "*", "args" : [["EXPRESSION", {
274
                              "args" : [["CONSTANT_VALUE", {
275
                                "value" : ["CST_LITERAL", "2"]}
276
                              ]]}
277
                            ], ["EXPRESSION", {
278
                              "args" : [["CALL", ["SIMPLE_NAME", "DATAPATH"]]]}
279
                            ]]}
280
                          ]]}
281
                        ]}
282
                      ]}
283
                    ], "rhs" : [{
284
                      "value" : ["EXPRESSION", {
285
                        "args" : [["EXPRESSION", {
286
                          "args" : [["EXPRESSION", {
287
                            "args" : [["EXPRESSION", {
288
                              "args" : [["CALL", ["SIMPLE_NAME", "a"]]]}
289
                            ]]}
290
                          ]]}
291
                        ]]}
292
                      ]}
293
                    ]}
294
                  ]]}
295
                , {
296
                  "when_cond" : [["EXPRESSION", {
297
                    "args" : [["EXPRESSION", {
298
                      "args" : [["CONSTANT_VALUE", {
299
                        "value" : ["CST_LITERAL", "3"]}
300
                      ]]}
301
                    ]]}
302
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
303
                    "lhs" : ["SLICE_NAME", {
304
                      "id" : ["SIMPLE_NAME", "tmp"], "range" : ["RANGE_WITH_DIRECTION", {
305
                        "direction" : "downto", "from" : ["EXPRESSION", {
306
                          "args" : [["EXPRESSION", {
307
                            "id" : "-", "args" : [["EXPRESSION", {
308
                              "id" : "*", "args" : [["EXPRESSION", {
309
                                "args" : [["CONSTANT_VALUE", {
310
                                  "value" : ["CST_LITERAL", "4"]}
311
                                ]]}
312
                              ], ["EXPRESSION", {
313
                                "args" : [["CALL", ["SIMPLE_NAME", "DATAPATH"]]]}
314
                              ]]}
315
                            ], ["EXPRESSION", {
316
                              "args" : [["CONSTANT_VALUE", {
317
                                "value" : ["CST_LITERAL", "1"]}
318
                              ]]}
319
                            ]]}
320
                          ]]}
321
                        ], "_to" : ["EXPRESSION", {
322
                          "args" : [["EXPRESSION", {
323
                            "id" : "*", "args" : [["EXPRESSION", {
324
                              "args" : [["CONSTANT_VALUE", {
325
                                "value" : ["CST_LITERAL", "3"]}
326
                              ]]}
327
                            ], ["EXPRESSION", {
328
                              "args" : [["CALL", ["SIMPLE_NAME", "DATAPATH"]]]}
329
                            ]]}
330
                          ]]}
331
                        ]}
332
                      ]}
333
                    ], "rhs" : [{
334
                      "value" : ["EXPRESSION", {
335
                        "args" : [["EXPRESSION", {
336
                          "args" : [["EXPRESSION", {
337
                            "args" : [["EXPRESSION", {
338
                              "args" : [["CALL", ["SIMPLE_NAME", "a"]]]}
339
                            ]]}
340
                          ]]}
341
                        ]]}
342
                      ]}
343
                    ]}
344
                  ]]}
345
                , {
346
                  "when_cond" : [["OTHERS"]], "when_stmt" : []}
347
                ]}
348
              ]]}
349
            , {
350
              "when_cond" : [["EXPRESSION", {
351
                "args" : [["EXPRESSION", {
352
                  "args" : [["CONSTANT_VALUE", {
353
                    "value" : ["CST_LITERAL", "16"]}
354
                  ]]}
355
                ]]}
356
              ]], "when_stmt" : [["CASE_STATEMENT_TREE", {
357
                "guard" : ["EXPRESSION", {
358
                  "args" : [["EXPRESSION", {
359
                    "args" : [["EXPRESSION", {
360
                      "args" : [["EXPRESSION", {
361
                        "args" : [["CALL", ["SIMPLE_NAME", "state"]]]}
362
                      ]]}
363
                    ]]}
364
                  ]]}
365
                ], "branches" : [{
366
                  "when_cond" : [["EXPRESSION", {
367
                    "args" : [["EXPRESSION", {
368
                      "args" : [["CONSTANT_VALUE", {
369
                        "value" : ["CST_LITERAL", "0"]}
370
                      ]]}
371
                    ]]}
372
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
373
                    "lhs" : ["SLICE_NAME", {
374
                      "id" : ["SIMPLE_NAME", "tmp"], "range" : ["RANGE_WITH_DIRECTION", {
375
                        "direction" : "downto", "from" : ["EXPRESSION", {
376
                          "args" : [["EXPRESSION", {
377
                            "id" : "-", "args" : [["EXPRESSION", {
378
                              "id" : "*", "args" : [["EXPRESSION", {
379
                                "args" : [["CONSTANT_VALUE", {
380
                                  "value" : ["CST_LITERAL", "1"]}
381
                                ]]}
382
                              ], ["EXPRESSION", {
383
                                "args" : [["CALL", ["SIMPLE_NAME", "DATAPATH"]]]}
384
                              ]]}
385
                            ], ["EXPRESSION", {
386
                              "args" : [["CONSTANT_VALUE", {
387
                                "value" : ["CST_LITERAL", "1"]}
388
                              ]]}
389
                            ]]}
390
                          ]]}
391
                        ], "_to" : ["EXPRESSION", {
392
                          "args" : [["EXPRESSION", {
393
                            "id" : "*", "args" : [["EXPRESSION", {
394
                              "args" : [["CONSTANT_VALUE", {
395
                                "value" : ["CST_LITERAL", "0"]}
396
                              ]]}
397
                            ], ["EXPRESSION", {
398
                              "args" : [["CALL", ["SIMPLE_NAME", "DATAPATH"]]]}
399
                            ]]}
400
                          ]]}
401
                        ]}
402
                      ]}
403
                    ], "rhs" : [{
404
                      "value" : ["EXPRESSION", {
405
                        "args" : [["EXPRESSION", {
406
                          "args" : [["EXPRESSION", {
407
                            "args" : [["EXPRESSION", {
408
                              "args" : [["CALL", ["SIMPLE_NAME", "a"]]]}
409
                            ]]}
410
                          ]]}
411
                        ]]}
412
                      ]}
413
                    ]}
414
                  ]]}
415
                , {
416
                  "when_cond" : [["EXPRESSION", {
417
                    "args" : [["EXPRESSION", {
418
                      "args" : [["CONSTANT_VALUE", {
419
                        "value" : ["CST_LITERAL", "1"]}
420
                      ]]}
421
                    ]]}
422
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
423
                    "lhs" : ["SLICE_NAME", {
424
                      "id" : ["SIMPLE_NAME", "tmp"], "range" : ["RANGE_WITH_DIRECTION", {
425
                        "direction" : "downto", "from" : ["EXPRESSION", {
426
                          "args" : [["EXPRESSION", {
427
                            "id" : "-", "args" : [["EXPRESSION", {
428
                              "id" : "*", "args" : [["EXPRESSION", {
429
                                "args" : [["CONSTANT_VALUE", {
430
                                  "value" : ["CST_LITERAL", "2"]}
431
                                ]]}
432
                              ], ["EXPRESSION", {
433
                                "args" : [["CALL", ["SIMPLE_NAME", "DATAPATH"]]]}
434
                              ]]}
435
                            ], ["EXPRESSION", {
436
                              "args" : [["CONSTANT_VALUE", {
437
                                "value" : ["CST_LITERAL", "1"]}
438
                              ]]}
439
                            ]]}
440
                          ]]}
441
                        ], "_to" : ["EXPRESSION", {
442
                          "args" : [["EXPRESSION", {
443
                            "id" : "*", "args" : [["EXPRESSION", {
444
                              "args" : [["CONSTANT_VALUE", {
445
                                "value" : ["CST_LITERAL", "1"]}
446
                              ]]}
447
                            ], ["EXPRESSION", {
448
                              "args" : [["CALL", ["SIMPLE_NAME", "DATAPATH"]]]}
449
                            ]]}
450
                          ]]}
451
                        ]}
452
                      ]}
453
                    ], "rhs" : [{
454
                      "value" : ["EXPRESSION", {
455
                        "args" : [["EXPRESSION", {
456
                          "args" : [["EXPRESSION", {
457
                            "args" : [["EXPRESSION", {
458
                              "args" : [["CALL", ["SIMPLE_NAME", "a"]]]}
459
                            ]]}
460
                          ]]}
461
                        ]]}
462
                      ]}
463
                    ]}
464
                  ]]}
465
                , {
466
                  "when_cond" : [["OTHERS"]], "when_stmt" : []}
467
                ]}
468
              ]]}
469
            , {
470
              "when_cond" : [["OTHERS"]], "when_stmt" : []}
471
            ]}
472
          ]]}
473
        ]]}
474
      ]}
475
    ]}
476
  }