Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

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