Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / cnes_guidelines / rule / data / STD_03900_good.json @ 3fd18385

History | View | Annotate | Download (19.9 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", "STD_03900_good"], "ports" : [{
6
          "names" : [["IDENTIFIER", "i_Clock"]], "mode" : ["in"], "typ" : {
7
            "name" : ["SIMPLE_NAME", "std_logic"]}
8
          }
9
        , {
10
          "names" : [["IDENTIFIER", "i_Reset_n"]], "mode" : ["in"], "typ" : {
11
            "name" : ["SIMPLE_NAME", "std_logic"]}
12
          }
13
        , {
14
          "names" : [["IDENTIFIER", "i_Start"]], "mode" : ["in"], "typ" : {
15
            "name" : ["SIMPLE_NAME", "std_logic"]}
16
          }
17
        , {
18
          "names" : [["IDENTIFIER", "i_Stop"]], "mode" : ["in"], "typ" : {
19
            "name" : ["SIMPLE_NAME", "std_logic"]}
20
          }
21
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
22
      ]}
23
    , {
24
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
25
        "name" : ["IDENTIFIER", "Behavioral"], "entity" : ["IDENTIFIER", "STD_03900_good"], "ARCHITECTURE_DECLARATIVE_PART" : [{
26
          "declaration" : ["CONSTANT_DECLARATION", {
27
            "names" : [["IDENTIFIER", "c_Length"]], "typ" : {
28
              "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
29
                "ranges" : [["RANGE_WITH_DIRECTION", {
30
                  "direction" : "downto", "from" : ["EXPRESSION", {
31
                    "args" : [["EXPRESSION", {
32
                      "args" : [["CONSTANT_VALUE", {
33
                        "value" : ["CST_LITERAL", "3"]}
34
                      ]]}
35
                    ]]}
36
                  ], "_to" : ["EXPRESSION", {
37
                    "args" : [["EXPRESSION", {
38
                      "args" : [["CONSTANT_VALUE", {
39
                        "value" : ["CST_LITERAL", "0"]}
40
                      ]]}
41
                    ]]}
42
                  ]}
43
                ]]}
44
              ]}
45
            , "init_val" : ["EXPRESSION", {
46
              "args" : [["EXPRESSION", {
47
                "args" : [["EXPRESSION", {
48
                  "args" : [["EXPRESSION", {
49
                    "args" : [["AGGREGATE", {
50
                      "elems" : [{
51
                        "choices" : [["OTHERS"]], "expr" : ["EXPRESSION", {
52
                          "args" : [["EXPRESSION", {
53
                            "args" : [["EXPRESSION", {
54
                              "args" : [["EXPRESSION", {
55
                                "args" : [["CONSTANT_VALUE", {
56
                                  "value" : ["CST_LITERAL", "'1'"]}
57
                                ]]}
58
                              ]]}
59
                            ]]}
60
                          ]]}
61
                        ]}
62
                      ]}
63
                    ]]}
64
                  ]]}
65
                ]]}
66
              ]]}
67
            ]}
68
          ]}
69
        , {
70
          "definition" : ["TYPE_DECLARATION", {
71
            "name" : ["IDENTIFIER", "t_state"], "definition" : ["ENUMERATION_TYPE_DEFINITION", [["IDENTIFIER", "init"], ["IDENTIFIER", "loading"], ["IDENTIFIER", "enabled"], ["IDENTIFIER", "finished"]]]}
72
          ]}
73
        , {
74
          "declaration" : ["SIGNAL_DECLARATION", {
75
            "names" : [["IDENTIFIER", "sm_State"]], "typ" : {
76
              "name" : ["SIMPLE_NAME", "t_state"]}
77
            }
78
          ]}
79
        , {
80
          "declaration" : ["SIGNAL_DECLARATION", {
81
            "names" : [["IDENTIFIER", "Raz"]], "typ" : {
82
              "name" : ["SIMPLE_NAME", "std_logic"]}
83
            }
84
          ]}
85
        , {
86
          "declaration" : ["SIGNAL_DECLARATION", {
87
            "names" : [["IDENTIFIER", "Enable"]], "typ" : {
88
              "name" : ["SIMPLE_NAME", "std_logic"]}
89
            }
90
          ]}
91
        , {
92
          "declaration" : ["SIGNAL_DECLARATION", {
93
            "names" : [["IDENTIFIER", "Length"]], "typ" : {
94
              "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
95
                "ranges" : [["RANGE_WITH_DIRECTION", {
96
                  "direction" : "downto", "from" : ["EXPRESSION", {
97
                    "args" : [["EXPRESSION", {
98
                      "args" : [["CONSTANT_VALUE", {
99
                        "value" : ["CST_LITERAL", "3"]}
100
                      ]]}
101
                    ]]}
102
                  ], "_to" : ["EXPRESSION", {
103
                    "args" : [["EXPRESSION", {
104
                      "args" : [["CONSTANT_VALUE", {
105
                        "value" : ["CST_LITERAL", "0"]}
106
                      ]]}
107
                    ]]}
108
                  ]}
109
                ]]}
110
              ]}
111
            }
112
          ]}
113
        , {
114
          "declaration" : ["SIGNAL_DECLARATION", {
115
            "names" : [["IDENTIFIER", "End_Count"]], "typ" : {
116
              "name" : ["SIMPLE_NAME", "std_logic"]}
117
            }
118
          ]}
119
        ], "ARCHITECTURE_STATEMENT_PART" : [["COMPONENT_INSTANTIATION_STATEMENT", {
120
          "name" : ["IDENTIFIER", "Counter"], "inst_unit" : ["SIMPLE_NAME", "Counter"], "inst_unit_type" : "component", "port_map" : [{
121
            "formal_name" : ["SIMPLE_NAME", "i_Clock"], "actual_designator" : ["SIMPLE_NAME", "i_Clock"]}
122
          , {
123
            "formal_name" : ["SIMPLE_NAME", "i_Reset_n"], "actual_designator" : ["SIMPLE_NAME", "i_Reset_n"]}
124
          , {
125
            "formal_name" : ["SIMPLE_NAME", "i_Raz"], "actual_designator" : ["SIMPLE_NAME", "Raz"]}
126
          , {
127
            "formal_name" : ["SIMPLE_NAME", "i_Enable"], "actual_designator" : ["SIMPLE_NAME", "Enable"]}
128
          , {
129
            "formal_name" : ["SIMPLE_NAME", "i_Length"], "actual_designator" : ["SIMPLE_NAME", "Length"]}
130
          , {
131
            "formal_name" : ["SIMPLE_NAME", "o_Done"], "actual_designator" : ["SIMPLE_NAME", "End_Count"]}
132
          ]}
133
        ], ["PROCESS_STATEMENT", {
134
          "id" : ["IDENTIFIER", "P_FSM"], "active_sigs" : [["SIMPLE_NAME", "i_Reset_n"], ["SIMPLE_NAME", "i_Clock"]], "PROCESS_STATEMENT_PART" : [["IF_STATEMENT", {
135
            "if_cases" : [{
136
              "if_cond" : ["EXPRESSION", {
137
                "args" : [["EXPRESSION", {
138
                  "args" : [["EXPRESSION", {
139
                    "args" : [["EXPRESSION", {
140
                      "args" : [["EXPRESSION", {
141
                        "id" : "=", "args" : [["EXPRESSION", {
142
                          "args" : [["EXPRESSION", {
143
                            "args" : [["EXPRESSION", {
144
                              "args" : [["CALL", ["SIMPLE_NAME", "i_Reset_n"]]]}
145
                            ]]}
146
                          ]]}
147
                        ], ["EXPRESSION", {
148
                          "args" : [["EXPRESSION", {
149
                            "args" : [["EXPRESSION", {
150
                              "args" : [["CONSTANT_VALUE", {
151
                                "value" : ["CST_LITERAL", "'0'"]}
152
                              ]]}
153
                            ]]}
154
                          ]]}
155
                        ]]}
156
                      ]]}
157
                    ]]}
158
                  ]]}
159
                ]]}
160
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
161
                "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
162
                  "value" : ["EXPRESSION", {
163
                    "args" : [["EXPRESSION", {
164
                      "args" : [["EXPRESSION", {
165
                        "args" : [["EXPRESSION", {
166
                          "args" : [["CALL", ["SIMPLE_NAME", "init"]]]}
167
                        ]]}
168
                      ]]}
169
                    ]]}
170
                  ]}
171
                ]}
172
              ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
173
                "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
174
                  "value" : ["EXPRESSION", {
175
                    "args" : [["EXPRESSION", {
176
                      "args" : [["EXPRESSION", {
177
                        "args" : [["EXPRESSION", {
178
                          "args" : [["CONSTANT_VALUE", {
179
                            "value" : ["CST_LITERAL", "'0'"]}
180
                          ]]}
181
                        ]]}
182
                      ]]}
183
                    ]]}
184
                  ]}
185
                ]}
186
              ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
187
                "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
188
                  "value" : ["EXPRESSION", {
189
                    "args" : [["EXPRESSION", {
190
                      "args" : [["EXPRESSION", {
191
                        "args" : [["EXPRESSION", {
192
                          "args" : [["CONSTANT_VALUE", {
193
                            "value" : ["CST_LITERAL", "'0'"]}
194
                          ]]}
195
                        ]]}
196
                      ]]}
197
                    ]]}
198
                  ]}
199
                ]}
200
              ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
201
                "lhs" : ["SIMPLE_NAME", "Count_Length"], "rhs" : [{
202
                  "value" : ["EXPRESSION", {
203
                    "args" : [["EXPRESSION", {
204
                      "args" : [["EXPRESSION", {
205
                        "args" : [["EXPRESSION", {
206
                          "args" : [["AGGREGATE", {
207
                            "elems" : [{
208
                              "choices" : [["OTHERS"]], "expr" : ["EXPRESSION", {
209
                                "args" : [["EXPRESSION", {
210
                                  "args" : [["EXPRESSION", {
211
                                    "args" : [["EXPRESSION", {
212
                                      "args" : [["CONSTANT_VALUE", {
213
                                        "value" : ["CST_LITERAL", "'0'"]}
214
                                      ]]}
215
                                    ]]}
216
                                  ]]}
217
                                ]]}
218
                              ]}
219
                            ]}
220
                          ]]}
221
                        ]]}
222
                      ]]}
223
                    ]]}
224
                  ]}
225
                ]}
226
              ]]}
227
            , {
228
              "if_cond" : ["EXPRESSION", {
229
                "args" : [["EXPRESSION", {
230
                  "args" : [["EXPRESSION", {
231
                    "args" : [["EXPRESSION", {
232
                      "args" : [["EXPRESSION", {
233
                        "args" : [["EXPRESSION", {
234
                          "args" : [["EXPRESSION", {
235
                            "args" : [["EXPRESSION", {
236
                              "args" : [["CALL", ["INDEXED_NAME", {
237
                                "id" : ["SIMPLE_NAME", "rising_edge"], "exprs" : [["EXPRESSION", {
238
                                  "args" : [["EXPRESSION", {
239
                                    "args" : [["EXPRESSION", {
240
                                      "args" : [["EXPRESSION", {
241
                                        "args" : [["CALL", ["SIMPLE_NAME", "i_Clock"]]]}
242
                                      ]]}
243
                                    ]]}
244
                                  ]]}
245
                                ]]}
246
                              ]]]}
247
                            ]]}
248
                          ]]}
249
                        ]]}
250
                      ]]}
251
                    ]]}
252
                  ]]}
253
                ]]}
254
              ], "if_block" : [["CASE_STATEMENT_TREE", {
255
                "guard" : ["EXPRESSION", {
256
                  "args" : [["EXPRESSION", {
257
                    "args" : [["EXPRESSION", {
258
                      "args" : [["EXPRESSION", {
259
                        "args" : [["CALL", ["SIMPLE_NAME", "sm_State"]]]}
260
                      ]]}
261
                    ]]}
262
                  ]]}
263
                ], "branches" : [{
264
                  "when_cond" : [["EXPRESSION", {
265
                    "args" : [["EXPRESSION", {
266
                      "args" : [["CALL", ["SIMPLE_NAME", "init"]]]}
267
                    ]]}
268
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
269
                    "lhs" : ["SIMPLE_NAME", "Length"], "rhs" : [{
270
                      "value" : ["EXPRESSION", {
271
                        "args" : [["EXPRESSION", {
272
                          "args" : [["EXPRESSION", {
273
                            "args" : [["EXPRESSION", {
274
                              "args" : [["CALL", ["SIMPLE_NAME", "c_Length"]]]}
275
                            ]]}
276
                          ]]}
277
                        ]]}
278
                      ]}
279
                    ]}
280
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
281
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
282
                      "value" : ["EXPRESSION", {
283
                        "args" : [["EXPRESSION", {
284
                          "args" : [["EXPRESSION", {
285
                            "args" : [["EXPRESSION", {
286
                              "args" : [["CALL", ["SIMPLE_NAME", "loading"]]]}
287
                            ]]}
288
                          ]]}
289
                        ]]}
290
                      ]}
291
                    ]}
292
                  ]]}
293
                , {
294
                  "when_cond" : [["EXPRESSION", {
295
                    "args" : [["EXPRESSION", {
296
                      "args" : [["CALL", ["SIMPLE_NAME", "loading"]]]}
297
                    ]]}
298
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
299
                    "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
300
                      "value" : ["EXPRESSION", {
301
                        "args" : [["EXPRESSION", {
302
                          "args" : [["EXPRESSION", {
303
                            "args" : [["EXPRESSION", {
304
                              "args" : [["CONSTANT_VALUE", {
305
                                "value" : ["CST_LITERAL", "'1'"]}
306
                              ]]}
307
                            ]]}
308
                          ]]}
309
                        ]]}
310
                      ]}
311
                    ]}
312
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
313
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
314
                      "value" : ["EXPRESSION", {
315
                        "args" : [["EXPRESSION", {
316
                          "args" : [["EXPRESSION", {
317
                            "args" : [["EXPRESSION", {
318
                              "args" : [["CALL", ["SIMPLE_NAME", "enabled"]]]}
319
                            ]]}
320
                          ]]}
321
                        ]]}
322
                      ]}
323
                    ]}
324
                  ]]}
325
                , {
326
                  "when_cond" : [["EXPRESSION", {
327
                    "args" : [["EXPRESSION", {
328
                      "args" : [["CALL", ["SIMPLE_NAME", "enabled"]]]}
329
                    ]]}
330
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
331
                    "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
332
                      "value" : ["EXPRESSION", {
333
                        "args" : [["EXPRESSION", {
334
                          "args" : [["EXPRESSION", {
335
                            "args" : [["EXPRESSION", {
336
                              "args" : [["CONSTANT_VALUE", {
337
                                "value" : ["CST_LITERAL", "'0'"]}
338
                              ]]}
339
                            ]]}
340
                          ]]}
341
                        ]]}
342
                      ]}
343
                    ]}
344
                  ], ["IF_STATEMENT", {
345
                    "if_cases" : [{
346
                      "if_cond" : ["EXPRESSION", {
347
                        "args" : [["EXPRESSION", {
348
                          "args" : [["EXPRESSION", {
349
                            "args" : [["EXPRESSION", {
350
                              "args" : [["EXPRESSION", {
351
                                "id" : "=", "args" : [["EXPRESSION", {
352
                                  "args" : [["EXPRESSION", {
353
                                    "args" : [["EXPRESSION", {
354
                                      "args" : [["CALL", ["SIMPLE_NAME", "End_Count"]]]}
355
                                    ]]}
356
                                  ]]}
357
                                ], ["EXPRESSION", {
358
                                  "args" : [["EXPRESSION", {
359
                                    "args" : [["EXPRESSION", {
360
                                      "args" : [["CONSTANT_VALUE", {
361
                                        "value" : ["CST_LITERAL", "'0'"]}
362
                                      ]]}
363
                                    ]]}
364
                                  ]]}
365
                                ]]}
366
                              ]]}
367
                            ]]}
368
                          ]]}
369
                        ]]}
370
                      ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
371
                        "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
372
                          "value" : ["EXPRESSION", {
373
                            "id" : "xor", "args" : [["EXPRESSION", {
374
                              "args" : [["EXPRESSION", {
375
                                "args" : [["EXPRESSION", {
376
                                  "args" : [["EXPRESSION", {
377
                                    "args" : [["CALL", ["SIMPLE_NAME", "i_Start"]]]}
378
                                  ]]}
379
                                ]]}
380
                              ]]}
381
                            ], ["EXPRESSION", {
382
                              "args" : [["EXPRESSION", {
383
                                "args" : [["EXPRESSION", {
384
                                  "args" : [["EXPRESSION", {
385
                                    "id" : "not", "args" : [["CALL", ["SIMPLE_NAME", "i_Stop"]]]}
386
                                  ]]}
387
                                ]]}
388
                              ]]}
389
                            ]]}
390
                          ]}
391
                        ]}
392
                      ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
393
                        "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
394
                          "value" : ["EXPRESSION", {
395
                            "args" : [["EXPRESSION", {
396
                              "args" : [["EXPRESSION", {
397
                                "args" : [["EXPRESSION", {
398
                                  "args" : [["CALL", ["SIMPLE_NAME", "Enabled"]]]}
399
                                ]]}
400
                              ]]}
401
                            ]]}
402
                          ]}
403
                        ]}
404
                      ]]}
405
                    ], "default" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
406
                      "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
407
                        "value" : ["EXPRESSION", {
408
                          "args" : [["EXPRESSION", {
409
                            "args" : [["EXPRESSION", {
410
                              "args" : [["EXPRESSION", {
411
                                "args" : [["CONSTANT_VALUE", {
412
                                  "value" : ["CST_LITERAL", "'0'"]}
413
                                ]]}
414
                              ]]}
415
                            ]]}
416
                          ]]}
417
                        ]}
418
                      ]}
419
                    ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
420
                      "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
421
                        "value" : ["EXPRESSION", {
422
                          "args" : [["EXPRESSION", {
423
                            "args" : [["EXPRESSION", {
424
                              "args" : [["EXPRESSION", {
425
                                "args" : [["CALL", ["SIMPLE_NAME", "finished"]]]}
426
                              ]]}
427
                            ]]}
428
                          ]]}
429
                        ]}
430
                      ]}
431
                    ]]}
432
                  ]]}
433
                , {
434
                  "when_cond" : [["OTHERS"]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
435
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
436
                      "value" : ["EXPRESSION", {
437
                        "args" : [["EXPRESSION", {
438
                          "args" : [["EXPRESSION", {
439
                            "args" : [["EXPRESSION", {
440
                              "args" : [["CALL", ["SIMPLE_NAME", "init"]]]}
441
                            ]]}
442
                          ]]}
443
                        ]]}
444
                      ]}
445
                    ]}
446
                  ]]}
447
                ]}
448
              ]]}
449
            ]}
450
          ]]}
451
        ]]}
452
      ]}
453
    ]}
454
  }