Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (20.7 KB)

1 2051e520 Arnaud Dieumegard
{
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_bad"], "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_bad"], "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
          "declaration" : ["SIGNAL_DECLARATION", {
71
            "names" : [["IDENTIFIER", "sm_State"]], "typ" : {
72
              "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
73
                "ranges" : [["RANGE_WITH_DIRECTION", {
74
                  "direction" : "downto", "from" : ["EXPRESSION", {
75
                    "args" : [["EXPRESSION", {
76
                      "args" : [["CONSTANT_VALUE", {
77
                        "value" : ["CST_LITERAL", "3"]}
78
                      ]]}
79
                    ]]}
80
                  ], "_to" : ["EXPRESSION", {
81
                    "args" : [["EXPRESSION", {
82
                      "args" : [["CONSTANT_VALUE", {
83
                        "value" : ["CST_LITERAL", "0"]}
84
                      ]]}
85
                    ]]}
86
                  ]}
87
                ]]}
88
              ]}
89
            }
90
          ]}
91
        , {
92
          "declaration" : ["SIGNAL_DECLARATION", {
93
            "names" : [["IDENTIFIER", "Raz"]], "typ" : {
94
              "name" : ["SIMPLE_NAME", "std_logic"]}
95
            }
96
          ]}
97
        , {
98
          "declaration" : ["SIGNAL_DECLARATION", {
99
            "names" : [["IDENTIFIER", "Enable"]], "typ" : {
100
              "name" : ["SIMPLE_NAME", "std_logic"]}
101
            }
102
          ]}
103
        , {
104
          "declaration" : ["SIGNAL_DECLARATION", {
105
            "names" : [["IDENTIFIER", "Length"]], "typ" : {
106
              "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
107
                "ranges" : [["RANGE_WITH_DIRECTION", {
108
                  "direction" : "downto", "from" : ["EXPRESSION", {
109
                    "args" : [["EXPRESSION", {
110
                      "args" : [["CONSTANT_VALUE", {
111
                        "value" : ["CST_LITERAL", "3"]}
112
                      ]]}
113
                    ]]}
114
                  ], "_to" : ["EXPRESSION", {
115
                    "args" : [["EXPRESSION", {
116
                      "args" : [["CONSTANT_VALUE", {
117
                        "value" : ["CST_LITERAL", "0"]}
118
                      ]]}
119
                    ]]}
120
                  ]}
121
                ]]}
122
              ]}
123
            }
124
          ]}
125
        , {
126
          "declaration" : ["SIGNAL_DECLARATION", {
127
            "names" : [["IDENTIFIER", "End_Count"]], "typ" : {
128
              "name" : ["SIMPLE_NAME", "std_logic"]}
129
            }
130
          ]}
131
        ], "ARCHITECTURE_STATEMENT_PART" : [["COMPONENT_INSTANTIATION_STATEMENT", {
132
          "name" : ["IDENTIFIER", "Counter"], "inst_unit" : ["SIMPLE_NAME", "Counter"], "port_map" : [{
133
            "formal_name" : ["SIMPLE_NAME", "i_Clock"], "actual_designator" : ["SIMPLE_NAME", "i_Clock"]}
134
          , {
135
            "formal_name" : ["SIMPLE_NAME", "i_Reset_n"], "actual_designator" : ["SIMPLE_NAME", "i_Reset_n"]}
136
          , {
137
            "formal_name" : ["SIMPLE_NAME", "i_Raz"], "actual_designator" : ["SIMPLE_NAME", "Raz"]}
138
          , {
139
            "formal_name" : ["SIMPLE_NAME", "i_Enable"], "actual_designator" : ["SIMPLE_NAME", "Enable"]}
140
          , {
141
            "formal_name" : ["SIMPLE_NAME", "i_Length"], "actual_designator" : ["SIMPLE_NAME", "Length"]}
142
          , {
143
            "formal_name" : ["SIMPLE_NAME", "o_Done"], "actual_designator" : ["SIMPLE_NAME", "End_Count"]}
144
          ]}
145
        ], ["PROCESS_STATEMENT", {
146
          "id" : ["IDENTIFIER", "P_FSM"], "active_sigs" : [["SIMPLE_NAME", "i_Reset_n"], ["SIMPLE_NAME", "i_Clock"]], "PROCESS_STATEMENT_PART" : [["IF_STATEMENT", {
147
            "if_cases" : [{
148
              "if_cond" : ["EXPRESSION", {
149
                "args" : [["EXPRESSION", {
150
                  "args" : [["EXPRESSION", {
151
                    "args" : [["EXPRESSION", {
152
                      "args" : [["EXPRESSION", {
153
                        "id" : "=", "args" : [["EXPRESSION", {
154
                          "args" : [["EXPRESSION", {
155
                            "args" : [["EXPRESSION", {
156
                              "args" : [["CALL", ["SIMPLE_NAME", "i_Reset_n"]]]}
157
                            ]]}
158
                          ]]}
159
                        ], ["EXPRESSION", {
160
                          "args" : [["EXPRESSION", {
161
                            "args" : [["EXPRESSION", {
162
                              "args" : [["CONSTANT_VALUE", {
163
                                "value" : ["CST_LITERAL", "'0'"]}
164
                              ]]}
165
                            ]]}
166
                          ]]}
167
                        ]]}
168
                      ]]}
169
                    ]]}
170
                  ]]}
171
                ]]}
172
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
173
                "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
174
                  "value" : ["EXPRESSION", {
175
                    "args" : [["EXPRESSION", {
176
                      "args" : [["EXPRESSION", {
177
                        "args" : [["EXPRESSION", {
178
                          "args" : [["CONSTANT_VALUE", {
179
                            "value" : ["CST_LITERAL", "\"0001\""]}
180
                          ]]}
181
                        ]]}
182
                      ]]}
183
                    ]]}
184
                  ]}
185
                ]}
186
              ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
187
                "lhs" : ["SIMPLE_NAME", "Raz"], "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", "Enable"], "rhs" : [{
202
                  "value" : ["EXPRESSION", {
203
                    "args" : [["EXPRESSION", {
204
                      "args" : [["EXPRESSION", {
205
                        "args" : [["EXPRESSION", {
206
                          "args" : [["CONSTANT_VALUE", {
207
                            "value" : ["CST_LITERAL", "'0'"]}
208
                          ]]}
209
                        ]]}
210
                      ]]}
211
                    ]]}
212
                  ]}
213
                ]}
214
              ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
215
                "lhs" : ["SIMPLE_NAME", "Count_Length"], "rhs" : [{
216
                  "value" : ["EXPRESSION", {
217
                    "args" : [["EXPRESSION", {
218
                      "args" : [["EXPRESSION", {
219
                        "args" : [["EXPRESSION", {
220
                          "args" : [["AGGREGATE", {
221
                            "elems" : [{
222
                              "choices" : [["OTHERS"]], "expr" : ["EXPRESSION", {
223
                                "args" : [["EXPRESSION", {
224
                                  "args" : [["EXPRESSION", {
225
                                    "args" : [["EXPRESSION", {
226
                                      "args" : [["CONSTANT_VALUE", {
227
                                        "value" : ["CST_LITERAL", "'0'"]}
228
                                      ]]}
229
                                    ]]}
230
                                  ]]}
231
                                ]]}
232
                              ]}
233
                            ]}
234
                          ]]}
235
                        ]]}
236
                      ]]}
237
                    ]]}
238
                  ]}
239
                ]}
240
              ]]}
241
            , {
242
              "if_cond" : ["EXPRESSION", {
243
                "args" : [["EXPRESSION", {
244
                  "args" : [["EXPRESSION", {
245
                    "args" : [["EXPRESSION", {
246
                      "args" : [["EXPRESSION", {
247
                        "args" : [["EXPRESSION", {
248
                          "args" : [["EXPRESSION", {
249
                            "args" : [["EXPRESSION", {
250
                              "args" : [["CALL", ["FUNCTION_CALL", {
251
                                "id" : ["SIMPLE_NAME", "rising_edge"], "assoc_list" : [{
252
                                  "actual_designator" : ["SIMPLE_NAME", "i_Clock"]}
253
                                ]}
254
                              ]]]}
255
                            ]]}
256
                          ]]}
257
                        ]]}
258
                      ]]}
259
                    ]]}
260
                  ]]}
261
                ]]}
262
              ], "if_block" : [["CASE_STATEMENT_TREE", {
263
                "guard" : ["EXPRESSION", {
264
                  "args" : [["EXPRESSION", {
265
                    "args" : [["EXPRESSION", {
266
                      "args" : [["EXPRESSION", {
267
                        "args" : [["CALL", ["SIMPLE_NAME", "sm_State"]]]}
268
                      ]]}
269
                    ]]}
270
                  ]]}
271
                ], "branches" : [{
272
                  "when_cond" : [["EXPRESSION", {
273
                    "args" : [["EXPRESSION", {
274
                      "args" : [["CONSTANT_VALUE", {
275
                        "value" : ["CST_LITERAL", "\"0001\""]}
276
                      ]]}
277
                    ]]}
278
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
279
                    "lhs" : ["SIMPLE_NAME", "Length"], "rhs" : [{
280
                      "value" : ["EXPRESSION", {
281
                        "args" : [["EXPRESSION", {
282
                          "args" : [["EXPRESSION", {
283
                            "args" : [["EXPRESSION", {
284
                              "args" : [["CALL", ["SIMPLE_NAME", "c_Length"]]]}
285
                            ]]}
286
                          ]]}
287
                        ]]}
288
                      ]}
289
                    ]}
290
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
291
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
292
                      "value" : ["EXPRESSION", {
293
                        "args" : [["EXPRESSION", {
294
                          "args" : [["EXPRESSION", {
295
                            "args" : [["EXPRESSION", {
296
                              "args" : [["CONSTANT_VALUE", {
297
                                "value" : ["CST_LITERAL", "\"0010\""]}
298
                              ]]}
299
                            ]]}
300
                          ]]}
301
                        ]]}
302
                      ]}
303
                    ]}
304
                  ]]}
305
                , {
306
                  "when_cond" : [["EXPRESSION", {
307
                    "args" : [["EXPRESSION", {
308
                      "args" : [["CONSTANT_VALUE", {
309
                        "value" : ["CST_LITERAL", "\"0010\""]}
310
                      ]]}
311
                    ]]}
312
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
313
                    "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
314
                      "value" : ["EXPRESSION", {
315
                        "args" : [["EXPRESSION", {
316
                          "args" : [["EXPRESSION", {
317
                            "args" : [["EXPRESSION", {
318
                              "args" : [["CONSTANT_VALUE", {
319
                                "value" : ["CST_LITERAL", "'1'"]}
320
                              ]]}
321
                            ]]}
322
                          ]]}
323
                        ]]}
324
                      ]}
325
                    ]}
326
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
327
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
328
                      "value" : ["EXPRESSION", {
329
                        "args" : [["EXPRESSION", {
330
                          "args" : [["EXPRESSION", {
331
                            "args" : [["EXPRESSION", {
332
                              "args" : [["CONSTANT_VALUE", {
333
                                "value" : ["CST_LITERAL", "\"0100\""]}
334
                              ]]}
335
                            ]]}
336
                          ]]}
337
                        ]]}
338
                      ]}
339
                    ]}
340
                  ]]}
341
                , {
342
                  "when_cond" : [["EXPRESSION", {
343
                    "args" : [["EXPRESSION", {
344
                      "args" : [["CONSTANT_VALUE", {
345
                        "value" : ["CST_LITERAL", "\"0100\""]}
346
                      ]]}
347
                    ]]}
348
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
349
                    "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
350
                      "value" : ["EXPRESSION", {
351
                        "args" : [["EXPRESSION", {
352
                          "args" : [["EXPRESSION", {
353
                            "args" : [["EXPRESSION", {
354
                              "args" : [["CONSTANT_VALUE", {
355
                                "value" : ["CST_LITERAL", "'0'"]}
356
                              ]]}
357
                            ]]}
358
                          ]]}
359
                        ]]}
360
                      ]}
361
                    ]}
362
                  ], ["IF_STATEMENT", {
363
                    "if_cases" : [{
364
                      "if_cond" : ["EXPRESSION", {
365
                        "args" : [["EXPRESSION", {
366
                          "args" : [["EXPRESSION", {
367
                            "args" : [["EXPRESSION", {
368
                              "args" : [["EXPRESSION", {
369
                                "id" : "=", "args" : [["EXPRESSION", {
370
                                  "args" : [["EXPRESSION", {
371
                                    "args" : [["EXPRESSION", {
372
                                      "args" : [["CALL", ["SIMPLE_NAME", "End_Count"]]]}
373
                                    ]]}
374
                                  ]]}
375
                                ], ["EXPRESSION", {
376
                                  "args" : [["EXPRESSION", {
377
                                    "args" : [["EXPRESSION", {
378
                                      "args" : [["CONSTANT_VALUE", {
379
                                        "value" : ["CST_LITERAL", "'0'"]}
380
                                      ]]}
381
                                    ]]}
382
                                  ]]}
383
                                ]]}
384
                              ]]}
385
                            ]]}
386
                          ]]}
387
                        ]]}
388
                      ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
389
                        "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
390
                          "value" : ["EXPRESSION", {
391
                            "id" : "xor", "args" : [["EXPRESSION", {
392
                              "args" : [["EXPRESSION", {
393
                                "args" : [["EXPRESSION", {
394
                                  "args" : [["EXPRESSION", {
395
                                    "args" : [["CALL", ["SIMPLE_NAME", "i_Start"]]]}
396
                                  ]]}
397
                                ]]}
398
                              ]]}
399
                            ], ["EXPRESSION", {
400
                              "args" : [["EXPRESSION", {
401
                                "args" : [["EXPRESSION", {
402
                                  "args" : [["EXPRESSION", {
403
                                    "id" : "not", "args" : [["CALL", ["SIMPLE_NAME", "i_Stop"]]]}
404
                                  ]]}
405
                                ]]}
406
                              ]]}
407
                            ]]}
408
                          ]}
409
                        ]}
410
                      ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
411
                        "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
412
                          "value" : ["EXPRESSION", {
413
                            "args" : [["EXPRESSION", {
414
                              "args" : [["EXPRESSION", {
415
                                "args" : [["EXPRESSION", {
416
                                  "args" : [["CONSTANT_VALUE", {
417
                                    "value" : ["CST_LITERAL", "\"0100\""]}
418
                                  ]]}
419
                                ]]}
420
                              ]]}
421
                            ]]}
422
                          ]}
423
                        ]}
424
                      ]]}
425
                    ], "default" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
426
                      "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
427
                        "value" : ["EXPRESSION", {
428
                          "args" : [["EXPRESSION", {
429
                            "args" : [["EXPRESSION", {
430
                              "args" : [["EXPRESSION", {
431
                                "args" : [["CONSTANT_VALUE", {
432
                                  "value" : ["CST_LITERAL", "'0'"]}
433
                                ]]}
434
                              ]]}
435
                            ]]}
436
                          ]]}
437
                        ]}
438
                      ]}
439
                    ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
440
                      "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
441
                        "value" : ["EXPRESSION", {
442
                          "args" : [["EXPRESSION", {
443
                            "args" : [["EXPRESSION", {
444
                              "args" : [["EXPRESSION", {
445
                                "args" : [["CONSTANT_VALUE", {
446
                                  "value" : ["CST_LITERAL", "\"1000\""]}
447
                                ]]}
448
                              ]]}
449
                            ]]}
450
                          ]]}
451
                        ]}
452
                      ]}
453
                    ]]}
454
                  ]]}
455
                , {
456
                  "when_cond" : [["OTHERS"]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
457
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
458
                      "value" : ["EXPRESSION", {
459
                        "args" : [["EXPRESSION", {
460
                          "args" : [["EXPRESSION", {
461
                            "args" : [["EXPRESSION", {
462
                              "args" : [["CONSTANT_VALUE", {
463
                                "value" : ["CST_LITERAL", "\"0001\""]}
464
                              ]]}
465
                            ]]}
466
                          ]]}
467
                        ]]}
468
                      ]}
469
                    ]}
470
                  ]]}
471
                ]}
472
              ]]}
473
            ]}
474
          ]]}
475
        ]]}
476
      ]}
477
    ]}
478
  }