Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (17.3 KB)

1 2051e520 Arnaud Dieumegard
{
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_04800_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_04800_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", "sm_Next_State"]], "typ" : {
82
              "name" : ["SIMPLE_NAME", "t_state"]}
83
            }
84
          ]}
85
        , {
86
          "declaration" : ["SIGNAL_DECLARATION", {
87
            "names" : [["IDENTIFIER", "Raz"]], "typ" : {
88
              "name" : ["SIMPLE_NAME", "std_logic"]}
89
            }
90
          ]}
91
        , {
92
          "declaration" : ["SIGNAL_DECLARATION", {
93
            "names" : [["IDENTIFIER", "Enable"]], "typ" : {
94
              "name" : ["SIMPLE_NAME", "std_logic"]}
95
            }
96
          ]}
97
        , {
98
          "declaration" : ["SIGNAL_DECLARATION", {
99
            "names" : [["IDENTIFIER", "Length"]], "typ" : {
100
              "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
101
                "ranges" : [["RANGE_WITH_DIRECTION", {
102
                  "direction" : "downto", "from" : ["EXPRESSION", {
103
                    "args" : [["EXPRESSION", {
104
                      "args" : [["CONSTANT_VALUE", {
105
                        "value" : ["CST_LITERAL", "3"]}
106
                      ]]}
107
                    ]]}
108
                  ], "_to" : ["EXPRESSION", {
109
                    "args" : [["EXPRESSION", {
110
                      "args" : [["CONSTANT_VALUE", {
111
                        "value" : ["CST_LITERAL", "0"]}
112
                      ]]}
113
                    ]]}
114
                  ]}
115
                ]]}
116
              ]}
117
            }
118
          ]}
119
        , {
120
          "declaration" : ["SIGNAL_DECLARATION", {
121
            "names" : [["IDENTIFIER", "End_Count"]], "typ" : {
122
              "name" : ["SIMPLE_NAME", "std_logic"]}
123
            }
124
          ]}
125
        ], "ARCHITECTURE_STATEMENT_PART" : [["COMPONENT_INSTANTIATION_STATEMENT", {
126
          "name" : ["IDENTIFIER", "Counter"], "inst_unit" : ["SIMPLE_NAME", "pkg_Counter"], "port_map" : [{
127
            "formal_name" : ["SIMPLE_NAME", "i_Clock"], "actual_designator" : ["SIMPLE_NAME", "i_Clock"]}
128
          , {
129
            "formal_name" : ["SIMPLE_NAME", "i_Reset_n"], "actual_designator" : ["SIMPLE_NAME", "i_Reset_n"]}
130
          , {
131
            "formal_name" : ["SIMPLE_NAME", "i_Raz"], "actual_designator" : ["SIMPLE_NAME", "Raz"]}
132
          , {
133
            "formal_name" : ["SIMPLE_NAME", "i_Enable"], "actual_designator" : ["SIMPLE_NAME", "Enable"]}
134
          , {
135
            "formal_name" : ["SIMPLE_NAME", "i_Length"], "actual_designator" : ["SIMPLE_NAME", "Length"]}
136
          , {
137
            "formal_name" : ["SIMPLE_NAME", "o_Done"], "actual_designator" : ["SIMPLE_NAME", "End_Count"]}
138
          ]}
139
        ], ["PROCESS_STATEMENT", {
140
          "id" : ["IDENTIFIER", "P_FSM_State_Reg"], "active_sigs" : [["SIMPLE_NAME", "i_Reset_n"], ["SIMPLE_NAME", "i_Clock"]], "PROCESS_STATEMENT_PART" : [["IF_STATEMENT", {
141
            "if_cases" : [{
142
              "if_cond" : ["EXPRESSION", {
143
                "args" : [["EXPRESSION", {
144
                  "args" : [["EXPRESSION", {
145
                    "args" : [["EXPRESSION", {
146
                      "args" : [["EXPRESSION", {
147
                        "id" : "=", "args" : [["EXPRESSION", {
148
                          "args" : [["EXPRESSION", {
149
                            "args" : [["EXPRESSION", {
150
                              "args" : [["CALL", ["SIMPLE_NAME", "i_Reset_n"]]]}
151
                            ]]}
152
                          ]]}
153
                        ], ["EXPRESSION", {
154
                          "args" : [["EXPRESSION", {
155
                            "args" : [["EXPRESSION", {
156
                              "args" : [["CONSTANT_VALUE", {
157
                                "value" : ["CST_LITERAL", "'0'"]}
158
                              ]]}
159
                            ]]}
160
                          ]]}
161
                        ]]}
162
                      ]]}
163
                    ]]}
164
                  ]]}
165
                ]]}
166
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
167
                "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
168
                  "value" : ["EXPRESSION", {
169
                    "args" : [["EXPRESSION", {
170
                      "args" : [["EXPRESSION", {
171
                        "args" : [["EXPRESSION", {
172
                          "args" : [["CALL", ["SIMPLE_NAME", "init"]]]}
173
                        ]]}
174
                      ]]}
175
                    ]]}
176
                  ]}
177
                ]}
178
              ]]}
179
            , {
180
              "if_cond" : ["EXPRESSION", {
181
                "args" : [["EXPRESSION", {
182
                  "args" : [["EXPRESSION", {
183
                    "args" : [["EXPRESSION", {
184
                      "args" : [["EXPRESSION", {
185
                        "args" : [["EXPRESSION", {
186
                          "args" : [["EXPRESSION", {
187
                            "args" : [["EXPRESSION", {
188
                              "args" : [["CALL", ["FUNCTION_CALL", {
189
                                "id" : ["SIMPLE_NAME", "rising_edge"], "assoc_list" : [{
190
                                  "actual_designator" : ["SIMPLE_NAME", "i_Clock"]}
191
                                ]}
192
                              ]]]}
193
                            ]]}
194
                          ]]}
195
                        ]]}
196
                      ]]}
197
                    ]]}
198
                  ]]}
199
                ]]}
200
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
201
                "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
202
                  "value" : ["EXPRESSION", {
203
                    "args" : [["EXPRESSION", {
204
                      "args" : [["EXPRESSION", {
205
                        "args" : [["EXPRESSION", {
206
                          "args" : [["CALL", ["SIMPLE_NAME", "sm_Next_State"]]]}
207
                        ]]}
208
                      ]]}
209
                    ]]}
210
                  ]}
211
                ]}
212
              ]]}
213
            ]}
214
          ]]}
215
        ], ["PROCESS_STATEMENT", {
216
          "id" : ["IDENTIFIER", "P_FSM_Output"], "active_sigs" : [["SIMPLE_NAME", "sm_State"], ["SIMPLE_NAME", "i_Start"], ["SIMPLE_NAME", "i_Stop"], ["SIMPLE_NAME", "End_Count"]], "PROCESS_STATEMENT_PART" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
217
            "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
218
              "value" : ["EXPRESSION", {
219
                "args" : [["EXPRESSION", {
220
                  "args" : [["EXPRESSION", {
221
                    "args" : [["EXPRESSION", {
222
                      "args" : [["CONSTANT_VALUE", {
223
                        "value" : ["CST_LITERAL", "'0'"]}
224
                      ]]}
225
                    ]]}
226
                  ]]}
227
                ]]}
228
              ]}
229
            ]}
230
          ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
231
            "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
232
              "value" : ["EXPRESSION", {
233
                "args" : [["EXPRESSION", {
234
                  "args" : [["EXPRESSION", {
235
                    "args" : [["EXPRESSION", {
236
                      "args" : [["CONSTANT_VALUE", {
237
                        "value" : ["CST_LITERAL", "'0'"]}
238
                      ]]}
239
                    ]]}
240
                  ]]}
241
                ]]}
242
              ]}
243
            ]}
244
          ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
245
            "lhs" : ["SIMPLE_NAME", "Length"], "rhs" : [{
246
              "value" : ["EXPRESSION", {
247
                "args" : [["EXPRESSION", {
248
                  "args" : [["EXPRESSION", {
249
                    "args" : [["EXPRESSION", {
250
                      "args" : [["CALL", ["SIMPLE_NAME", "c_Length"]]]}
251
                    ]]}
252
                  ]]}
253
                ]]}
254
              ]}
255
            ]}
256
          ], ["CASE_STATEMENT_TREE", {
257
            "guard" : ["EXPRESSION", {
258
              "args" : [["EXPRESSION", {
259
                "args" : [["EXPRESSION", {
260
                  "args" : [["EXPRESSION", {
261
                    "args" : [["CALL", ["SIMPLE_NAME", "sm_State"]]]}
262
                  ]]}
263
                ]]}
264
              ]]}
265
            ], "branches" : [{
266
              "when_cond" : [["EXPRESSION", {
267
                "args" : [["EXPRESSION", {
268
                  "args" : [["CALL", ["SIMPLE_NAME", "init"]]]}
269
                ]]}
270
              ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
271
                "lhs" : ["SIMPLE_NAME", "sm_Next_State"], "rhs" : [{
272
                  "value" : ["EXPRESSION", {
273
                    "args" : [["EXPRESSION", {
274
                      "args" : [["EXPRESSION", {
275
                        "args" : [["EXPRESSION", {
276
                          "args" : [["CALL", ["SIMPLE_NAME", "loading"]]]}
277
                        ]]}
278
                      ]]}
279
                    ]]}
280
                  ]}
281
                ]}
282
              ]]}
283
            , {
284
              "when_cond" : [["EXPRESSION", {
285
                "args" : [["EXPRESSION", {
286
                  "args" : [["CALL", ["SIMPLE_NAME", "loading"]]]}
287
                ]]}
288
              ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
289
                "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
290
                  "value" : ["EXPRESSION", {
291
                    "args" : [["EXPRESSION", {
292
                      "args" : [["EXPRESSION", {
293
                        "args" : [["EXPRESSION", {
294
                          "args" : [["CONSTANT_VALUE", {
295
                            "value" : ["CST_LITERAL", "'1'"]}
296
                          ]]}
297
                        ]]}
298
                      ]]}
299
                    ]]}
300
                  ]}
301
                ]}
302
              ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
303
                "lhs" : ["SIMPLE_NAME", "sm_Next_State"], "rhs" : [{
304
                  "value" : ["EXPRESSION", {
305
                    "args" : [["EXPRESSION", {
306
                      "args" : [["EXPRESSION", {
307
                        "args" : [["EXPRESSION", {
308
                          "args" : [["CALL", ["SIMPLE_NAME", "enabled"]]]}
309
                        ]]}
310
                      ]]}
311
                    ]]}
312
                  ]}
313
                ]}
314
              ]]}
315
            , {
316
              "when_cond" : [["EXPRESSION", {
317
                "args" : [["EXPRESSION", {
318
                  "args" : [["CALL", ["SIMPLE_NAME", "enabled"]]]}
319
                ]]}
320
              ]], "when_stmt" : [["IF_STATEMENT", {
321
                "if_cases" : [{
322
                  "if_cond" : ["EXPRESSION", {
323
                    "args" : [["EXPRESSION", {
324
                      "args" : [["EXPRESSION", {
325
                        "args" : [["EXPRESSION", {
326
                          "args" : [["EXPRESSION", {
327
                            "id" : "=", "args" : [["EXPRESSION", {
328
                              "args" : [["EXPRESSION", {
329
                                "args" : [["EXPRESSION", {
330
                                  "args" : [["CALL", ["SIMPLE_NAME", "End_Count"]]]}
331
                                ]]}
332
                              ]]}
333
                            ], ["EXPRESSION", {
334
                              "args" : [["EXPRESSION", {
335
                                "args" : [["EXPRESSION", {
336
                                  "args" : [["CONSTANT_VALUE", {
337
                                    "value" : ["CST_LITERAL", "'0'"]}
338
                                  ]]}
339
                                ]]}
340
                              ]]}
341
                            ]]}
342
                          ]]}
343
                        ]]}
344
                      ]]}
345
                    ]]}
346
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
347
                    "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
348
                      "value" : ["EXPRESSION", {
349
                        "id" : "xor", "args" : [["EXPRESSION", {
350
                          "args" : [["EXPRESSION", {
351
                            "args" : [["EXPRESSION", {
352
                              "args" : [["EXPRESSION", {
353
                                "args" : [["CALL", ["SIMPLE_NAME", "i_Start"]]]}
354
                              ]]}
355
                            ]]}
356
                          ]]}
357
                        ], ["EXPRESSION", {
358
                          "args" : [["EXPRESSION", {
359
                            "args" : [["EXPRESSION", {
360
                              "args" : [["EXPRESSION", {
361
                                "id" : "not", "args" : [["CALL", ["SIMPLE_NAME", "i_Stop"]]]}
362
                              ]]}
363
                            ]]}
364
                          ]]}
365
                        ]]}
366
                      ]}
367
                    ]}
368
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
369
                    "lhs" : ["SIMPLE_NAME", "sm_Next_State"], "rhs" : [{
370
                      "value" : ["EXPRESSION", {
371
                        "args" : [["EXPRESSION", {
372
                          "args" : [["EXPRESSION", {
373
                            "args" : [["EXPRESSION", {
374
                              "args" : [["CALL", ["SIMPLE_NAME", "enabled"]]]}
375
                            ]]}
376
                          ]]}
377
                        ]]}
378
                      ]}
379
                    ]}
380
                  ]]}
381
                ], "default" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
382
                  "lhs" : ["SIMPLE_NAME", "sm_Next_State"], "rhs" : [{
383
                    "value" : ["EXPRESSION", {
384
                      "args" : [["EXPRESSION", {
385
                        "args" : [["EXPRESSION", {
386
                          "args" : [["EXPRESSION", {
387
                            "args" : [["CALL", ["SIMPLE_NAME", "finished"]]]}
388
                          ]]}
389
                        ]]}
390
                      ]]}
391
                    ]}
392
                  ]}
393
                ]]}
394
              ]]}
395
            , {
396
              "when_cond" : [["OTHERS"]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
397
                "lhs" : ["SIMPLE_NAME", "sm_Next_State"], "rhs" : [{
398
                  "value" : ["EXPRESSION", {
399
                    "args" : [["EXPRESSION", {
400
                      "args" : [["EXPRESSION", {
401
                        "args" : [["EXPRESSION", {
402
                          "args" : [["CALL", ["SIMPLE_NAME", "init"]]]}
403
                        ]]}
404
                      ]]}
405
                    ]]}
406
                  ]}
407
                ]}
408
              ]]}
409
            ]}
410
          ]]}
411
        ]]}
412
      ]}
413
    ]}
414
  }