Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (21 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_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"], "inst_unit_type" : "component", "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", ["INDEXED_NAME", {
251
                                "id" : ["SIMPLE_NAME", "rising_edge"], "exprs" : [["EXPRESSION", {
252
                                  "args" : [["EXPRESSION", {
253
                                    "args" : [["EXPRESSION", {
254
                                      "args" : [["EXPRESSION", {
255
                                        "args" : [["CALL", ["SIMPLE_NAME", "i_Clock"]]]}
256
                                      ]]}
257
                                    ]]}
258
                                  ]]}
259
                                ]]}
260
                              ]]]}
261
                            ]]}
262
                          ]]}
263
                        ]]}
264
                      ]]}
265
                    ]]}
266
                  ]]}
267
                ]]}
268
              ], "if_block" : [["CASE_STATEMENT_TREE", {
269
                "guard" : ["EXPRESSION", {
270
                  "args" : [["EXPRESSION", {
271
                    "args" : [["EXPRESSION", {
272
                      "args" : [["EXPRESSION", {
273
                        "args" : [["CALL", ["SIMPLE_NAME", "sm_State"]]]}
274
                      ]]}
275
                    ]]}
276
                  ]]}
277
                ], "branches" : [{
278
                  "when_cond" : [["EXPRESSION", {
279
                    "args" : [["EXPRESSION", {
280
                      "args" : [["CONSTANT_VALUE", {
281
                        "value" : ["CST_LITERAL", "\"0001\""]}
282
                      ]]}
283
                    ]]}
284
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
285
                    "lhs" : ["SIMPLE_NAME", "Length"], "rhs" : [{
286
                      "value" : ["EXPRESSION", {
287
                        "args" : [["EXPRESSION", {
288
                          "args" : [["EXPRESSION", {
289
                            "args" : [["EXPRESSION", {
290
                              "args" : [["CALL", ["SIMPLE_NAME", "c_Length"]]]}
291
                            ]]}
292
                          ]]}
293
                        ]]}
294
                      ]}
295
                    ]}
296
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
297
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
298
                      "value" : ["EXPRESSION", {
299
                        "args" : [["EXPRESSION", {
300
                          "args" : [["EXPRESSION", {
301
                            "args" : [["EXPRESSION", {
302
                              "args" : [["CONSTANT_VALUE", {
303
                                "value" : ["CST_LITERAL", "\"0010\""]}
304
                              ]]}
305
                            ]]}
306
                          ]]}
307
                        ]]}
308
                      ]}
309
                    ]}
310
                  ]]}
311
                , {
312
                  "when_cond" : [["EXPRESSION", {
313
                    "args" : [["EXPRESSION", {
314
                      "args" : [["CONSTANT_VALUE", {
315
                        "value" : ["CST_LITERAL", "\"0010\""]}
316
                      ]]}
317
                    ]]}
318
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
319
                    "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
320
                      "value" : ["EXPRESSION", {
321
                        "args" : [["EXPRESSION", {
322
                          "args" : [["EXPRESSION", {
323
                            "args" : [["EXPRESSION", {
324
                              "args" : [["CONSTANT_VALUE", {
325
                                "value" : ["CST_LITERAL", "'1'"]}
326
                              ]]}
327
                            ]]}
328
                          ]]}
329
                        ]]}
330
                      ]}
331
                    ]}
332
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
333
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
334
                      "value" : ["EXPRESSION", {
335
                        "args" : [["EXPRESSION", {
336
                          "args" : [["EXPRESSION", {
337
                            "args" : [["EXPRESSION", {
338
                              "args" : [["CONSTANT_VALUE", {
339
                                "value" : ["CST_LITERAL", "\"0100\""]}
340
                              ]]}
341
                            ]]}
342
                          ]]}
343
                        ]]}
344
                      ]}
345
                    ]}
346
                  ]]}
347
                , {
348
                  "when_cond" : [["EXPRESSION", {
349
                    "args" : [["EXPRESSION", {
350
                      "args" : [["CONSTANT_VALUE", {
351
                        "value" : ["CST_LITERAL", "\"0100\""]}
352
                      ]]}
353
                    ]]}
354
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
355
                    "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
356
                      "value" : ["EXPRESSION", {
357
                        "args" : [["EXPRESSION", {
358
                          "args" : [["EXPRESSION", {
359
                            "args" : [["EXPRESSION", {
360
                              "args" : [["CONSTANT_VALUE", {
361
                                "value" : ["CST_LITERAL", "'0'"]}
362
                              ]]}
363
                            ]]}
364
                          ]]}
365
                        ]]}
366
                      ]}
367
                    ]}
368
                  ], ["IF_STATEMENT", {
369
                    "if_cases" : [{
370
                      "if_cond" : ["EXPRESSION", {
371
                        "args" : [["EXPRESSION", {
372
                          "args" : [["EXPRESSION", {
373
                            "args" : [["EXPRESSION", {
374
                              "args" : [["EXPRESSION", {
375
                                "id" : "=", "args" : [["EXPRESSION", {
376
                                  "args" : [["EXPRESSION", {
377
                                    "args" : [["EXPRESSION", {
378
                                      "args" : [["CALL", ["SIMPLE_NAME", "End_Count"]]]}
379
                                    ]]}
380
                                  ]]}
381
                                ], ["EXPRESSION", {
382
                                  "args" : [["EXPRESSION", {
383
                                    "args" : [["EXPRESSION", {
384
                                      "args" : [["CONSTANT_VALUE", {
385
                                        "value" : ["CST_LITERAL", "'0'"]}
386
                                      ]]}
387
                                    ]]}
388
                                  ]]}
389
                                ]]}
390
                              ]]}
391
                            ]]}
392
                          ]]}
393
                        ]]}
394
                      ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
395
                        "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
396
                          "value" : ["EXPRESSION", {
397
                            "id" : "xor", "args" : [["EXPRESSION", {
398
                              "args" : [["EXPRESSION", {
399
                                "args" : [["EXPRESSION", {
400
                                  "args" : [["EXPRESSION", {
401
                                    "args" : [["CALL", ["SIMPLE_NAME", "i_Start"]]]}
402
                                  ]]}
403
                                ]]}
404
                              ]]}
405
                            ], ["EXPRESSION", {
406
                              "args" : [["EXPRESSION", {
407
                                "args" : [["EXPRESSION", {
408
                                  "args" : [["EXPRESSION", {
409
                                    "id" : "not", "args" : [["CALL", ["SIMPLE_NAME", "i_Stop"]]]}
410
                                  ]]}
411
                                ]]}
412
                              ]]}
413
                            ]]}
414
                          ]}
415
                        ]}
416
                      ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
417
                        "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
418
                          "value" : ["EXPRESSION", {
419
                            "args" : [["EXPRESSION", {
420
                              "args" : [["EXPRESSION", {
421
                                "args" : [["EXPRESSION", {
422
                                  "args" : [["CONSTANT_VALUE", {
423
                                    "value" : ["CST_LITERAL", "\"0100\""]}
424
                                  ]]}
425
                                ]]}
426
                              ]]}
427
                            ]]}
428
                          ]}
429
                        ]}
430
                      ]]}
431
                    ], "default" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
432
                      "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
433
                        "value" : ["EXPRESSION", {
434
                          "args" : [["EXPRESSION", {
435
                            "args" : [["EXPRESSION", {
436
                              "args" : [["EXPRESSION", {
437
                                "args" : [["CONSTANT_VALUE", {
438
                                  "value" : ["CST_LITERAL", "'0'"]}
439
                                ]]}
440
                              ]]}
441
                            ]]}
442
                          ]]}
443
                        ]}
444
                      ]}
445
                    ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
446
                      "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
447
                        "value" : ["EXPRESSION", {
448
                          "args" : [["EXPRESSION", {
449
                            "args" : [["EXPRESSION", {
450
                              "args" : [["EXPRESSION", {
451
                                "args" : [["CONSTANT_VALUE", {
452
                                  "value" : ["CST_LITERAL", "\"1000\""]}
453
                                ]]}
454
                              ]]}
455
                            ]]}
456
                          ]]}
457
                        ]}
458
                      ]}
459
                    ]]}
460
                  ]]}
461
                , {
462
                  "when_cond" : [["OTHERS"]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
463
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
464
                      "value" : ["EXPRESSION", {
465
                        "args" : [["EXPRESSION", {
466
                          "args" : [["EXPRESSION", {
467
                            "args" : [["EXPRESSION", {
468
                              "args" : [["CONSTANT_VALUE", {
469
                                "value" : ["CST_LITERAL", "\"0001\""]}
470
                              ]]}
471
                            ]]}
472
                          ]]}
473
                        ]]}
474
                      ]}
475
                    ]}
476
                  ]]}
477
                ]}
478
              ]]}
479
            ]}
480
          ]]}
481
        ]]}
482
      ]}
483
    ]}
484
  }