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

History | View | Annotate | Download (9.82 KB)

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