Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (12.8 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"]]]]], ["USE_CLAUSE", [["SELECTED_NAME", [["SIMPLE_NAME", "IEEE"], ["SIMPLE_NAME", "numeric_std"]]]]]], "library" : ["ENTITY_DECLARATION", {
5
        "name" : ["IDENTIFIER", "demo"], "ports" : [{
6
          "names" : [["IDENTIFIER", "clk"], ["IDENTIFIER", "reset"]], "mode" : ["in"], "typ" : {
7
            "name" : ["SIMPLE_NAME", "std_logic"]}
8
          }
9
        , {
10
          "names" : [["IDENTIFIER", "load"]], "mode" : ["in"], "typ" : {
11
            "name" : ["SIMPLE_NAME", "std_logic"]}
12
          }
13
        , {
14
          "names" : [["IDENTIFIER", "load_val"]], "mode" : ["in"], "typ" : {
15
            "name" : ["SIMPLE_NAME", "unsigned"], "const" : ["INDEX_CONSTRAINT", {
16
              "ranges" : [["RANGE_WITH_DIRECTION", {
17
                "direction" : "downto", "from" : ["EXPRESSION", {
18
                  "args" : [["EXPRESSION", {
19
                    "args" : [["CONSTANT_VALUE", {
20
                      "value" : ["CST_LITERAL", "7"]}
21
                    ]]}
22
                  ]]}
23
                ], "_to" : ["EXPRESSION", {
24
                  "args" : [["EXPRESSION", {
25
                    "args" : [["CONSTANT_VALUE", {
26
                      "value" : ["CST_LITERAL", "0"]}
27
                    ]]}
28
                  ]]}
29
                ]}
30
              ]]}
31
            ]}
32
          }
33
        , {
34
          "names" : [["IDENTIFIER", "qout"]], "mode" : ["out"], "typ" : {
35
            "name" : ["SIMPLE_NAME", "unsigned"], "const" : ["INDEX_CONSTRAINT", {
36
              "ranges" : [["RANGE_WITH_DIRECTION", {
37
                "direction" : "downto", "from" : ["EXPRESSION", {
38
                  "args" : [["EXPRESSION", {
39
                    "args" : [["CONSTANT_VALUE", {
40
                      "value" : ["CST_LITERAL", "7"]}
41
                    ]]}
42
                  ]]}
43
                ], "_to" : ["EXPRESSION", {
44
                  "args" : [["EXPRESSION", {
45
                    "args" : [["CONSTANT_VALUE", {
46
                      "value" : ["CST_LITERAL", "0"]}
47
                    ]]}
48
                  ]]}
49
                ]}
50
              ]]}
51
            ]}
52
          }
53
        , {
54
          "names" : [["IDENTIFIER", "is5"]], "mode" : ["out"], "typ" : {
55
            "name" : ["SIMPLE_NAME", "std_logic"]}
56
          }
57
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
58
      ]}
59
    , {
60
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
61
        "name" : ["IDENTIFIER", "v1"], "entity" : ["IDENTIFIER", "demo"], "ARCHITECTURE_DECLARATIVE_PART" : [{
62
          "declaration" : ["SIGNAL_DECLARATION", {
63
            "names" : [["IDENTIFIER", "q"]], "typ" : {
64
              "name" : ["SIMPLE_NAME", "unsigned"], "const" : ["INDEX_CONSTRAINT", {
65
                "ranges" : [["RANGE_WITH_DIRECTION", {
66
                  "direction" : "downto", "from" : ["EXPRESSION", {
67
                    "args" : [["EXPRESSION", {
68
                      "args" : [["CONSTANT_VALUE", {
69
                        "value" : ["CST_LITERAL", "7"]}
70
                      ]]}
71
                    ]]}
72
                  ], "_to" : ["EXPRESSION", {
73
                    "args" : [["EXPRESSION", {
74
                      "args" : [["CONSTANT_VALUE", {
75
                        "value" : ["CST_LITERAL", "0"]}
76
                      ]]}
77
                    ]]}
78
                  ]}
79
                ]]}
80
              ]}
81
            }
82
          ]}
83
        ], "ARCHITECTURE_STATEMENT_PART" : [["CONDITIONAL_SIGNAL_ASSIGNMENT", {
84
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "qout"], "rhs" : [{
85
            "expr" : [{
86
              "value" : ["EXPRESSION", {
87
                "args" : [["EXPRESSION", {
88
                  "args" : [["EXPRESSION", {
89
                    "args" : [["EXPRESSION", {
90
                      "args" : [["CALL", ["SIMPLE_NAME", "q"]]]}
91
                    ]]}
92
                  ]]}
93
                ]]}
94
              ]}
95
            ]}
96
          ]}
97
        ], ["PROCESS_STATEMENT", {
98
          "active_sigs" : [["SIMPLE_NAME", "clk"], ["SIMPLE_NAME", "reset"]], "PROCESS_STATEMENT_PART" : [["IF_STATEMENT", {
99
            "if_cases" : [{
100
              "if_cond" : ["EXPRESSION", {
101
                "id" : "=", "args" : [["EXPRESSION", {
102
                  "args" : [["EXPRESSION", {
103
                    "args" : [["EXPRESSION", {
104
                      "args" : [["CALL", ["SIMPLE_NAME", "reset"]]]}
105
                    ]]}
106
                  ]]}
107
                ], ["EXPRESSION", {
108
                  "args" : [["EXPRESSION", {
109
                    "args" : [["EXPRESSION", {
110
                      "args" : [["CONSTANT_VALUE", {
111
                        "value" : ["CST_LITERAL", "'1'"]}
112
                      ]]}
113
                    ]]}
114
                  ]]}
115
                ]]}
116
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
117
                "lhs" : ["SIMPLE_NAME", "q"], "rhs" : [{
118
                  "value" : ["EXPRESSION", {
119
                    "args" : [["EXPRESSION", {
120
                      "args" : [["EXPRESSION", {
121
                        "args" : [["EXPRESSION", {
122
                          "args" : [["AGGREGATE", {
123
                            "elems" : [{
124
                              "choices" : [["OTHERS"]], "expr" : ["EXPRESSION", {
125
                                "args" : [["EXPRESSION", {
126
                                  "args" : [["EXPRESSION", {
127
                                    "args" : [["EXPRESSION", {
128
                                      "args" : [["CONSTANT_VALUE", {
129
                                        "value" : ["CST_LITERAL", "'0'"]}
130
                                      ]]}
131
                                    ]]}
132
                                  ]]}
133
                                ]]}
134
                              ]}
135
                            ]}
136
                          ]]}
137
                        ]]}
138
                      ]]}
139
                    ]]}
140
                  ]}
141
                ]}
142
              ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
143
                "lhs" : ["SIMPLE_NAME", "is5"], "rhs" : [{
144
                  "value" : ["EXPRESSION", {
145
                    "args" : [["EXPRESSION", {
146
                      "args" : [["EXPRESSION", {
147
                        "args" : [["EXPRESSION", {
148
                          "args" : [["CONSTANT_VALUE", {
149
                            "value" : ["CST_LITERAL", "'0'"]}
150
                          ]]}
151
                        ]]}
152
                      ]]}
153
                    ]]}
154
                  ]}
155
                ]}
156
              ]]}
157
            , {
158
              "if_cond" : ["EXPRESSION", {
159
                "args" : [["EXPRESSION", {
160
                  "args" : [["EXPRESSION", {
161
                    "args" : [["EXPRESSION", {
162
                      "args" : [["CALL", ["FUNCTION_CALL", {
163
                        "id" : ["SIMPLE_NAME", "rising_edge"], "assoc_list" : [{
164
                          "actual_designator" : ["SIMPLE_NAME", "clk"]}
165
                        ]}
166
                      ]]]}
167
                    ]]}
168
                  ]]}
169
                ]]}
170
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
171
                "lhs" : ["SIMPLE_NAME", "is5"], "rhs" : [{
172
                  "value" : ["EXPRESSION", {
173
                    "args" : [["EXPRESSION", {
174
                      "args" : [["EXPRESSION", {
175
                        "args" : [["EXPRESSION", {
176
                          "args" : [["CONSTANT_VALUE", {
177
                            "value" : ["CST_LITERAL", "'0'"]}
178
                          ]]}
179
                        ]]}
180
                      ]]}
181
                    ]]}
182
                  ]}
183
                ]}
184
              ], ["IF_STATEMENT", {
185
                "if_cases" : [{
186
                  "if_cond" : ["EXPRESSION", {
187
                    "id" : "=", "args" : [["EXPRESSION", {
188
                      "args" : [["EXPRESSION", {
189
                        "args" : [["EXPRESSION", {
190
                          "args" : [["CALL", ["SIMPLE_NAME", "q"]]]}
191
                        ]]}
192
                      ]]}
193
                    ], ["EXPRESSION", {
194
                      "args" : [["EXPRESSION", {
195
                        "args" : [["EXPRESSION", {
196
                          "args" : [["CONSTANT_VALUE", {
197
                            "value" : ["CST_LITERAL", "x\"04\""]}
198
                          ]]}
199
                        ]]}
200
                      ]]}
201
                    ]]}
202
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
203
                    "lhs" : ["SIMPLE_NAME", "is5"], "rhs" : [{
204
                      "value" : ["EXPRESSION", {
205
                        "args" : [["EXPRESSION", {
206
                          "args" : [["EXPRESSION", {
207
                            "args" : [["EXPRESSION", {
208
                              "args" : [["CONSTANT_VALUE", {
209
                                "value" : ["CST_LITERAL", "'1'"]}
210
                              ]]}
211
                            ]]}
212
                          ]]}
213
                        ]]}
214
                      ]}
215
                    ]}
216
                  ]]}
217
                ]}
218
              ], ["IF_STATEMENT", {
219
                "if_cases" : [{
220
                  "if_cond" : ["EXPRESSION", {
221
                    "id" : "=", "args" : [["EXPRESSION", {
222
                      "args" : [["EXPRESSION", {
223
                        "args" : [["EXPRESSION", {
224
                          "args" : [["CALL", ["SIMPLE_NAME", "load"]]]}
225
                        ]]}
226
                      ]]}
227
                    ], ["EXPRESSION", {
228
                      "args" : [["EXPRESSION", {
229
                        "args" : [["EXPRESSION", {
230
                          "args" : [["CONSTANT_VALUE", {
231
                            "value" : ["CST_LITERAL", "'1'"]}
232
                          ]]}
233
                        ]]}
234
                      ]]}
235
                    ]]}
236
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
237
                    "lhs" : ["SIMPLE_NAME", "q"], "rhs" : [{
238
                      "value" : ["EXPRESSION", {
239
                        "args" : [["EXPRESSION", {
240
                          "args" : [["EXPRESSION", {
241
                            "args" : [["EXPRESSION", {
242
                              "args" : [["CALL", ["SIMPLE_NAME", "load_val"]]]}
243
                            ]]}
244
                          ]]}
245
                        ]]}
246
                      ]}
247
                    ]}
248
                  ], ["IF_STATEMENT", {
249
                    "if_cases" : [{
250
                      "if_cond" : ["EXPRESSION", {
251
                        "id" : "=", "args" : [["EXPRESSION", {
252
                          "args" : [["EXPRESSION", {
253
                            "args" : [["EXPRESSION", {
254
                              "args" : [["CALL", ["SIMPLE_NAME", "load_val"]]]}
255
                            ]]}
256
                          ]]}
257
                        ], ["EXPRESSION", {
258
                          "args" : [["EXPRESSION", {
259
                            "args" : [["EXPRESSION", {
260
                              "args" : [["CONSTANT_VALUE", {
261
                                "value" : ["CST_LITERAL", "x\"05\""]}
262
                              ]]}
263
                            ]]}
264
                          ]]}
265
                        ]]}
266
                      ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
267
                        "lhs" : ["SIMPLE_NAME", "is5"], "rhs" : [{
268
                          "value" : ["EXPRESSION", {
269
                            "args" : [["EXPRESSION", {
270
                              "args" : [["EXPRESSION", {
271
                                "args" : [["EXPRESSION", {
272
                                  "args" : [["CONSTANT_VALUE", {
273
                                    "value" : ["CST_LITERAL", "'1'"]}
274
                                  ]]}
275
                                ]]}
276
                              ]]}
277
                            ]]}
278
                          ]}
279
                        ]}
280
                      ]]}
281
                    ]}
282
                  ]]}
283
                ], "default" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
284
                  "lhs" : ["SIMPLE_NAME", "q"], "rhs" : [{
285
                    "value" : ["EXPRESSION", {
286
                      "args" : [["EXPRESSION", {
287
                        "args" : [["EXPRESSION", {
288
                          "args" : [["EXPRESSION", {
289
                            "id" : "+", "args" : [["EXPRESSION", {
290
                              "args" : [["CALL", ["SIMPLE_NAME", "q"]]]}
291
                            ], ["EXPRESSION", {
292
                              "args" : [["CONSTANT_VALUE", {
293
                                "value" : ["CST_LITERAL", "1"]}
294
                              ]]}
295
                            ]]}
296
                          ]]}
297
                        ]]}
298
                      ]]}
299
                    ]}
300
                  ]}
301
                ]]}
302
              ]]}
303
            ]}
304
          ]]}
305
        ]]}
306
      ]}
307
    ]}
308
  }