Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (18.8 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", "pkg_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", "pkg_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", "pkg_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", ["INDEXED_NAME", {
197
                                "id" : ["SIMPLE_NAME", "rising_edge"], "exprs" : [["EXPRESSION", {
198
                                  "args" : [["EXPRESSION", {
199
                                    "args" : [["EXPRESSION", {
200
                                      "args" : [["EXPRESSION", {
201
                                        "args" : [["CALL", ["SIMPLE_NAME", "i_Clock"]]]}
202
                                      ]]}
203
                                    ]]}
204
                                  ]]}
205
                                ]]}
206
                              ]]]}
207
                            ]]}
208
                          ]]}
209
                        ]]}
210
                      ]]}
211
                    ]]}
212
                  ]]}
213
                ]]}
214
              ], "if_block" : [["IF_STATEMENT", {
215
                "if_cases" : [{
216
                  "if_cond" : ["EXPRESSION", {
217
                    "args" : [["EXPRESSION", {
218
                      "args" : [["EXPRESSION", {
219
                        "args" : [["EXPRESSION", {
220
                          "args" : [["EXPRESSION", {
221
                            "id" : "=", "args" : [["EXPRESSION", {
222
                              "args" : [["EXPRESSION", {
223
                                "args" : [["EXPRESSION", {
224
                                  "args" : [["CALL", ["SIMPLE_NAME", "i_Raz"]]]}
225
                                ]]}
226
                              ]]}
227
                            ], ["EXPRESSION", {
228
                              "args" : [["EXPRESSION", {
229
                                "args" : [["EXPRESSION", {
230
                                  "args" : [["CONSTANT_VALUE", {
231
                                    "value" : ["CST_LITERAL", "'1'"]}
232
                                  ]]}
233
                                ]]}
234
                              ]]}
235
                            ]]}
236
                          ]]}
237
                        ]]}
238
                      ]]}
239
                    ]]}
240
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
241
                    "lhs" : ["SIMPLE_NAME", "Length"], "rhs" : [{
242
                      "value" : ["EXPRESSION", {
243
                        "args" : [["EXPRESSION", {
244
                          "args" : [["EXPRESSION", {
245
                            "args" : [["EXPRESSION", {
246
                              "args" : [["CALL", ["INDEXED_NAME", {
247
                                "id" : ["SIMPLE_NAME", "signed"], "exprs" : [["EXPRESSION", {
248
                                  "args" : [["EXPRESSION", {
249
                                    "args" : [["EXPRESSION", {
250
                                      "args" : [["EXPRESSION", {
251
                                        "args" : [["CALL", ["SIMPLE_NAME", "i_Length"]]]}
252
                                      ]]}
253
                                    ]]}
254
                                  ]]}
255
                                ]]}
256
                              ]]]}
257
                            ]]}
258
                          ]]}
259
                        ]]}
260
                      ]}
261
                    ]}
262
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
263
                    "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
264
                      "value" : ["EXPRESSION", {
265
                        "args" : [["EXPRESSION", {
266
                          "args" : [["EXPRESSION", {
267
                            "args" : [["EXPRESSION", {
268
                              "args" : [["AGGREGATE", {
269
                                "elems" : [{
270
                                  "choices" : [["OTHERS"]], "expr" : ["EXPRESSION", {
271
                                    "args" : [["EXPRESSION", {
272
                                      "args" : [["EXPRESSION", {
273
                                        "args" : [["EXPRESSION", {
274
                                          "args" : [["CONSTANT_VALUE", {
275
                                            "value" : ["CST_LITERAL", "'0'"]}
276
                                          ]]}
277
                                        ]]}
278
                                      ]]}
279
                                    ]]}
280
                                  ]}
281
                                ]}
282
                              ]]}
283
                            ]]}
284
                          ]]}
285
                        ]]}
286
                      ]}
287
                    ]}
288
                  ]]}
289
                , {
290
                  "if_cond" : ["EXPRESSION", {
291
                    "args" : [["EXPRESSION", {
292
                      "args" : [["EXPRESSION", {
293
                        "args" : [["EXPRESSION", {
294
                          "args" : [["EXPRESSION", {
295
                            "id" : "and", "args" : [["EXPRESSION", {
296
                              "id" : "=", "args" : [["EXPRESSION", {
297
                                "args" : [["EXPRESSION", {
298
                                  "args" : [["EXPRESSION", {
299
                                    "args" : [["CALL", ["SIMPLE_NAME", "i_Enable"]]]}
300
                                  ]]}
301
                                ]]}
302
                              ], ["EXPRESSION", {
303
                                "args" : [["EXPRESSION", {
304
                                  "args" : [["EXPRESSION", {
305
                                    "args" : [["CONSTANT_VALUE", {
306
                                      "value" : ["CST_LITERAL", "'1'"]}
307
                                    ]]}
308
                                  ]]}
309
                                ]]}
310
                              ]]}
311
                            ], ["EXPRESSION", {
312
                              "id" : "=", "args" : [["EXPRESSION", {
313
                                "args" : [["EXPRESSION", {
314
                                  "args" : [["EXPRESSION", {
315
                                    "args" : [["CALL", ["SIMPLE_NAME", "Done"]]]}
316
                                  ]]}
317
                                ]]}
318
                              ], ["EXPRESSION", {
319
                                "args" : [["EXPRESSION", {
320
                                  "args" : [["EXPRESSION", {
321
                                    "args" : [["CONSTANT_VALUE", {
322
                                      "value" : ["CST_LITERAL", "'0'"]}
323
                                    ]]}
324
                                  ]]}
325
                                ]]}
326
                              ]]}
327
                            ]]}
328
                          ]]}
329
                        ]]}
330
                      ]]}
331
                    ]]}
332
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
333
                    "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
334
                      "value" : ["EXPRESSION", {
335
                        "args" : [["EXPRESSION", {
336
                          "args" : [["EXPRESSION", {
337
                            "args" : [["EXPRESSION", {
338
                              "id" : "+", "args" : [["EXPRESSION", {
339
                                "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
340
                              ], ["EXPRESSION", {
341
                                "args" : [["CONSTANT_VALUE", {
342
                                  "value" : ["CST_LITERAL", "1"]}
343
                                ]]}
344
                              ]]}
345
                            ]]}
346
                          ]]}
347
                        ]]}
348
                      ]}
349
                    ]}
350
                  ]]}
351
                ]}
352
              ], ["IF_STATEMENT", {
353
                "if_cases" : [{
354
                  "if_cond" : ["EXPRESSION", {
355
                    "args" : [["EXPRESSION", {
356
                      "args" : [["EXPRESSION", {
357
                        "args" : [["EXPRESSION", {
358
                          "args" : [["EXPRESSION", {
359
                            "id" : ">=", "args" : [["EXPRESSION", {
360
                              "args" : [["EXPRESSION", {
361
                                "args" : [["EXPRESSION", {
362
                                  "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
363
                                ]]}
364
                              ]]}
365
                            ], ["EXPRESSION", {
366
                              "args" : [["EXPRESSION", {
367
                                "args" : [["EXPRESSION", {
368
                                  "args" : [["CALL", ["SIMPLE_NAME", "Length"]]]}
369
                                ]]}
370
                              ]]}
371
                            ]]}
372
                          ]]}
373
                        ]]}
374
                      ]]}
375
                    ]]}
376
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
377
                    "lhs" : ["SIMPLE_NAME", "Done"], "rhs" : [{
378
                      "value" : ["EXPRESSION", {
379
                        "args" : [["EXPRESSION", {
380
                          "args" : [["EXPRESSION", {
381
                            "args" : [["EXPRESSION", {
382
                              "args" : [["CONSTANT_VALUE", {
383
                                "value" : ["CST_LITERAL", "'1'"]}
384
                              ]]}
385
                            ]]}
386
                          ]]}
387
                        ]]}
388
                      ]}
389
                    ]}
390
                  ]]}
391
                ], "default" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
392
                  "lhs" : ["SIMPLE_NAME", "Done"], "rhs" : [{
393
                    "value" : ["EXPRESSION", {
394
                      "args" : [["EXPRESSION", {
395
                        "args" : [["EXPRESSION", {
396
                          "args" : [["EXPRESSION", {
397
                            "args" : [["CONSTANT_VALUE", {
398
                              "value" : ["CST_LITERAL", "'0'"]}
399
                            ]]}
400
                          ]]}
401
                        ]]}
402
                      ]]}
403
                    ]}
404
                  ]}
405
                ]]}
406
              ]]}
407
            ]}
408
          ]]}
409
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
410
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "o_Done"], "rhs" : [{
411
            "expr" : [{
412
              "value" : ["EXPRESSION", {
413
                "args" : [["EXPRESSION", {
414
                  "args" : [["EXPRESSION", {
415
                    "args" : [["EXPRESSION", {
416
                      "args" : [["CALL", ["SIMPLE_NAME", "Done"]]]}
417
                    ]]}
418
                  ]]}
419
                ]]}
420
              ]}
421
            ]}
422
          ]}
423
        ]]}
424
      ]}
425
    ]}
426
  }