Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (18.5 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"], "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", ["FUNCTION_CALL", {
183
                                "id" : ["SIMPLE_NAME", "rising_edge"], "assoc_list" : [{
184
                                  "actual_designator" : ["SIMPLE_NAME", "i_Clock"]}
185
                                ]}
186
                              ]]]}
187
                            ]]}
188
                          ]]}
189
                        ]]}
190
                      ]]}
191
                    ]]}
192
                  ]]}
193
                ]]}
194
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
195
                "lhs" : ["SIMPLE_NAME", "Length"], "rhs" : [{
196
                  "value" : ["EXPRESSION", {
197
                    "args" : [["EXPRESSION", {
198
                      "args" : [["EXPRESSION", {
199
                        "args" : [["EXPRESSION", {
200
                          "args" : [["CALL", ["SIMPLE_NAME", "c_Length"]]]}
201
                        ]]}
202
                      ]]}
203
                    ]]}
204
                  ]}
205
                ]}
206
              ], ["CASE_STATEMENT_TREE", {
207
                "guard" : ["EXPRESSION", {
208
                  "args" : [["EXPRESSION", {
209
                    "args" : [["EXPRESSION", {
210
                      "args" : [["EXPRESSION", {
211
                        "args" : [["CALL", ["SIMPLE_NAME", "sm_State"]]]}
212
                      ]]}
213
                    ]]}
214
                  ]]}
215
                ], "branches" : [{
216
                  "when_cond" : [["EXPRESSION", {
217
                    "args" : [["EXPRESSION", {
218
                      "args" : [["CALL", ["SIMPLE_NAME", "init"]]]}
219
                    ]]}
220
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
221
                    "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
222
                      "value" : ["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
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
235
                    "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
236
                      "value" : ["EXPRESSION", {
237
                        "args" : [["EXPRESSION", {
238
                          "args" : [["EXPRESSION", {
239
                            "args" : [["EXPRESSION", {
240
                              "args" : [["CONSTANT_VALUE", {
241
                                "value" : ["CST_LITERAL", "'0'"]}
242
                              ]]}
243
                            ]]}
244
                          ]]}
245
                        ]]}
246
                      ]}
247
                    ]}
248
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
249
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
250
                      "value" : ["EXPRESSION", {
251
                        "args" : [["EXPRESSION", {
252
                          "args" : [["EXPRESSION", {
253
                            "args" : [["EXPRESSION", {
254
                              "args" : [["CALL", ["SIMPLE_NAME", "loading"]]]}
255
                            ]]}
256
                          ]]}
257
                        ]]}
258
                      ]}
259
                    ]}
260
                  ]]}
261
                , {
262
                  "when_cond" : [["EXPRESSION", {
263
                    "args" : [["EXPRESSION", {
264
                      "args" : [["CALL", ["SIMPLE_NAME", "loading"]]]}
265
                    ]]}
266
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
267
                    "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
268
                      "value" : ["EXPRESSION", {
269
                        "args" : [["EXPRESSION", {
270
                          "args" : [["EXPRESSION", {
271
                            "args" : [["EXPRESSION", {
272
                              "args" : [["CONSTANT_VALUE", {
273
                                "value" : ["CST_LITERAL", "'1'"]}
274
                              ]]}
275
                            ]]}
276
                          ]]}
277
                        ]]}
278
                      ]}
279
                    ]}
280
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
281
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
282
                      "value" : ["EXPRESSION", {
283
                        "args" : [["EXPRESSION", {
284
                          "args" : [["EXPRESSION", {
285
                            "args" : [["EXPRESSION", {
286
                              "args" : [["CALL", ["SIMPLE_NAME", "enabled"]]]}
287
                            ]]}
288
                          ]]}
289
                        ]]}
290
                      ]}
291
                    ]}
292
                  ]]}
293
                , {
294
                  "when_cond" : [["EXPRESSION", {
295
                    "args" : [["EXPRESSION", {
296
                      "args" : [["CALL", ["SIMPLE_NAME", "enabled"]]]}
297
                    ]]}
298
                  ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
299
                    "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
300
                      "value" : ["EXPRESSION", {
301
                        "args" : [["EXPRESSION", {
302
                          "args" : [["EXPRESSION", {
303
                            "args" : [["EXPRESSION", {
304
                              "args" : [["CONSTANT_VALUE", {
305
                                "value" : ["CST_LITERAL", "'0'"]}
306
                              ]]}
307
                            ]]}
308
                          ]]}
309
                        ]]}
310
                      ]}
311
                    ]}
312
                  ], ["IF_STATEMENT", {
313
                    "if_cases" : [{
314
                      "if_cond" : ["EXPRESSION", {
315
                        "args" : [["EXPRESSION", {
316
                          "args" : [["EXPRESSION", {
317
                            "args" : [["EXPRESSION", {
318
                              "args" : [["EXPRESSION", {
319
                                "id" : "=", "args" : [["EXPRESSION", {
320
                                  "args" : [["EXPRESSION", {
321
                                    "args" : [["EXPRESSION", {
322
                                      "args" : [["CALL", ["SIMPLE_NAME", "End_Count"]]]}
323
                                    ]]}
324
                                  ]]}
325
                                ], ["EXPRESSION", {
326
                                  "args" : [["EXPRESSION", {
327
                                    "args" : [["EXPRESSION", {
328
                                      "args" : [["CONSTANT_VALUE", {
329
                                        "value" : ["CST_LITERAL", "'0'"]}
330
                                      ]]}
331
                                    ]]}
332
                                  ]]}
333
                                ]]}
334
                              ]]}
335
                            ]]}
336
                          ]]}
337
                        ]]}
338
                      ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
339
                        "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
340
                          "value" : ["EXPRESSION", {
341
                            "id" : "xor", "args" : [["EXPRESSION", {
342
                              "args" : [["EXPRESSION", {
343
                                "args" : [["EXPRESSION", {
344
                                  "args" : [["EXPRESSION", {
345
                                    "args" : [["CALL", ["SIMPLE_NAME", "i_Start"]]]}
346
                                  ]]}
347
                                ]]}
348
                              ]]}
349
                            ], ["EXPRESSION", {
350
                              "args" : [["EXPRESSION", {
351
                                "args" : [["EXPRESSION", {
352
                                  "args" : [["EXPRESSION", {
353
                                    "id" : "not", "args" : [["CALL", ["SIMPLE_NAME", "i_Stop"]]]}
354
                                  ]]}
355
                                ]]}
356
                              ]]}
357
                            ]]}
358
                          ]}
359
                        ]}
360
                      ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
361
                        "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
362
                          "value" : ["EXPRESSION", {
363
                            "args" : [["EXPRESSION", {
364
                              "args" : [["EXPRESSION", {
365
                                "args" : [["EXPRESSION", {
366
                                  "args" : [["CALL", ["SIMPLE_NAME", "Enabled"]]]}
367
                                ]]}
368
                              ]]}
369
                            ]]}
370
                          ]}
371
                        ]}
372
                      ]]}
373
                    ], "default" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
374
                      "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
375
                        "value" : ["EXPRESSION", {
376
                          "args" : [["EXPRESSION", {
377
                            "args" : [["EXPRESSION", {
378
                              "args" : [["EXPRESSION", {
379
                                "args" : [["CONSTANT_VALUE", {
380
                                  "value" : ["CST_LITERAL", "'0'"]}
381
                                ]]}
382
                              ]]}
383
                            ]]}
384
                          ]]}
385
                        ]}
386
                      ]}
387
                    ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
388
                      "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
389
                        "value" : ["EXPRESSION", {
390
                          "args" : [["EXPRESSION", {
391
                            "args" : [["EXPRESSION", {
392
                              "args" : [["EXPRESSION", {
393
                                "args" : [["CALL", ["SIMPLE_NAME", "finished"]]]}
394
                              ]]}
395
                            ]]}
396
                          ]]}
397
                        ]}
398
                      ]}
399
                    ]]}
400
                  ]]}
401
                , {
402
                  "when_cond" : [["OTHERS"]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
403
                    "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
404
                      "value" : ["EXPRESSION", {
405
                        "args" : [["EXPRESSION", {
406
                          "args" : [["EXPRESSION", {
407
                            "args" : [["EXPRESSION", {
408
                              "args" : [["CALL", ["SIMPLE_NAME", "init"]]]}
409
                            ]]}
410
                          ]]}
411
                        ]]}
412
                      ]}
413
                    ]}
414
                  ]]}
415
                ]}
416
              ]]}
417
            ]}
418
          ]]}
419
        ]]}
420
      ]}
421
    ]}
422
  }