Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

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