Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / ghdl / ghdl / testsuite / gna / bug021 / tb_cosim.json @ 3fd18385

History | View | Annotate | Download (12.8 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"]]]]], ["USE_CLAUSE", [["SELECTED_NAME", [["SIMPLE_NAME", "ieee"], ["SIMPLE_NAME", "numeric_std"]]]]], ["USE_CLAUSE", [["SELECTED_NAME", [["SIMPLE_NAME", "work"], ["SIMPLE_NAME", "sim_pkg"]]]]]], "library" : ["ENTITY_DECLARATION", {
5
        "name" : ["IDENTIFIER", "tb_cosim"], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
6
      ]}
7
    , {
8
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
9
        "name" : ["IDENTIFIER", "behavior"], "entity" : ["IDENTIFIER", "tb_cosim"], "ARCHITECTURE_DECLARATIVE_PART" : [{
10
          "declaration" : ["SUBPROGRAM_BODY", {
11
            "spec" : {
12
              "name" : "crc", "subprogram_type" : "function", "parameters" : [{
13
                "names" : [["IDENTIFIER", "crc_value"]], "typ" : {
14
                  "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
15
                    "ranges" : [["RANGE_WITH_DIRECTION", {
16
                      "direction" : "downto", "from" : ["EXPRESSION", {
17
                        "args" : [["EXPRESSION", {
18
                          "args" : [["CONSTANT_VALUE", {
19
                            "value" : ["CST_LITERAL", "31"]}
20
                          ]]}
21
                        ]]}
22
                      ], "_to" : ["EXPRESSION", {
23
                        "args" : [["EXPRESSION", {
24
                          "args" : [["CONSTANT_VALUE", {
25
                            "value" : ["CST_LITERAL", "0"]}
26
                          ]]}
27
                        ]]}
28
                      ]}
29
                    ]]}
30
                  ]}
31
                }
32
              ], "typeMark" : ["SIMPLE_NAME", "std_logic_vector"], "isPure" : false}
33
            , "decl_part" : [["VARIABLE_DECLARATION", {
34
              "names" : [["IDENTIFIER", "crc_out"]], "typ" : {
35
                "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
36
                  "ranges" : [["RANGE_WITH_DIRECTION", {
37
                    "direction" : "downto", "from" : ["EXPRESSION", {
38
                      "args" : [["EXPRESSION", {
39
                        "args" : [["CONSTANT_VALUE", {
40
                          "value" : ["CST_LITERAL", "31"]}
41
                        ]]}
42
                      ]]}
43
                    ], "_to" : ["EXPRESSION", {
44
                      "args" : [["EXPRESSION", {
45
                        "args" : [["CONSTANT_VALUE", {
46
                          "value" : ["CST_LITERAL", "0"]}
47
                        ]]}
48
                      ]]}
49
                    ]}
50
                  ]]}
51
                ]}
52
              }
53
            ]], "stmts" : [["VARIABLE_ASSIGNMENT_STATEMENT", {
54
              "lhs" : ["SIMPLE_NAME", "crc_out"], "rhs" : ["EXPRESSION", {
55
                "id" : "xor", "args" : [["EXPRESSION", {
56
                  "args" : [["EXPRESSION", {
57
                    "args" : [["EXPRESSION", {
58
                      "args" : [["EXPRESSION", {
59
                        "args" : [["EXPRESSION", {
60
                          "args" : [["EXPRESSION", {
61
                            "args" : [["EXPRESSION", {
62
                              "args" : [["EXPRESSION", {
63
                                "id" : "&", "args" : [["EXPRESSION", {
64
                                  "args" : [["CALL", ["SLICE_NAME", {
65
                                    "id" : ["SIMPLE_NAME", "crc"], "range" : ["RANGE_WITH_DIRECTION", {
66
                                      "direction" : "downto", "from" : ["EXPRESSION", {
67
                                        "args" : [["EXPRESSION", {
68
                                          "args" : [["CONSTANT_VALUE", {
69
                                            "value" : ["CST_LITERAL", "3"]}
70
                                          ]]}
71
                                        ]]}
72
                                      ], "_to" : ["EXPRESSION", {
73
                                        "args" : [["EXPRESSION", {
74
                                          "args" : [["CONSTANT_VALUE", {
75
                                            "value" : ["CST_LITERAL", "0"]}
76
                                          ]]}
77
                                        ]]}
78
                                      ]}
79
                                    ]}
80
                                  ]]]}
81
                                ], ["EXPRESSION", {
82
                                  "args" : [["CALL", ["SLICE_NAME", {
83
                                    "id" : ["SIMPLE_NAME", "crc_out"], "range" : ["RANGE_WITH_DIRECTION", {
84
                                      "direction" : "downto", "from" : ["EXPRESSION", {
85
                                        "args" : [["EXPRESSION", {
86
                                          "args" : [["CONSTANT_VALUE", {
87
                                            "value" : ["CST_LITERAL", "31"]}
88
                                          ]]}
89
                                        ]]}
90
                                      ], "_to" : ["EXPRESSION", {
91
                                        "args" : [["EXPRESSION", {
92
                                          "args" : [["CONSTANT_VALUE", {
93
                                            "value" : ["CST_LITERAL", "4"]}
94
                                          ]]}
95
                                        ]]}
96
                                      ]}
97
                                    ]}
98
                                  ]]]}
99
                                ]]}
100
                              ]]}
101
                            ]]}
102
                          ]]}
103
                        ]]}
104
                      ]]}
105
                    ]]}
106
                  ]]}
107
                ], ["EXPRESSION", {
108
                  "args" : [["EXPRESSION", {
109
                    "args" : [["EXPRESSION", {
110
                      "args" : [["EXPRESSION", {
111
                        "args" : [["CALL", ["SIMPLE_NAME", "crc"]]]}
112
                      ]]}
113
                    ]]}
114
                  ]]}
115
                ]]}
116
              ]}
117
            ], ["RETURN_STATEMENT", {
118
              "expr" : ["EXPRESSION", {
119
                "args" : [["EXPRESSION", {
120
                  "args" : [["EXPRESSION", {
121
                    "args" : [["EXPRESSION", {
122
                      "args" : [["CALL", ["SIMPLE_NAME", "crc_out"]]]}
123
                    ]]}
124
                  ]]}
125
                ]]}
126
              ]}
127
            ]]}
128
          ]}
129
        , {
130
          "declaration" : ["SIGNAL_DECLARATION", {
131
            "names" : [["IDENTIFIER", "random"]], "typ" : {
132
              "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
133
                "ranges" : [["RANGE_WITH_DIRECTION", {
134
                  "direction" : "downto", "from" : ["EXPRESSION", {
135
                    "args" : [["EXPRESSION", {
136
                      "args" : [["CONSTANT_VALUE", {
137
                        "value" : ["CST_LITERAL", "31"]}
138
                      ]]}
139
                    ]]}
140
                  ], "_to" : ["EXPRESSION", {
141
                    "args" : [["EXPRESSION", {
142
                      "args" : [["CONSTANT_VALUE", {
143
                        "value" : ["CST_LITERAL", "0"]}
144
                      ]]}
145
                    ]]}
146
                  ]}
147
                ]]}
148
              ]}
149
            , "init_val" : ["EXPRESSION", {
150
              "args" : [["EXPRESSION", {
151
                "args" : [["EXPRESSION", {
152
                  "args" : [["EXPRESSION", {
153
                    "args" : [["CONSTANT_VALUE", {
154
                      "value" : ["CST_LITERAL", "X\"00000000\""]}
155
                    ]]}
156
                  ]]}
157
                ]]}
158
              ]]}
159
            ]}
160
          ]}
161
        , {
162
          "declaration" : ["CONSTANT_DECLARATION", {
163
            "names" : [["IDENTIFIER", "board_clk_period"]], "typ" : {
164
              "name" : ["SIMPLE_NAME", "time"]}
165
            , "init_val" : ["EXPRESSION", {
166
              "args" : [["EXPRESSION", {
167
                "args" : [["EXPRESSION", {
168
                  "args" : [["EXPRESSION", {
169
                    "args" : [["CONSTANT_VALUE", {
170
                      "value" : ["CST_LITERAL", "20"], "unit_name" : ["SIMPLE_NAME", "ns"]}
171
                    ]]}
172
                  ]]}
173
                ]]}
174
              ]]}
175
            ]}
176
          ]}
177
        , {
178
          "declaration" : ["SIGNAL_DECLARATION", {
179
            "names" : [["IDENTIFIER", "board_clk"]], "typ" : {
180
              "name" : ["SIMPLE_NAME", "std_logic"]}
181
            }
182
          ]}
183
        ], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
184
          "active_sigs" : [["SIMPLE_NAME", "board_clk"]], "PROCESS_STATEMENT_PART" : [["IF_STATEMENT", {
185
            "if_cases" : [{
186
              "if_cond" : ["EXPRESSION", {
187
                "args" : [["EXPRESSION", {
188
                  "args" : [["EXPRESSION", {
189
                    "args" : [["EXPRESSION", {
190
                      "args" : [["CALL", ["INDEXED_NAME", {
191
                        "id" : ["SIMPLE_NAME", "rising_edge"], "exprs" : [["EXPRESSION", {
192
                          "args" : [["EXPRESSION", {
193
                            "args" : [["EXPRESSION", {
194
                              "args" : [["EXPRESSION", {
195
                                "args" : [["CALL", ["SIMPLE_NAME", "board_clk"]]]}
196
                              ]]}
197
                            ]]}
198
                          ]]}
199
                        ]]}
200
                      ]]]}
201
                    ]]}
202
                  ]]}
203
                ]]}
204
              ], "if_block" : [["PROCEDURE_CALL_STATEMENT", {
205
                "name" : ["IDENTIFIER", "street"], "assocs" : [{
206
                  "actual_designator" : ["INDEXED_NAME", {
207
                    "id" : ["SIMPLE_NAME", "to_integer"], "exprs" : [["EXPRESSION", {
208
                      "args" : [["EXPRESSION", {
209
                        "args" : [["EXPRESSION", {
210
                          "args" : [["EXPRESSION", {
211
                            "args" : [["CALL", ["INDEXED_NAME", {
212
                              "id" : ["SIMPLE_NAME", "unsigned"], "exprs" : [["EXPRESSION", {
213
                                "args" : [["EXPRESSION", {
214
                                  "args" : [["EXPRESSION", {
215
                                    "args" : [["EXPRESSION", {
216
                                      "args" : [["CALL", ["SIMPLE_NAME", "random"]]]}
217
                                    ]]}
218
                                  ]]}
219
                                ]]}
220
                              ]]}
221
                            ]]]}
222
                          ]]}
223
                        ]]}
224
                      ]]}
225
                    ]]}
226
                  ]}
227
                ]}
228
              ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
229
                "lhs" : ["SIMPLE_NAME", "random"], "rhs" : [{
230
                  "value" : ["EXPRESSION", {
231
                    "args" : [["EXPRESSION", {
232
                      "args" : [["EXPRESSION", {
233
                        "args" : [["EXPRESSION", {
234
                          "args" : [["CALL", ["INDEXED_NAME", {
235
                            "id" : ["SIMPLE_NAME", "crc"], "exprs" : [["EXPRESSION", {
236
                              "args" : [["EXPRESSION", {
237
                                "args" : [["EXPRESSION", {
238
                                  "args" : [["EXPRESSION", {
239
                                    "args" : [["CALL", ["SIMPLE_NAME", "random"]]]}
240
                                  ]]}
241
                                ]]}
242
                              ]]}
243
                            ]]}
244
                          ]]]}
245
                        ]]}
246
                      ]]}
247
                    ]]}
248
                  ]}
249
                ]}
250
              ]]}
251
            ]}
252
          ]]}
253
        ], ["PROCESS_STATEMENT", {
254
          "id" : ["IDENTIFIER", "board_clk_process"], "PROCESS_STATEMENT_PART" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
255
            "lhs" : ["SIMPLE_NAME", "board_clk"], "rhs" : [{
256
              "value" : ["EXPRESSION", {
257
                "args" : [["EXPRESSION", {
258
                  "args" : [["EXPRESSION", {
259
                    "args" : [["EXPRESSION", {
260
                      "args" : [["CONSTANT_VALUE", {
261
                        "value" : ["CST_LITERAL", "'0'"]}
262
                      ]]}
263
                    ]]}
264
                  ]]}
265
                ]]}
266
              ]}
267
            ]}
268
          ], ["WAIT_STATEMENT"], ["SIGNAL_ASSIGNMENT_STATEMENT", {
269
            "lhs" : ["SIMPLE_NAME", "board_clk"], "rhs" : [{
270
              "value" : ["EXPRESSION", {
271
                "args" : [["EXPRESSION", {
272
                  "args" : [["EXPRESSION", {
273
                    "args" : [["EXPRESSION", {
274
                      "args" : [["CONSTANT_VALUE", {
275
                        "value" : ["CST_LITERAL", "'1'"]}
276
                      ]]}
277
                    ]]}
278
                  ]]}
279
                ]]}
280
              ]}
281
            ]}
282
          ], ["WAIT_STATEMENT"]]}
283
        ]]}
284
      ]}
285
    ]}
286
  }