Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (18.1 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_CLAUSE", [["IDENTIFIER", "work"]]], ["USE_CLAUSE", [["SELECTED_NAME", [["SIMPLE_NAME", "work"], ["SIMPLE_NAME", "pkg_HBK"]]]]]], "library" : ["ENTITY_DECLARATION", {
5
        "name" : ["IDENTIFIER", "CNE_01600_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_Raz"]], "mode" : ["in"], "typ" : {
15
            "name" : ["SIMPLE_NAME", "std_logic"]}
16
          }
17
        , {
18
          "names" : [["IDENTIFIER", "i_Enable"]], "mode" : ["in"], "typ" : {
19
            "name" : ["SIMPLE_NAME", "std_logic"]}
20
          }
21
        , {
22
          "names" : [["IDENTIFIER", "i_Length"]], "mode" : ["in"], "typ" : {
23
            "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
24
              "ranges" : [["RANGE_WITH_DIRECTION", {
25
                "direction" : "downto", "from" : ["EXPRESSION", {
26
                  "args" : [["EXPRESSION", {
27
                    "args" : [["CALL", ["SIMPLE_NAME", "Width"]]]}
28
                  ]]}
29
                ], "_to" : ["EXPRESSION", {
30
                  "args" : [["EXPRESSION", {
31
                    "args" : [["CONSTANT_VALUE", {
32
                      "value" : ["CST_LITERAL", "0"]}
33
                    ]]}
34
                  ]]}
35
                ]}
36
              ]]}
37
            ]}
38
          }
39
        , {
40
          "names" : [["IDENTIFIER", "o_Done"]], "mode" : ["out"], "typ" : {
41
            "name" : ["SIMPLE_NAME", "std_logic"]}
42
          }
43
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
44
      ]}
45
    , {
46
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
47
        "name" : ["IDENTIFIER", "Behavioral"], "entity" : ["IDENTIFIER", "CNE_01600_good"], "ARCHITECTURE_DECLARATIVE_PART" : [{
48
          "declaration" : ["SIGNAL_DECLARATION", {
49
            "names" : [["IDENTIFIER", "Count"]], "typ" : {
50
              "name" : ["SIMPLE_NAME", "signed"], "const" : ["INDEX_CONSTRAINT", {
51
                "ranges" : [["RANGE_WITH_DIRECTION", {
52
                  "direction" : "downto", "from" : ["EXPRESSION", {
53
                    "args" : [["EXPRESSION", {
54
                      "args" : [["CALL", ["SIMPLE_NAME", "Width"]]]}
55
                    ]]}
56
                  ], "_to" : ["EXPRESSION", {
57
                    "args" : [["EXPRESSION", {
58
                      "args" : [["CONSTANT_VALUE", {
59
                        "value" : ["CST_LITERAL", "0"]}
60
                      ]]}
61
                    ]]}
62
                  ]}
63
                ]]}
64
              ]}
65
            }
66
          ]}
67
        , {
68
          "declaration" : ["SIGNAL_DECLARATION", {
69
            "names" : [["IDENTIFIER", "Length"]], "typ" : {
70
              "name" : ["SIMPLE_NAME", "signed"], "const" : ["INDEX_CONSTRAINT", {
71
                "ranges" : [["RANGE_WITH_DIRECTION", {
72
                  "direction" : "downto", "from" : ["EXPRESSION", {
73
                    "args" : [["EXPRESSION", {
74
                      "args" : [["CALL", ["SIMPLE_NAME", "Width"]]]}
75
                    ]]}
76
                  ], "_to" : ["EXPRESSION", {
77
                    "args" : [["EXPRESSION", {
78
                      "args" : [["CONSTANT_VALUE", {
79
                        "value" : ["CST_LITERAL", "0"]}
80
                      ]]}
81
                    ]]}
82
                  ]}
83
                ]]}
84
              ]}
85
            }
86
          ]}
87
        , {
88
          "declaration" : ["SIGNAL_DECLARATION", {
89
            "names" : [["IDENTIFIER", "Done"]], "typ" : {
90
              "name" : ["SIMPLE_NAME", "std_logic"]}
91
            }
92
          ]}
93
        ], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
94
          "id" : ["IDENTIFIER", "P_Count"], "active_sigs" : [["SIMPLE_NAME", "i_Reset_n"], ["SIMPLE_NAME", "i_Clock"]], "PROCESS_STATEMENT_PART" : [["IF_STATEMENT", {
95
            "if_cases" : [{
96
              "if_cond" : ["EXPRESSION", {
97
                "args" : [["EXPRESSION", {
98
                  "args" : [["EXPRESSION", {
99
                    "args" : [["EXPRESSION", {
100
                      "args" : [["EXPRESSION", {
101
                        "id" : "=", "args" : [["EXPRESSION", {
102
                          "args" : [["EXPRESSION", {
103
                            "args" : [["EXPRESSION", {
104
                              "args" : [["CALL", ["SIMPLE_NAME", "i_Reset_n"]]]}
105
                            ]]}
106
                          ]]}
107
                        ], ["EXPRESSION", {
108
                          "args" : [["EXPRESSION", {
109
                            "args" : [["EXPRESSION", {
110
                              "args" : [["CONSTANT_VALUE", {
111
                                "value" : ["CST_LITERAL", "'0'"]}
112
                              ]]}
113
                            ]]}
114
                          ]]}
115
                        ]]}
116
                      ]]}
117
                    ]]}
118
                  ]]}
119
                ]]}
120
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
121
                "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
122
                  "value" : ["EXPRESSION", {
123
                    "args" : [["EXPRESSION", {
124
                      "args" : [["EXPRESSION", {
125
                        "args" : [["EXPRESSION", {
126
                          "args" : [["AGGREGATE", {
127
                            "elems" : [{
128
                              "choices" : [["OTHERS"]], "expr" : ["EXPRESSION", {
129
                                "args" : [["EXPRESSION", {
130
                                  "args" : [["EXPRESSION", {
131
                                    "args" : [["EXPRESSION", {
132
                                      "args" : [["CONSTANT_VALUE", {
133
                                        "value" : ["CST_LITERAL", "'0'"]}
134
                                      ]]}
135
                                    ]]}
136
                                  ]]}
137
                                ]]}
138
                              ]}
139
                            ]}
140
                          ]]}
141
                        ]]}
142
                      ]]}
143
                    ]]}
144
                  ]}
145
                ]}
146
              ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
147
                "lhs" : ["SIMPLE_NAME", "Length"], "rhs" : [{
148
                  "value" : ["EXPRESSION", {
149
                    "args" : [["EXPRESSION", {
150
                      "args" : [["EXPRESSION", {
151
                        "args" : [["EXPRESSION", {
152
                          "args" : [["AGGREGATE", {
153
                            "elems" : [{
154
                              "choices" : [["OTHERS"]], "expr" : ["EXPRESSION", {
155
                                "args" : [["EXPRESSION", {
156
                                  "args" : [["EXPRESSION", {
157
                                    "args" : [["EXPRESSION", {
158
                                      "args" : [["CONSTANT_VALUE", {
159
                                        "value" : ["CST_LITERAL", "'0'"]}
160
                                      ]]}
161
                                    ]]}
162
                                  ]]}
163
                                ]]}
164
                              ]}
165
                            ]}
166
                          ]]}
167
                        ]]}
168
                      ]]}
169
                    ]]}
170
                  ]}
171
                ]}
172
              ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
173
                "lhs" : ["SIMPLE_NAME", "Done"], "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
              ]]}
187
            , {
188
              "if_cond" : ["EXPRESSION", {
189
                "args" : [["EXPRESSION", {
190
                  "args" : [["EXPRESSION", {
191
                    "args" : [["EXPRESSION", {
192
                      "args" : [["EXPRESSION", {
193
                        "args" : [["EXPRESSION", {
194
                          "args" : [["EXPRESSION", {
195
                            "args" : [["EXPRESSION", {
196
                              "args" : [["CALL", ["FUNCTION_CALL", {
197
                                "id" : ["SIMPLE_NAME", "rising_edge"], "assoc_list" : [{
198
                                  "actual_designator" : ["SIMPLE_NAME", "i_Clock"]}
199
                                ]}
200
                              ]]]}
201
                            ]]}
202
                          ]]}
203
                        ]]}
204
                      ]]}
205
                    ]]}
206
                  ]]}
207
                ]]}
208
              ], "if_block" : [["IF_STATEMENT", {
209
                "if_cases" : [{
210
                  "if_cond" : ["EXPRESSION", {
211
                    "args" : [["EXPRESSION", {
212
                      "args" : [["EXPRESSION", {
213
                        "args" : [["EXPRESSION", {
214
                          "args" : [["EXPRESSION", {
215
                            "id" : "=", "args" : [["EXPRESSION", {
216
                              "args" : [["EXPRESSION", {
217
                                "args" : [["EXPRESSION", {
218
                                  "args" : [["CALL", ["SIMPLE_NAME", "i_Raz"]]]}
219
                                ]]}
220
                              ]]}
221
                            ], ["EXPRESSION", {
222
                              "args" : [["EXPRESSION", {
223
                                "args" : [["EXPRESSION", {
224
                                  "args" : [["CONSTANT_VALUE", {
225
                                    "value" : ["CST_LITERAL", "'1'"]}
226
                                  ]]}
227
                                ]]}
228
                              ]]}
229
                            ]]}
230
                          ]]}
231
                        ]]}
232
                      ]]}
233
                    ]]}
234
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
235
                    "lhs" : ["SIMPLE_NAME", "Length"], "rhs" : [{
236
                      "value" : ["EXPRESSION", {
237
                        "args" : [["EXPRESSION", {
238
                          "args" : [["EXPRESSION", {
239
                            "args" : [["EXPRESSION", {
240
                              "args" : [["CALL", ["FUNCTION_CALL", {
241
                                "id" : ["SIMPLE_NAME", "signed"], "assoc_list" : [{
242
                                  "actual_designator" : ["SIMPLE_NAME", "i_Length"]}
243
                                ]}
244
                              ]]]}
245
                            ]]}
246
                          ]]}
247
                        ]]}
248
                      ]}
249
                    ]}
250
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
251
                    "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
252
                      "value" : ["EXPRESSION", {
253
                        "args" : [["EXPRESSION", {
254
                          "args" : [["EXPRESSION", {
255
                            "args" : [["EXPRESSION", {
256
                              "args" : [["AGGREGATE", {
257
                                "elems" : [{
258
                                  "choices" : [["OTHERS"]], "expr" : ["EXPRESSION", {
259
                                    "args" : [["EXPRESSION", {
260
                                      "args" : [["EXPRESSION", {
261
                                        "args" : [["EXPRESSION", {
262
                                          "args" : [["CONSTANT_VALUE", {
263
                                            "value" : ["CST_LITERAL", "'0'"]}
264
                                          ]]}
265
                                        ]]}
266
                                      ]]}
267
                                    ]]}
268
                                  ]}
269
                                ]}
270
                              ]]}
271
                            ]]}
272
                          ]]}
273
                        ]]}
274
                      ]}
275
                    ]}
276
                  ]]}
277
                , {
278
                  "if_cond" : ["EXPRESSION", {
279
                    "args" : [["EXPRESSION", {
280
                      "args" : [["EXPRESSION", {
281
                        "args" : [["EXPRESSION", {
282
                          "args" : [["EXPRESSION", {
283
                            "id" : "and", "args" : [["EXPRESSION", {
284
                              "id" : "=", "args" : [["EXPRESSION", {
285
                                "args" : [["EXPRESSION", {
286
                                  "args" : [["EXPRESSION", {
287
                                    "args" : [["CALL", ["SIMPLE_NAME", "i_Enable"]]]}
288
                                  ]]}
289
                                ]]}
290
                              ], ["EXPRESSION", {
291
                                "args" : [["EXPRESSION", {
292
                                  "args" : [["EXPRESSION", {
293
                                    "args" : [["CONSTANT_VALUE", {
294
                                      "value" : ["CST_LITERAL", "'1'"]}
295
                                    ]]}
296
                                  ]]}
297
                                ]]}
298
                              ]]}
299
                            ], ["EXPRESSION", {
300
                              "id" : "=", "args" : [["EXPRESSION", {
301
                                "args" : [["EXPRESSION", {
302
                                  "args" : [["EXPRESSION", {
303
                                    "args" : [["CALL", ["SIMPLE_NAME", "Done"]]]}
304
                                  ]]}
305
                                ]]}
306
                              ], ["EXPRESSION", {
307
                                "args" : [["EXPRESSION", {
308
                                  "args" : [["EXPRESSION", {
309
                                    "args" : [["CONSTANT_VALUE", {
310
                                      "value" : ["CST_LITERAL", "'0'"]}
311
                                    ]]}
312
                                  ]]}
313
                                ]]}
314
                              ]]}
315
                            ]]}
316
                          ]]}
317
                        ]]}
318
                      ]]}
319
                    ]]}
320
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
321
                    "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
322
                      "value" : ["EXPRESSION", {
323
                        "args" : [["EXPRESSION", {
324
                          "args" : [["EXPRESSION", {
325
                            "args" : [["EXPRESSION", {
326
                              "id" : "+", "args" : [["EXPRESSION", {
327
                                "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
328
                              ], ["EXPRESSION", {
329
                                "args" : [["CONSTANT_VALUE", {
330
                                  "value" : ["CST_LITERAL", "1"]}
331
                                ]]}
332
                              ]]}
333
                            ]]}
334
                          ]]}
335
                        ]]}
336
                      ]}
337
                    ]}
338
                  ]]}
339
                ]}
340
              ], ["IF_STATEMENT", {
341
                "if_cases" : [{
342
                  "if_cond" : ["EXPRESSION", {
343
                    "args" : [["EXPRESSION", {
344
                      "args" : [["EXPRESSION", {
345
                        "args" : [["EXPRESSION", {
346
                          "args" : [["EXPRESSION", {
347
                            "id" : ">=", "args" : [["EXPRESSION", {
348
                              "args" : [["EXPRESSION", {
349
                                "args" : [["EXPRESSION", {
350
                                  "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
351
                                ]]}
352
                              ]]}
353
                            ], ["EXPRESSION", {
354
                              "args" : [["EXPRESSION", {
355
                                "args" : [["EXPRESSION", {
356
                                  "args" : [["CALL", ["SIMPLE_NAME", "Length"]]]}
357
                                ]]}
358
                              ]]}
359
                            ]]}
360
                          ]]}
361
                        ]]}
362
                      ]]}
363
                    ]]}
364
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
365
                    "lhs" : ["SIMPLE_NAME", "Done"], "rhs" : [{
366
                      "value" : ["EXPRESSION", {
367
                        "args" : [["EXPRESSION", {
368
                          "args" : [["EXPRESSION", {
369
                            "args" : [["EXPRESSION", {
370
                              "args" : [["CONSTANT_VALUE", {
371
                                "value" : ["CST_LITERAL", "'1'"]}
372
                              ]]}
373
                            ]]}
374
                          ]]}
375
                        ]]}
376
                      ]}
377
                    ]}
378
                  ]]}
379
                ], "default" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
380
                  "lhs" : ["SIMPLE_NAME", "Done"], "rhs" : [{
381
                    "value" : ["EXPRESSION", {
382
                      "args" : [["EXPRESSION", {
383
                        "args" : [["EXPRESSION", {
384
                          "args" : [["EXPRESSION", {
385
                            "args" : [["CONSTANT_VALUE", {
386
                              "value" : ["CST_LITERAL", "'0'"]}
387
                            ]]}
388
                          ]]}
389
                        ]]}
390
                      ]]}
391
                    ]}
392
                  ]}
393
                ]]}
394
              ]]}
395
            ]}
396
          ]]}
397
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
398
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "o_Done"], "rhs" : [{
399
            "expr" : [{
400
              "value" : ["EXPRESSION", {
401
                "args" : [["EXPRESSION", {
402
                  "args" : [["EXPRESSION", {
403
                    "args" : [["EXPRESSION", {
404
                      "args" : [["CALL", ["SIMPLE_NAME", "Done"]]]}
405
                    ]]}
406
                  ]]}
407
                ]]}
408
              ]}
409
            ]}
410
          ]}
411
        ]]}
412
      ]}
413
    ]}
414
  }