Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (13.1 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", ["INDEXED_NAME", {
163
                        "id" : ["SIMPLE_NAME", "rising_edge"], "exprs" : [["EXPRESSION", {
164
                          "args" : [["EXPRESSION", {
165
                            "args" : [["EXPRESSION", {
166
                              "args" : [["EXPRESSION", {
167
                                "args" : [["CALL", ["SIMPLE_NAME", "clk"]]]}
168
                              ]]}
169
                            ]]}
170
                          ]]}
171
                        ]]}
172
                      ]]]}
173
                    ]]}
174
                  ]]}
175
                ]]}
176
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
177
                "lhs" : ["SIMPLE_NAME", "is5"], "rhs" : [{
178
                  "value" : ["EXPRESSION", {
179
                    "args" : [["EXPRESSION", {
180
                      "args" : [["EXPRESSION", {
181
                        "args" : [["EXPRESSION", {
182
                          "args" : [["CONSTANT_VALUE", {
183
                            "value" : ["CST_LITERAL", "'0'"]}
184
                          ]]}
185
                        ]]}
186
                      ]]}
187
                    ]]}
188
                  ]}
189
                ]}
190
              ], ["IF_STATEMENT", {
191
                "if_cases" : [{
192
                  "if_cond" : ["EXPRESSION", {
193
                    "id" : "=", "args" : [["EXPRESSION", {
194
                      "args" : [["EXPRESSION", {
195
                        "args" : [["EXPRESSION", {
196
                          "args" : [["CALL", ["SIMPLE_NAME", "q"]]]}
197
                        ]]}
198
                      ]]}
199
                    ], ["EXPRESSION", {
200
                      "args" : [["EXPRESSION", {
201
                        "args" : [["EXPRESSION", {
202
                          "args" : [["CONSTANT_VALUE", {
203
                            "value" : ["CST_LITERAL", "x\"04\""]}
204
                          ]]}
205
                        ]]}
206
                      ]]}
207
                    ]]}
208
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
209
                    "lhs" : ["SIMPLE_NAME", "is5"], "rhs" : [{
210
                      "value" : ["EXPRESSION", {
211
                        "args" : [["EXPRESSION", {
212
                          "args" : [["EXPRESSION", {
213
                            "args" : [["EXPRESSION", {
214
                              "args" : [["CONSTANT_VALUE", {
215
                                "value" : ["CST_LITERAL", "'1'"]}
216
                              ]]}
217
                            ]]}
218
                          ]]}
219
                        ]]}
220
                      ]}
221
                    ]}
222
                  ]]}
223
                ]}
224
              ], ["IF_STATEMENT", {
225
                "if_cases" : [{
226
                  "if_cond" : ["EXPRESSION", {
227
                    "id" : "=", "args" : [["EXPRESSION", {
228
                      "args" : [["EXPRESSION", {
229
                        "args" : [["EXPRESSION", {
230
                          "args" : [["CALL", ["SIMPLE_NAME", "load"]]]}
231
                        ]]}
232
                      ]]}
233
                    ], ["EXPRESSION", {
234
                      "args" : [["EXPRESSION", {
235
                        "args" : [["EXPRESSION", {
236
                          "args" : [["CONSTANT_VALUE", {
237
                            "value" : ["CST_LITERAL", "'1'"]}
238
                          ]]}
239
                        ]]}
240
                      ]]}
241
                    ]]}
242
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
243
                    "lhs" : ["SIMPLE_NAME", "q"], "rhs" : [{
244
                      "value" : ["EXPRESSION", {
245
                        "args" : [["EXPRESSION", {
246
                          "args" : [["EXPRESSION", {
247
                            "args" : [["EXPRESSION", {
248
                              "args" : [["CALL", ["SIMPLE_NAME", "load_val"]]]}
249
                            ]]}
250
                          ]]}
251
                        ]]}
252
                      ]}
253
                    ]}
254
                  ], ["IF_STATEMENT", {
255
                    "if_cases" : [{
256
                      "if_cond" : ["EXPRESSION", {
257
                        "id" : "=", "args" : [["EXPRESSION", {
258
                          "args" : [["EXPRESSION", {
259
                            "args" : [["EXPRESSION", {
260
                              "args" : [["CALL", ["SIMPLE_NAME", "load_val"]]]}
261
                            ]]}
262
                          ]]}
263
                        ], ["EXPRESSION", {
264
                          "args" : [["EXPRESSION", {
265
                            "args" : [["EXPRESSION", {
266
                              "args" : [["CONSTANT_VALUE", {
267
                                "value" : ["CST_LITERAL", "x\"05\""]}
268
                              ]]}
269
                            ]]}
270
                          ]]}
271
                        ]]}
272
                      ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
273
                        "lhs" : ["SIMPLE_NAME", "is5"], "rhs" : [{
274
                          "value" : ["EXPRESSION", {
275
                            "args" : [["EXPRESSION", {
276
                              "args" : [["EXPRESSION", {
277
                                "args" : [["EXPRESSION", {
278
                                  "args" : [["CONSTANT_VALUE", {
279
                                    "value" : ["CST_LITERAL", "'1'"]}
280
                                  ]]}
281
                                ]]}
282
                              ]]}
283
                            ]]}
284
                          ]}
285
                        ]}
286
                      ]]}
287
                    ]}
288
                  ]]}
289
                ], "default" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
290
                  "lhs" : ["SIMPLE_NAME", "q"], "rhs" : [{
291
                    "value" : ["EXPRESSION", {
292
                      "args" : [["EXPRESSION", {
293
                        "args" : [["EXPRESSION", {
294
                          "args" : [["EXPRESSION", {
295
                            "id" : "+", "args" : [["EXPRESSION", {
296
                              "args" : [["CALL", ["SIMPLE_NAME", "q"]]]}
297
                            ], ["EXPRESSION", {
298
                              "args" : [["CONSTANT_VALUE", {
299
                                "value" : ["CST_LITERAL", "1"]}
300
                              ]]}
301
                            ]]}
302
                          ]]}
303
                        ]]}
304
                      ]]}
305
                    ]}
306
                  ]}
307
                ]]}
308
              ]]}
309
            ]}
310
          ]]}
311
        ]]}
312
      ]}
313
    ]}
314
  }