Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (15 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", "shr_212"], "ports" : [{
6
          "names" : [["IDENTIFIER", "output"]], "mode" : ["out"], "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", "31"]}
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", "input"]], "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", "31"]}
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", "shift"]], "mode" : ["in"], "typ" : {
47
            "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
48
              "ranges" : [["RANGE_WITH_DIRECTION", {
49
                "direction" : "downto", "from" : ["EXPRESSION", {
50
                  "args" : [["EXPRESSION", {
51
                    "args" : [["CONSTANT_VALUE", {
52
                      "value" : ["CST_LITERAL", "5"]}
53
                    ]]}
54
                  ]]}
55
                ], "_to" : ["EXPRESSION", {
56
                  "args" : [["EXPRESSION", {
57
                    "args" : [["CONSTANT_VALUE", {
58
                      "value" : ["CST_LITERAL", "0"]}
59
                    ]]}
60
                  ]]}
61
                ]}
62
              ]]}
63
            ]}
64
          }
65
        , {
66
          "names" : [["IDENTIFIER", "padding"]], "mode" : ["in"], "typ" : {
67
            "name" : ["SIMPLE_NAME", "std_logic"]}
68
          }
69
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
70
      ]}
71
    , {
72
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
73
        "name" : ["IDENTIFIER", "augh"], "entity" : ["IDENTIFIER", "shr_212"], "ARCHITECTURE_DECLARATIVE_PART" : [{
74
          "declaration" : ["SIGNAL_DECLARATION", {
75
            "names" : [["IDENTIFIER", "tmp_padding"]], "typ" : {
76
              "name" : ["SIMPLE_NAME", "std_logic"]}
77
            }
78
          ]}
79
        , {
80
          "declaration" : ["SIGNAL_DECLARATION", {
81
            "names" : [["IDENTIFIER", "tmp_result"]], "typ" : {
82
              "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
83
                "ranges" : [["RANGE_WITH_DIRECTION", {
84
                  "direction" : "downto", "from" : ["EXPRESSION", {
85
                    "args" : [["EXPRESSION", {
86
                      "args" : [["CONSTANT_VALUE", {
87
                        "value" : ["CST_LITERAL", "32"]}
88
                      ]]}
89
                    ]]}
90
                  ], "_to" : ["EXPRESSION", {
91
                    "args" : [["EXPRESSION", {
92
                      "args" : [["CONSTANT_VALUE", {
93
                        "value" : ["CST_LITERAL", "0"]}
94
                      ]]}
95
                    ]]}
96
                  ]}
97
                ]]}
98
              ]}
99
            }
100
          ]}
101
        , {
102
          "declaration" : ["SUBPROGRAM_BODY", {
103
            "spec" : {
104
              "name" : "to_integer", "subprogram_type" : "function", "parameters" : [{
105
                "names" : [["IDENTIFIER", "B"]], "typ" : {
106
                  "name" : ["SIMPLE_NAME", "std_logic"]}
107
                }
108
              ], "typeMark" : ["SIMPLE_NAME", "integer"], "isPure" : false}
109
            , "decl_part" : [["VARIABLE_DECLARATION", {
110
              "names" : [["IDENTIFIER", "V"]], "typ" : {
111
                "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
112
                  "ranges" : [["RANGE_WITH_DIRECTION", {
113
                    "direction" : "to", "from" : ["EXPRESSION", {
114
                      "args" : [["EXPRESSION", {
115
                        "args" : [["CONSTANT_VALUE", {
116
                          "value" : ["CST_LITERAL", "0"]}
117
                        ]]}
118
                      ]]}
119
                    ], "_to" : ["EXPRESSION", {
120
                      "args" : [["EXPRESSION", {
121
                        "args" : [["CONSTANT_VALUE", {
122
                          "value" : ["CST_LITERAL", "0"]}
123
                        ]]}
124
                      ]]}
125
                    ]}
126
                  ]]}
127
                ]}
128
              }
129
            ]], "stmts" : [["VARIABLE_ASSIGNMENT_STATEMENT", {
130
              "lhs" : ["INDEXED_NAME", {
131
                "id" : ["SIMPLE_NAME", "V"], "exprs" : [["EXPRESSION", {
132
                  "args" : [["EXPRESSION", {
133
                    "args" : [["EXPRESSION", {
134
                      "args" : [["EXPRESSION", {
135
                        "args" : [["CONSTANT_VALUE", {
136
                          "value" : ["CST_LITERAL", "0"]}
137
                        ]]}
138
                      ]]}
139
                    ]]}
140
                  ]]}
141
                ]]}
142
              ], "rhs" : ["EXPRESSION", {
143
                "args" : [["EXPRESSION", {
144
                  "args" : [["EXPRESSION", {
145
                    "args" : [["EXPRESSION", {
146
                      "args" : [["CALL", ["SIMPLE_NAME", "B"]]]}
147
                    ]]}
148
                  ]]}
149
                ]]}
150
              ]}
151
            ], ["RETURN_STATEMENT", {
152
              "expr" : ["EXPRESSION", {
153
                "args" : [["EXPRESSION", {
154
                  "args" : [["EXPRESSION", {
155
                    "args" : [["EXPRESSION", {
156
                      "args" : [["CALL", ["INDEXED_NAME", {
157
                        "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
158
                          "args" : [["EXPRESSION", {
159
                            "args" : [["EXPRESSION", {
160
                              "args" : [["EXPRESSION", {
161
                                "args" : [["CALL", ["INDEXED_NAME", {
162
                                  "id" : ["SIMPLE_NAME", "unsigned"], "exprs" : [["EXPRESSION", {
163
                                    "args" : [["EXPRESSION", {
164
                                      "args" : [["EXPRESSION", {
165
                                        "args" : [["EXPRESSION", {
166
                                          "args" : [["CALL", ["SIMPLE_NAME", "V"]]]}
167
                                        ]]}
168
                                      ]]}
169
                                    ]]}
170
                                  ]]}
171
                                ]]]}
172
                              ]]}
173
                            ]]}
174
                          ]]}
175
                        ]]}
176
                      ]]]}
177
                    ]]}
178
                  ]]}
179
                ]]}
180
              ]}
181
            ]]}
182
          ]}
183
        , {
184
          "declaration" : ["SUBPROGRAM_BODY", {
185
            "spec" : {
186
              "name" : "to_integer", "subprogram_type" : "function", "parameters" : [{
187
                "names" : [["IDENTIFIER", "V"]], "typ" : {
188
                  "name" : ["SIMPLE_NAME", "std_logic_vector"]}
189
                }
190
              ], "typeMark" : ["SIMPLE_NAME", "integer"], "isPure" : false}
191
            , "stmts" : [["RETURN_STATEMENT", {
192
              "expr" : ["EXPRESSION", {
193
                "args" : [["EXPRESSION", {
194
                  "args" : [["EXPRESSION", {
195
                    "args" : [["EXPRESSION", {
196
                      "args" : [["CALL", ["INDEXED_NAME", {
197
                        "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
198
                          "args" : [["EXPRESSION", {
199
                            "args" : [["EXPRESSION", {
200
                              "args" : [["EXPRESSION", {
201
                                "args" : [["CALL", ["INDEXED_NAME", {
202
                                  "id" : ["SIMPLE_NAME", "unsigned"], "exprs" : [["EXPRESSION", {
203
                                    "args" : [["EXPRESSION", {
204
                                      "args" : [["EXPRESSION", {
205
                                        "args" : [["EXPRESSION", {
206
                                          "args" : [["CALL", ["SIMPLE_NAME", "V"]]]}
207
                                        ]]}
208
                                      ]]}
209
                                    ]]}
210
                                  ]]}
211
                                ]]]}
212
                              ]]}
213
                            ]]}
214
                          ]]}
215
                        ]]}
216
                      ]]]}
217
                    ]]}
218
                  ]]}
219
                ]]}
220
              ]}
221
            ]]}
222
          ]}
223
        ], "ARCHITECTURE_STATEMENT_PART" : [["CONDITIONAL_SIGNAL_ASSIGNMENT", {
224
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "tmp_padding"], "rhs" : [{
225
            "expr" : [{
226
              "value" : ["EXPRESSION", {
227
                "args" : [["EXPRESSION", {
228
                  "args" : [["EXPRESSION", {
229
                    "args" : [["EXPRESSION", {
230
                      "args" : [["CALL", ["SIMPLE_NAME", "padding"]]]}
231
                    ]]}
232
                  ]]}
233
                ]]}
234
              ]}
235
            ]}
236
          ]}
237
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
238
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "tmp_result"], "rhs" : [{
239
            "expr" : [{
240
              "value" : ["EXPRESSION", {
241
                "args" : [["EXPRESSION", {
242
                  "args" : [["EXPRESSION", {
243
                    "args" : [["EXPRESSION", {
244
                      "args" : [["CALL", ["INDEXED_NAME", {
245
                        "id" : ["SIMPLE_NAME", "std_logic_vector"], "exprs" : [["EXPRESSION", {
246
                          "args" : [["EXPRESSION", {
247
                            "args" : [["EXPRESSION", {
248
                              "args" : [["EXPRESSION", {
249
                                "args" : [["CALL", ["INDEXED_NAME", {
250
                                  "id" : ["SIMPLE_NAME", "shift_right"], "exprs" : [["EXPRESSION", {
251
                                    "args" : [["EXPRESSION", {
252
                                      "args" : [["EXPRESSION", {
253
                                        "args" : [["EXPRESSION", {
254
                                          "args" : [["CALL", ["INDEXED_NAME", {
255
                                            "id" : ["SIMPLE_NAME", "unsigned"], "exprs" : [["EXPRESSION", {
256
                                              "args" : [["EXPRESSION", {
257
                                                "args" : [["EXPRESSION", {
258
                                                  "args" : [["EXPRESSION", {
259
                                                    "id" : "&", "args" : [["EXPRESSION", {
260
                                                      "args" : [["CALL", ["SIMPLE_NAME", "padding"]]]}
261
                                                    ], ["EXPRESSION", {
262
                                                      "args" : [["CALL", ["SIMPLE_NAME", "input"]]]}
263
                                                    ]]}
264
                                                  ]]}
265
                                                ]]}
266
                                              ]]}
267
                                            ]]}
268
                                          ]]]}
269
                                        ]]}
270
                                      ]]}
271
                                    ]]}
272
                                  ], ["EXPRESSION", {
273
                                    "args" : [["EXPRESSION", {
274
                                      "args" : [["EXPRESSION", {
275
                                        "args" : [["EXPRESSION", {
276
                                          "args" : [["CALL", ["INDEXED_NAME", {
277
                                            "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
278
                                              "args" : [["EXPRESSION", {
279
                                                "args" : [["EXPRESSION", {
280
                                                  "args" : [["EXPRESSION", {
281
                                                    "args" : [["CALL", ["SIMPLE_NAME", "shift"]]]}
282
                                                  ]]}
283
                                                ]]}
284
                                              ]]}
285
                                            ]]}
286
                                          ]]]}
287
                                        ]]}
288
                                      ]]}
289
                                    ]]}
290
                                  ]]}
291
                                ]]]}
292
                              ]]}
293
                            ]]}
294
                          ]]}
295
                        ]]}
296
                      ]]]}
297
                    ]]}
298
                  ]]}
299
                ]]}
300
              ]}
301
            ]}
302
          ]}
303
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
304
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "output"], "rhs" : [{
305
            "expr" : [{
306
              "value" : ["EXPRESSION", {
307
                "args" : [["EXPRESSION", {
308
                  "args" : [["EXPRESSION", {
309
                    "args" : [["EXPRESSION", {
310
                      "args" : [["CALL", ["SLICE_NAME", {
311
                        "id" : ["SIMPLE_NAME", "tmp_result"], "range" : ["RANGE_WITH_DIRECTION", {
312
                          "direction" : "downto", "from" : ["EXPRESSION", {
313
                            "args" : [["EXPRESSION", {
314
                              "args" : [["CONSTANT_VALUE", {
315
                                "value" : ["CST_LITERAL", "31"]}
316
                              ]]}
317
                            ]]}
318
                          ], "_to" : ["EXPRESSION", {
319
                            "args" : [["EXPRESSION", {
320
                              "args" : [["CONSTANT_VALUE", {
321
                                "value" : ["CST_LITERAL", "0"]}
322
                              ]]}
323
                            ]]}
324
                          ]}
325
                        ]}
326
                      ]]]}
327
                    ]]}
328
                  ]]}
329
                ]]}
330
              ]}
331
            ]}
332
          ]}
333
        ]]}
334
      ]}
335
    ]}
336
  }