Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / valencia / d-latch-and-gate.json @ 1a2296da

History | View | Annotate | Download (16.8 KB)

1
{
2
  "DESIGN_FILE" : {
3
    "design_units" : [{
4
      "contexts" : [], "library" : ["ENTITY_DECLARATION", {
5
        "name" : ["IDENTIFIER", "reg4"], "ports" : [{
6
          "names" : [["IDENTIFIER", "d0"], ["IDENTIFIER", "d1"], ["IDENTIFIER", "d2"], ["IDENTIFIER", "d3"], ["IDENTIFIER", "en"], ["IDENTIFIER", "clk"]], "mode" : ["in"], "typ" : {
7
            "name" : ["SIMPLE_NAME", "bit"]}
8
          }
9
        , {
10
          "names" : [["IDENTIFIER", "q0"], ["IDENTIFIER", "q1"], ["IDENTIFIER", "q2"], ["IDENTIFIER", "q3"]], "mode" : ["out"], "typ" : {
11
            "name" : ["SIMPLE_NAME", "bit"]}
12
          }
13
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
14
      ]}
15
    , {
16
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
17
        "name" : ["IDENTIFIER", "behav"], "entity" : ["IDENTIFIER", "reg4"], "ARCHITECTURE_DECLARATIVE_PART" : [], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
18
          "id" : ["IDENTIFIER", "storage"], "PROCESS_DECLARATIVE_PART" : [{
19
            "declaration" : ["VARIABLE_DECLARATION", {
20
              "names" : [["IDENTIFIER", "stored_d0"], ["IDENTIFIER", "stored_d1"], ["IDENTIFIER", "stored_d2"], ["IDENTIFIER", "stored_d3"]], "typ" : {
21
                "name" : ["SIMPLE_NAME", "bit"]}
22
              }
23
            ]}
24
          ], "active_sigs" : [["SIMPLE_NAME", "d0"], ["SIMPLE_NAME", "d1"], ["SIMPLE_NAME", "d2"], ["SIMPLE_NAME", "d3"], ["SIMPLE_NAME", "en"], ["SIMPLE_NAME", "clk"]], "PROCESS_STATEMENT_PART" : [["IF_STATEMENT", {
25
            "if_cases" : [{
26
              "if_cond" : ["EXPRESSION", {
27
                "id" : "and", "args" : [["EXPRESSION", {
28
                  "id" : "=", "args" : [["EXPRESSION", {
29
                    "args" : [["EXPRESSION", {
30
                      "args" : [["EXPRESSION", {
31
                        "args" : [["CALL", ["SIMPLE_NAME", "en"]]]}
32
                      ]]}
33
                    ]]}
34
                  ], ["EXPRESSION", {
35
                    "args" : [["EXPRESSION", {
36
                      "args" : [["EXPRESSION", {
37
                        "args" : [["CONSTANT_VALUE", {
38
                          "value" : ["CST_LITERAL", "'1'"]}
39
                        ]]}
40
                      ]]}
41
                    ]]}
42
                  ]]}
43
                ], ["EXPRESSION", {
44
                  "id" : "=", "args" : [["EXPRESSION", {
45
                    "args" : [["EXPRESSION", {
46
                      "args" : [["EXPRESSION", {
47
                        "args" : [["CALL", ["SIMPLE_NAME", "clk"]]]}
48
                      ]]}
49
                    ]]}
50
                  ], ["EXPRESSION", {
51
                    "args" : [["EXPRESSION", {
52
                      "args" : [["EXPRESSION", {
53
                        "args" : [["CONSTANT_VALUE", {
54
                          "value" : ["CST_LITERAL", "'1'"]}
55
                        ]]}
56
                      ]]}
57
                    ]]}
58
                  ]]}
59
                ]]}
60
              ], "if_block" : [["VARIABLE_ASSIGNMENT_STATEMENT", {
61
                "lhs" : ["SIMPLE_NAME", "stored_d0"], "rhs" : ["EXPRESSION", {
62
                  "args" : [["EXPRESSION", {
63
                    "args" : [["EXPRESSION", {
64
                      "args" : [["EXPRESSION", {
65
                        "args" : [["CALL", ["SIMPLE_NAME", "d0"]]]}
66
                      ]]}
67
                    ]]}
68
                  ]]}
69
                ]}
70
              ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
71
                "lhs" : ["SIMPLE_NAME", "stored_d1"], "rhs" : ["EXPRESSION", {
72
                  "args" : [["EXPRESSION", {
73
                    "args" : [["EXPRESSION", {
74
                      "args" : [["EXPRESSION", {
75
                        "args" : [["CALL", ["SIMPLE_NAME", "d1"]]]}
76
                      ]]}
77
                    ]]}
78
                  ]]}
79
                ]}
80
              ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
81
                "lhs" : ["SIMPLE_NAME", "stored_d2"], "rhs" : ["EXPRESSION", {
82
                  "args" : [["EXPRESSION", {
83
                    "args" : [["EXPRESSION", {
84
                      "args" : [["EXPRESSION", {
85
                        "args" : [["CALL", ["SIMPLE_NAME", "d2"]]]}
86
                      ]]}
87
                    ]]}
88
                  ]]}
89
                ]}
90
              ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
91
                "lhs" : ["SIMPLE_NAME", "stored_d3"], "rhs" : ["EXPRESSION", {
92
                  "args" : [["EXPRESSION", {
93
                    "args" : [["EXPRESSION", {
94
                      "args" : [["EXPRESSION", {
95
                        "args" : [["CALL", ["SIMPLE_NAME", "d3"]]]}
96
                      ]]}
97
                    ]]}
98
                  ]]}
99
                ]}
100
              ]]}
101
            ]}
102
          ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
103
            "lhs" : ["SIMPLE_NAME", "q0"], "rhs" : [{
104
              "value" : ["EXPRESSION", {
105
                "args" : [["EXPRESSION", {
106
                  "args" : [["EXPRESSION", {
107
                    "args" : [["EXPRESSION", {
108
                      "args" : [["CALL", ["SIMPLE_NAME", "stored_d0"]]]}
109
                    ]]}
110
                  ]]}
111
                ]]}
112
              ], "delay" : ["EXPRESSION", {
113
                "args" : [["EXPRESSION", {
114
                  "args" : [["EXPRESSION", {
115
                    "args" : [["EXPRESSION", {
116
                      "args" : [["CONSTANT_VALUE", {
117
                        "value" : ["CST_LITERAL", "5"], "unit_name" : ["SIMPLE_NAME", "ns"]}
118
                      ]]}
119
                    ]]}
120
                  ]]}
121
                ]]}
122
              ]}
123
            ]}
124
          ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
125
            "lhs" : ["SIMPLE_NAME", "q1"], "rhs" : [{
126
              "value" : ["EXPRESSION", {
127
                "args" : [["EXPRESSION", {
128
                  "args" : [["EXPRESSION", {
129
                    "args" : [["EXPRESSION", {
130
                      "args" : [["CALL", ["SIMPLE_NAME", "stored_d1"]]]}
131
                    ]]}
132
                  ]]}
133
                ]]}
134
              ], "delay" : ["EXPRESSION", {
135
                "args" : [["EXPRESSION", {
136
                  "args" : [["EXPRESSION", {
137
                    "args" : [["EXPRESSION", {
138
                      "args" : [["CONSTANT_VALUE", {
139
                        "value" : ["CST_LITERAL", "5"], "unit_name" : ["SIMPLE_NAME", "ns"]}
140
                      ]]}
141
                    ]]}
142
                  ]]}
143
                ]]}
144
              ]}
145
            ]}
146
          ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
147
            "lhs" : ["SIMPLE_NAME", "q2"], "rhs" : [{
148
              "value" : ["EXPRESSION", {
149
                "args" : [["EXPRESSION", {
150
                  "args" : [["EXPRESSION", {
151
                    "args" : [["EXPRESSION", {
152
                      "args" : [["CALL", ["SIMPLE_NAME", "stored_d2"]]]}
153
                    ]]}
154
                  ]]}
155
                ]]}
156
              ], "delay" : ["EXPRESSION", {
157
                "args" : [["EXPRESSION", {
158
                  "args" : [["EXPRESSION", {
159
                    "args" : [["EXPRESSION", {
160
                      "args" : [["CONSTANT_VALUE", {
161
                        "value" : ["CST_LITERAL", "5"], "unit_name" : ["SIMPLE_NAME", "ns"]}
162
                      ]]}
163
                    ]]}
164
                  ]]}
165
                ]]}
166
              ]}
167
            ]}
168
          ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
169
            "lhs" : ["SIMPLE_NAME", "q3"], "rhs" : [{
170
              "value" : ["EXPRESSION", {
171
                "args" : [["EXPRESSION", {
172
                  "args" : [["EXPRESSION", {
173
                    "args" : [["EXPRESSION", {
174
                      "args" : [["CALL", ["SIMPLE_NAME", "stored_d3"]]]}
175
                    ]]}
176
                  ]]}
177
                ]]}
178
              ], "delay" : ["EXPRESSION", {
179
                "args" : [["EXPRESSION", {
180
                  "args" : [["EXPRESSION", {
181
                    "args" : [["EXPRESSION", {
182
                      "args" : [["CONSTANT_VALUE", {
183
                        "value" : ["CST_LITERAL", "5"], "unit_name" : ["SIMPLE_NAME", "ns"]}
184
                      ]]}
185
                    ]]}
186
                  ]]}
187
                ]]}
188
              ]}
189
            ]}
190
          ], ["WAIT_STATEMENT"]]}
191
        ]]}
192
      ]}
193
    , {
194
      "contexts" : [], "library" : ["ENTITY_DECLARATION", {
195
        "name" : ["IDENTIFIER", "d_latch"], "ports" : [{
196
          "names" : [["IDENTIFIER", "d"], ["IDENTIFIER", "clk"]], "mode" : ["in"], "typ" : {
197
            "name" : ["SIMPLE_NAME", "bit"]}
198
          }
199
        , {
200
          "names" : [["IDENTIFIER", "q"]], "mode" : ["out"], "typ" : {
201
            "name" : ["SIMPLE_NAME", "bit"]}
202
          }
203
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
204
      ]}
205
    , {
206
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
207
        "name" : ["IDENTIFIER", "basic"], "entity" : ["IDENTIFIER", "d_latch"], "ARCHITECTURE_DECLARATIVE_PART" : [], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
208
          "id" : ["IDENTIFIER", "latch_behavior"], "active_sigs" : [["SIMPLE_NAME", "clk"], ["SIMPLE_NAME", "d"]], "PROCESS_STATEMENT_PART" : [["IF_STATEMENT", {
209
            "if_cases" : [{
210
              "if_cond" : ["EXPRESSION", {
211
                "id" : "=", "args" : [["EXPRESSION", {
212
                  "args" : [["EXPRESSION", {
213
                    "args" : [["EXPRESSION", {
214
                      "args" : [["CALL", ["SIMPLE_NAME", "clk"]]]}
215
                    ]]}
216
                  ]]}
217
                ], ["EXPRESSION", {
218
                  "args" : [["EXPRESSION", {
219
                    "args" : [["EXPRESSION", {
220
                      "args" : [["CONSTANT_VALUE", {
221
                        "value" : ["CST_LITERAL", "'1'"]}
222
                      ]]}
223
                    ]]}
224
                  ]]}
225
                ]]}
226
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
227
                "lhs" : ["SIMPLE_NAME", "q"], "rhs" : [{
228
                  "value" : ["EXPRESSION", {
229
                    "args" : [["EXPRESSION", {
230
                      "args" : [["EXPRESSION", {
231
                        "args" : [["EXPRESSION", {
232
                          "args" : [["CALL", ["SIMPLE_NAME", "d"]]]}
233
                        ]]}
234
                      ]]}
235
                    ]]}
236
                  ], "delay" : ["EXPRESSION", {
237
                    "args" : [["EXPRESSION", {
238
                      "args" : [["EXPRESSION", {
239
                        "args" : [["EXPRESSION", {
240
                          "args" : [["CONSTANT_VALUE", {
241
                            "value" : ["CST_LITERAL", "2"], "unit_name" : ["SIMPLE_NAME", "ns"]}
242
                          ]]}
243
                        ]]}
244
                      ]]}
245
                    ]]}
246
                  ]}
247
                ]}
248
              ]]}
249
            ]}
250
          ], ["WAIT_STATEMENT"]]}
251
        ]]}
252
      ]}
253
    , {
254
      "contexts" : [], "library" : ["ENTITY_DECLARATION", {
255
        "name" : ["IDENTIFIER", "and2"], "ports" : [{
256
          "names" : [["IDENTIFIER", "a"], ["IDENTIFIER", "b"]], "mode" : ["in"], "typ" : {
257
            "name" : ["SIMPLE_NAME", "bit"]}
258
          }
259
        , {
260
          "names" : [["IDENTIFIER", "y"]], "mode" : ["out"], "typ" : {
261
            "name" : ["SIMPLE_NAME", "bit"]}
262
          }
263
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
264
      ]}
265
    , {
266
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
267
        "name" : ["IDENTIFIER", "basic"], "entity" : ["IDENTIFIER", "and2"], "ARCHITECTURE_DECLARATIVE_PART" : [], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
268
          "id" : ["IDENTIFIER", "and2_behavior"], "active_sigs" : [["SIMPLE_NAME", "a"], ["SIMPLE_NAME", "b"]], "PROCESS_STATEMENT_PART" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
269
            "lhs" : ["SIMPLE_NAME", "y"], "rhs" : [{
270
              "value" : ["EXPRESSION", {
271
                "id" : "and", "args" : [["EXPRESSION", {
272
                  "args" : [["EXPRESSION", {
273
                    "args" : [["EXPRESSION", {
274
                      "args" : [["EXPRESSION", {
275
                        "args" : [["CALL", ["SIMPLE_NAME", "a"]]]}
276
                      ]]}
277
                    ]]}
278
                  ]]}
279
                ], ["EXPRESSION", {
280
                  "args" : [["EXPRESSION", {
281
                    "args" : [["EXPRESSION", {
282
                      "args" : [["EXPRESSION", {
283
                        "args" : [["CALL", ["SIMPLE_NAME", "b"]]]}
284
                      ]]}
285
                    ]]}
286
                  ]]}
287
                ]]}
288
              ], "delay" : ["EXPRESSION", {
289
                "args" : [["EXPRESSION", {
290
                  "args" : [["EXPRESSION", {
291
                    "args" : [["EXPRESSION", {
292
                      "args" : [["CONSTANT_VALUE", {
293
                        "value" : ["CST_LITERAL", "2"], "unit_name" : ["SIMPLE_NAME", "ns"]}
294
                      ]]}
295
                    ]]}
296
                  ]]}
297
                ]]}
298
              ]}
299
            ]}
300
          ], ["WAIT_STATEMENT"]]}
301
        ]]}
302
      ]}
303
    , {
304
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
305
        "name" : ["IDENTIFIER", "struct"], "entity" : ["IDENTIFIER", "reg4"], "ARCHITECTURE_DECLARATIVE_PART" : [{
306
          "declaration" : ["SIGNAL_DECLARATION", {
307
            "names" : [["IDENTIFIER", "int_clk"]], "typ" : {
308
              "name" : ["SIMPLE_NAME", "bit"]}
309
            }
310
          ]}
311
        ], "ARCHITECTURE_STATEMENT_PART" : [["CONDITIONAL_SIGNAL_ASSIGNMENT", {
312
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "q0"], "rhs" : [{
313
            "expr" : [{
314
              "value" : ["EXPRESSION", {
315
                "args" : [["EXPRESSION", {
316
                  "args" : [["EXPRESSION", {
317
                    "args" : [["EXPRESSION", {
318
                      "id" : "&", "args" : [["EXPRESSION", {
319
                        "args" : [["CALL", ["SIMPLE_NAME", "d0"]]]}
320
                      ], ["EXPRESSION", {
321
                        "args" : [["CALL", ["SIMPLE_NAME", "d1"]]]}
322
                      ]]}
323
                    ]]}
324
                  ]]}
325
                ]]}
326
              ]}
327
            ]}
328
          ]}
329
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
330
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "q1"], "rhs" : [{
331
            "expr" : [{
332
              "value" : ["EXPRESSION", {
333
                "args" : [["EXPRESSION", {
334
                  "args" : [["EXPRESSION", {
335
                    "args" : [["EXPRESSION", {
336
                      "id" : "&", "args" : [["EXPRESSION", {
337
                        "args" : [["CALL", ["SIMPLE_NAME", "d2"]]]}
338
                      ], ["EXPRESSION", {
339
                        "args" : [["CALL", ["SIMPLE_NAME", "d3"]]]}
340
                      ]]}
341
                    ]]}
342
                  ]]}
343
                ]]}
344
              ]}
345
            ]}
346
          ]}
347
        ], ["COMPONENT_INSTANTIATION_STATEMENT", {
348
          "name" : ["IDENTIFIER", "bit0"], "inst_unit" : ["SELECTED_NAME", [["SIMPLE_NAME", "work"], ["IDENTIFIER", "d_latch"]]], "inst_unit_type" : "entity", "archi_name" : ["IDENTIFIER", "basic"], "port_map" : [{
349
            "actual_designator" : ["SIMPLE_NAME", "d0"]}
350
          , {
351
            "actual_designator" : ["SIMPLE_NAME", "int_clk"]}
352
          , {
353
            "actual_designator" : ["SIMPLE_NAME", "q0"]}
354
          ]}
355
        ], ["COMPONENT_INSTANTIATION_STATEMENT", {
356
          "name" : ["IDENTIFIER", "bit1"], "inst_unit" : ["SELECTED_NAME", [["SIMPLE_NAME", "work"], ["IDENTIFIER", "d_latch"]]], "inst_unit_type" : "entity", "archi_name" : ["IDENTIFIER", "basic"], "port_map" : [{
357
            "actual_designator" : ["SIMPLE_NAME", "d1"]}
358
          , {
359
            "actual_designator" : ["SIMPLE_NAME", "int_clk"]}
360
          , {
361
            "actual_designator" : ["SIMPLE_NAME", "q1"]}
362
          ]}
363
        ], ["COMPONENT_INSTANTIATION_STATEMENT", {
364
          "name" : ["IDENTIFIER", "bit2"], "inst_unit" : ["SELECTED_NAME", [["SIMPLE_NAME", "work"], ["IDENTIFIER", "d_latch"]]], "inst_unit_type" : "entity", "archi_name" : ["IDENTIFIER", "basic"], "port_map" : [{
365
            "actual_designator" : ["SIMPLE_NAME", "d2"]}
366
          , {
367
            "actual_designator" : ["SIMPLE_NAME", "int_clk"]}
368
          , {
369
            "actual_designator" : ["SIMPLE_NAME", "q2"]}
370
          ]}
371
        ], ["COMPONENT_INSTANTIATION_STATEMENT", {
372
          "name" : ["IDENTIFIER", "bit3"], "inst_unit" : ["SELECTED_NAME", [["SIMPLE_NAME", "work"], ["IDENTIFIER", "d_latch"]]], "inst_unit_type" : "entity", "archi_name" : ["IDENTIFIER", "basic"], "port_map" : [{
373
            "actual_designator" : ["SIMPLE_NAME", "d3"]}
374
          , {
375
            "actual_designator" : ["SIMPLE_NAME", "int_clk"]}
376
          , {
377
            "actual_designator" : ["SIMPLE_NAME", "q3"]}
378
          ]}
379
        ], ["COMPONENT_INSTANTIATION_STATEMENT", {
380
          "name" : ["IDENTIFIER", "gate"], "inst_unit" : ["SELECTED_NAME", [["SIMPLE_NAME", "work"], ["IDENTIFIER", "and2"]]], "inst_unit_type" : "entity", "archi_name" : ["IDENTIFIER", "basic"], "port_map" : [{
381
            "actual_designator" : ["SIMPLE_NAME", "en"]}
382
          , {
383
            "actual_designator" : ["SIMPLE_NAME", "clk"]}
384
          , {
385
            "actual_designator" : ["SIMPLE_NAME", "int_clk"]}
386
          ]}
387
        ]]}
388
      ]}
389
    ]}
390
  }