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

History | View | Annotate | Download (10.4 KB)

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