Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (13.8 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", ["FUNCTION_CALL", {
113
                        "id" : ["SIMPLE_NAME", "to_integer"], "assoc_list" : [{
114
                          "actual_expr" : ["EXPRESSION", {
115
                            "args" : [["EXPRESSION", {
116
                              "args" : [["EXPRESSION", {
117
                                "args" : [["EXPRESSION", {
118
                                  "args" : [["CALL", ["FUNCTION_CALL", {
119
                                    "id" : ["SIMPLE_NAME", "unsigned"], "assoc_list" : [{
120
                                      "actual_designator" : ["SIMPLE_NAME", "i_Length"]}
121
                                    ]}
122
                                  ]]]}
123
                                ]]}
124
                              ]]}
125
                            ]]}
126
                          ]}
127
                        ]}
128
                      ]]]}
129
                    ]]}
130
                  ]]}
131
                ]]}
132
              ]}
133
            ]}
134
          ]}
135
        ], ["PROCESS_STATEMENT", {
136
          "id" : ["IDENTIFIER", "P_Count"], "active_sigs" : [["SIMPLE_NAME", "i_Reset_n"], ["SIMPLE_NAME", "i_Clock"]], "PROCESS_STATEMENT_PART" : [["IF_STATEMENT", {
137
            "if_cases" : [{
138
              "if_cond" : ["EXPRESSION", {
139
                "args" : [["EXPRESSION", {
140
                  "args" : [["EXPRESSION", {
141
                    "args" : [["EXPRESSION", {
142
                      "args" : [["EXPRESSION", {
143
                        "id" : "=", "args" : [["EXPRESSION", {
144
                          "args" : [["EXPRESSION", {
145
                            "args" : [["EXPRESSION", {
146
                              "args" : [["CALL", ["SIMPLE_NAME", "i_Reset_n"]]]}
147
                            ]]}
148
                          ]]}
149
                        ], ["EXPRESSION", {
150
                          "args" : [["EXPRESSION", {
151
                            "args" : [["EXPRESSION", {
152
                              "args" : [["CONSTANT_VALUE", {
153
                                "value" : ["CST_LITERAL", "'0'"]}
154
                              ]]}
155
                            ]]}
156
                          ]]}
157
                        ]]}
158
                      ]]}
159
                    ]]}
160
                  ]]}
161
                ]]}
162
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
163
                "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
164
                  "value" : ["EXPRESSION", {
165
                    "args" : [["EXPRESSION", {
166
                      "args" : [["EXPRESSION", {
167
                        "args" : [["EXPRESSION", {
168
                          "args" : [["CONSTANT_VALUE", {
169
                            "value" : ["CST_LITERAL", "0"]}
170
                          ]]}
171
                        ]]}
172
                      ]]}
173
                    ]]}
174
                  ]}
175
                ]}
176
              ]]}
177
            , {
178
              "if_cond" : ["EXPRESSION", {
179
                "args" : [["EXPRESSION", {
180
                  "args" : [["EXPRESSION", {
181
                    "args" : [["EXPRESSION", {
182
                      "args" : [["EXPRESSION", {
183
                        "args" : [["EXPRESSION", {
184
                          "args" : [["EXPRESSION", {
185
                            "args" : [["EXPRESSION", {
186
                              "args" : [["CALL", ["FUNCTION_CALL", {
187
                                "id" : ["SIMPLE_NAME", "rising_edge"], "assoc_list" : [{
188
                                  "actual_designator" : ["SIMPLE_NAME", "i_Clock"]}
189
                                ]}
190
                              ]]]}
191
                            ]]}
192
                          ]]}
193
                        ]]}
194
                      ]]}
195
                    ]]}
196
                  ]]}
197
                ]]}
198
              ], "if_block" : [["IF_STATEMENT", {
199
                "if_cases" : [{
200
                  "if_cond" : ["EXPRESSION", {
201
                    "args" : [["EXPRESSION", {
202
                      "args" : [["EXPRESSION", {
203
                        "args" : [["EXPRESSION", {
204
                          "args" : [["EXPRESSION", {
205
                            "id" : ">=", "args" : [["EXPRESSION", {
206
                              "args" : [["EXPRESSION", {
207
                                "args" : [["EXPRESSION", {
208
                                  "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
209
                                ]]}
210
                              ]]}
211
                            ], ["EXPRESSION", {
212
                              "args" : [["EXPRESSION", {
213
                                "args" : [["EXPRESSION", {
214
                                  "args" : [["CALL", ["SIMPLE_NAME", "Count_Length"]]]}
215
                                ]]}
216
                              ]]}
217
                            ]]}
218
                          ]]}
219
                        ]]}
220
                      ]]}
221
                    ]]}
222
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
223
                    "lhs" : ["SIMPLE_NAME", "Count"], "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
                  ]]}
237
                , {
238
                  "if_cond" : ["EXPRESSION", {
239
                    "args" : [["EXPRESSION", {
240
                      "args" : [["EXPRESSION", {
241
                        "args" : [["EXPRESSION", {
242
                          "args" : [["EXPRESSION", {
243
                            "id" : "=", "args" : [["EXPRESSION", {
244
                              "args" : [["EXPRESSION", {
245
                                "args" : [["EXPRESSION", {
246
                                  "args" : [["CALL", ["SIMPLE_NAME", "i_Enable"]]]}
247
                                ]]}
248
                              ]]}
249
                            ], ["EXPRESSION", {
250
                              "args" : [["EXPRESSION", {
251
                                "args" : [["EXPRESSION", {
252
                                  "args" : [["CONSTANT_VALUE", {
253
                                    "value" : ["CST_LITERAL", "'1'"]}
254
                                  ]]}
255
                                ]]}
256
                              ]]}
257
                            ]]}
258
                          ]]}
259
                        ]]}
260
                      ]]}
261
                    ]]}
262
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
263
                    "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
264
                      "value" : ["EXPRESSION", {
265
                        "args" : [["EXPRESSION", {
266
                          "args" : [["EXPRESSION", {
267
                            "args" : [["EXPRESSION", {
268
                              "id" : "+", "args" : [["EXPRESSION", {
269
                                "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
270
                              ], ["EXPRESSION", {
271
                                "args" : [["CONSTANT_VALUE", {
272
                                  "value" : ["CST_LITERAL", "1"]}
273
                                ]]}
274
                              ]]}
275
                            ]]}
276
                          ]]}
277
                        ]]}
278
                      ]}
279
                    ]}
280
                  ]]}
281
                ]}
282
              ]]}
283
            ]}
284
          ]]}
285
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
286
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "o_Count"], "rhs" : [{
287
            "expr" : [{
288
              "value" : ["EXPRESSION", {
289
                "args" : [["EXPRESSION", {
290
                  "args" : [["EXPRESSION", {
291
                    "args" : [["EXPRESSION", {
292
                      "args" : [["CALL", ["FUNCTION_CALL", {
293
                        "id" : ["SIMPLE_NAME", "std_logic_vector"], "assoc_list" : [{
294
                          "actual_expr" : ["EXPRESSION", {
295
                            "args" : [["EXPRESSION", {
296
                              "args" : [["EXPRESSION", {
297
                                "args" : [["EXPRESSION", {
298
                                  "args" : [["CALL", ["FUNCTION_CALL", {
299
                                    "id" : ["SIMPLE_NAME", "to_unsigned"], "assoc_list" : [{
300
                                      "actual_designator" : ["SIMPLE_NAME", "Count"]}
301
                                    , {
302
                                      "actual_designator" : ["ATTRIBUTE_NAME", {
303
                                        "id" : ["SIMPLE_NAME", "o_Count"], "designator" : ["SIMPLE_NAME", "length"]}
304
                                      ]}
305
                                    ]}
306
                                  ]]]}
307
                                ]]}
308
                              ]]}
309
                            ]]}
310
                          ]}
311
                        ]}
312
                      ]]]}
313
                    ]]}
314
                  ]]}
315
                ]]}
316
              ]}
317
            ]}
318
          ]}
319
        ]]}
320
      ]}
321
    ]}
322
  }