Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (15.4 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_good"], "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_good"], "ARCHITECTURE_DECLARATIVE_PART" : [{
54
          "definition" : ["TYPE_DECLARATION", {
55
            "name" : ["IDENTIFIER", "t_register"], "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", "t_register"]}
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", ["INDEXED_NAME", {
167
                                "id" : ["SIMPLE_NAME", "rising_edge"], "exprs" : [["EXPRESSION", {
168
                                  "args" : [["EXPRESSION", {
169
                                    "args" : [["EXPRESSION", {
170
                                      "args" : [["EXPRESSION", {
171
                                        "args" : [["CALL", ["SIMPLE_NAME", "i_Clock"]]]}
172
                                      ]]}
173
                                    ]]}
174
                                  ]]}
175
                                ]]}
176
                              ]]]}
177
                            ]]}
178
                          ]]}
179
                        ]]}
180
                      ]]}
181
                    ]]}
182
                  ]]}
183
                ]]}
184
              ], "if_block" : [["IF_STATEMENT", {
185
                "if_cases" : [{
186
                  "if_cond" : ["EXPRESSION", {
187
                    "args" : [["EXPRESSION", {
188
                      "args" : [["EXPRESSION", {
189
                        "args" : [["EXPRESSION", {
190
                          "args" : [["EXPRESSION", {
191
                            "id" : "=", "args" : [["EXPRESSION", {
192
                              "args" : [["EXPRESSION", {
193
                                "args" : [["EXPRESSION", {
194
                                  "args" : [["CALL", ["SIMPLE_NAME", "i_Rd"]]]}
195
                                ]]}
196
                              ]]}
197
                            ], ["EXPRESSION", {
198
                              "args" : [["EXPRESSION", {
199
                                "args" : [["EXPRESSION", {
200
                                  "args" : [["CONSTANT_VALUE", {
201
                                    "value" : ["CST_LITERAL", "'1'"]}
202
                                  ]]}
203
                                ]]}
204
                              ]]}
205
                            ]]}
206
                          ]]}
207
                        ]]}
208
                      ]]}
209
                    ]]}
210
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
211
                    "lhs" : ["SIMPLE_NAME", "Data"], "rhs" : [{
212
                      "value" : ["EXPRESSION", {
213
                        "args" : [["EXPRESSION", {
214
                          "args" : [["EXPRESSION", {
215
                            "args" : [["EXPRESSION", {
216
                              "args" : [["CALL", ["INDEXED_NAME", {
217
                                "id" : ["SIMPLE_NAME", "D"], "exprs" : [["EXPRESSION", {
218
                                  "args" : [["EXPRESSION", {
219
                                    "args" : [["EXPRESSION", {
220
                                      "args" : [["EXPRESSION", {
221
                                        "args" : [["CALL", ["INDEXED_NAME", {
222
                                          "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
223
                                            "args" : [["EXPRESSION", {
224
                                              "args" : [["EXPRESSION", {
225
                                                "args" : [["EXPRESSION", {
226
                                                  "args" : [["CALL", ["INDEXED_NAME", {
227
                                                    "id" : ["SIMPLE_NAME", "unsigned"], "exprs" : [["EXPRESSION", {
228
                                                      "args" : [["EXPRESSION", {
229
                                                        "args" : [["EXPRESSION", {
230
                                                          "args" : [["EXPRESSION", {
231
                                                            "args" : [["CALL", ["SIMPLE_NAME", "i_Addr"]]]}
232
                                                          ]]}
233
                                                        ]]}
234
                                                      ]]}
235
                                                    ]]}
236
                                                  ]]]}
237
                                                ]]}
238
                                              ]]}
239
                                            ]]}
240
                                          ]]}
241
                                        ]]]}
242
                                      ]]}
243
                                    ]]}
244
                                  ]]}
245
                                ]]}
246
                              ]]]}
247
                            ]]}
248
                          ]]}
249
                        ]]}
250
                      ]}
251
                    ]}
252
                  ]]}
253
                , {
254
                  "if_cond" : ["EXPRESSION", {
255
                    "args" : [["EXPRESSION", {
256
                      "args" : [["EXPRESSION", {
257
                        "args" : [["EXPRESSION", {
258
                          "args" : [["EXPRESSION", {
259
                            "id" : "=", "args" : [["EXPRESSION", {
260
                              "args" : [["EXPRESSION", {
261
                                "args" : [["EXPRESSION", {
262
                                  "args" : [["CALL", ["SIMPLE_NAME", "i_Wr"]]]}
263
                                ]]}
264
                              ]]}
265
                            ], ["EXPRESSION", {
266
                              "args" : [["EXPRESSION", {
267
                                "args" : [["EXPRESSION", {
268
                                  "args" : [["CONSTANT_VALUE", {
269
                                    "value" : ["CST_LITERAL", "'1'"]}
270
                                  ]]}
271
                                ]]}
272
                              ]]}
273
                            ]]}
274
                          ]]}
275
                        ]]}
276
                      ]]}
277
                    ]]}
278
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
279
                    "lhs" : ["INDEXED_NAME", {
280
                      "id" : ["SIMPLE_NAME", "D"], "exprs" : [["EXPRESSION", {
281
                        "args" : [["EXPRESSION", {
282
                          "args" : [["EXPRESSION", {
283
                            "args" : [["EXPRESSION", {
284
                              "args" : [["CALL", ["INDEXED_NAME", {
285
                                "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
286
                                  "args" : [["EXPRESSION", {
287
                                    "args" : [["EXPRESSION", {
288
                                      "args" : [["EXPRESSION", {
289
                                        "args" : [["CALL", ["INDEXED_NAME", {
290
                                          "id" : ["SIMPLE_NAME", "unsigned"], "exprs" : [["EXPRESSION", {
291
                                            "args" : [["EXPRESSION", {
292
                                              "args" : [["EXPRESSION", {
293
                                                "args" : [["EXPRESSION", {
294
                                                  "args" : [["CALL", ["SIMPLE_NAME", "i_Addr"]]]}
295
                                                ]]}
296
                                              ]]}
297
                                            ]]}
298
                                          ]]}
299
                                        ]]]}
300
                                      ]]}
301
                                    ]]}
302
                                  ]]}
303
                                ]]}
304
                              ]]]}
305
                            ]]}
306
                          ]]}
307
                        ]]}
308
                      ]]}
309
                    ], "rhs" : [{
310
                      "value" : ["EXPRESSION", {
311
                        "args" : [["EXPRESSION", {
312
                          "args" : [["EXPRESSION", {
313
                            "args" : [["EXPRESSION", {
314
                              "args" : [["CALL", ["SIMPLE_NAME", "i_Data"]]]}
315
                            ]]}
316
                          ]]}
317
                        ]]}
318
                      ]}
319
                    ]}
320
                  ]]}
321
                ]}
322
              ]]}
323
            ]}
324
          ]]}
325
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
326
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "o_Data"], "rhs" : [{
327
            "expr" : [{
328
              "value" : ["EXPRESSION", {
329
                "args" : [["EXPRESSION", {
330
                  "args" : [["EXPRESSION", {
331
                    "args" : [["EXPRESSION", {
332
                      "args" : [["CALL", ["SIMPLE_NAME", "Data"]]]}
333
                    ]]}
334
                  ]]}
335
                ]]}
336
              ]}
337
            ]}
338
          ]}
339
        ]]}
340
      ]}
341
    ]}
342
  }