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_06.json @ 3fd18385

History | View | Annotate | Download (10.2 KB)

1
{
2
  "DESIGN_FILE" : {
3
    "design_units" : [{
4
      "contexts" : [], "library" : ["ENTITY_DECLARATION", {
5
        "name" : ["IDENTIFIER", "fg_07_06"], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
6
      ]}
7
    , {
8
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
9
        "name" : ["IDENTIFIER", "test"], "entity" : ["IDENTIFIER", "fg_07_06"], "ARCHITECTURE_DECLARATIVE_PART" : [{
10
          "definition" : ["TYPE_DECLARATION", {
11
            "name" : ["IDENTIFIER", "func_code"], "definition" : ["ENUMERATION_TYPE_DEFINITION", [["IDENTIFIER", "add"], ["IDENTIFIER", "subtract"]]]}
12
          ]}
13
        , {
14
          "declaration" : ["SIGNAL_DECLARATION", {
15
            "names" : [["IDENTIFIER", "op1"]], "typ" : {
16
              "name" : ["SIMPLE_NAME", "integer"]}
17
            , "init_val" : ["EXPRESSION", {
18
              "args" : [["EXPRESSION", {
19
                "args" : [["EXPRESSION", {
20
                  "args" : [["EXPRESSION", {
21
                    "args" : [["CONSTANT_VALUE", {
22
                      "value" : ["CST_LITERAL", "10"]}
23
                    ]]}
24
                  ]]}
25
                ]]}
26
              ]]}
27
            ]}
28
          ]}
29
        , {
30
          "declaration" : ["SIGNAL_DECLARATION", {
31
            "names" : [["IDENTIFIER", "op2"]], "typ" : {
32
              "name" : ["SIMPLE_NAME", "integer"]}
33
            , "init_val" : ["EXPRESSION", {
34
              "args" : [["EXPRESSION", {
35
                "args" : [["EXPRESSION", {
36
                  "args" : [["EXPRESSION", {
37
                    "args" : [["CONSTANT_VALUE", {
38
                      "value" : ["CST_LITERAL", "3"]}
39
                    ]]}
40
                  ]]}
41
                ]]}
42
              ]]}
43
            ]}
44
          ]}
45
        , {
46
          "declaration" : ["SIGNAL_DECLARATION", {
47
            "names" : [["IDENTIFIER", "dest"]], "typ" : {
48
              "name" : ["SIMPLE_NAME", "integer"]}
49
            , "init_val" : ["EXPRESSION", {
50
              "args" : [["EXPRESSION", {
51
                "args" : [["EXPRESSION", {
52
                  "args" : [["EXPRESSION", {
53
                    "args" : [["CONSTANT_VALUE", {
54
                      "value" : ["CST_LITERAL", "0"]}
55
                    ]]}
56
                  ]]}
57
                ]]}
58
              ]]}
59
            ]}
60
          ]}
61
        , {
62
          "declaration" : ["SIGNAL_DECLARATION", {
63
            "names" : [["IDENTIFIER", "func"]], "typ" : {
64
              "name" : ["SIMPLE_NAME", "func_code"]}
65
            , "init_val" : ["EXPRESSION", {
66
              "args" : [["EXPRESSION", {
67
                "args" : [["EXPRESSION", {
68
                  "args" : [["EXPRESSION", {
69
                    "args" : [["CALL", ["SIMPLE_NAME", "add"]]]}
70
                  ]]}
71
                ]]}
72
              ]]}
73
            ]}
74
          ]}
75
        , {
76
          "declaration" : ["SIGNAL_DECLARATION", {
77
            "names" : [["IDENTIFIER", "Z_flag"]], "typ" : {
78
              "name" : ["SIMPLE_NAME", "boolean"]}
79
            , "init_val" : ["EXPRESSION", {
80
              "args" : [["EXPRESSION", {
81
                "args" : [["EXPRESSION", {
82
                  "args" : [["EXPRESSION", {
83
                    "args" : [["CALL", ["SIMPLE_NAME", "false"]]]}
84
                  ]]}
85
                ]]}
86
              ]]}
87
            ]}
88
          ]}
89
        , {
90
          "declaration" : ["CONSTANT_DECLARATION", {
91
            "names" : [["IDENTIFIER", "Tpd"]], "typ" : {
92
              "name" : ["SIMPLE_NAME", "delay_length"]}
93
            , "init_val" : ["EXPRESSION", {
94
              "args" : [["EXPRESSION", {
95
                "args" : [["EXPRESSION", {
96
                  "args" : [["EXPRESSION", {
97
                    "args" : [["CONSTANT_VALUE", {
98
                      "value" : ["CST_LITERAL", "3"], "unit_name" : ["SIMPLE_NAME", "ns"]}
99
                    ]]}
100
                  ]]}
101
                ]]}
102
              ]]}
103
            ]}
104
          ]}
105
        ], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
106
          "id" : ["IDENTIFIER", "stimulus"], "PROCESS_DECLARATIVE_PART" : [{
107
            "declaration" : ["SUBPROGRAM_BODY", {
108
              "spec" : {
109
                "name" : "do_arith_op", "subprogram_type" : "procedure", "parameters" : [{
110
                  "names" : [["IDENTIFIER", "op"]], "mode" : ["in"], "typ" : {
111
                    "name" : ["SIMPLE_NAME", "func_code"]}
112
                  }
113
                ]}
114
              , "decl_part" : [["VARIABLE_DECLARATION", {
115
                "names" : [["IDENTIFIER", "result"]], "typ" : {
116
                  "name" : ["SIMPLE_NAME", "integer"]}
117
                }
118
              ]], "stmts" : [["CASE_STATEMENT_TREE", {
119
                "guard" : ["EXPRESSION", {
120
                  "args" : [["EXPRESSION", {
121
                    "args" : [["EXPRESSION", {
122
                      "args" : [["EXPRESSION", {
123
                        "args" : [["CALL", ["SIMPLE_NAME", "op"]]]}
124
                      ]]}
125
                    ]]}
126
                  ]]}
127
                ], "branches" : [{
128
                  "when_cond" : [["EXPRESSION", {
129
                    "args" : [["EXPRESSION", {
130
                      "args" : [["CALL", ["SIMPLE_NAME", "add"]]]}
131
                    ]]}
132
                  ]], "when_stmt" : [["VARIABLE_ASSIGNMENT_STATEMENT", {
133
                    "lhs" : ["SIMPLE_NAME", "result"], "rhs" : ["EXPRESSION", {
134
                      "args" : [["EXPRESSION", {
135
                        "args" : [["EXPRESSION", {
136
                          "args" : [["EXPRESSION", {
137
                            "id" : "+", "args" : [["EXPRESSION", {
138
                              "args" : [["CALL", ["SIMPLE_NAME", "op1"]]]}
139
                            ], ["EXPRESSION", {
140
                              "args" : [["CALL", ["SIMPLE_NAME", "op2"]]]}
141
                            ]]}
142
                          ]]}
143
                        ]]}
144
                      ]]}
145
                    ]}
146
                  ]]}
147
                , {
148
                  "when_cond" : [["EXPRESSION", {
149
                    "args" : [["EXPRESSION", {
150
                      "args" : [["CALL", ["SIMPLE_NAME", "subtract"]]]}
151
                    ]]}
152
                  ]], "when_stmt" : [["VARIABLE_ASSIGNMENT_STATEMENT", {
153
                    "lhs" : ["SIMPLE_NAME", "result"], "rhs" : ["EXPRESSION", {
154
                      "args" : [["EXPRESSION", {
155
                        "args" : [["EXPRESSION", {
156
                          "args" : [["EXPRESSION", {
157
                            "id" : "-", "args" : [["EXPRESSION", {
158
                              "args" : [["CALL", ["SIMPLE_NAME", "op1"]]]}
159
                            ], ["EXPRESSION", {
160
                              "args" : [["CALL", ["SIMPLE_NAME", "op2"]]]}
161
                            ]]}
162
                          ]]}
163
                        ]]}
164
                      ]]}
165
                    ]}
166
                  ]]}
167
                ]}
168
              ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
169
                "lhs" : ["SIMPLE_NAME", "dest"], "rhs" : [{
170
                  "value" : ["EXPRESSION", {
171
                    "args" : [["EXPRESSION", {
172
                      "args" : [["EXPRESSION", {
173
                        "args" : [["EXPRESSION", {
174
                          "args" : [["CALL", ["SIMPLE_NAME", "result"]]]}
175
                        ]]}
176
                      ]]}
177
                    ]]}
178
                  ], "delay" : ["EXPRESSION", {
179
                    "args" : [["EXPRESSION", {
180
                      "args" : [["EXPRESSION", {
181
                        "args" : [["EXPRESSION", {
182
                          "args" : [["CALL", ["SIMPLE_NAME", "Tpd"]]]}
183
                        ]]}
184
                      ]]}
185
                    ]]}
186
                  ]}
187
                ]}
188
              ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
189
                "lhs" : ["SIMPLE_NAME", "Z_flag"], "rhs" : [{
190
                  "value" : ["EXPRESSION", {
191
                    "id" : "=", "args" : [["EXPRESSION", {
192
                      "args" : [["EXPRESSION", {
193
                        "args" : [["EXPRESSION", {
194
                          "args" : [["CALL", ["SIMPLE_NAME", "result"]]]}
195
                        ]]}
196
                      ]]}
197
                    ], ["EXPRESSION", {
198
                      "args" : [["EXPRESSION", {
199
                        "args" : [["EXPRESSION", {
200
                          "args" : [["CONSTANT_VALUE", {
201
                            "value" : ["CST_LITERAL", "0"]}
202
                          ]]}
203
                        ]]}
204
                      ]]}
205
                    ]]}
206
                  ], "delay" : ["EXPRESSION", {
207
                    "args" : [["EXPRESSION", {
208
                      "args" : [["EXPRESSION", {
209
                        "args" : [["EXPRESSION", {
210
                          "args" : [["CALL", ["SIMPLE_NAME", "Tpd"]]]}
211
                        ]]}
212
                      ]]}
213
                    ]]}
214
                  ]}
215
                ]}
216
              ]]}
217
            ]}
218
          ], "PROCESS_STATEMENT_PART" : [["WAIT_STATEMENT"], ["PROCEDURE_CALL_STATEMENT", {
219
            "name" : ["IDENTIFIER", "do_arith_op"], "assocs" : [{
220
              "actual_designator" : ["SIMPLE_NAME", "add"]}
221
            ]}
222
          ], ["WAIT_STATEMENT"], ["PROCEDURE_CALL_STATEMENT", {
223
            "name" : ["IDENTIFIER", "do_arith_op"], "assocs" : [{
224
              "actual_designator" : ["SIMPLE_NAME", "func"]}
225
            ]}
226
          ], ["WAIT_STATEMENT"], ["PROCEDURE_CALL_STATEMENT", {
227
            "name" : ["IDENTIFIER", "do_arith_op"], "assocs" : [{
228
              "actual_designator" : ["SIMPLE_NAME", "subtract"]}
229
            ]}
230
          ], ["WAIT_STATEMENT"], ["SIGNAL_ASSIGNMENT_STATEMENT", {
231
            "lhs" : ["SIMPLE_NAME", "op2"], "rhs" : [{
232
              "value" : ["EXPRESSION", {
233
                "args" : [["EXPRESSION", {
234
                  "args" : [["EXPRESSION", {
235
                    "args" : [["EXPRESSION", {
236
                      "args" : [["CONSTANT_VALUE", {
237
                        "value" : ["CST_LITERAL", "10"]}
238
                      ]]}
239
                    ]]}
240
                  ]]}
241
                ]]}
242
              ]}
243
            ]}
244
          ], ["WAIT_STATEMENT"], ["PROCEDURE_CALL_STATEMENT", {
245
            "name" : ["IDENTIFIER", "do_arith_op"], "assocs" : [{
246
              "actual_designator" : ["SIMPLE_NAME", "subtract"]}
247
            ]}
248
          ], ["WAIT_STATEMENT"]]}
249
        ]]}
250
      ]}
251
    ]}
252
  }