Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (17.7 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_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"], "inst_unit_type" : "component", "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", ["INDEXED_NAME", {
189
                                "id" : ["SIMPLE_NAME", "rising_edge"], "exprs" : [["EXPRESSION", {
190
                                  "args" : [["EXPRESSION", {
191
                                    "args" : [["EXPRESSION", {
192
                                      "args" : [["EXPRESSION", {
193
                                        "args" : [["CALL", ["SIMPLE_NAME", "i_Clock"]]]}
194
                                      ]]}
195
                                    ]]}
196
                                  ]]}
197
                                ]]}
198
                              ]]]}
199
                            ]]}
200
                          ]]}
201
                        ]]}
202
                      ]]}
203
                    ]]}
204
                  ]]}
205
                ]]}
206
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
207
                "lhs" : ["SIMPLE_NAME", "sm_State"], "rhs" : [{
208
                  "value" : ["EXPRESSION", {
209
                    "args" : [["EXPRESSION", {
210
                      "args" : [["EXPRESSION", {
211
                        "args" : [["EXPRESSION", {
212
                          "args" : [["CALL", ["SIMPLE_NAME", "sm_Next_State"]]]}
213
                        ]]}
214
                      ]]}
215
                    ]]}
216
                  ]}
217
                ]}
218
              ]]}
219
            ]}
220
          ]]}
221
        ], ["PROCESS_STATEMENT", {
222
          "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", {
223
            "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
224
              "value" : ["EXPRESSION", {
225
                "args" : [["EXPRESSION", {
226
                  "args" : [["EXPRESSION", {
227
                    "args" : [["EXPRESSION", {
228
                      "args" : [["CONSTANT_VALUE", {
229
                        "value" : ["CST_LITERAL", "'0'"]}
230
                      ]]}
231
                    ]]}
232
                  ]]}
233
                ]]}
234
              ]}
235
            ]}
236
          ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
237
            "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
238
              "value" : ["EXPRESSION", {
239
                "args" : [["EXPRESSION", {
240
                  "args" : [["EXPRESSION", {
241
                    "args" : [["EXPRESSION", {
242
                      "args" : [["CONSTANT_VALUE", {
243
                        "value" : ["CST_LITERAL", "'0'"]}
244
                      ]]}
245
                    ]]}
246
                  ]]}
247
                ]]}
248
              ]}
249
            ]}
250
          ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
251
            "lhs" : ["SIMPLE_NAME", "Length"], "rhs" : [{
252
              "value" : ["EXPRESSION", {
253
                "args" : [["EXPRESSION", {
254
                  "args" : [["EXPRESSION", {
255
                    "args" : [["EXPRESSION", {
256
                      "args" : [["CALL", ["SIMPLE_NAME", "c_Length"]]]}
257
                    ]]}
258
                  ]]}
259
                ]]}
260
              ]}
261
            ]}
262
          ], ["CASE_STATEMENT_TREE", {
263
            "guard" : ["EXPRESSION", {
264
              "args" : [["EXPRESSION", {
265
                "args" : [["EXPRESSION", {
266
                  "args" : [["EXPRESSION", {
267
                    "args" : [["CALL", ["SIMPLE_NAME", "sm_State"]]]}
268
                  ]]}
269
                ]]}
270
              ]]}
271
            ], "branches" : [{
272
              "when_cond" : [["EXPRESSION", {
273
                "args" : [["EXPRESSION", {
274
                  "args" : [["CALL", ["SIMPLE_NAME", "init"]]]}
275
                ]]}
276
              ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
277
                "lhs" : ["SIMPLE_NAME", "sm_Next_State"], "rhs" : [{
278
                  "value" : ["EXPRESSION", {
279
                    "args" : [["EXPRESSION", {
280
                      "args" : [["EXPRESSION", {
281
                        "args" : [["EXPRESSION", {
282
                          "args" : [["CALL", ["SIMPLE_NAME", "loading"]]]}
283
                        ]]}
284
                      ]]}
285
                    ]]}
286
                  ]}
287
                ]}
288
              ]]}
289
            , {
290
              "when_cond" : [["EXPRESSION", {
291
                "args" : [["EXPRESSION", {
292
                  "args" : [["CALL", ["SIMPLE_NAME", "loading"]]]}
293
                ]]}
294
              ]], "when_stmt" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
295
                "lhs" : ["SIMPLE_NAME", "Raz"], "rhs" : [{
296
                  "value" : ["EXPRESSION", {
297
                    "args" : [["EXPRESSION", {
298
                      "args" : [["EXPRESSION", {
299
                        "args" : [["EXPRESSION", {
300
                          "args" : [["CONSTANT_VALUE", {
301
                            "value" : ["CST_LITERAL", "'1'"]}
302
                          ]]}
303
                        ]]}
304
                      ]]}
305
                    ]]}
306
                  ]}
307
                ]}
308
              ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
309
                "lhs" : ["SIMPLE_NAME", "sm_Next_State"], "rhs" : [{
310
                  "value" : ["EXPRESSION", {
311
                    "args" : [["EXPRESSION", {
312
                      "args" : [["EXPRESSION", {
313
                        "args" : [["EXPRESSION", {
314
                          "args" : [["CALL", ["SIMPLE_NAME", "enabled"]]]}
315
                        ]]}
316
                      ]]}
317
                    ]]}
318
                  ]}
319
                ]}
320
              ]]}
321
            , {
322
              "when_cond" : [["EXPRESSION", {
323
                "args" : [["EXPRESSION", {
324
                  "args" : [["CALL", ["SIMPLE_NAME", "enabled"]]]}
325
                ]]}
326
              ]], "when_stmt" : [["IF_STATEMENT", {
327
                "if_cases" : [{
328
                  "if_cond" : ["EXPRESSION", {
329
                    "args" : [["EXPRESSION", {
330
                      "args" : [["EXPRESSION", {
331
                        "args" : [["EXPRESSION", {
332
                          "args" : [["EXPRESSION", {
333
                            "id" : "=", "args" : [["EXPRESSION", {
334
                              "args" : [["EXPRESSION", {
335
                                "args" : [["EXPRESSION", {
336
                                  "args" : [["CALL", ["SIMPLE_NAME", "End_Count"]]]}
337
                                ]]}
338
                              ]]}
339
                            ], ["EXPRESSION", {
340
                              "args" : [["EXPRESSION", {
341
                                "args" : [["EXPRESSION", {
342
                                  "args" : [["CONSTANT_VALUE", {
343
                                    "value" : ["CST_LITERAL", "'0'"]}
344
                                  ]]}
345
                                ]]}
346
                              ]]}
347
                            ]]}
348
                          ]]}
349
                        ]]}
350
                      ]]}
351
                    ]]}
352
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
353
                    "lhs" : ["SIMPLE_NAME", "Enable"], "rhs" : [{
354
                      "value" : ["EXPRESSION", {
355
                        "id" : "xor", "args" : [["EXPRESSION", {
356
                          "args" : [["EXPRESSION", {
357
                            "args" : [["EXPRESSION", {
358
                              "args" : [["EXPRESSION", {
359
                                "args" : [["CALL", ["SIMPLE_NAME", "i_Start"]]]}
360
                              ]]}
361
                            ]]}
362
                          ]]}
363
                        ], ["EXPRESSION", {
364
                          "args" : [["EXPRESSION", {
365
                            "args" : [["EXPRESSION", {
366
                              "args" : [["EXPRESSION", {
367
                                "id" : "not", "args" : [["CALL", ["SIMPLE_NAME", "i_Stop"]]]}
368
                              ]]}
369
                            ]]}
370
                          ]]}
371
                        ]]}
372
                      ]}
373
                    ]}
374
                  ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
375
                    "lhs" : ["SIMPLE_NAME", "sm_Next_State"], "rhs" : [{
376
                      "value" : ["EXPRESSION", {
377
                        "args" : [["EXPRESSION", {
378
                          "args" : [["EXPRESSION", {
379
                            "args" : [["EXPRESSION", {
380
                              "args" : [["CALL", ["SIMPLE_NAME", "enabled"]]]}
381
                            ]]}
382
                          ]]}
383
                        ]]}
384
                      ]}
385
                    ]}
386
                  ]]}
387
                ], "default" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
388
                  "lhs" : ["SIMPLE_NAME", "sm_Next_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_Next_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
  }