Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / ghdl / ghdl / testsuite / vests / vhdl-93 / ashenden / compliant / ch_07_fg_07_16.json @ 3fd18385

History | View | Annotate | Download (20.9 KB)

1
{
2
  "DESIGN_FILE" : {
3
    "design_units" : [{
4
      "contexts" : [], "library" : ["ENTITY_DECLARATION", {
5
        "name" : ["IDENTIFIER", "fg_07_16"], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
6
      ]}
7
    , {
8
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
9
        "name" : ["IDENTIFIER", "test"], "entity" : ["IDENTIFIER", "fg_07_16"], "ARCHITECTURE_DECLARATIVE_PART" : [{
10
          "declaration" : ["SUBPROGRAM_BODY", {
11
            "spec" : {
12
              "name" : "limit", "subprogram_type" : "function", "parameters" : [{
13
                "names" : [["IDENTIFIER", "value"], ["IDENTIFIER", "min"], ["IDENTIFIER", "max"]], "typ" : {
14
                  "name" : ["SIMPLE_NAME", "integer"]}
15
                }
16
              ], "typeMark" : ["SIMPLE_NAME", "integer"], "isPure" : false}
17
            , "stmts" : [["IF_STATEMENT", {
18
              "if_cases" : [{
19
                "if_cond" : ["EXPRESSION", {
20
                  "id" : ">", "args" : [["EXPRESSION", {
21
                    "args" : [["EXPRESSION", {
22
                      "args" : [["EXPRESSION", {
23
                        "args" : [["CALL", ["SIMPLE_NAME", "value"]]]}
24
                      ]]}
25
                    ]]}
26
                  ], ["EXPRESSION", {
27
                    "args" : [["EXPRESSION", {
28
                      "args" : [["EXPRESSION", {
29
                        "args" : [["CALL", ["SIMPLE_NAME", "max"]]]}
30
                      ]]}
31
                    ]]}
32
                  ]]}
33
                ], "if_block" : [["RETURN_STATEMENT", {
34
                  "expr" : ["EXPRESSION", {
35
                    "args" : [["EXPRESSION", {
36
                      "args" : [["EXPRESSION", {
37
                        "args" : [["EXPRESSION", {
38
                          "args" : [["CALL", ["SIMPLE_NAME", "max"]]]}
39
                        ]]}
40
                      ]]}
41
                    ]]}
42
                  ]}
43
                ]]}
44
              , {
45
                "if_cond" : ["EXPRESSION", {
46
                  "id" : "<", "args" : [["EXPRESSION", {
47
                    "args" : [["EXPRESSION", {
48
                      "args" : [["EXPRESSION", {
49
                        "args" : [["CALL", ["SIMPLE_NAME", "value"]]]}
50
                      ]]}
51
                    ]]}
52
                  ], ["EXPRESSION", {
53
                    "args" : [["EXPRESSION", {
54
                      "args" : [["EXPRESSION", {
55
                        "args" : [["CALL", ["SIMPLE_NAME", "min"]]]}
56
                      ]]}
57
                    ]]}
58
                  ]]}
59
                ], "if_block" : [["RETURN_STATEMENT", {
60
                  "expr" : ["EXPRESSION", {
61
                    "args" : [["EXPRESSION", {
62
                      "args" : [["EXPRESSION", {
63
                        "args" : [["EXPRESSION", {
64
                          "args" : [["CALL", ["SIMPLE_NAME", "min"]]]}
65
                        ]]}
66
                      ]]}
67
                    ]]}
68
                  ]}
69
                ]]}
70
              ], "default" : [["RETURN_STATEMENT", {
71
                "expr" : ["EXPRESSION", {
72
                  "args" : [["EXPRESSION", {
73
                    "args" : [["EXPRESSION", {
74
                      "args" : [["EXPRESSION", {
75
                        "args" : [["CALL", ["SIMPLE_NAME", "value"]]]}
76
                      ]]}
77
                    ]]}
78
                  ]]}
79
                ]}
80
              ]]}
81
            ]]}
82
          ]}
83
        ], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
84
          "id" : ["IDENTIFIER", "tester"], "PROCESS_DECLARATIVE_PART" : [{
85
            "declaration" : ["VARIABLE_DECLARATION", {
86
              "names" : [["IDENTIFIER", "new_temperature"], ["IDENTIFIER", "current_temperature"], ["IDENTIFIER", "increment"]], "typ" : {
87
                "name" : ["SIMPLE_NAME", "integer"]}
88
              }
89
            ]}
90
          , {
91
            "declaration" : ["VARIABLE_DECLARATION", {
92
              "names" : [["IDENTIFIER", "new_motor_speed"], ["IDENTIFIER", "old_motor_speed"], ["IDENTIFIER", "scale_factor"], ["IDENTIFIER", "error"]], "typ" : {
93
                "name" : ["SIMPLE_NAME", "integer"]}
94
              }
95
            ]}
96
          ], "PROCESS_STATEMENT_PART" : [["VARIABLE_ASSIGNMENT_STATEMENT", {
97
            "lhs" : ["SIMPLE_NAME", "current_temperature"], "rhs" : ["EXPRESSION", {
98
              "args" : [["EXPRESSION", {
99
                "args" : [["EXPRESSION", {
100
                  "args" : [["EXPRESSION", {
101
                    "args" : [["CONSTANT_VALUE", {
102
                      "value" : ["CST_LITERAL", "75"]}
103
                    ]]}
104
                  ]]}
105
                ]]}
106
              ]]}
107
            ]}
108
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
109
            "lhs" : ["SIMPLE_NAME", "increment"], "rhs" : ["EXPRESSION", {
110
              "args" : [["EXPRESSION", {
111
                "args" : [["EXPRESSION", {
112
                  "args" : [["EXPRESSION", {
113
                    "args" : [["CONSTANT_VALUE", {
114
                      "value" : ["CST_LITERAL", "10"]}
115
                    ]]}
116
                  ]]}
117
                ]]}
118
              ]]}
119
            ]}
120
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
121
            "lhs" : ["SIMPLE_NAME", "new_temperature"], "rhs" : ["EXPRESSION", {
122
              "args" : [["EXPRESSION", {
123
                "args" : [["EXPRESSION", {
124
                  "args" : [["EXPRESSION", {
125
                    "args" : [["CALL", ["INDEXED_NAME", {
126
                      "id" : ["SIMPLE_NAME", "limit"], "exprs" : [["EXPRESSION", {
127
                        "args" : [["EXPRESSION", {
128
                          "args" : [["EXPRESSION", {
129
                            "args" : [["EXPRESSION", {
130
                              "id" : "+", "args" : [["EXPRESSION", {
131
                                "args" : [["CALL", ["SIMPLE_NAME", "current_temperature"]]]}
132
                              ], ["EXPRESSION", {
133
                                "args" : [["CALL", ["SIMPLE_NAME", "increment"]]]}
134
                              ]]}
135
                            ]]}
136
                          ]]}
137
                        ]]}
138
                      ], ["EXPRESSION", {
139
                        "args" : [["EXPRESSION", {
140
                          "args" : [["EXPRESSION", {
141
                            "args" : [["EXPRESSION", {
142
                              "args" : [["CONSTANT_VALUE", {
143
                                "value" : ["CST_LITERAL", "10"]}
144
                              ]]}
145
                            ]]}
146
                          ]]}
147
                        ]]}
148
                      ], ["EXPRESSION", {
149
                        "args" : [["EXPRESSION", {
150
                          "args" : [["EXPRESSION", {
151
                            "args" : [["EXPRESSION", {
152
                              "args" : [["CONSTANT_VALUE", {
153
                                "value" : ["CST_LITERAL", "100"]}
154
                              ]]}
155
                            ]]}
156
                          ]]}
157
                        ]]}
158
                      ]]}
159
                    ]]]}
160
                  ]]}
161
                ]]}
162
              ]]}
163
            ]}
164
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
165
            "lhs" : ["SIMPLE_NAME", "increment"], "rhs" : ["EXPRESSION", {
166
              "args" : [["EXPRESSION", {
167
                "args" : [["EXPRESSION", {
168
                  "args" : [["EXPRESSION", {
169
                    "args" : [["CONSTANT_VALUE", {
170
                      "value" : ["CST_LITERAL", "60"]}
171
                    ]]}
172
                  ]]}
173
                ]]}
174
              ]]}
175
            ]}
176
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
177
            "lhs" : ["SIMPLE_NAME", "new_temperature"], "rhs" : ["EXPRESSION", {
178
              "args" : [["EXPRESSION", {
179
                "args" : [["EXPRESSION", {
180
                  "args" : [["EXPRESSION", {
181
                    "args" : [["CALL", ["INDEXED_NAME", {
182
                      "id" : ["SIMPLE_NAME", "limit"], "exprs" : [["EXPRESSION", {
183
                        "args" : [["EXPRESSION", {
184
                          "args" : [["EXPRESSION", {
185
                            "args" : [["EXPRESSION", {
186
                              "id" : "+", "args" : [["EXPRESSION", {
187
                                "args" : [["CALL", ["SIMPLE_NAME", "current_temperature"]]]}
188
                              ], ["EXPRESSION", {
189
                                "args" : [["CALL", ["SIMPLE_NAME", "increment"]]]}
190
                              ]]}
191
                            ]]}
192
                          ]]}
193
                        ]]}
194
                      ], ["EXPRESSION", {
195
                        "args" : [["EXPRESSION", {
196
                          "args" : [["EXPRESSION", {
197
                            "args" : [["EXPRESSION", {
198
                              "args" : [["CONSTANT_VALUE", {
199
                                "value" : ["CST_LITERAL", "10"]}
200
                              ]]}
201
                            ]]}
202
                          ]]}
203
                        ]]}
204
                      ], ["EXPRESSION", {
205
                        "args" : [["EXPRESSION", {
206
                          "args" : [["EXPRESSION", {
207
                            "args" : [["EXPRESSION", {
208
                              "args" : [["CONSTANT_VALUE", {
209
                                "value" : ["CST_LITERAL", "100"]}
210
                              ]]}
211
                            ]]}
212
                          ]]}
213
                        ]]}
214
                      ]]}
215
                    ]]]}
216
                  ]]}
217
                ]]}
218
              ]]}
219
            ]}
220
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
221
            "lhs" : ["SIMPLE_NAME", "increment"], "rhs" : ["EXPRESSION", {
222
              "args" : [["EXPRESSION", {
223
                "args" : [["EXPRESSION", {
224
                  "id" : "-", "args" : [["EXPRESSION", {
225
                    "args" : [["CONSTANT_VALUE", {
226
                      "value" : ["CST_LITERAL", "100"]}
227
                    ]]}
228
                  ]]}
229
                ]]}
230
              ]]}
231
            ]}
232
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
233
            "lhs" : ["SIMPLE_NAME", "new_temperature"], "rhs" : ["EXPRESSION", {
234
              "args" : [["EXPRESSION", {
235
                "args" : [["EXPRESSION", {
236
                  "args" : [["EXPRESSION", {
237
                    "args" : [["CALL", ["INDEXED_NAME", {
238
                      "id" : ["SIMPLE_NAME", "limit"], "exprs" : [["EXPRESSION", {
239
                        "args" : [["EXPRESSION", {
240
                          "args" : [["EXPRESSION", {
241
                            "args" : [["EXPRESSION", {
242
                              "id" : "+", "args" : [["EXPRESSION", {
243
                                "args" : [["CALL", ["SIMPLE_NAME", "current_temperature"]]]}
244
                              ], ["EXPRESSION", {
245
                                "args" : [["CALL", ["SIMPLE_NAME", "increment"]]]}
246
                              ]]}
247
                            ]]}
248
                          ]]}
249
                        ]]}
250
                      ], ["EXPRESSION", {
251
                        "args" : [["EXPRESSION", {
252
                          "args" : [["EXPRESSION", {
253
                            "args" : [["EXPRESSION", {
254
                              "args" : [["CONSTANT_VALUE", {
255
                                "value" : ["CST_LITERAL", "10"]}
256
                              ]]}
257
                            ]]}
258
                          ]]}
259
                        ]]}
260
                      ], ["EXPRESSION", {
261
                        "args" : [["EXPRESSION", {
262
                          "args" : [["EXPRESSION", {
263
                            "args" : [["EXPRESSION", {
264
                              "args" : [["CONSTANT_VALUE", {
265
                                "value" : ["CST_LITERAL", "100"]}
266
                              ]]}
267
                            ]]}
268
                          ]]}
269
                        ]]}
270
                      ]]}
271
                    ]]]}
272
                  ]]}
273
                ]]}
274
              ]]}
275
            ]}
276
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
277
            "lhs" : ["SIMPLE_NAME", "old_motor_speed"], "rhs" : ["EXPRESSION", {
278
              "args" : [["EXPRESSION", {
279
                "args" : [["EXPRESSION", {
280
                  "args" : [["EXPRESSION", {
281
                    "args" : [["CONSTANT_VALUE", {
282
                      "value" : ["CST_LITERAL", "1000"]}
283
                    ]]}
284
                  ]]}
285
                ]]}
286
              ]]}
287
            ]}
288
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
289
            "lhs" : ["SIMPLE_NAME", "scale_factor"], "rhs" : ["EXPRESSION", {
290
              "args" : [["EXPRESSION", {
291
                "args" : [["EXPRESSION", {
292
                  "args" : [["EXPRESSION", {
293
                    "args" : [["CONSTANT_VALUE", {
294
                      "value" : ["CST_LITERAL", "5"]}
295
                    ]]}
296
                  ]]}
297
                ]]}
298
              ]]}
299
            ]}
300
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
301
            "lhs" : ["SIMPLE_NAME", "error"], "rhs" : ["EXPRESSION", {
302
              "args" : [["EXPRESSION", {
303
                "args" : [["EXPRESSION", {
304
                  "args" : [["EXPRESSION", {
305
                    "args" : [["CONSTANT_VALUE", {
306
                      "value" : ["CST_LITERAL", "5"]}
307
                    ]]}
308
                  ]]}
309
                ]]}
310
              ]]}
311
            ]}
312
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
313
            "lhs" : ["SIMPLE_NAME", "new_motor_speed"], "rhs" : ["EXPRESSION", {
314
              "args" : [["EXPRESSION", {
315
                "args" : [["EXPRESSION", {
316
                  "args" : [["EXPRESSION", {
317
                    "id" : "+", "args" : [["EXPRESSION", {
318
                      "args" : [["CALL", ["SIMPLE_NAME", "old_motor_speed"]]]}
319
                    ], ["EXPRESSION", {
320
                      "id" : "*", "args" : [["EXPRESSION", {
321
                        "args" : [["CALL", ["SIMPLE_NAME", "scale_factor"]]]}
322
                      ], ["EXPRESSION", {
323
                        "args" : [["CALL", ["INDEXED_NAME", {
324
                          "id" : ["SIMPLE_NAME", "limit"], "exprs" : [["EXPRESSION", {
325
                            "args" : [["EXPRESSION", {
326
                              "args" : [["EXPRESSION", {
327
                                "args" : [["EXPRESSION", {
328
                                  "args" : [["CALL", ["SIMPLE_NAME", "error"]]]}
329
                                ]]}
330
                              ]]}
331
                            ]]}
332
                          ], ["EXPRESSION", {
333
                            "args" : [["EXPRESSION", {
334
                              "args" : [["EXPRESSION", {
335
                                "id" : "-", "args" : [["EXPRESSION", {
336
                                  "args" : [["CONSTANT_VALUE", {
337
                                    "value" : ["CST_LITERAL", "10"]}
338
                                  ]]}
339
                                ]]}
340
                              ]]}
341
                            ]]}
342
                          ], ["EXPRESSION", {
343
                            "args" : [["EXPRESSION", {
344
                              "args" : [["EXPRESSION", {
345
                                "id" : "+", "args" : [["EXPRESSION", {
346
                                  "args" : [["CONSTANT_VALUE", {
347
                                    "value" : ["CST_LITERAL", "10"]}
348
                                  ]]}
349
                                ]]}
350
                              ]]}
351
                            ]]}
352
                          ]]}
353
                        ]]]}
354
                      ]]}
355
                    ]]}
356
                  ]]}
357
                ]]}
358
              ]]}
359
            ]}
360
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
361
            "lhs" : ["SIMPLE_NAME", "error"], "rhs" : ["EXPRESSION", {
362
              "args" : [["EXPRESSION", {
363
                "args" : [["EXPRESSION", {
364
                  "args" : [["EXPRESSION", {
365
                    "args" : [["CONSTANT_VALUE", {
366
                      "value" : ["CST_LITERAL", "15"]}
367
                    ]]}
368
                  ]]}
369
                ]]}
370
              ]]}
371
            ]}
372
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
373
            "lhs" : ["SIMPLE_NAME", "new_motor_speed"], "rhs" : ["EXPRESSION", {
374
              "args" : [["EXPRESSION", {
375
                "args" : [["EXPRESSION", {
376
                  "args" : [["EXPRESSION", {
377
                    "id" : "+", "args" : [["EXPRESSION", {
378
                      "args" : [["CALL", ["SIMPLE_NAME", "old_motor_speed"]]]}
379
                    ], ["EXPRESSION", {
380
                      "id" : "*", "args" : [["EXPRESSION", {
381
                        "args" : [["CALL", ["SIMPLE_NAME", "scale_factor"]]]}
382
                      ], ["EXPRESSION", {
383
                        "args" : [["CALL", ["INDEXED_NAME", {
384
                          "id" : ["SIMPLE_NAME", "limit"], "exprs" : [["EXPRESSION", {
385
                            "args" : [["EXPRESSION", {
386
                              "args" : [["EXPRESSION", {
387
                                "args" : [["EXPRESSION", {
388
                                  "args" : [["CALL", ["SIMPLE_NAME", "error"]]]}
389
                                ]]}
390
                              ]]}
391
                            ]]}
392
                          ], ["EXPRESSION", {
393
                            "args" : [["EXPRESSION", {
394
                              "args" : [["EXPRESSION", {
395
                                "id" : "-", "args" : [["EXPRESSION", {
396
                                  "args" : [["CONSTANT_VALUE", {
397
                                    "value" : ["CST_LITERAL", "10"]}
398
                                  ]]}
399
                                ]]}
400
                              ]]}
401
                            ]]}
402
                          ], ["EXPRESSION", {
403
                            "args" : [["EXPRESSION", {
404
                              "args" : [["EXPRESSION", {
405
                                "id" : "+", "args" : [["EXPRESSION", {
406
                                  "args" : [["CONSTANT_VALUE", {
407
                                    "value" : ["CST_LITERAL", "10"]}
408
                                  ]]}
409
                                ]]}
410
                              ]]}
411
                            ]]}
412
                          ]]}
413
                        ]]]}
414
                      ]]}
415
                    ]]}
416
                  ]]}
417
                ]]}
418
              ]]}
419
            ]}
420
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
421
            "lhs" : ["SIMPLE_NAME", "error"], "rhs" : ["EXPRESSION", {
422
              "args" : [["EXPRESSION", {
423
                "args" : [["EXPRESSION", {
424
                  "id" : "-", "args" : [["EXPRESSION", {
425
                    "args" : [["CONSTANT_VALUE", {
426
                      "value" : ["CST_LITERAL", "20"]}
427
                    ]]}
428
                  ]]}
429
                ]]}
430
              ]]}
431
            ]}
432
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
433
            "lhs" : ["SIMPLE_NAME", "new_motor_speed"], "rhs" : ["EXPRESSION", {
434
              "args" : [["EXPRESSION", {
435
                "args" : [["EXPRESSION", {
436
                  "args" : [["EXPRESSION", {
437
                    "id" : "+", "args" : [["EXPRESSION", {
438
                      "args" : [["CALL", ["SIMPLE_NAME", "old_motor_speed"]]]}
439
                    ], ["EXPRESSION", {
440
                      "id" : "*", "args" : [["EXPRESSION", {
441
                        "args" : [["CALL", ["SIMPLE_NAME", "scale_factor"]]]}
442
                      ], ["EXPRESSION", {
443
                        "args" : [["CALL", ["INDEXED_NAME", {
444
                          "id" : ["SIMPLE_NAME", "limit"], "exprs" : [["EXPRESSION", {
445
                            "args" : [["EXPRESSION", {
446
                              "args" : [["EXPRESSION", {
447
                                "args" : [["EXPRESSION", {
448
                                  "args" : [["CALL", ["SIMPLE_NAME", "error"]]]}
449
                                ]]}
450
                              ]]}
451
                            ]]}
452
                          ], ["EXPRESSION", {
453
                            "args" : [["EXPRESSION", {
454
                              "args" : [["EXPRESSION", {
455
                                "id" : "-", "args" : [["EXPRESSION", {
456
                                  "args" : [["CONSTANT_VALUE", {
457
                                    "value" : ["CST_LITERAL", "10"]}
458
                                  ]]}
459
                                ]]}
460
                              ]]}
461
                            ]]}
462
                          ], ["EXPRESSION", {
463
                            "args" : [["EXPRESSION", {
464
                              "args" : [["EXPRESSION", {
465
                                "id" : "+", "args" : [["EXPRESSION", {
466
                                  "args" : [["CONSTANT_VALUE", {
467
                                    "value" : ["CST_LITERAL", "10"]}
468
                                  ]]}
469
                                ]]}
470
                              ]]}
471
                            ]]}
472
                          ]]}
473
                        ]]]}
474
                      ]]}
475
                    ]]}
476
                  ]]}
477
                ]]}
478
              ]]}
479
            ]}
480
          ], ["WAIT_STATEMENT"]]}
481
        ]]}
482
      ]}
483
    ]}
484
  }