Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (12.5 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", "shl_211"], "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", "shl_211"], "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
              }
153
            ]]}
154
          ]}
155
        , {
156
          "declaration" : ["SUBPROGRAM_BODY", {
157
            "spec" : {
158
              "name" : "to_integer", "subprogram_type" : "function", "parameters" : [{
159
                "names" : [["IDENTIFIER", "V"]], "typ" : {
160
                  "name" : ["SIMPLE_NAME", "std_logic_vector"]}
161
                }
162
              ], "typeMark" : ["SIMPLE_NAME", "integer"], "isPure" : false}
163
            , "stmts" : [["RETURN_STATEMENT", {
164
              }
165
            ]]}
166
          ]}
167
        ], "ARCHITECTURE_STATEMENT_PART" : [["CONDITIONAL_SIGNAL_ASSIGNMENT", {
168
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "tmp_padding"], "rhs" : [{
169
            "expr" : [{
170
              "value" : ["EXPRESSION", {
171
                "args" : [["EXPRESSION", {
172
                  "args" : [["EXPRESSION", {
173
                    "args" : [["EXPRESSION", {
174
                      "args" : [["CALL", ["SIMPLE_NAME", "padding"]]]}
175
                    ]]}
176
                  ]]}
177
                ]]}
178
              ]}
179
            ]}
180
          ]}
181
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
182
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "tmp_result"], "rhs" : [{
183
            "expr" : [{
184
              "value" : ["EXPRESSION", {
185
                "args" : [["EXPRESSION", {
186
                  "args" : [["EXPRESSION", {
187
                    "args" : [["EXPRESSION", {
188
                      "args" : [["CALL", ["FUNCTION_CALL", {
189
                        "id" : ["SIMPLE_NAME", "std_logic_vector"], "assoc_list" : [{
190
                          "actual_expr" : ["EXPRESSION", {
191
                            "args" : [["EXPRESSION", {
192
                              "args" : [["EXPRESSION", {
193
                                "args" : [["EXPRESSION", {
194
                                  "args" : [["CALL", ["FUNCTION_CALL", {
195
                                    "id" : ["SIMPLE_NAME", "shift_left"], "assoc_list" : [{
196
                                      "actual_expr" : ["EXPRESSION", {
197
                                        "args" : [["EXPRESSION", {
198
                                          "args" : [["EXPRESSION", {
199
                                            "args" : [["EXPRESSION", {
200
                                              "args" : [["CALL", ["FUNCTION_CALL", {
201
                                                "id" : ["SIMPLE_NAME", "unsigned"], "assoc_list" : [{
202
                                                  "actual_expr" : ["EXPRESSION", {
203
                                                    "args" : [["EXPRESSION", {
204
                                                      "args" : [["EXPRESSION", {
205
                                                        "args" : [["EXPRESSION", {
206
                                                          "id" : "&", "args" : [["EXPRESSION", {
207
                                                            "args" : [["CALL", ["SIMPLE_NAME", "input"]]]}
208
                                                          ], ["EXPRESSION", {
209
                                                            "args" : [["CALL", ["SIMPLE_NAME", "padding"]]]}
210
                                                          ]]}
211
                                                        ]]}
212
                                                      ]]}
213
                                                    ]]}
214
                                                  ]}
215
                                                ]}
216
                                              ]]]}
217
                                            ]]}
218
                                          ]]}
219
                                        ]]}
220
                                      ]}
221
                                    , {
222
                                      "actual_expr" : ["EXPRESSION", {
223
                                        "args" : [["EXPRESSION", {
224
                                          "args" : [["EXPRESSION", {
225
                                            "args" : [["EXPRESSION", {
226
                                              "args" : [["CALL", ["FUNCTION_CALL", {
227
                                                "id" : ["SIMPLE_NAME", "to_integer"], "assoc_list" : [{
228
                                                  "actual_designator" : ["SIMPLE_NAME", "shift"]}
229
                                                ]}
230
                                              ]]]}
231
                                            ]]}
232
                                          ]]}
233
                                        ]]}
234
                                      ]}
235
                                    ]}
236
                                  ]]]}
237
                                ]]}
238
                              ]]}
239
                            ]]}
240
                          ]}
241
                        ]}
242
                      ]]]}
243
                    ]]}
244
                  ]]}
245
                ]]}
246
              ]}
247
            ]}
248
          ]}
249
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
250
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "output"], "rhs" : [{
251
            "expr" : [{
252
              "value" : ["EXPRESSION", {
253
                "args" : [["EXPRESSION", {
254
                  "args" : [["EXPRESSION", {
255
                    "args" : [["EXPRESSION", {
256
                      "args" : [["CALL", ["SLICE_NAME", {
257
                        "id" : ["SIMPLE_NAME", "tmp_result"], "range" : ["RANGE_WITH_DIRECTION", {
258
                          "direction" : "downto", "from" : ["EXPRESSION", {
259
                            "args" : [["EXPRESSION", {
260
                              "args" : [["CONSTANT_VALUE", {
261
                                "value" : ["CST_LITERAL", "32"]}
262
                              ]]}
263
                            ]]}
264
                          ], "_to" : ["EXPRESSION", {
265
                            "args" : [["EXPRESSION", {
266
                              "args" : [["CONSTANT_VALUE", {
267
                                "value" : ["CST_LITERAL", "1"]}
268
                              ]]}
269
                            ]]}
270
                          ]}
271
                        ]}
272
                      ]]]}
273
                    ]]}
274
                  ]]}
275
                ]]}
276
              ]}
277
            ]}
278
          ]}
279
        ]]}
280
      ]}
281
    ]}
282
  }