Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / cnes_guidelines / rule / data / best-chronometer-ever / src / user_handler.json @ 2051e520

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