Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (13.6 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_bad"], "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_bad"], "ARCHITECTURE_DECLARATIVE_PART" : [{
62
          "declaration" : ["SIGNAL_DECLARATION", {
63
            "names" : [["IDENTIFIER", "Count"]], "typ" : {
64
              "name" : ["SIMPLE_NAME", "integer"]}
65
            }
66
          ]}
67
        , {
68
          "declaration" : ["SIGNAL_DECLARATION", {
69
            "names" : [["IDENTIFIER", "Count_Length"]], "typ" : {
70
              "name" : ["SIMPLE_NAME", "integer"]}
71
            }
72
          ]}
73
        ], "ARCHITECTURE_STATEMENT_PART" : [["CONDITIONAL_SIGNAL_ASSIGNMENT", {
74
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "Count_Length"], "rhs" : [{
75
            "expr" : [{
76
              "value" : ["EXPRESSION", {
77
                "args" : [["EXPRESSION", {
78
                  "args" : [["EXPRESSION", {
79
                    "args" : [["EXPRESSION", {
80
                      "args" : [["CALL", ["INDEXED_NAME", {
81
                        "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
82
                          "args" : [["EXPRESSION", {
83
                            "args" : [["EXPRESSION", {
84
                              "args" : [["EXPRESSION", {
85
                                "args" : [["CALL", ["INDEXED_NAME", {
86
                                  "id" : ["SIMPLE_NAME", "unsigned"], "exprs" : [["EXPRESSION", {
87
                                    "args" : [["EXPRESSION", {
88
                                      "args" : [["EXPRESSION", {
89
                                        "args" : [["EXPRESSION", {
90
                                          "args" : [["CALL", ["SIMPLE_NAME", "i_Length"]]]}
91
                                        ]]}
92
                                      ]]}
93
                                    ]]}
94
                                  ]]}
95
                                ]]]}
96
                              ]]}
97
                            ]]}
98
                          ]]}
99
                        ]]}
100
                      ]]]}
101
                    ]]}
102
                  ]]}
103
                ]]}
104
              ]}
105
            ]}
106
          ]}
107
        ], ["PROCESS_STATEMENT", {
108
          "id" : ["IDENTIFIER", "P_Count"], "active_sigs" : [["SIMPLE_NAME", "i_Reset_n"], ["SIMPLE_NAME", "i_Clock"]], "PROCESS_STATEMENT_PART" : [["IF_STATEMENT", {
109
            "if_cases" : [{
110
              "if_cond" : ["EXPRESSION", {
111
                "args" : [["EXPRESSION", {
112
                  "args" : [["EXPRESSION", {
113
                    "args" : [["EXPRESSION", {
114
                      "args" : [["EXPRESSION", {
115
                        "id" : "=", "args" : [["EXPRESSION", {
116
                          "args" : [["EXPRESSION", {
117
                            "args" : [["EXPRESSION", {
118
                              "args" : [["CALL", ["SIMPLE_NAME", "i_Reset_n"]]]}
119
                            ]]}
120
                          ]]}
121
                        ], ["EXPRESSION", {
122
                          "args" : [["EXPRESSION", {
123
                            "args" : [["EXPRESSION", {
124
                              "args" : [["CONSTANT_VALUE", {
125
                                "value" : ["CST_LITERAL", "'0'"]}
126
                              ]]}
127
                            ]]}
128
                          ]]}
129
                        ]]}
130
                      ]]}
131
                    ]]}
132
                  ]]}
133
                ]]}
134
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
135
                "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
136
                  "value" : ["EXPRESSION", {
137
                    "args" : [["EXPRESSION", {
138
                      "args" : [["EXPRESSION", {
139
                        "args" : [["EXPRESSION", {
140
                          "args" : [["CONSTANT_VALUE", {
141
                            "value" : ["CST_LITERAL", "0"]}
142
                          ]]}
143
                        ]]}
144
                      ]]}
145
                    ]]}
146
                  ]}
147
                ]}
148
              ]]}
149
            , {
150
              "if_cond" : ["EXPRESSION", {
151
                "args" : [["EXPRESSION", {
152
                  "args" : [["EXPRESSION", {
153
                    "args" : [["EXPRESSION", {
154
                      "args" : [["EXPRESSION", {
155
                        "args" : [["EXPRESSION", {
156
                          "args" : [["EXPRESSION", {
157
                            "args" : [["EXPRESSION", {
158
                              "args" : [["CALL", ["INDEXED_NAME", {
159
                                "id" : ["SIMPLE_NAME", "rising_edge"], "exprs" : [["EXPRESSION", {
160
                                  "args" : [["EXPRESSION", {
161
                                    "args" : [["EXPRESSION", {
162
                                      "args" : [["EXPRESSION", {
163
                                        "args" : [["CALL", ["SIMPLE_NAME", "i_Clock"]]]}
164
                                      ]]}
165
                                    ]]}
166
                                  ]]}
167
                                ]]}
168
                              ]]]}
169
                            ]]}
170
                          ]]}
171
                        ]]}
172
                      ]]}
173
                    ]]}
174
                  ]]}
175
                ]]}
176
              ], "if_block" : [["IF_STATEMENT", {
177
                "if_cases" : [{
178
                  "if_cond" : ["EXPRESSION", {
179
                    "args" : [["EXPRESSION", {
180
                      "args" : [["EXPRESSION", {
181
                        "args" : [["EXPRESSION", {
182
                          "args" : [["EXPRESSION", {
183
                            "id" : ">=", "args" : [["EXPRESSION", {
184
                              "args" : [["EXPRESSION", {
185
                                "args" : [["EXPRESSION", {
186
                                  "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
187
                                ]]}
188
                              ]]}
189
                            ], ["EXPRESSION", {
190
                              "args" : [["EXPRESSION", {
191
                                "args" : [["EXPRESSION", {
192
                                  "args" : [["CALL", ["SIMPLE_NAME", "Count_Length"]]]}
193
                                ]]}
194
                              ]]}
195
                            ]]}
196
                          ]]}
197
                        ]]}
198
                      ]]}
199
                    ]]}
200
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
201
                    "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
202
                      "value" : ["EXPRESSION", {
203
                        "args" : [["EXPRESSION", {
204
                          "args" : [["EXPRESSION", {
205
                            "args" : [["EXPRESSION", {
206
                              "args" : [["CONSTANT_VALUE", {
207
                                "value" : ["CST_LITERAL", "0"]}
208
                              ]]}
209
                            ]]}
210
                          ]]}
211
                        ]]}
212
                      ]}
213
                    ]}
214
                  ]]}
215
                , {
216
                  "if_cond" : ["EXPRESSION", {
217
                    "args" : [["EXPRESSION", {
218
                      "args" : [["EXPRESSION", {
219
                        "args" : [["EXPRESSION", {
220
                          "args" : [["EXPRESSION", {
221
                            "id" : "=", "args" : [["EXPRESSION", {
222
                              "args" : [["EXPRESSION", {
223
                                "args" : [["EXPRESSION", {
224
                                  "args" : [["CALL", ["SIMPLE_NAME", "i_Enable"]]]}
225
                                ]]}
226
                              ]]}
227
                            ], ["EXPRESSION", {
228
                              "args" : [["EXPRESSION", {
229
                                "args" : [["EXPRESSION", {
230
                                  "args" : [["CONSTANT_VALUE", {
231
                                    "value" : ["CST_LITERAL", "'1'"]}
232
                                  ]]}
233
                                ]]}
234
                              ]]}
235
                            ]]}
236
                          ]]}
237
                        ]]}
238
                      ]]}
239
                    ]]}
240
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
241
                    "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
242
                      "value" : ["EXPRESSION", {
243
                        "args" : [["EXPRESSION", {
244
                          "args" : [["EXPRESSION", {
245
                            "args" : [["EXPRESSION", {
246
                              "id" : "+", "args" : [["EXPRESSION", {
247
                                "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
248
                              ], ["EXPRESSION", {
249
                                "args" : [["CONSTANT_VALUE", {
250
                                  "value" : ["CST_LITERAL", "1"]}
251
                                ]]}
252
                              ]]}
253
                            ]]}
254
                          ]]}
255
                        ]]}
256
                      ]}
257
                    ]}
258
                  ]]}
259
                ]}
260
              ]]}
261
            ]}
262
          ]]}
263
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
264
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "o_Count"], "rhs" : [{
265
            "expr" : [{
266
              "value" : ["EXPRESSION", {
267
                "args" : [["EXPRESSION", {
268
                  "args" : [["EXPRESSION", {
269
                    "args" : [["EXPRESSION", {
270
                      "args" : [["CALL", ["INDEXED_NAME", {
271
                        "id" : ["SIMPLE_NAME", "std_logic_vector"], "exprs" : [["EXPRESSION", {
272
                          "args" : [["EXPRESSION", {
273
                            "args" : [["EXPRESSION", {
274
                              "args" : [["EXPRESSION", {
275
                                "args" : [["CALL", ["INDEXED_NAME", {
276
                                  "id" : ["SIMPLE_NAME", "to_unsigned"], "exprs" : [["EXPRESSION", {
277
                                    "args" : [["EXPRESSION", {
278
                                      "args" : [["EXPRESSION", {
279
                                        "args" : [["EXPRESSION", {
280
                                          "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
281
                                        ]]}
282
                                      ]]}
283
                                    ]]}
284
                                  ], ["EXPRESSION", {
285
                                    "args" : [["EXPRESSION", {
286
                                      "args" : [["EXPRESSION", {
287
                                        "args" : [["EXPRESSION", {
288
                                          "args" : [["CALL", ["ATTRIBUTE_NAME", {
289
                                            "id" : ["SIMPLE_NAME", "o_Count"], "designator" : ["SIMPLE_NAME", "length"]}
290
                                          ]]]}
291
                                        ]]}
292
                                      ]]}
293
                                    ]]}
294
                                  ]]}
295
                                ]]]}
296
                              ]]}
297
                            ]]}
298
                          ]]}
299
                        ]]}
300
                      ]]]}
301
                    ]]}
302
                  ]]}
303
                ]]}
304
              ]}
305
            ]}
306
          ]}
307
        ]]}
308
      ]}
309
    ]}
310
  }