Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / valencia / d-latch-and-gate-memories.json @ 47142ed7

History | View | Annotate | Download (19.3 KB)

1 47142ed7 Arnaud Dieumegard
{
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" : [["CONDITIONAL_SIGNAL_ASSIGNMENT", {
18
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "q1"], "rhs" : [{
19
            "expr" : [{
20
              "value" : ["EXPRESSION", {
21
                "args" : [["EXPRESSION", {
22
                  "args" : [["EXPRESSION", {
23
                    "args" : [["EXPRESSION", {
24
                      "args" : [["CONSTANT_VALUE", {
25
                        "value" : ["CST_LITERAL", "'1'"]}
26
                      ]]}
27
                    ]]}
28
                  ]]}
29
                ]]}
30
              ]}
31
            ]}
32
          ]}
33
        ], ["PROCESS_STATEMENT", {
34
          "id" : ["IDENTIFIER", "storage"], "PROCESS_DECLARATIVE_PART" : [{
35
            "declaration" : ["VARIABLE_DECLARATION", {
36
              "names" : [["IDENTIFIER", "stored_d0"], ["IDENTIFIER", "stored_d1"], ["IDENTIFIER", "stored_d2"], ["IDENTIFIER", "stored_d3"]], "typ" : {
37
                "name" : ["SIMPLE_NAME", "bit"]}
38
              }
39
            ]}
40
          ], "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", {
41
            "if_cases" : [{
42
              "if_cond" : ["EXPRESSION", {
43
                "id" : "and", "args" : [["EXPRESSION", {
44
                  "id" : "=", "args" : [["EXPRESSION", {
45
                    "args" : [["EXPRESSION", {
46
                      "args" : [["EXPRESSION", {
47
                        "args" : [["CALL", ["SIMPLE_NAME", "en"]]]}
48
                      ]]}
49
                    ]]}
50
                  ], ["EXPRESSION", {
51
                    "args" : [["EXPRESSION", {
52
                      "args" : [["EXPRESSION", {
53
                        "args" : [["CONSTANT_VALUE", {
54
                          "value" : ["CST_LITERAL", "'1'"]}
55
                        ]]}
56
                      ]]}
57
                    ]]}
58
                  ]]}
59
                ], ["EXPRESSION", {
60
                  "id" : "=", "args" : [["EXPRESSION", {
61
                    "args" : [["EXPRESSION", {
62
                      "args" : [["EXPRESSION", {
63
                        "args" : [["CALL", ["SIMPLE_NAME", "clk"]]]}
64
                      ]]}
65
                    ]]}
66
                  ], ["EXPRESSION", {
67
                    "args" : [["EXPRESSION", {
68
                      "args" : [["EXPRESSION", {
69
                        "args" : [["CONSTANT_VALUE", {
70
                          "value" : ["CST_LITERAL", "'1'"]}
71
                        ]]}
72
                      ]]}
73
                    ]]}
74
                  ]]}
75
                ]]}
76
              ], "if_block" : [["VARIABLE_ASSIGNMENT_STATEMENT", {
77
                "lhs" : ["SIMPLE_NAME", "stored_d0"], "rhs" : ["EXPRESSION", {
78
                  "args" : [["EXPRESSION", {
79
                    "args" : [["EXPRESSION", {
80
                      "args" : [["EXPRESSION", {
81
                        "args" : [["CALL", ["SIMPLE_NAME", "d0"]]]}
82
                      ]]}
83
                    ]]}
84
                  ]]}
85
                ]}
86
              ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
87
                "lhs" : ["SIMPLE_NAME", "stored_d1"], "rhs" : ["EXPRESSION", {
88
                  "args" : [["EXPRESSION", {
89
                    "args" : [["EXPRESSION", {
90
                      "args" : [["EXPRESSION", {
91
                        "args" : [["CALL", ["SIMPLE_NAME", "d1"]]]}
92
                      ]]}
93
                    ]]}
94
                  ]]}
95
                ]}
96
              ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
97
                "lhs" : ["SIMPLE_NAME", "stored_d2"], "rhs" : ["EXPRESSION", {
98
                  "args" : [["EXPRESSION", {
99
                    "args" : [["EXPRESSION", {
100
                      "args" : [["EXPRESSION", {
101
                        "args" : [["CALL", ["SIMPLE_NAME", "d2"]]]}
102
                      ]]}
103
                    ]]}
104
                  ]]}
105
                ]}
106
              ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
107
                "lhs" : ["SIMPLE_NAME", "stored_d3"], "rhs" : ["EXPRESSION", {
108
                  "args" : [["EXPRESSION", {
109
                    "args" : [["EXPRESSION", {
110
                      "args" : [["EXPRESSION", {
111
                        "args" : [["CALL", ["SIMPLE_NAME", "d3"]]]}
112
                      ]]}
113
                    ]]}
114
                  ]]}
115
                ]}
116
              ]]}
117
            ]}
118
          ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
119
            "lhs" : ["SIMPLE_NAME", "q0"], "rhs" : [{
120
              "value" : ["EXPRESSION", {
121
                "args" : [["EXPRESSION", {
122
                  "args" : [["EXPRESSION", {
123
                    "args" : [["EXPRESSION", {
124
                      "args" : [["CALL", ["SIMPLE_NAME", "stored_d0"]]]}
125
                    ]]}
126
                  ]]}
127
                ]]}
128
              ], "delay" : ["EXPRESSION", {
129
                "args" : [["EXPRESSION", {
130
                  "args" : [["EXPRESSION", {
131
                    "args" : [["EXPRESSION", {
132
                      "args" : [["CONSTANT_VALUE", {
133
                        "value" : ["CST_LITERAL", "5"], "unit_name" : ["SIMPLE_NAME", "ns"]}
134
                      ]]}
135
                    ]]}
136
                  ]]}
137
                ]]}
138
              ]}
139
            ]}
140
          ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
141
            "lhs" : ["SIMPLE_NAME", "q1"], "rhs" : [{
142
              "value" : ["EXPRESSION", {
143
                "args" : [["EXPRESSION", {
144
                  "args" : [["EXPRESSION", {
145
                    "args" : [["EXPRESSION", {
146
                      "args" : [["CALL", ["SIMPLE_NAME", "stored_d1"]]]}
147
                    ]]}
148
                  ]]}
149
                ]]}
150
              ], "delay" : ["EXPRESSION", {
151
                "args" : [["EXPRESSION", {
152
                  "args" : [["EXPRESSION", {
153
                    "args" : [["EXPRESSION", {
154
                      "args" : [["CONSTANT_VALUE", {
155
                        "value" : ["CST_LITERAL", "5"], "unit_name" : ["SIMPLE_NAME", "ns"]}
156
                      ]]}
157
                    ]]}
158
                  ]]}
159
                ]]}
160
              ]}
161
            ]}
162
          ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
163
            "lhs" : ["SIMPLE_NAME", "q2"], "rhs" : [{
164
              "value" : ["EXPRESSION", {
165
                "args" : [["EXPRESSION", {
166
                  "args" : [["EXPRESSION", {
167
                    "args" : [["EXPRESSION", {
168
                      "args" : [["CALL", ["SIMPLE_NAME", "stored_d2"]]]}
169
                    ]]}
170
                  ]]}
171
                ]]}
172
              ], "delay" : ["EXPRESSION", {
173
                "args" : [["EXPRESSION", {
174
                  "args" : [["EXPRESSION", {
175
                    "args" : [["EXPRESSION", {
176
                      "args" : [["CONSTANT_VALUE", {
177
                        "value" : ["CST_LITERAL", "5"], "unit_name" : ["SIMPLE_NAME", "ns"]}
178
                      ]]}
179
                    ]]}
180
                  ]]}
181
                ]]}
182
              ]}
183
            ]}
184
          ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
185
            "lhs" : ["SIMPLE_NAME", "q3"], "rhs" : [{
186
              "value" : ["EXPRESSION", {
187
                "args" : [["EXPRESSION", {
188
                  "args" : [["EXPRESSION", {
189
                    "args" : [["EXPRESSION", {
190
                      "args" : [["CALL", ["SIMPLE_NAME", "stored_d3"]]]}
191
                    ]]}
192
                  ]]}
193
                ]]}
194
              ], "delay" : ["EXPRESSION", {
195
                "args" : [["EXPRESSION", {
196
                  "args" : [["EXPRESSION", {
197
                    "args" : [["EXPRESSION", {
198
                      "args" : [["CONSTANT_VALUE", {
199
                        "value" : ["CST_LITERAL", "5"], "unit_name" : ["SIMPLE_NAME", "ns"]}
200
                      ]]}
201
                    ]]}
202
                  ]]}
203
                ]]}
204
              ]}
205
            ]}
206
          ]]}
207
        ]]}
208
      ]}
209
    , {
210
      "contexts" : [], "library" : ["ENTITY_DECLARATION", {
211
        "name" : ["IDENTIFIER", "d_latch"], "ports" : [{
212
          "names" : [["IDENTIFIER", "d"], ["IDENTIFIER", "clk"]], "mode" : ["in"], "typ" : {
213
            "name" : ["SIMPLE_NAME", "bit"]}
214
          }
215
        , {
216
          "names" : [["IDENTIFIER", "q"]], "mode" : ["out"], "typ" : {
217
            "name" : ["SIMPLE_NAME", "bit"]}
218
          }
219
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
220
      ]}
221
    , {
222
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
223
        "name" : ["IDENTIFIER", "basic"], "entity" : ["IDENTIFIER", "d_latch"], "ARCHITECTURE_DECLARATIVE_PART" : [], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
224
          "id" : ["IDENTIFIER", "latch_behavior"], "active_sigs" : [["SIMPLE_NAME", "clk"], ["SIMPLE_NAME", "d"]], "PROCESS_STATEMENT_PART" : [["IF_STATEMENT", {
225
            "if_cases" : [{
226
              "if_cond" : ["EXPRESSION", {
227
                "id" : "=", "args" : [["EXPRESSION", {
228
                  "args" : [["EXPRESSION", {
229
                    "args" : [["EXPRESSION", {
230
                      "args" : [["CALL", ["SIMPLE_NAME", "clk"]]]}
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", "d"]]]}
249
                        ]]}
250
                      ]]}
251
                    ]]}
252
                  ], "delay" : ["EXPRESSION", {
253
                    "args" : [["EXPRESSION", {
254
                      "args" : [["EXPRESSION", {
255
                        "args" : [["EXPRESSION", {
256
                          "args" : [["CONSTANT_VALUE", {
257
                            "value" : ["CST_LITERAL", "2"], "unit_name" : ["SIMPLE_NAME", "ns"]}
258
                          ]]}
259
                        ]]}
260
                      ]]}
261
                    ]]}
262
                  ]}
263
                ]}
264
              ]]}
265
            ]}
266
          ]]}
267
        ]]}
268
      ]}
269
    , {
270
      "contexts" : [], "library" : ["ENTITY_DECLARATION", {
271
        "name" : ["IDENTIFIER", "and2"], "ports" : [{
272
          "names" : [["IDENTIFIER", "a"], ["IDENTIFIER", "b"]], "mode" : ["in"], "typ" : {
273
            "name" : ["SIMPLE_NAME", "bit"]}
274
          }
275
        , {
276
          "names" : [["IDENTIFIER", "y"]], "mode" : ["out"], "typ" : {
277
            "name" : ["SIMPLE_NAME", "bit"]}
278
          }
279
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
280
      ]}
281
    , {
282
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
283
        "name" : ["IDENTIFIER", "basic"], "entity" : ["IDENTIFIER", "and2"], "ARCHITECTURE_DECLARATIVE_PART" : [], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
284
          "id" : ["IDENTIFIER", "and2_behavior"], "active_sigs" : [["SIMPLE_NAME", "a"], ["SIMPLE_NAME", "b"]], "PROCESS_STATEMENT_PART" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
285
            "lhs" : ["SIMPLE_NAME", "y"], "rhs" : [{
286
              "value" : ["EXPRESSION", {
287
                "id" : "and", "args" : [["EXPRESSION", {
288
                  "args" : [["EXPRESSION", {
289
                    "args" : [["EXPRESSION", {
290
                      "args" : [["EXPRESSION", {
291
                        "args" : [["CALL", ["SIMPLE_NAME", "a"]]]}
292
                      ]]}
293
                    ]]}
294
                  ]]}
295
                ], ["EXPRESSION", {
296
                  "args" : [["EXPRESSION", {
297
                    "args" : [["EXPRESSION", {
298
                      "args" : [["EXPRESSION", {
299
                        "args" : [["CALL", ["SIMPLE_NAME", "b"]]]}
300
                      ]]}
301
                    ]]}
302
                  ]]}
303
                ]]}
304
              ], "delay" : ["EXPRESSION", {
305
                "args" : [["EXPRESSION", {
306
                  "args" : [["EXPRESSION", {
307
                    "args" : [["EXPRESSION", {
308
                      "args" : [["CONSTANT_VALUE", {
309
                        "value" : ["CST_LITERAL", "2"], "unit_name" : ["SIMPLE_NAME", "ns"]}
310
                      ]]}
311
                    ]]}
312
                  ]]}
313
                ]]}
314
              ]}
315
            ]}
316
          ]]}
317
        ]]}
318
      ]}
319
    , {
320
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
321
        "name" : ["IDENTIFIER", "struct"], "entity" : ["IDENTIFIER", "reg4"], "ARCHITECTURE_DECLARATIVE_PART" : [{
322
          "declaration" : ["SIGNAL_DECLARATION", {
323
            "names" : [["IDENTIFIER", "int_clk"]], "typ" : {
324
              "name" : ["SIMPLE_NAME", "bit"]}
325
            }
326
          ]}
327
        , {
328
          "declaration" : ["SIGNAL_DECLARATION", {
329
            "names" : [["IDENTIFIER", "mem"]], "typ" : {
330
              "name" : ["SIMPLE_NAME", "bit"]}
331
            }
332
          ]}
333
        ], "ARCHITECTURE_STATEMENT_PART" : [["CONDITIONAL_SIGNAL_ASSIGNMENT", {
334
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "q0"], "rhs" : [{
335
            "expr" : [{
336
              "value" : ["EXPRESSION", {
337
                "id" : "and", "args" : [["EXPRESSION", {
338
                  "args" : [["EXPRESSION", {
339
                    "args" : [["EXPRESSION", {
340
                      "args" : [["EXPRESSION", {
341
                        "args" : [["CALL", ["SIMPLE_NAME", "d0"]]]}
342
                      ]]}
343
                    ]]}
344
                  ]]}
345
                ], ["EXPRESSION", {
346
                  "args" : [["EXPRESSION", {
347
                    "args" : [["EXPRESSION", {
348
                      "args" : [["EXPRESSION", {
349
                        "args" : [["CALL", ["SIMPLE_NAME", "mem"]]]}
350
                      ]]}
351
                    ]]}
352
                  ]]}
353
                ]]}
354
              ]}
355
            ]}
356
          ]}
357
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
358
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "mem"], "rhs" : [{
359
            "expr" : [{
360
              "value" : ["EXPRESSION", {
361
                "args" : [["EXPRESSION", {
362
                  "args" : [["EXPRESSION", {
363
                    "args" : [["EXPRESSION", {
364
                      "id" : "not", "args" : [["CALL", ["SIMPLE_NAME", "d1"]]]}
365
                    ]]}
366
                  ]]}
367
                ]]}
368
              ]}
369
            ]}
370
          ]}
371
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
372
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "q1"], "rhs" : [{
373
            "expr" : [{
374
              "value" : ["EXPRESSION", {
375
                "id" : "and", "args" : [["EXPRESSION", {
376
                  "id" : "and", "args" : [["EXPRESSION", {
377
                    "args" : [["EXPRESSION", {
378
                      "args" : [["EXPRESSION", {
379
                        "args" : [["EXPRESSION", {
380
                          "args" : [["CALL", ["SIMPLE_NAME", "d2"]]]}
381
                        ]]}
382
                      ]]}
383
                    ]]}
384
                  ], ["EXPRESSION", {
385
                    "args" : [["EXPRESSION", {
386
                      "args" : [["EXPRESSION", {
387
                        "args" : [["EXPRESSION", {
388
                          "args" : [["EXPRESSION", {
389
                            "args" : [["EXPRESSION", {
390
                              "args" : [["EXPRESSION", {
391
                                "args" : [["EXPRESSION", {
392
                                  "id" : "not", "args" : [["CALL", ["SIMPLE_NAME", "mem"]]]}
393
                                ]]}
394
                              ]]}
395
                            ]]}
396
                          ]]}
397
                        ]]}
398
                      ]]}
399
                    ]]}
400
                  ]]}
401
                ], ["EXPRESSION", {
402
                  "args" : [["EXPRESSION", {
403
                    "args" : [["EXPRESSION", {
404
                      "args" : [["EXPRESSION", {
405
                        "args" : [["CALL", ["SIMPLE_NAME", "d3"]]]}
406
                      ]]}
407
                    ]]}
408
                  ]]}
409
                ]]}
410
              ]}
411
            ]}
412
          ]}
413
        ], ["COMPONENT_INSTANTIATION_STATEMENT", {
414
          "name" : ["IDENTIFIER", "bit0"], "inst_unit" : ["SELECTED_NAME", [["SIMPLE_NAME", "work"], ["IDENTIFIER", "d_latch"]]], "inst_unit_type" : "entity", "archi_name" : ["IDENTIFIER", "basic"], "port_map" : [{
415
            "actual_designator" : ["SIMPLE_NAME", "d0"]}
416
          , {
417
            "actual_designator" : ["SIMPLE_NAME", "int_clk"]}
418
          , {
419
            "actual_designator" : ["SIMPLE_NAME", "q0"]}
420
          ]}
421
        ], ["COMPONENT_INSTANTIATION_STATEMENT", {
422
          "name" : ["IDENTIFIER", "bit1"], "inst_unit" : ["SELECTED_NAME", [["SIMPLE_NAME", "work"], ["IDENTIFIER", "d_latch"]]], "inst_unit_type" : "entity", "archi_name" : ["IDENTIFIER", "basic"], "port_map" : [{
423
            "formal_name" : ["SIMPLE_NAME", "q"], "actual_designator" : ["SIMPLE_NAME", "q1"]}
424
          , {
425
            "formal_name" : ["SIMPLE_NAME", "d"], "actual_designator" : ["SIMPLE_NAME", "d1"]}
426
          , {
427
            "formal_name" : ["SIMPLE_NAME", "clk"], "actual_designator" : ["SIMPLE_NAME", "int_clk"]}
428
          ]}
429
        ], ["COMPONENT_INSTANTIATION_STATEMENT", {
430
          "name" : ["IDENTIFIER", "bit2"], "inst_unit" : ["SELECTED_NAME", [["SIMPLE_NAME", "work"], ["IDENTIFIER", "d_latch"]]], "inst_unit_type" : "entity", "archi_name" : ["IDENTIFIER", "basic"], "port_map" : [{
431
            "actual_designator" : ["SIMPLE_NAME", "d2"]}
432
          , {
433
            "actual_designator" : ["SIMPLE_NAME", "int_clk"]}
434
          , {
435
            "actual_designator" : ["SIMPLE_NAME", "q2"]}
436
          ]}
437
        ], ["COMPONENT_INSTANTIATION_STATEMENT", {
438
          "name" : ["IDENTIFIER", "bit3"], "inst_unit" : ["SELECTED_NAME", [["SIMPLE_NAME", "work"], ["IDENTIFIER", "d_latch"]]], "inst_unit_type" : "entity", "archi_name" : ["IDENTIFIER", "basic"], "port_map" : [{
439
            "actual_designator" : ["SIMPLE_NAME", "d3"]}
440
          , {
441
            "actual_designator" : ["SIMPLE_NAME", "int_clk"]}
442
          , {
443
            "actual_designator" : ["SIMPLE_NAME", "q3"]}
444
          ]}
445
        ], ["COMPONENT_INSTANTIATION_STATEMENT", {
446
          "name" : ["IDENTIFIER", "gate"], "inst_unit" : ["SELECTED_NAME", [["SIMPLE_NAME", "work"], ["IDENTIFIER", "and2"]]], "inst_unit_type" : "entity", "archi_name" : ["IDENTIFIER", "basic"], "port_map" : [{
447
            "actual_designator" : ["SIMPLE_NAME", "en"]}
448
          , {
449
            "actual_designator" : ["SIMPLE_NAME", "clk"]}
450
          , {
451
            "actual_designator" : ["SIMPLE_NAME", "int_clk"]}
452
          ]}
453
        ]]}
454
      ]}
455
    ]}
456
  }