Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / ghdl / ghdl / testsuite / gna / issue50 / vector.d / w_split5.json @ 3fd18385

History | View | Annotate | Download (16.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", "w_split5"], "ports" : [{
6
          "names" : [["IDENTIFIER", "clk"]], "mode" : ["in"], "typ" : {
7
            "name" : ["SIMPLE_NAME", "std_logic"]}
8
          }
9
        , {
10
          "names" : [["IDENTIFIER", "ra0_data"]], "mode" : ["out"], "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", "7"]}
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", "wa0_data"]], "mode" : ["in"], "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", "7"]}
37
                    ]]}
38
                  ]]}
39
                ], "_to" : ["EXPRESSION", {
40
                  "args" : [["EXPRESSION", {
41
                    "args" : [["CONSTANT_VALUE", {
42
                      "value" : ["CST_LITERAL", "0"]}
43
                    ]]}
44
                  ]]}
45
                ]}
46
              ]]}
47
            ]}
48
          }
49
        , {
50
          "names" : [["IDENTIFIER", "wa0_addr"]], "mode" : ["in"], "typ" : {
51
            "name" : ["SIMPLE_NAME", "std_logic"]}
52
          }
53
        , {
54
          "names" : [["IDENTIFIER", "wa0_en"]], "mode" : ["in"], "typ" : {
55
            "name" : ["SIMPLE_NAME", "std_logic"]}
56
          }
57
        , {
58
          "names" : [["IDENTIFIER", "ra0_addr"]], "mode" : ["in"], "typ" : {
59
            "name" : ["SIMPLE_NAME", "std_logic"]}
60
          }
61
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
62
      ]}
63
    , {
64
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
65
        "name" : ["IDENTIFIER", "augh"], "entity" : ["IDENTIFIER", "w_split5"], "ARCHITECTURE_DECLARATIVE_PART" : [{
66
          "definition" : ["TYPE_DECLARATION", {
67
            "name" : ["IDENTIFIER", "ram_type"], "definition" : ["ARRAY_TYPE_DEFINITION", {
68
              "const" : ["INDEX_CONSTRAINT", {
69
                "ranges" : [["RANGE_WITH_DIRECTION", {
70
                  "direction" : "to", "from" : ["EXPRESSION", {
71
                    "args" : [["EXPRESSION", {
72
                      "args" : [["CONSTANT_VALUE", {
73
                        "value" : ["CST_LITERAL", "0"]}
74
                      ]]}
75
                    ]]}
76
                  ], "_to" : ["EXPRESSION", {
77
                    "args" : [["EXPRESSION", {
78
                      "args" : [["CONSTANT_VALUE", {
79
                        "value" : ["CST_LITERAL", "1"]}
80
                      ]]}
81
                    ]]}
82
                  ]}
83
                ]]}
84
              ], "definition" : {
85
                "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
86
                  "ranges" : [["RANGE_WITH_DIRECTION", {
87
                    "direction" : "downto", "from" : ["EXPRESSION", {
88
                      "args" : [["EXPRESSION", {
89
                        "args" : [["CONSTANT_VALUE", {
90
                          "value" : ["CST_LITERAL", "7"]}
91
                        ]]}
92
                      ]]}
93
                    ], "_to" : ["EXPRESSION", {
94
                      "args" : [["EXPRESSION", {
95
                        "args" : [["CONSTANT_VALUE", {
96
                          "value" : ["CST_LITERAL", "0"]}
97
                        ]]}
98
                      ]]}
99
                    ]}
100
                  ]]}
101
                ]}
102
              }
103
            ]}
104
          ]}
105
        , {
106
          "declaration" : ["SIGNAL_DECLARATION", {
107
            "names" : [["IDENTIFIER", "ram"]], "typ" : {
108
              "name" : ["SIMPLE_NAME", "ram_type"]}
109
            , "init_val" : ["EXPRESSION", {
110
              "args" : [["EXPRESSION", {
111
                "args" : [["EXPRESSION", {
112
                  "args" : [["EXPRESSION", {
113
                    "args" : [["AGGREGATE", {
114
                      "elems" : [{
115
                        "expr" : ["EXPRESSION", {
116
                          "args" : [["EXPRESSION", {
117
                            "args" : [["EXPRESSION", {
118
                              "args" : [["EXPRESSION", {
119
                                "args" : [["CONSTANT_VALUE", {
120
                                  "value" : ["CST_LITERAL", "\"00000111\""]}
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", "\"00000111\""]}
133
                                ]]}
134
                              ]]}
135
                            ]]}
136
                          ]]}
137
                        ]}
138
                      ]}
139
                    ]]}
140
                  ]]}
141
                ]]}
142
              ]]}
143
            ]}
144
          ]}
145
        , {
146
          "declaration" : ["SUBPROGRAM_BODY", {
147
            "spec" : {
148
              "name" : "to_integer", "subprogram_type" : "function", "parameters" : [{
149
                "names" : [["IDENTIFIER", "B"]], "typ" : {
150
                  "name" : ["SIMPLE_NAME", "std_logic"]}
151
                }
152
              ], "typeMark" : ["SIMPLE_NAME", "integer"], "isPure" : false}
153
            , "decl_part" : [["VARIABLE_DECLARATION", {
154
              "names" : [["IDENTIFIER", "V"]], "typ" : {
155
                "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
156
                  "ranges" : [["RANGE_WITH_DIRECTION", {
157
                    "direction" : "to", "from" : ["EXPRESSION", {
158
                      "args" : [["EXPRESSION", {
159
                        "args" : [["CONSTANT_VALUE", {
160
                          "value" : ["CST_LITERAL", "0"]}
161
                        ]]}
162
                      ]]}
163
                    ], "_to" : ["EXPRESSION", {
164
                      "args" : [["EXPRESSION", {
165
                        "args" : [["CONSTANT_VALUE", {
166
                          "value" : ["CST_LITERAL", "0"]}
167
                        ]]}
168
                      ]]}
169
                    ]}
170
                  ]]}
171
                ]}
172
              }
173
            ]], "stmts" : [["VARIABLE_ASSIGNMENT_STATEMENT", {
174
              "lhs" : ["INDEXED_NAME", {
175
                "id" : ["SIMPLE_NAME", "V"], "exprs" : [["EXPRESSION", {
176
                  "args" : [["EXPRESSION", {
177
                    "args" : [["EXPRESSION", {
178
                      "args" : [["EXPRESSION", {
179
                        "args" : [["CONSTANT_VALUE", {
180
                          "value" : ["CST_LITERAL", "0"]}
181
                        ]]}
182
                      ]]}
183
                    ]]}
184
                  ]]}
185
                ]]}
186
              ], "rhs" : ["EXPRESSION", {
187
                "args" : [["EXPRESSION", {
188
                  "args" : [["EXPRESSION", {
189
                    "args" : [["EXPRESSION", {
190
                      "args" : [["CALL", ["SIMPLE_NAME", "B"]]]}
191
                    ]]}
192
                  ]]}
193
                ]]}
194
              ]}
195
            ], ["RETURN_STATEMENT", {
196
              "expr" : ["EXPRESSION", {
197
                "args" : [["EXPRESSION", {
198
                  "args" : [["EXPRESSION", {
199
                    "args" : [["EXPRESSION", {
200
                      "args" : [["CALL", ["INDEXED_NAME", {
201
                        "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
202
                          "args" : [["EXPRESSION", {
203
                            "args" : [["EXPRESSION", {
204
                              "args" : [["EXPRESSION", {
205
                                "args" : [["CALL", ["INDEXED_NAME", {
206
                                  "id" : ["SIMPLE_NAME", "unsigned"], "exprs" : [["EXPRESSION", {
207
                                    "args" : [["EXPRESSION", {
208
                                      "args" : [["EXPRESSION", {
209
                                        "args" : [["EXPRESSION", {
210
                                          "args" : [["CALL", ["SIMPLE_NAME", "V"]]]}
211
                                        ]]}
212
                                      ]]}
213
                                    ]]}
214
                                  ]]}
215
                                ]]]}
216
                              ]]}
217
                            ]]}
218
                          ]]}
219
                        ]]}
220
                      ]]]}
221
                    ]]}
222
                  ]]}
223
                ]]}
224
              ]}
225
            ]]}
226
          ]}
227
        , {
228
          "declaration" : ["SUBPROGRAM_BODY", {
229
            "spec" : {
230
              "name" : "to_integer", "subprogram_type" : "function", "parameters" : [{
231
                "names" : [["IDENTIFIER", "V"]], "typ" : {
232
                  "name" : ["SIMPLE_NAME", "std_logic_vector"]}
233
                }
234
              ], "typeMark" : ["SIMPLE_NAME", "integer"], "isPure" : false}
235
            , "stmts" : [["RETURN_STATEMENT", {
236
              "expr" : ["EXPRESSION", {
237
                "args" : [["EXPRESSION", {
238
                  "args" : [["EXPRESSION", {
239
                    "args" : [["EXPRESSION", {
240
                      "args" : [["CALL", ["INDEXED_NAME", {
241
                        "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
242
                          "args" : [["EXPRESSION", {
243
                            "args" : [["EXPRESSION", {
244
                              "args" : [["EXPRESSION", {
245
                                "args" : [["CALL", ["INDEXED_NAME", {
246
                                  "id" : ["SIMPLE_NAME", "unsigned"], "exprs" : [["EXPRESSION", {
247
                                    "args" : [["EXPRESSION", {
248
                                      "args" : [["EXPRESSION", {
249
                                        "args" : [["EXPRESSION", {
250
                                          "args" : [["CALL", ["SIMPLE_NAME", "V"]]]}
251
                                        ]]}
252
                                      ]]}
253
                                    ]]}
254
                                  ]]}
255
                                ]]]}
256
                              ]]}
257
                            ]]}
258
                          ]]}
259
                        ]]}
260
                      ]]]}
261
                    ]]}
262
                  ]]}
263
                ]]}
264
              ]}
265
            ]]}
266
          ]}
267
        ], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
268
          "active_sigs" : [["SIMPLE_NAME", "clk"]], "PROCESS_STATEMENT_PART" : [["IF_STATEMENT", {
269
            "if_cases" : [{
270
              "if_cond" : ["EXPRESSION", {
271
                "args" : [["EXPRESSION", {
272
                  "args" : [["EXPRESSION", {
273
                    "args" : [["EXPRESSION", {
274
                      "args" : [["CALL", ["INDEXED_NAME", {
275
                        "id" : ["SIMPLE_NAME", "rising_edge"], "exprs" : [["EXPRESSION", {
276
                          "args" : [["EXPRESSION", {
277
                            "args" : [["EXPRESSION", {
278
                              "args" : [["EXPRESSION", {
279
                                "args" : [["CALL", ["SIMPLE_NAME", "clk"]]]}
280
                              ]]}
281
                            ]]}
282
                          ]]}
283
                        ]]}
284
                      ]]]}
285
                    ]]}
286
                  ]]}
287
                ]]}
288
              ], "if_block" : [["IF_STATEMENT", {
289
                "if_cases" : [{
290
                  "if_cond" : ["EXPRESSION", {
291
                    "id" : "=", "args" : [["EXPRESSION", {
292
                      "args" : [["EXPRESSION", {
293
                        "args" : [["EXPRESSION", {
294
                          "args" : [["CALL", ["SIMPLE_NAME", "wa0_en"]]]}
295
                        ]]}
296
                      ]]}
297
                    ], ["EXPRESSION", {
298
                      "args" : [["EXPRESSION", {
299
                        "args" : [["EXPRESSION", {
300
                          "args" : [["CONSTANT_VALUE", {
301
                            "value" : ["CST_LITERAL", "'1'"]}
302
                          ]]}
303
                        ]]}
304
                      ]]}
305
                    ]]}
306
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
307
                    "lhs" : ["INDEXED_NAME", {
308
                      "id" : ["SIMPLE_NAME", "ram"], "exprs" : [["EXPRESSION", {
309
                        "args" : [["EXPRESSION", {
310
                          "args" : [["EXPRESSION", {
311
                            "args" : [["EXPRESSION", {
312
                              "args" : [["CALL", ["INDEXED_NAME", {
313
                                "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
314
                                  "args" : [["EXPRESSION", {
315
                                    "args" : [["EXPRESSION", {
316
                                      "args" : [["EXPRESSION", {
317
                                        "args" : [["CALL", ["SIMPLE_NAME", "wa0_addr"]]]}
318
                                      ]]}
319
                                    ]]}
320
                                  ]]}
321
                                ]]}
322
                              ]]]}
323
                            ]]}
324
                          ]]}
325
                        ]]}
326
                      ]]}
327
                    ], "rhs" : [{
328
                      "value" : ["EXPRESSION", {
329
                        "args" : [["EXPRESSION", {
330
                          "args" : [["EXPRESSION", {
331
                            "args" : [["EXPRESSION", {
332
                              "args" : [["CALL", ["SIMPLE_NAME", "wa0_data"]]]}
333
                            ]]}
334
                          ]]}
335
                        ]]}
336
                      ]}
337
                    ]}
338
                  ]]}
339
                ]}
340
              ]]}
341
            ]}
342
          ]]}
343
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
344
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "ra0_data"], "rhs" : [{
345
            "expr" : [{
346
              "value" : ["EXPRESSION", {
347
                "args" : [["EXPRESSION", {
348
                  "args" : [["EXPRESSION", {
349
                    "args" : [["EXPRESSION", {
350
                      "args" : [["CALL", ["INDEXED_NAME", {
351
                        "id" : ["SIMPLE_NAME", "ram"], "exprs" : [["EXPRESSION", {
352
                          "args" : [["EXPRESSION", {
353
                            "args" : [["EXPRESSION", {
354
                              "args" : [["EXPRESSION", {
355
                                "args" : [["CALL", ["INDEXED_NAME", {
356
                                  "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
357
                                    "args" : [["EXPRESSION", {
358
                                      "args" : [["EXPRESSION", {
359
                                        "args" : [["EXPRESSION", {
360
                                          "args" : [["CALL", ["SIMPLE_NAME", "ra0_addr"]]]}
361
                                        ]]}
362
                                      ]]}
363
                                    ]]}
364
                                  ]]}
365
                                ]]]}
366
                              ]]}
367
                            ]]}
368
                          ]]}
369
                        ]]}
370
                      ]]]}
371
                    ]]}
372
                  ]]}
373
                ]]}
374
              ]}
375
            ]}
376
          ]}
377
        ]]}
378
      ]}
379
    ]}
380
  }