Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (12.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_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", ["FUNCTION_CALL", {
159
                                "id" : ["SIMPLE_NAME", "rising_edge"], "assoc_list" : [{
160
                                  "actual_designator" : ["SIMPLE_NAME", "i_Clock"]}
161
                                ]}
162
                              ]]]}
163
                            ]]}
164
                          ]]}
165
                        ]]}
166
                      ]]}
167
                    ]]}
168
                  ]]}
169
                ]]}
170
              ], "if_block" : [["IF_STATEMENT", {
171
                "if_cases" : [{
172
                  "if_cond" : ["EXPRESSION", {
173
                    "args" : [["EXPRESSION", {
174
                      "args" : [["EXPRESSION", {
175
                        "args" : [["EXPRESSION", {
176
                          "args" : [["EXPRESSION", {
177
                            "id" : ">=", "args" : [["EXPRESSION", {
178
                              "args" : [["EXPRESSION", {
179
                                "args" : [["EXPRESSION", {
180
                                  "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
181
                                ]]}
182
                              ]]}
183
                            ], ["EXPRESSION", {
184
                              "args" : [["EXPRESSION", {
185
                                "args" : [["EXPRESSION", {
186
                                  "args" : [["CALL", ["SIMPLE_NAME", "c_Length"]]]}
187
                                ]]}
188
                              ]]}
189
                            ]]}
190
                          ]]}
191
                        ]]}
192
                      ]]}
193
                    ]]}
194
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
195
                    "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
196
                      "value" : ["EXPRESSION", {
197
                        "args" : [["EXPRESSION", {
198
                          "args" : [["EXPRESSION", {
199
                            "args" : [["EXPRESSION", {
200
                              "args" : [["AGGREGATE", {
201
                                "elems" : [{
202
                                  "choices" : [["OTHERS"]], "expr" : ["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
                          ]]}
217
                        ]]}
218
                      ]}
219
                    ]}
220
                  ]]}
221
                , {
222
                  "if_cond" : ["EXPRESSION", {
223
                    "args" : [["EXPRESSION", {
224
                      "args" : [["EXPRESSION", {
225
                        "args" : [["EXPRESSION", {
226
                          "args" : [["EXPRESSION", {
227
                            "id" : "=", "args" : [["EXPRESSION", {
228
                              "args" : [["EXPRESSION", {
229
                                "args" : [["EXPRESSION", {
230
                                  "args" : [["CALL", ["SIMPLE_NAME", "i_Enable"]]]}
231
                                ]]}
232
                              ]]}
233
                            ], ["EXPRESSION", {
234
                              "args" : [["EXPRESSION", {
235
                                "args" : [["EXPRESSION", {
236
                                  "args" : [["CONSTANT_VALUE", {
237
                                    "value" : ["CST_LITERAL", "'1'"]}
238
                                  ]]}
239
                                ]]}
240
                              ]]}
241
                            ]]}
242
                          ]]}
243
                        ]]}
244
                      ]]}
245
                    ]]}
246
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
247
                    "lhs" : ["SIMPLE_NAME", "Count"], "rhs" : [{
248
                      "value" : ["EXPRESSION", {
249
                        "args" : [["EXPRESSION", {
250
                          "args" : [["EXPRESSION", {
251
                            "args" : [["EXPRESSION", {
252
                              "id" : "+", "args" : [["EXPRESSION", {
253
                                "args" : [["CALL", ["SIMPLE_NAME", "Count"]]]}
254
                              ], ["EXPRESSION", {
255
                                "args" : [["CONSTANT_VALUE", {
256
                                  "value" : ["CST_LITERAL", "1"]}
257
                                ]]}
258
                              ]]}
259
                            ]]}
260
                          ]]}
261
                        ]]}
262
                      ]}
263
                    ]}
264
                  ]]}
265
                ]}
266
              ]]}
267
            ]}
268
          ]]}
269
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
270
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "o_Count"], "rhs" : [{
271
            "expr" : [{
272
              "value" : ["EXPRESSION", {
273
                "args" : [["EXPRESSION", {
274
                  "args" : [["EXPRESSION", {
275
                    "args" : [["EXPRESSION", {
276
                      "args" : [["CALL", ["FUNCTION_CALL", {
277
                        "id" : ["SIMPLE_NAME", "std_logic_vector"], "assoc_list" : [{
278
                          "actual_designator" : ["SIMPLE_NAME", "Count"]}
279
                        ]}
280
                      ]]]}
281
                    ]]}
282
                  ]]}
283
                ]]}
284
              ]}
285
            ]}
286
          ]}
287
        ]]}
288
      ]}
289
    ]}
290
  }