Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (13 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_01300_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", "o_Count"]], "mode" : ["out"], "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", "3"]}
25
                    ]]}
26
                  ]]}
27
                ], "_to" : ["EXPRESSION", {
28
                  "args" : [["EXPRESSION", {
29
                    "args" : [["CONSTANT_VALUE", {
30
                      "value" : ["CST_LITERAL", "0"]}
31
                    ]]}
32
                  ]]}
33
                ]}
34
              ]]}
35
            ]}
36
          }
37
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
38
      ]}
39
    , {
40
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
41
        "name" : ["IDENTIFIER", "Behavioral"], "entity" : ["IDENTIFIER", "CNE_01300_good"], "ARCHITECTURE_DECLARATIVE_PART" : [{
42
          "declaration" : ["SIGNAL_DECLARATION", {
43
            "names" : [["IDENTIFIER", "Count"]], "typ" : {
44
              "name" : ["SIMPLE_NAME", "unsigned"], "const" : ["INDEX_CONSTRAINT", {
45
                "ranges" : [["RANGE_WITH_DIRECTION", {
46
                  "direction" : "downto", "from" : ["EXPRESSION", {
47
                    "args" : [["EXPRESSION", {
48
                      "args" : [["CONSTANT_VALUE", {
49
                        "value" : ["CST_LITERAL", "3"]}
50
                      ]]}
51
                    ]]}
52
                  ], "_to" : ["EXPRESSION", {
53
                    "args" : [["EXPRESSION", {
54
                      "args" : [["CONSTANT_VALUE", {
55
                        "value" : ["CST_LITERAL", "0"]}
56
                      ]]}
57
                    ]]}
58
                  ]}
59
                ]]}
60
              ]}
61
            }
62
          ]}
63
        , {
64
          "declaration" : ["CONSTANT_DECLARATION", {
65
            "names" : [["IDENTIFIER", "c_Length"]], "typ" : {
66
              "name" : ["SIMPLE_NAME", "unsigned"], "const" : ["INDEX_CONSTRAINT", {
67
                "ranges" : [["RANGE_WITH_DIRECTION", {
68
                  "direction" : "downto", "from" : ["EXPRESSION", {
69
                    "args" : [["EXPRESSION", {
70
                      "args" : [["CONSTANT_VALUE", {
71
                        "value" : ["CST_LITERAL", "3"]}
72
                      ]]}
73
                    ]]}
74
                  ], "_to" : ["EXPRESSION", {
75
                    "args" : [["EXPRESSION", {
76
                      "args" : [["CONSTANT_VALUE", {
77
                        "value" : ["CST_LITERAL", "0"]}
78
                      ]]}
79
                    ]]}
80
                  ]}
81
                ]]}
82
              ]}
83
            , "init_val" : ["EXPRESSION", {
84
              "args" : [["EXPRESSION", {
85
                "args" : [["EXPRESSION", {
86
                  "args" : [["EXPRESSION", {
87
                    "args" : [["CONSTANT_VALUE", {
88
                      "value" : ["CST_LITERAL", "\"1001\""]}
89
                    ]]}
90
                  ]]}
91
                ]]}
92
              ]]}
93
            ]}
94
          ]}
95
        ], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
96
          "id" : ["IDENTIFIER", "P_Count"], "active_sigs" : [["SIMPLE_NAME", "i_Reset_n"], ["SIMPLE_NAME", "i_Clock"]], "PROCESS_STATEMENT_PART" : [["IF_STATEMENT", {
97
            "if_cases" : [{
98
              "if_cond" : ["EXPRESSION", {
99
                "args" : [["EXPRESSION", {
100
                  "args" : [["EXPRESSION", {
101
                    "args" : [["EXPRESSION", {
102
                      "args" : [["EXPRESSION", {
103
                        "id" : "=", "args" : [["EXPRESSION", {
104
                          "args" : [["EXPRESSION", {
105
                            "args" : [["EXPRESSION", {
106
                              "args" : [["CALL", ["SIMPLE_NAME", "i_Reset_n"]]]}
107
                            ]]}
108
                          ]]}
109
                        ], ["EXPRESSION", {
110
                          "args" : [["EXPRESSION", {
111
                            "args" : [["EXPRESSION", {
112
                              "args" : [["CONSTANT_VALUE", {
113
                                "value" : ["CST_LITERAL", "'0'"]}
114
                              ]]}
115
                            ]]}
116
                          ]]}
117
                        ]]}
118
                      ]]}
119
                    ]]}
120
                  ]]}
121
                ]]}
122
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
123
                "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
124
                  "value" : ["EXPRESSION", {
125
                    "args" : [["EXPRESSION", {
126
                      "args" : [["EXPRESSION", {
127
                        "args" : [["EXPRESSION", {
128
                          "args" : [["AGGREGATE", {
129
                            "elems" : [{
130
                              "choices" : [["OTHERS"]], "expr" : ["EXPRESSION", {
131
                                "args" : [["EXPRESSION", {
132
                                  "args" : [["EXPRESSION", {
133
                                    "args" : [["EXPRESSION", {
134
                                      "args" : [["CONSTANT_VALUE", {
135
                                        "value" : ["CST_LITERAL", "'0'"]}
136
                                      ]]}
137
                                    ]]}
138
                                  ]]}
139
                                ]]}
140
                              ]}
141
                            ]}
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", "c_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" : [["AGGREGATE", {
207
                                "elems" : [{
208
                                  "choices" : [["OTHERS"]], "expr" : ["EXPRESSION", {
209
                                    "args" : [["EXPRESSION", {
210
                                      "args" : [["EXPRESSION", {
211
                                        "args" : [["EXPRESSION", {
212
                                          "args" : [["CONSTANT_VALUE", {
213
                                            "value" : ["CST_LITERAL", "'0'"]}
214
                                          ]]}
215
                                        ]]}
216
                                      ]]}
217
                                    ]]}
218
                                  ]}
219
                                ]}
220
                              ]]}
221
                            ]]}
222
                          ]]}
223
                        ]]}
224
                      ]}
225
                    ]}
226
                  ]]}
227
                , {
228
                  "if_cond" : ["EXPRESSION", {
229
                    "args" : [["EXPRESSION", {
230
                      "args" : [["EXPRESSION", {
231
                        "args" : [["EXPRESSION", {
232
                          "args" : [["EXPRESSION", {
233
                            "id" : "=", "args" : [["EXPRESSION", {
234
                              "args" : [["EXPRESSION", {
235
                                "args" : [["EXPRESSION", {
236
                                  "args" : [["CALL", ["SIMPLE_NAME", "i_Enable"]]]}
237
                                ]]}
238
                              ]]}
239
                            ], ["EXPRESSION", {
240
                              "args" : [["EXPRESSION", {
241
                                "args" : [["EXPRESSION", {
242
                                  "args" : [["CONSTANT_VALUE", {
243
                                    "value" : ["CST_LITERAL", "'1'"]}
244
                                  ]]}
245
                                ]]}
246
                              ]]}
247
                            ]]}
248
                          ]]}
249
                        ]]}
250
                      ]]}
251
                    ]]}
252
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
253
                    "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
254
                      "value" : ["EXPRESSION", {
255
                        "args" : [["EXPRESSION", {
256
                          "args" : [["EXPRESSION", {
257
                            "args" : [["EXPRESSION", {
258
                              "id" : "+", "args" : [["EXPRESSION", {
259
                                "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
260
                              ], ["EXPRESSION", {
261
                                "args" : [["CONSTANT_VALUE", {
262
                                  "value" : ["CST_LITERAL", "1"]}
263
                                ]]}
264
                              ]]}
265
                            ]]}
266
                          ]]}
267
                        ]]}
268
                      ]}
269
                    ]}
270
                  ]]}
271
                ]}
272
              ]]}
273
            ]}
274
          ]]}
275
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
276
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "o_Count"], "rhs" : [{
277
            "expr" : [{
278
              "value" : ["EXPRESSION", {
279
                "args" : [["EXPRESSION", {
280
                  "args" : [["EXPRESSION", {
281
                    "args" : [["EXPRESSION", {
282
                      "args" : [["CALL", ["INDEXED_NAME", {
283
                        "id" : ["SIMPLE_NAME", "std_logic_vector"], "exprs" : [["EXPRESSION", {
284
                          "args" : [["EXPRESSION", {
285
                            "args" : [["EXPRESSION", {
286
                              "args" : [["EXPRESSION", {
287
                                "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
288
                              ]]}
289
                            ]]}
290
                          ]]}
291
                        ]]}
292
                      ]]]}
293
                    ]]}
294
                  ]]}
295
                ]]}
296
              ]}
297
            ]}
298
          ]}
299
        ]]}
300
      ]}
301
    ]}
302
  }