Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / ghdl / ghdl / testsuite / gna / bug040 / extend_mask.json @ 3fd18385

History | View | Annotate | Download (24.2 KB)

1
{
2
  "DESIGN_FILE" : {
3
    "design_units" : [{
4
      "contexts" : [["LIBRARY_CLAUSE", [["IDENTIFIER", "ieee"]]], ["USE_CLAUSE", [["SELECTED_NAME", [["SIMPLE_NAME", "ieee"], ["SIMPLE_NAME", "std_logic_1164"]]]]], ["LIBRARY_CLAUSE", [["IDENTIFIER", "ieee"]]], ["USE_CLAUSE", [["SELECTED_NAME", [["SIMPLE_NAME", "ieee"], ["SIMPLE_NAME", "numeric_std"]]]]]], "library" : ["ENTITY_DECLARATION", {
5
        "name" : ["IDENTIFIER", "extend_mask"], "ports" : [{
6
          "names" : [["IDENTIFIER", "clk"]], "mode" : ["in"], "typ" : {
7
            "name" : ["SIMPLE_NAME", "std_logic"]}
8
          }
9
        , {
10
          "names" : [["IDENTIFIER", "ra0_addr"]], "mode" : ["in"], "typ" : {
11
            "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
12
              "ranges" : [["RANGE_WITH_DIRECTION", {
13
                "direction" : "downto", "from" : ["EXPRESSION", {
14
                  "args" : [["EXPRESSION", {
15
                    "args" : [["CONSTANT_VALUE", {
16
                      "value" : ["CST_LITERAL", "4"]}
17
                    ]]}
18
                  ]]}
19
                ], "_to" : ["EXPRESSION", {
20
                  "args" : [["EXPRESSION", {
21
                    "args" : [["CONSTANT_VALUE", {
22
                      "value" : ["CST_LITERAL", "0"]}
23
                    ]]}
24
                  ]]}
25
                ]}
26
              ]]}
27
            ]}
28
          }
29
        , {
30
          "names" : [["IDENTIFIER", "ra0_data"]], "mode" : ["out"], "typ" : {
31
            "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
32
              "ranges" : [["RANGE_WITH_DIRECTION", {
33
                "direction" : "downto", "from" : ["EXPRESSION", {
34
                  "args" : [["EXPRESSION", {
35
                    "args" : [["CONSTANT_VALUE", {
36
                      "value" : ["CST_LITERAL", "20"]}
37
                    ]]}
38
                  ]]}
39
                ], "_to" : ["EXPRESSION", {
40
                  "args" : [["EXPRESSION", {
41
                    "args" : [["CONSTANT_VALUE", {
42
                      "value" : ["CST_LITERAL", "0"]}
43
                    ]]}
44
                  ]]}
45
                ]}
46
              ]]}
47
            ]}
48
          }
49
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
50
      ]}
51
    , {
52
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
53
        "name" : ["IDENTIFIER", "augh"], "entity" : ["IDENTIFIER", "extend_mask"], "ARCHITECTURE_DECLARATIVE_PART" : [{
54
          "definition" : ["TYPE_DECLARATION", {
55
            "name" : ["IDENTIFIER", "ram_type"], "definition" : ["ARRAY_TYPE_DEFINITION", {
56
              "const" : ["INDEX_CONSTRAINT", {
57
                "ranges" : [["RANGE_WITH_DIRECTION", {
58
                  "direction" : "to", "from" : ["EXPRESSION", {
59
                    "args" : [["EXPRESSION", {
60
                      "args" : [["CONSTANT_VALUE", {
61
                        "value" : ["CST_LITERAL", "0"]}
62
                      ]]}
63
                    ]]}
64
                  ], "_to" : ["EXPRESSION", {
65
                    "args" : [["EXPRESSION", {
66
                      "args" : [["CONSTANT_VALUE", {
67
                        "value" : ["CST_LITERAL", "19"]}
68
                      ]]}
69
                    ]]}
70
                  ]}
71
                ]]}
72
              ], "definition" : {
73
                "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
74
                  "ranges" : [["RANGE_WITH_DIRECTION", {
75
                    "direction" : "downto", "from" : ["EXPRESSION", {
76
                      "args" : [["EXPRESSION", {
77
                        "args" : [["CONSTANT_VALUE", {
78
                          "value" : ["CST_LITERAL", "20"]}
79
                        ]]}
80
                      ]]}
81
                    ], "_to" : ["EXPRESSION", {
82
                      "args" : [["EXPRESSION", {
83
                        "args" : [["CONSTANT_VALUE", {
84
                          "value" : ["CST_LITERAL", "0"]}
85
                        ]]}
86
                      ]]}
87
                    ]}
88
                  ]]}
89
                ]}
90
              }
91
            ]}
92
          ]}
93
        , {
94
          "declaration" : ["SIGNAL_DECLARATION", {
95
            "names" : [["IDENTIFIER", "ram"]], "typ" : {
96
              "name" : ["SIMPLE_NAME", "ram_type"]}
97
            , "init_val" : ["EXPRESSION", {
98
              "args" : [["EXPRESSION", {
99
                "args" : [["EXPRESSION", {
100
                  "args" : [["EXPRESSION", {
101
                    "args" : [["AGGREGATE", {
102
                      "elems" : [{
103
                        "expr" : ["EXPRESSION", {
104
                          "args" : [["EXPRESSION", {
105
                            "args" : [["EXPRESSION", {
106
                              "args" : [["EXPRESSION", {
107
                                "args" : [["CONSTANT_VALUE", {
108
                                  "value" : ["CST_LITERAL", "\"111111111111111111110\""]}
109
                                ]]}
110
                              ]]}
111
                            ]]}
112
                          ]]}
113
                        ]}
114
                      , {
115
                        "expr" : ["EXPRESSION", {
116
                          "args" : [["EXPRESSION", {
117
                            "args" : [["EXPRESSION", {
118
                              "args" : [["EXPRESSION", {
119
                                "args" : [["CONSTANT_VALUE", {
120
                                  "value" : ["CST_LITERAL", "\"111111111111111111100\""]}
121
                                ]]}
122
                              ]]}
123
                            ]]}
124
                          ]]}
125
                        ]}
126
                      , {
127
                        "expr" : ["EXPRESSION", {
128
                          "args" : [["EXPRESSION", {
129
                            "args" : [["EXPRESSION", {
130
                              "args" : [["EXPRESSION", {
131
                                "args" : [["CONSTANT_VALUE", {
132
                                  "value" : ["CST_LITERAL", "\"111111111111111111000\""]}
133
                                ]]}
134
                              ]]}
135
                            ]]}
136
                          ]]}
137
                        ]}
138
                      , {
139
                        "expr" : ["EXPRESSION", {
140
                          "args" : [["EXPRESSION", {
141
                            "args" : [["EXPRESSION", {
142
                              "args" : [["EXPRESSION", {
143
                                "args" : [["CONSTANT_VALUE", {
144
                                  "value" : ["CST_LITERAL", "\"111111111111111110000\""]}
145
                                ]]}
146
                              ]]}
147
                            ]]}
148
                          ]]}
149
                        ]}
150
                      , {
151
                        "expr" : ["EXPRESSION", {
152
                          "args" : [["EXPRESSION", {
153
                            "args" : [["EXPRESSION", {
154
                              "args" : [["EXPRESSION", {
155
                                "args" : [["CONSTANT_VALUE", {
156
                                  "value" : ["CST_LITERAL", "\"111111111111111100000\""]}
157
                                ]]}
158
                              ]]}
159
                            ]]}
160
                          ]]}
161
                        ]}
162
                      , {
163
                        "expr" : ["EXPRESSION", {
164
                          "args" : [["EXPRESSION", {
165
                            "args" : [["EXPRESSION", {
166
                              "args" : [["EXPRESSION", {
167
                                "args" : [["CONSTANT_VALUE", {
168
                                  "value" : ["CST_LITERAL", "\"111111111111111000000\""]}
169
                                ]]}
170
                              ]]}
171
                            ]]}
172
                          ]]}
173
                        ]}
174
                      , {
175
                        "expr" : ["EXPRESSION", {
176
                          "args" : [["EXPRESSION", {
177
                            "args" : [["EXPRESSION", {
178
                              "args" : [["EXPRESSION", {
179
                                "args" : [["CONSTANT_VALUE", {
180
                                  "value" : ["CST_LITERAL", "\"111111111111110000000\""]}
181
                                ]]}
182
                              ]]}
183
                            ]]}
184
                          ]]}
185
                        ]}
186
                      , {
187
                        "expr" : ["EXPRESSION", {
188
                          "args" : [["EXPRESSION", {
189
                            "args" : [["EXPRESSION", {
190
                              "args" : [["EXPRESSION", {
191
                                "args" : [["CONSTANT_VALUE", {
192
                                  "value" : ["CST_LITERAL", "\"111111111111100000000\""]}
193
                                ]]}
194
                              ]]}
195
                            ]]}
196
                          ]]}
197
                        ]}
198
                      , {
199
                        "expr" : ["EXPRESSION", {
200
                          "args" : [["EXPRESSION", {
201
                            "args" : [["EXPRESSION", {
202
                              "args" : [["EXPRESSION", {
203
                                "args" : [["CONSTANT_VALUE", {
204
                                  "value" : ["CST_LITERAL", "\"111111111111000000000\""]}
205
                                ]]}
206
                              ]]}
207
                            ]]}
208
                          ]]}
209
                        ]}
210
                      , {
211
                        "expr" : ["EXPRESSION", {
212
                          "args" : [["EXPRESSION", {
213
                            "args" : [["EXPRESSION", {
214
                              "args" : [["EXPRESSION", {
215
                                "args" : [["CONSTANT_VALUE", {
216
                                  "value" : ["CST_LITERAL", "\"111111111110000000000\""]}
217
                                ]]}
218
                              ]]}
219
                            ]]}
220
                          ]]}
221
                        ]}
222
                      , {
223
                        "expr" : ["EXPRESSION", {
224
                          "args" : [["EXPRESSION", {
225
                            "args" : [["EXPRESSION", {
226
                              "args" : [["EXPRESSION", {
227
                                "args" : [["CONSTANT_VALUE", {
228
                                  "value" : ["CST_LITERAL", "\"111111111100000000000\""]}
229
                                ]]}
230
                              ]]}
231
                            ]]}
232
                          ]]}
233
                        ]}
234
                      , {
235
                        "expr" : ["EXPRESSION", {
236
                          "args" : [["EXPRESSION", {
237
                            "args" : [["EXPRESSION", {
238
                              "args" : [["EXPRESSION", {
239
                                "args" : [["CONSTANT_VALUE", {
240
                                  "value" : ["CST_LITERAL", "\"111111111000000000000\""]}
241
                                ]]}
242
                              ]]}
243
                            ]]}
244
                          ]]}
245
                        ]}
246
                      , {
247
                        "expr" : ["EXPRESSION", {
248
                          "args" : [["EXPRESSION", {
249
                            "args" : [["EXPRESSION", {
250
                              "args" : [["EXPRESSION", {
251
                                "args" : [["CONSTANT_VALUE", {
252
                                  "value" : ["CST_LITERAL", "\"111111110000000000000\""]}
253
                                ]]}
254
                              ]]}
255
                            ]]}
256
                          ]]}
257
                        ]}
258
                      , {
259
                        "expr" : ["EXPRESSION", {
260
                          "args" : [["EXPRESSION", {
261
                            "args" : [["EXPRESSION", {
262
                              "args" : [["EXPRESSION", {
263
                                "args" : [["CONSTANT_VALUE", {
264
                                  "value" : ["CST_LITERAL", "\"111111100000000000000\""]}
265
                                ]]}
266
                              ]]}
267
                            ]]}
268
                          ]]}
269
                        ]}
270
                      , {
271
                        "expr" : ["EXPRESSION", {
272
                          "args" : [["EXPRESSION", {
273
                            "args" : [["EXPRESSION", {
274
                              "args" : [["EXPRESSION", {
275
                                "args" : [["CONSTANT_VALUE", {
276
                                  "value" : ["CST_LITERAL", "\"111111000000000000000\""]}
277
                                ]]}
278
                              ]]}
279
                            ]]}
280
                          ]]}
281
                        ]}
282
                      , {
283
                        "expr" : ["EXPRESSION", {
284
                          "args" : [["EXPRESSION", {
285
                            "args" : [["EXPRESSION", {
286
                              "args" : [["EXPRESSION", {
287
                                "args" : [["CONSTANT_VALUE", {
288
                                  "value" : ["CST_LITERAL", "\"111110000000000000000\""]}
289
                                ]]}
290
                              ]]}
291
                            ]]}
292
                          ]]}
293
                        ]}
294
                      , {
295
                        "expr" : ["EXPRESSION", {
296
                          "args" : [["EXPRESSION", {
297
                            "args" : [["EXPRESSION", {
298
                              "args" : [["EXPRESSION", {
299
                                "args" : [["CONSTANT_VALUE", {
300
                                  "value" : ["CST_LITERAL", "\"111100000000000000000\""]}
301
                                ]]}
302
                              ]]}
303
                            ]]}
304
                          ]]}
305
                        ]}
306
                      , {
307
                        "expr" : ["EXPRESSION", {
308
                          "args" : [["EXPRESSION", {
309
                            "args" : [["EXPRESSION", {
310
                              "args" : [["EXPRESSION", {
311
                                "args" : [["CONSTANT_VALUE", {
312
                                  "value" : ["CST_LITERAL", "\"111000000000000000000\""]}
313
                                ]]}
314
                              ]]}
315
                            ]]}
316
                          ]]}
317
                        ]}
318
                      , {
319
                        "expr" : ["EXPRESSION", {
320
                          "args" : [["EXPRESSION", {
321
                            "args" : [["EXPRESSION", {
322
                              "args" : [["EXPRESSION", {
323
                                "args" : [["CONSTANT_VALUE", {
324
                                  "value" : ["CST_LITERAL", "\"110000000000000000000\""]}
325
                                ]]}
326
                              ]]}
327
                            ]]}
328
                          ]]}
329
                        ]}
330
                      , {
331
                        "expr" : ["EXPRESSION", {
332
                          "args" : [["EXPRESSION", {
333
                            "args" : [["EXPRESSION", {
334
                              "args" : [["EXPRESSION", {
335
                                "args" : [["CONSTANT_VALUE", {
336
                                  "value" : ["CST_LITERAL", "\"100000000000000000000\""]}
337
                                ]]}
338
                              ]]}
339
                            ]]}
340
                          ]]}
341
                        ]}
342
                      ]}
343
                    ]]}
344
                  ]]}
345
                ]]}
346
              ]]}
347
            ]}
348
          ]}
349
        , {
350
          "declaration" : ["SUBPROGRAM_BODY", {
351
            "spec" : {
352
              "name" : "to_integer", "subprogram_type" : "function", "parameters" : [{
353
                "names" : [["IDENTIFIER", "B"]], "typ" : {
354
                  "name" : ["SIMPLE_NAME", "std_logic"]}
355
                }
356
              ], "typeMark" : ["SIMPLE_NAME", "integer"], "isPure" : false}
357
            , "decl_part" : [["VARIABLE_DECLARATION", {
358
              "names" : [["IDENTIFIER", "V"]], "typ" : {
359
                "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
360
                  "ranges" : [["RANGE_WITH_DIRECTION", {
361
                    "direction" : "to", "from" : ["EXPRESSION", {
362
                      "args" : [["EXPRESSION", {
363
                        "args" : [["CONSTANT_VALUE", {
364
                          "value" : ["CST_LITERAL", "0"]}
365
                        ]]}
366
                      ]]}
367
                    ], "_to" : ["EXPRESSION", {
368
                      "args" : [["EXPRESSION", {
369
                        "args" : [["CONSTANT_VALUE", {
370
                          "value" : ["CST_LITERAL", "0"]}
371
                        ]]}
372
                      ]]}
373
                    ]}
374
                  ]]}
375
                ]}
376
              }
377
            ]], "stmts" : [["VARIABLE_ASSIGNMENT_STATEMENT", {
378
              "lhs" : ["INDEXED_NAME", {
379
                "id" : ["SIMPLE_NAME", "V"], "exprs" : [["EXPRESSION", {
380
                  "args" : [["EXPRESSION", {
381
                    "args" : [["EXPRESSION", {
382
                      "args" : [["EXPRESSION", {
383
                        "args" : [["CONSTANT_VALUE", {
384
                          "value" : ["CST_LITERAL", "0"]}
385
                        ]]}
386
                      ]]}
387
                    ]]}
388
                  ]]}
389
                ]]}
390
              ], "rhs" : ["EXPRESSION", {
391
                "args" : [["EXPRESSION", {
392
                  "args" : [["EXPRESSION", {
393
                    "args" : [["EXPRESSION", {
394
                      "args" : [["CALL", ["SIMPLE_NAME", "B"]]]}
395
                    ]]}
396
                  ]]}
397
                ]]}
398
              ]}
399
            ], ["RETURN_STATEMENT", {
400
              "expr" : ["EXPRESSION", {
401
                "args" : [["EXPRESSION", {
402
                  "args" : [["EXPRESSION", {
403
                    "args" : [["EXPRESSION", {
404
                      "args" : [["CALL", ["INDEXED_NAME", {
405
                        "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
406
                          "args" : [["EXPRESSION", {
407
                            "args" : [["EXPRESSION", {
408
                              "args" : [["EXPRESSION", {
409
                                "args" : [["CALL", ["INDEXED_NAME", {
410
                                  "id" : ["SIMPLE_NAME", "unsigned"], "exprs" : [["EXPRESSION", {
411
                                    "args" : [["EXPRESSION", {
412
                                      "args" : [["EXPRESSION", {
413
                                        "args" : [["EXPRESSION", {
414
                                          "args" : [["CALL", ["SIMPLE_NAME", "V"]]]}
415
                                        ]]}
416
                                      ]]}
417
                                    ]]}
418
                                  ]]}
419
                                ]]]}
420
                              ]]}
421
                            ]]}
422
                          ]]}
423
                        ]]}
424
                      ]]]}
425
                    ]]}
426
                  ]]}
427
                ]]}
428
              ]}
429
            ]]}
430
          ]}
431
        , {
432
          "declaration" : ["SUBPROGRAM_BODY", {
433
            "spec" : {
434
              "name" : "to_integer", "subprogram_type" : "function", "parameters" : [{
435
                "names" : [["IDENTIFIER", "V"]], "typ" : {
436
                  "name" : ["SIMPLE_NAME", "std_logic_vector"]}
437
                }
438
              ], "typeMark" : ["SIMPLE_NAME", "integer"], "isPure" : false}
439
            , "stmts" : [["RETURN_STATEMENT", {
440
              "expr" : ["EXPRESSION", {
441
                "args" : [["EXPRESSION", {
442
                  "args" : [["EXPRESSION", {
443
                    "args" : [["EXPRESSION", {
444
                      "args" : [["CALL", ["INDEXED_NAME", {
445
                        "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
446
                          "args" : [["EXPRESSION", {
447
                            "args" : [["EXPRESSION", {
448
                              "args" : [["EXPRESSION", {
449
                                "args" : [["CALL", ["INDEXED_NAME", {
450
                                  "id" : ["SIMPLE_NAME", "unsigned"], "exprs" : [["EXPRESSION", {
451
                                    "args" : [["EXPRESSION", {
452
                                      "args" : [["EXPRESSION", {
453
                                        "args" : [["EXPRESSION", {
454
                                          "args" : [["CALL", ["SIMPLE_NAME", "V"]]]}
455
                                        ]]}
456
                                      ]]}
457
                                    ]]}
458
                                  ]]}
459
                                ]]]}
460
                              ]]}
461
                            ]]}
462
                          ]]}
463
                        ]]}
464
                      ]]]}
465
                    ]]}
466
                  ]]}
467
                ]]}
468
              ]}
469
            ]]}
470
          ]}
471
        ], "ARCHITECTURE_STATEMENT_PART" : [["CONDITIONAL_SIGNAL_ASSIGNMENT", {
472
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "ra0_data"], "rhs" : [{
473
            "expr" : [{
474
              "value" : ["EXPRESSION", {
475
                "args" : [["EXPRESSION", {
476
                  "args" : [["EXPRESSION", {
477
                    "args" : [["EXPRESSION", {
478
                      "args" : [["CALL", ["INDEXED_NAME", {
479
                        "id" : ["SIMPLE_NAME", "ram"], "exprs" : [["EXPRESSION", {
480
                          "args" : [["EXPRESSION", {
481
                            "args" : [["EXPRESSION", {
482
                              "args" : [["EXPRESSION", {
483
                                "args" : [["CALL", ["INDEXED_NAME", {
484
                                  "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
485
                                    "args" : [["EXPRESSION", {
486
                                      "args" : [["EXPRESSION", {
487
                                        "args" : [["EXPRESSION", {
488
                                          "args" : [["CALL", ["SIMPLE_NAME", "ra0_addr"]]]}
489
                                        ]]}
490
                                      ]]}
491
                                    ]]}
492
                                  ]]}
493
                                ]]]}
494
                              ]]}
495
                            ]]}
496
                          ]]}
497
                        ]]}
498
                      ]]]}
499
                    ]]}
500
                  ]]}
501
                ]]}
502
              ]}
503
            ], "cond" : ["EXPRESSION", {
504
              "id" : "<", "args" : [["EXPRESSION", {
505
                "args" : [["EXPRESSION", {
506
                  "args" : [["EXPRESSION", {
507
                    "args" : [["CALL", ["INDEXED_NAME", {
508
                      "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
509
                        "args" : [["EXPRESSION", {
510
                          "args" : [["EXPRESSION", {
511
                            "args" : [["EXPRESSION", {
512
                              "args" : [["CALL", ["SIMPLE_NAME", "ra0_addr"]]]}
513
                            ]]}
514
                          ]]}
515
                        ]]}
516
                      ]]}
517
                    ]]]}
518
                  ]]}
519
                ]]}
520
              ], ["EXPRESSION", {
521
                "args" : [["EXPRESSION", {
522
                  "args" : [["EXPRESSION", {
523
                    "args" : [["CONSTANT_VALUE", {
524
                      "value" : ["CST_LITERAL", "20"]}
525
                    ]]}
526
                  ]]}
527
                ]]}
528
              ]]}
529
            ]}
530
          , {
531
            "expr" : [{
532
              "value" : ["EXPRESSION", {
533
                "args" : [["EXPRESSION", {
534
                  "args" : [["EXPRESSION", {
535
                    "args" : [["EXPRESSION", {
536
                      "args" : [["AGGREGATE", {
537
                        "elems" : [{
538
                          "choices" : [["OTHERS"]], "expr" : ["EXPRESSION", {
539
                            "args" : [["EXPRESSION", {
540
                              "args" : [["EXPRESSION", {
541
                                "args" : [["EXPRESSION", {
542
                                  "args" : [["CONSTANT_VALUE", {
543
                                    "value" : ["CST_LITERAL", "'-'"]}
544
                                  ]]}
545
                                ]]}
546
                              ]]}
547
                            ]]}
548
                          ]}
549
                        ]}
550
                      ]]}
551
                    ]]}
552
                  ]]}
553
                ]]}
554
              ]}
555
            ]}
556
          ]}
557
        ]]}
558
      ]}
559
    ]}
560
  }