Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (14.9 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", "STD_05900_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_Enable"]], "mode" : ["in"], "typ" : {
15
            "name" : ["SIMPLE_NAME", "std_logic"]}
16
          }
17
        , {
18
          "names" : [["IDENTIFIER", "i_Length"]], "mode" : ["in"], "typ" : {
19
            "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
20
              "ranges" : [["RANGE_WITH_DIRECTION", {
21
                "direction" : "downto", "from" : ["EXPRESSION", {
22
                  "args" : [["EXPRESSION", {
23
                    "args" : [["CONSTANT_VALUE", {
24
                      "value" : ["CST_LITERAL", "7"]}
25
                    ]]}
26
                  ]]}
27
                ], "_to" : ["EXPRESSION", {
28
                  "args" : [["EXPRESSION", {
29
                    "args" : [["CONSTANT_VALUE", {
30
                      "value" : ["CST_LITERAL", "0"]}
31
                    ]]}
32
                  ]]}
33
                ]}
34
              ]]}
35
            ]}
36
          }
37
        , {
38
          "names" : [["IDENTIFIER", "o_Count"]], "mode" : ["out"], "typ" : {
39
            "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
40
              "ranges" : [["RANGE_WITH_DIRECTION", {
41
                "direction" : "downto", "from" : ["EXPRESSION", {
42
                  "args" : [["EXPRESSION", {
43
                    "args" : [["CONSTANT_VALUE", {
44
                      "value" : ["CST_LITERAL", "7"]}
45
                    ]]}
46
                  ]]}
47
                ], "_to" : ["EXPRESSION", {
48
                  "args" : [["EXPRESSION", {
49
                    "args" : [["CONSTANT_VALUE", {
50
                      "value" : ["CST_LITERAL", "0"]}
51
                    ]]}
52
                  ]]}
53
                ]}
54
              ]]}
55
            ]}
56
          }
57
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
58
      ]}
59
    , {
60
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
61
        "name" : ["IDENTIFIER", "Behavioral"], "entity" : ["IDENTIFIER", "STD_05900_good"], "ARCHITECTURE_DECLARATIVE_PART" : [{
62
          "declaration" : ["SIGNAL_DECLARATION", {
63
            "names" : [["IDENTIFIER", "Count"]], "typ" : {
64
              "name" : ["SIMPLE_NAME", "integer"], "const" : ["RANGE_CONSTRAINT", {
65
                "range" : ["RANGE_WITH_DIRECTION", {
66
                  "direction" : "to", "from" : ["EXPRESSION", {
67
                    "args" : [["EXPRESSION", {
68
                      "args" : [["CONSTANT_VALUE", {
69
                        "value" : ["CST_LITERAL", "0"]}
70
                      ]]}
71
                    ]]}
72
                  ], "_to" : ["EXPRESSION", {
73
                    "args" : [["EXPRESSION", {
74
                      "args" : [["CONSTANT_VALUE", {
75
                        "value" : ["CST_LITERAL", "255"]}
76
                      ]]}
77
                    ]]}
78
                  ]}
79
                ]}
80
              ]}
81
            }
82
          ]}
83
        , {
84
          "declaration" : ["SIGNAL_DECLARATION", {
85
            "names" : [["IDENTIFIER", "Count_Length"]], "typ" : {
86
              "name" : ["SIMPLE_NAME", "integer"], "const" : ["RANGE_CONSTRAINT", {
87
                "range" : ["RANGE_WITH_DIRECTION", {
88
                  "direction" : "to", "from" : ["EXPRESSION", {
89
                    "args" : [["EXPRESSION", {
90
                      "args" : [["CONSTANT_VALUE", {
91
                        "value" : ["CST_LITERAL", "0"]}
92
                      ]]}
93
                    ]]}
94
                  ], "_to" : ["EXPRESSION", {
95
                    "args" : [["EXPRESSION", {
96
                      "args" : [["CONSTANT_VALUE", {
97
                        "value" : ["CST_LITERAL", "255"]}
98
                      ]]}
99
                    ]]}
100
                  ]}
101
                ]}
102
              ]}
103
            }
104
          ]}
105
        ], "ARCHITECTURE_STATEMENT_PART" : [["CONDITIONAL_SIGNAL_ASSIGNMENT", {
106
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "Count_Length"], "rhs" : [{
107
            "expr" : [{
108
              "value" : ["EXPRESSION", {
109
                "args" : [["EXPRESSION", {
110
                  "args" : [["EXPRESSION", {
111
                    "args" : [["EXPRESSION", {
112
                      "args" : [["CALL", ["INDEXED_NAME", {
113
                        "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
114
                          "args" : [["EXPRESSION", {
115
                            "args" : [["EXPRESSION", {
116
                              "args" : [["EXPRESSION", {
117
                                "args" : [["CALL", ["INDEXED_NAME", {
118
                                  "id" : ["SIMPLE_NAME", "unsigned"], "exprs" : [["EXPRESSION", {
119
                                    "args" : [["EXPRESSION", {
120
                                      "args" : [["EXPRESSION", {
121
                                        "args" : [["EXPRESSION", {
122
                                          "args" : [["CALL", ["SIMPLE_NAME", "i_Length"]]]}
123
                                        ]]}
124
                                      ]]}
125
                                    ]]}
126
                                  ]]}
127
                                ]]]}
128
                              ]]}
129
                            ]]}
130
                          ]]}
131
                        ]]}
132
                      ]]]}
133
                    ]]}
134
                  ]]}
135
                ]]}
136
              ]}
137
            ]}
138
          ]}
139
        ], ["PROCESS_STATEMENT", {
140
          "id" : ["IDENTIFIER", "P_Count"], "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", "Count"], "rhs" : [{
168
                  "value" : ["EXPRESSION", {
169
                    "args" : [["EXPRESSION", {
170
                      "args" : [["EXPRESSION", {
171
                        "args" : [["EXPRESSION", {
172
                          "args" : [["CONSTANT_VALUE", {
173
                            "value" : ["CST_LITERAL", "0"]}
174
                          ]]}
175
                        ]]}
176
                      ]]}
177
                    ]]}
178
                  ]}
179
                ]}
180
              ]]}
181
            , {
182
              "if_cond" : ["EXPRESSION", {
183
                "args" : [["EXPRESSION", {
184
                  "args" : [["EXPRESSION", {
185
                    "args" : [["EXPRESSION", {
186
                      "args" : [["EXPRESSION", {
187
                        "args" : [["EXPRESSION", {
188
                          "args" : [["EXPRESSION", {
189
                            "args" : [["EXPRESSION", {
190
                              "args" : [["CALL", ["INDEXED_NAME", {
191
                                "id" : ["SIMPLE_NAME", "rising_edge"], "exprs" : [["EXPRESSION", {
192
                                  "args" : [["EXPRESSION", {
193
                                    "args" : [["EXPRESSION", {
194
                                      "args" : [["EXPRESSION", {
195
                                        "args" : [["CALL", ["SIMPLE_NAME", "i_Clock"]]]}
196
                                      ]]}
197
                                    ]]}
198
                                  ]]}
199
                                ]]}
200
                              ]]]}
201
                            ]]}
202
                          ]]}
203
                        ]]}
204
                      ]]}
205
                    ]]}
206
                  ]]}
207
                ]]}
208
              ], "if_block" : [["IF_STATEMENT", {
209
                "if_cases" : [{
210
                  "if_cond" : ["EXPRESSION", {
211
                    "args" : [["EXPRESSION", {
212
                      "args" : [["EXPRESSION", {
213
                        "args" : [["EXPRESSION", {
214
                          "args" : [["EXPRESSION", {
215
                            "id" : ">=", "args" : [["EXPRESSION", {
216
                              "args" : [["EXPRESSION", {
217
                                "args" : [["EXPRESSION", {
218
                                  "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
219
                                ]]}
220
                              ]]}
221
                            ], ["EXPRESSION", {
222
                              "args" : [["EXPRESSION", {
223
                                "args" : [["EXPRESSION", {
224
                                  "args" : [["CALL", ["SIMPLE_NAME", "Count_Length"]]]}
225
                                ]]}
226
                              ]]}
227
                            ]]}
228
                          ]]}
229
                        ]]}
230
                      ]]}
231
                    ]]}
232
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
233
                    "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
234
                      "value" : ["EXPRESSION", {
235
                        "args" : [["EXPRESSION", {
236
                          "args" : [["EXPRESSION", {
237
                            "args" : [["EXPRESSION", {
238
                              "args" : [["CONSTANT_VALUE", {
239
                                "value" : ["CST_LITERAL", "0"]}
240
                              ]]}
241
                            ]]}
242
                          ]]}
243
                        ]]}
244
                      ]}
245
                    ]}
246
                  ]]}
247
                , {
248
                  "if_cond" : ["EXPRESSION", {
249
                    "args" : [["EXPRESSION", {
250
                      "args" : [["EXPRESSION", {
251
                        "args" : [["EXPRESSION", {
252
                          "args" : [["EXPRESSION", {
253
                            "id" : "=", "args" : [["EXPRESSION", {
254
                              "args" : [["EXPRESSION", {
255
                                "args" : [["EXPRESSION", {
256
                                  "args" : [["CALL", ["SIMPLE_NAME", "i_Enable"]]]}
257
                                ]]}
258
                              ]]}
259
                            ], ["EXPRESSION", {
260
                              "args" : [["EXPRESSION", {
261
                                "args" : [["EXPRESSION", {
262
                                  "args" : [["CONSTANT_VALUE", {
263
                                    "value" : ["CST_LITERAL", "'1'"]}
264
                                  ]]}
265
                                ]]}
266
                              ]]}
267
                            ]]}
268
                          ]]}
269
                        ]]}
270
                      ]]}
271
                    ]]}
272
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
273
                    "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
274
                      "value" : ["EXPRESSION", {
275
                        "args" : [["EXPRESSION", {
276
                          "args" : [["EXPRESSION", {
277
                            "args" : [["EXPRESSION", {
278
                              "id" : "+", "args" : [["EXPRESSION", {
279
                                "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
280
                              ], ["EXPRESSION", {
281
                                "args" : [["CONSTANT_VALUE", {
282
                                  "value" : ["CST_LITERAL", "1"]}
283
                                ]]}
284
                              ]]}
285
                            ]]}
286
                          ]]}
287
                        ]]}
288
                      ]}
289
                    ]}
290
                  ]]}
291
                ]}
292
              ]]}
293
            ]}
294
          ]]}
295
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
296
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "o_Count"], "rhs" : [{
297
            "expr" : [{
298
              "value" : ["EXPRESSION", {
299
                "args" : [["EXPRESSION", {
300
                  "args" : [["EXPRESSION", {
301
                    "args" : [["EXPRESSION", {
302
                      "args" : [["CALL", ["INDEXED_NAME", {
303
                        "id" : ["SIMPLE_NAME", "std_logic_vector"], "exprs" : [["EXPRESSION", {
304
                          "args" : [["EXPRESSION", {
305
                            "args" : [["EXPRESSION", {
306
                              "args" : [["EXPRESSION", {
307
                                "args" : [["CALL", ["INDEXED_NAME", {
308
                                  "id" : ["SIMPLE_NAME", "to_unsigned"], "exprs" : [["EXPRESSION", {
309
                                    "args" : [["EXPRESSION", {
310
                                      "args" : [["EXPRESSION", {
311
                                        "args" : [["EXPRESSION", {
312
                                          "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
313
                                        ]]}
314
                                      ]]}
315
                                    ]]}
316
                                  ], ["EXPRESSION", {
317
                                    "args" : [["EXPRESSION", {
318
                                      "args" : [["EXPRESSION", {
319
                                        "args" : [["EXPRESSION", {
320
                                          "args" : [["CALL", ["ATTRIBUTE_NAME", {
321
                                            "id" : ["SIMPLE_NAME", "o_Count"], "designator" : ["SIMPLE_NAME", "length"]}
322
                                          ]]]}
323
                                        ]]}
324
                                      ]]}
325
                                    ]]}
326
                                  ]]}
327
                                ]]]}
328
                              ]]}
329
                            ]]}
330
                          ]]}
331
                        ]]}
332
                      ]]]}
333
                    ]]}
334
                  ]]}
335
                ]]}
336
              ]}
337
            ]}
338
          ]}
339
        ]]}
340
      ]}
341
    ]}
342
  }