Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (12.5 KB)

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