Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

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