Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / cnes_guidelines / rule / data / CNE_04700_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" : ["ENTITY_DECLARATION", {
5
        "name" : ["IDENTIFIER", "CNE_04700_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", "CNE_04700_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"], "inst_unit_type" : "component", "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
              ]]}
173
            , {
174
              "if_cond" : ["EXPRESSION", {
175
                "args" : [["EXPRESSION", {
176
                  "args" : [["EXPRESSION", {
177
                    "args" : [["EXPRESSION", {
178
                      "args" : [["EXPRESSION", {
179
                        "args" : [["EXPRESSION", {
180
                          "args" : [["EXPRESSION", {
181
                            "args" : [["EXPRESSION", {
182
                              "args" : [["CALL", ["INDEXED_NAME", {
183
                                "id" : ["SIMPLE_NAME", "rising_edge"], "exprs" : [["EXPRESSION", {
184
                                  "args" : [["EXPRESSION", {
185
                                    "args" : [["EXPRESSION", {
186
                                      "args" : [["EXPRESSION", {
187
                                        "args" : [["CALL", ["SIMPLE_NAME", "i_Clock"]]]}
188
                                      ]]}
189
                                    ]]}
190
                                  ]]}
191
                                ]]}
192
                              ]]]}
193
                            ]]}
194
                          ]]}
195
                        ]]}
196
                      ]]}
197
                    ]]}
198
                  ]]}
199
                ]]}
200
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
201
                "lhs" : ["SIMPLE_NAME", "Length"], "rhs" : [{
202
                  "value" : ["EXPRESSION", {
203
                    "args" : [["EXPRESSION", {
204
                      "args" : [["EXPRESSION", {
205
                        "args" : [["EXPRESSION", {
206
                          "args" : [["CALL", ["SIMPLE_NAME", "c_Length"]]]}
207
                        ]]}
208
                      ]]}
209
                    ]]}
210
                  ]}
211
                ]}
212
              ], ["CASE_STATEMENT_TREE", {
213
                "guard" : ["EXPRESSION", {
214
                  "args" : [["EXPRESSION", {
215
                    "args" : [["EXPRESSION", {
216
                      "args" : [["EXPRESSION", {
217
                        "args" : [["CALL", ["SIMPLE_NAME", "sm_State"]]]}
218
                      ]]}
219
                    ]]}
220
                  ]]}
221
                ], "branches" : [{
222
                  "when_cond" : [["EXPRESSION", {
223
                    "args" : [["EXPRESSION", {
224
                      "args" : [["CALL", ["SIMPLE_NAME", "init"]]]}
225
                    ]]}
226
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
227
                    "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
228
                      "value" : ["EXPRESSION", {
229
                        "args" : [["EXPRESSION", {
230
                          "args" : [["EXPRESSION", {
231
                            "args" : [["EXPRESSION", {
232
                              "args" : [["CONSTANT_VALUE", {
233
                                "value" : ["CST_LITERAL", "'0'"]}
234
                              ]]}
235
                            ]]}
236
                          ]]}
237
                        ]]}
238
                      ]}
239
                    ]}
240
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
241
                    "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
242
                      "value" : ["EXPRESSION", {
243
                        "args" : [["EXPRESSION", {
244
                          "args" : [["EXPRESSION", {
245
                            "args" : [["EXPRESSION", {
246
                              "args" : [["CONSTANT_VALUE", {
247
                                "value" : ["CST_LITERAL", "'0'"]}
248
                              ]]}
249
                            ]]}
250
                          ]]}
251
                        ]]}
252
                      ]}
253
                    ]}
254
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
255
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
256
                      "value" : ["EXPRESSION", {
257
                        "args" : [["EXPRESSION", {
258
                          "args" : [["EXPRESSION", {
259
                            "args" : [["EXPRESSION", {
260
                              "args" : [["CALL", ["SIMPLE_NAME", "loading"]]]}
261
                            ]]}
262
                          ]]}
263
                        ]]}
264
                      ]}
265
                    ]}
266
                  ]]}
267
                , {
268
                  "when_cond" : [["EXPRESSION", {
269
                    "args" : [["EXPRESSION", {
270
                      "args" : [["CALL", ["SIMPLE_NAME", "loading"]]]}
271
                    ]]}
272
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
273
                    "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
274
                      "value" : ["EXPRESSION", {
275
                        "args" : [["EXPRESSION", {
276
                          "args" : [["EXPRESSION", {
277
                            "args" : [["EXPRESSION", {
278
                              "args" : [["CONSTANT_VALUE", {
279
                                "value" : ["CST_LITERAL", "'1'"]}
280
                              ]]}
281
                            ]]}
282
                          ]]}
283
                        ]]}
284
                      ]}
285
                    ]}
286
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
287
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
288
                      "value" : ["EXPRESSION", {
289
                        "args" : [["EXPRESSION", {
290
                          "args" : [["EXPRESSION", {
291
                            "args" : [["EXPRESSION", {
292
                              "args" : [["CALL", ["SIMPLE_NAME", "enabled"]]]}
293
                            ]]}
294
                          ]]}
295
                        ]]}
296
                      ]}
297
                    ]}
298
                  ]]}
299
                , {
300
                  "when_cond" : [["EXPRESSION", {
301
                    "args" : [["EXPRESSION", {
302
                      "args" : [["CALL", ["SIMPLE_NAME", "enabled"]]]}
303
                    ]]}
304
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
305
                    "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
306
                      "value" : ["EXPRESSION", {
307
                        "args" : [["EXPRESSION", {
308
                          "args" : [["EXPRESSION", {
309
                            "args" : [["EXPRESSION", {
310
                              "args" : [["CONSTANT_VALUE", {
311
                                "value" : ["CST_LITERAL", "'0'"]}
312
                              ]]}
313
                            ]]}
314
                          ]]}
315
                        ]]}
316
                      ]}
317
                    ]}
318
                  ], ["IF_STATEMENT", {
319
                    "if_cases" : [{
320
                      "if_cond" : ["EXPRESSION", {
321
                        "args" : [["EXPRESSION", {
322
                          "args" : [["EXPRESSION", {
323
                            "args" : [["EXPRESSION", {
324
                              "args" : [["EXPRESSION", {
325
                                "id" : "=", "args" : [["EXPRESSION", {
326
                                  "args" : [["EXPRESSION", {
327
                                    "args" : [["EXPRESSION", {
328
                                      "args" : [["CALL", ["SIMPLE_NAME", "End_Count"]]]}
329
                                    ]]}
330
                                  ]]}
331
                                ], ["EXPRESSION", {
332
                                  "args" : [["EXPRESSION", {
333
                                    "args" : [["EXPRESSION", {
334
                                      "args" : [["CONSTANT_VALUE", {
335
                                        "value" : ["CST_LITERAL", "'0'"]}
336
                                      ]]}
337
                                    ]]}
338
                                  ]]}
339
                                ]]}
340
                              ]]}
341
                            ]]}
342
                          ]]}
343
                        ]]}
344
                      ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
345
                        "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
346
                          "value" : ["EXPRESSION", {
347
                            "id" : "xor", "args" : [["EXPRESSION", {
348
                              "args" : [["EXPRESSION", {
349
                                "args" : [["EXPRESSION", {
350
                                  "args" : [["EXPRESSION", {
351
                                    "args" : [["CALL", ["SIMPLE_NAME", "i_Start"]]]}
352
                                  ]]}
353
                                ]]}
354
                              ]]}
355
                            ], ["EXPRESSION", {
356
                              "args" : [["EXPRESSION", {
357
                                "args" : [["EXPRESSION", {
358
                                  "args" : [["EXPRESSION", {
359
                                    "id" : "not", "args" : [["CALL", ["SIMPLE_NAME", "i_Stop"]]]}
360
                                  ]]}
361
                                ]]}
362
                              ]]}
363
                            ]]}
364
                          ]}
365
                        ]}
366
                      ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
367
                        "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
368
                          "value" : ["EXPRESSION", {
369
                            "args" : [["EXPRESSION", {
370
                              "args" : [["EXPRESSION", {
371
                                "args" : [["EXPRESSION", {
372
                                  "args" : [["CALL", ["SIMPLE_NAME", "Enabled"]]]}
373
                                ]]}
374
                              ]]}
375
                            ]]}
376
                          ]}
377
                        ]}
378
                      ]]}
379
                    ], "default" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
380
                      "lhs" : ["SIMPLE_NAME", "Enable"], "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
                    ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
394
                      "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
395
                        "value" : ["EXPRESSION", {
396
                          "args" : [["EXPRESSION", {
397
                            "args" : [["EXPRESSION", {
398
                              "args" : [["EXPRESSION", {
399
                                "args" : [["CALL", ["SIMPLE_NAME", "finished"]]]}
400
                              ]]}
401
                            ]]}
402
                          ]]}
403
                        ]}
404
                      ]}
405
                    ]]}
406
                  ]]}
407
                , {
408
                  "when_cond" : [["OTHERS"]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
409
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
410
                      "value" : ["EXPRESSION", {
411
                        "args" : [["EXPRESSION", {
412
                          "args" : [["EXPRESSION", {
413
                            "args" : [["EXPRESSION", {
414
                              "args" : [["CALL", ["SIMPLE_NAME", "init"]]]}
415
                            ]]}
416
                          ]]}
417
                        ]]}
418
                      ]}
419
                    ]}
420
                  ]]}
421
                ]}
422
              ]]}
423
            ]}
424
          ]]}
425
        ]]}
426
      ]}
427
    ]}
428
  }