Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / cnes_guidelines / rule / data / STD_03900_good.json @ 2051e520

History | View | Annotate | Download (19.6 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"], "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", ["FUNCTION_CALL", {
237
                                "id" : ["SIMPLE_NAME", "rising_edge"], "assoc_list" : [{
238
                                  "actual_designator" : ["SIMPLE_NAME", "i_Clock"]}
239
                                ]}
240
                              ]]]}
241
                            ]]}
242
                          ]]}
243
                        ]]}
244
                      ]]}
245
                    ]]}
246
                  ]]}
247
                ]]}
248
              ], "if_block" : [["CASE_STATEMENT_TREE", {
249
                "guard" : ["EXPRESSION", {
250
                  "args" : [["EXPRESSION", {
251
                    "args" : [["EXPRESSION", {
252
                      "args" : [["EXPRESSION", {
253
                        "args" : [["CALL", ["SIMPLE_NAME", "sm_State"]]]}
254
                      ]]}
255
                    ]]}
256
                  ]]}
257
                ], "branches" : [{
258
                  "when_cond" : [["EXPRESSION", {
259
                    "args" : [["EXPRESSION", {
260
                      "args" : [["CALL", ["SIMPLE_NAME", "init"]]]}
261
                    ]]}
262
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
263
                    "lhs" : ["SIMPLE_NAME", "Length"], "rhs" : [{
264
                      "value" : ["EXPRESSION", {
265
                        "args" : [["EXPRESSION", {
266
                          "args" : [["EXPRESSION", {
267
                            "args" : [["EXPRESSION", {
268
                              "args" : [["CALL", ["SIMPLE_NAME", "c_Length"]]]}
269
                            ]]}
270
                          ]]}
271
                        ]]}
272
                      ]}
273
                    ]}
274
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
275
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
276
                      "value" : ["EXPRESSION", {
277
                        "args" : [["EXPRESSION", {
278
                          "args" : [["EXPRESSION", {
279
                            "args" : [["EXPRESSION", {
280
                              "args" : [["CALL", ["SIMPLE_NAME", "loading"]]]}
281
                            ]]}
282
                          ]]}
283
                        ]]}
284
                      ]}
285
                    ]}
286
                  ]]}
287
                , {
288
                  "when_cond" : [["EXPRESSION", {
289
                    "args" : [["EXPRESSION", {
290
                      "args" : [["CALL", ["SIMPLE_NAME", "loading"]]]}
291
                    ]]}
292
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
293
                    "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
294
                      "value" : ["EXPRESSION", {
295
                        "args" : [["EXPRESSION", {
296
                          "args" : [["EXPRESSION", {
297
                            "args" : [["EXPRESSION", {
298
                              "args" : [["CONSTANT_VALUE", {
299
                                "value" : ["CST_LITERAL", "'1'"]}
300
                              ]]}
301
                            ]]}
302
                          ]]}
303
                        ]]}
304
                      ]}
305
                    ]}
306
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
307
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
308
                      "value" : ["EXPRESSION", {
309
                        "args" : [["EXPRESSION", {
310
                          "args" : [["EXPRESSION", {
311
                            "args" : [["EXPRESSION", {
312
                              "args" : [["CALL", ["SIMPLE_NAME", "enabled"]]]}
313
                            ]]}
314
                          ]]}
315
                        ]]}
316
                      ]}
317
                    ]}
318
                  ]]}
319
                , {
320
                  "when_cond" : [["EXPRESSION", {
321
                    "args" : [["EXPRESSION", {
322
                      "args" : [["CALL", ["SIMPLE_NAME", "enabled"]]]}
323
                    ]]}
324
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
325
                    "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
326
                      "value" : ["EXPRESSION", {
327
                        "args" : [["EXPRESSION", {
328
                          "args" : [["EXPRESSION", {
329
                            "args" : [["EXPRESSION", {
330
                              "args" : [["CONSTANT_VALUE", {
331
                                "value" : ["CST_LITERAL", "'0'"]}
332
                              ]]}
333
                            ]]}
334
                          ]]}
335
                        ]]}
336
                      ]}
337
                    ]}
338
                  ], ["IF_STATEMENT", {
339
                    "if_cases" : [{
340
                      "if_cond" : ["EXPRESSION", {
341
                        "args" : [["EXPRESSION", {
342
                          "args" : [["EXPRESSION", {
343
                            "args" : [["EXPRESSION", {
344
                              "args" : [["EXPRESSION", {
345
                                "id" : "=", "args" : [["EXPRESSION", {
346
                                  "args" : [["EXPRESSION", {
347
                                    "args" : [["EXPRESSION", {
348
                                      "args" : [["CALL", ["SIMPLE_NAME", "End_Count"]]]}
349
                                    ]]}
350
                                  ]]}
351
                                ], ["EXPRESSION", {
352
                                  "args" : [["EXPRESSION", {
353
                                    "args" : [["EXPRESSION", {
354
                                      "args" : [["CONSTANT_VALUE", {
355
                                        "value" : ["CST_LITERAL", "'0'"]}
356
                                      ]]}
357
                                    ]]}
358
                                  ]]}
359
                                ]]}
360
                              ]]}
361
                            ]]}
362
                          ]]}
363
                        ]]}
364
                      ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
365
                        "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
366
                          "value" : ["EXPRESSION", {
367
                            "id" : "xor", "args" : [["EXPRESSION", {
368
                              "args" : [["EXPRESSION", {
369
                                "args" : [["EXPRESSION", {
370
                                  "args" : [["EXPRESSION", {
371
                                    "args" : [["CALL", ["SIMPLE_NAME", "i_Start"]]]}
372
                                  ]]}
373
                                ]]}
374
                              ]]}
375
                            ], ["EXPRESSION", {
376
                              "args" : [["EXPRESSION", {
377
                                "args" : [["EXPRESSION", {
378
                                  "args" : [["EXPRESSION", {
379
                                    "id" : "not", "args" : [["CALL", ["SIMPLE_NAME", "i_Stop"]]]}
380
                                  ]]}
381
                                ]]}
382
                              ]]}
383
                            ]]}
384
                          ]}
385
                        ]}
386
                      ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
387
                        "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
388
                          "value" : ["EXPRESSION", {
389
                            "args" : [["EXPRESSION", {
390
                              "args" : [["EXPRESSION", {
391
                                "args" : [["EXPRESSION", {
392
                                  "args" : [["CALL", ["SIMPLE_NAME", "Enabled"]]]}
393
                                ]]}
394
                              ]]}
395
                            ]]}
396
                          ]}
397
                        ]}
398
                      ]]}
399
                    ], "default" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
400
                      "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
401
                        "value" : ["EXPRESSION", {
402
                          "args" : [["EXPRESSION", {
403
                            "args" : [["EXPRESSION", {
404
                              "args" : [["EXPRESSION", {
405
                                "args" : [["CONSTANT_VALUE", {
406
                                  "value" : ["CST_LITERAL", "'0'"]}
407
                                ]]}
408
                              ]]}
409
                            ]]}
410
                          ]]}
411
                        ]}
412
                      ]}
413
                    ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
414
                      "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
415
                        "value" : ["EXPRESSION", {
416
                          "args" : [["EXPRESSION", {
417
                            "args" : [["EXPRESSION", {
418
                              "args" : [["EXPRESSION", {
419
                                "args" : [["CALL", ["SIMPLE_NAME", "finished"]]]}
420
                              ]]}
421
                            ]]}
422
                          ]]}
423
                        ]}
424
                      ]}
425
                    ]]}
426
                  ]]}
427
                , {
428
                  "when_cond" : [["OTHERS"]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
429
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
430
                      "value" : ["EXPRESSION", {
431
                        "args" : [["EXPRESSION", {
432
                          "args" : [["EXPRESSION", {
433
                            "args" : [["EXPRESSION", {
434
                              "args" : [["CALL", ["SIMPLE_NAME", "init"]]]}
435
                            ]]}
436
                          ]]}
437
                        ]]}
438
                      ]}
439
                    ]}
440
                  ]]}
441
                ]}
442
              ]]}
443
            ]}
444
          ]]}
445
        ]]}
446
      ]}
447
    ]}
448
  }