Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / valencia / two_counters.json @ 47142ed7

History | View | Annotate | Download (9.54 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"]]]]]], "library" : ["ENTITY_DECLARATION", {
5
        "name" : ["IDENTIFIER", "counter"], "ports" : [{
6
          "names" : [["IDENTIFIER", "x"]], "mode" : ["in"], "typ" : {
7
            "name" : ["SIMPLE_NAME", "boolean"]}
8
          }
9
        , {
10
          "names" : [["IDENTIFIER", "o"]], "mode" : ["out"], "typ" : {
11
            "name" : ["SIMPLE_NAME", "boolean"]}
12
          }
13
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
14
      ]}
15
    , {
16
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
17
        "name" : ["IDENTIFIER", "greycounter"], "entity" : ["IDENTIFIER", "counter"], "ARCHITECTURE_DECLARATIVE_PART" : [{
18
          "declaration" : ["SIGNAL_DECLARATION", {
19
            "names" : [["IDENTIFIER", "a"], ["IDENTIFIER", "b"]], "typ" : {
20
              "name" : ["SIMPLE_NAME", "boolean"]}
21
            , "init_val" : ["EXPRESSION", {
22
              "args" : [["EXPRESSION", {
23
                "args" : [["EXPRESSION", {
24
                  "args" : [["EXPRESSION", {
25
                    "args" : [["CALL", ["SIMPLE_NAME", "false"]]]}
26
                  ]]}
27
                ]]}
28
              ]]}
29
            ]}
30
          ]}
31
        ], "ARCHITECTURE_STATEMENT_PART" : [["CONDITIONAL_SIGNAL_ASSIGNMENT", {
32
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "a"], "rhs" : [{
33
            "expr" : [{
34
              "value" : ["EXPRESSION", {
35
                "args" : [["EXPRESSION", {
36
                  "args" : [["EXPRESSION", {
37
                    "args" : [["EXPRESSION", {
38
                      "args" : [["CALL", ["SIMPLE_NAME", "b"]]]}
39
                    ]]}
40
                  ]]}
41
                ]]}
42
              ]}
43
            ]}
44
          ]}
45
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
46
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "b"], "rhs" : [{
47
            "expr" : [{
48
              "value" : ["EXPRESSION", {
49
                "args" : [["EXPRESSION", {
50
                  "args" : [["EXPRESSION", {
51
                    "args" : [["EXPRESSION", {
52
                      "args" : [["CALL", ["SIMPLE_NAME", "a"]]]}
53
                    ]]}
54
                  ]]}
55
                ]]}
56
              ]}
57
            ]}
58
          ]}
59
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
60
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "o"], "rhs" : [{
61
            "expr" : [{
62
              "value" : ["EXPRESSION", {
63
                "id" : "and", "args" : [["EXPRESSION", {
64
                  "args" : [["EXPRESSION", {
65
                    "args" : [["EXPRESSION", {
66
                      "args" : [["EXPRESSION", {
67
                        "args" : [["CALL", ["SIMPLE_NAME", "a"]]]}
68
                      ]]}
69
                    ]]}
70
                  ]]}
71
                ], ["EXPRESSION", {
72
                  "args" : [["EXPRESSION", {
73
                    "args" : [["EXPRESSION", {
74
                      "args" : [["EXPRESSION", {
75
                        "args" : [["CALL", ["SIMPLE_NAME", "b"]]]}
76
                      ]]}
77
                    ]]}
78
                  ]]}
79
                ]]}
80
              ]}
81
            ]}
82
          ]}
83
        ]]}
84
      ]}
85
    , {
86
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
87
        "name" : ["IDENTIFIER", "intloopcounter"], "entity" : ["IDENTIFIER", "counter"], "ARCHITECTURE_DECLARATIVE_PART" : [{
88
          "declaration" : ["SIGNAL_DECLARATION", {
89
            "names" : [["IDENTIFIER", "t"]], "typ" : {
90
              "name" : ["SIMPLE_NAME", "integer"]}
91
            , "init_val" : ["EXPRESSION", {
92
              "args" : [["EXPRESSION", {
93
                "args" : [["EXPRESSION", {
94
                  "args" : [["EXPRESSION", {
95
                    "args" : [["CONSTANT_VALUE", {
96
                      "value" : ["CST_LITERAL", "0"]}
97
                    ]]}
98
                  ]]}
99
                ]]}
100
              ]]}
101
            ]}
102
          ]}
103
        ], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
104
          "id" : ["IDENTIFIER", "p"], "active_sigs" : [["SIMPLE_NAME", "t"]], "PROCESS_STATEMENT_PART" : [["IF_STATEMENT", {
105
            "if_cases" : [{
106
              "if_cond" : ["EXPRESSION", {
107
                "id" : "=", "args" : [["EXPRESSION", {
108
                  "args" : [["EXPRESSION", {
109
                    "args" : [["EXPRESSION", {
110
                      "args" : [["CALL", ["SIMPLE_NAME", "t"]]]}
111
                    ]]}
112
                  ]]}
113
                ], ["EXPRESSION", {
114
                  "args" : [["EXPRESSION", {
115
                    "args" : [["EXPRESSION", {
116
                      "args" : [["CONSTANT_VALUE", {
117
                        "value" : ["CST_LITERAL", "3"]}
118
                      ]]}
119
                    ]]}
120
                  ]]}
121
                ]]}
122
              ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
123
                "lhs" : ["SIMPLE_NAME", "t"], "rhs" : [{
124
                  "value" : ["EXPRESSION", {
125
                    "args" : [["EXPRESSION", {
126
                      "args" : [["EXPRESSION", {
127
                        "args" : [["EXPRESSION", {
128
                          "args" : [["CONSTANT_VALUE", {
129
                            "value" : ["CST_LITERAL", "0"]}
130
                          ]]}
131
                        ]]}
132
                      ]]}
133
                    ]]}
134
                  ]}
135
                ]}
136
              ]]}
137
            ], "default" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
138
              "lhs" : ["SIMPLE_NAME", "t"], "rhs" : [{
139
                "value" : ["EXPRESSION", {
140
                  "args" : [["EXPRESSION", {
141
                    "args" : [["EXPRESSION", {
142
                      "args" : [["EXPRESSION", {
143
                        "id" : "+", "args" : [["EXPRESSION", {
144
                          "args" : [["CALL", ["SIMPLE_NAME", "t"]]]}
145
                        ], ["EXPRESSION", {
146
                          "args" : [["CONSTANT_VALUE", {
147
                            "value" : ["CST_LITERAL", "1"]}
148
                          ]]}
149
                        ]]}
150
                      ]]}
151
                    ]]}
152
                  ]]}
153
                ]}
154
              ]}
155
            ]]}
156
          ]]}
157
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
158
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "o"], "rhs" : [{
159
            "expr" : [{
160
              "value" : ["EXPRESSION", {
161
                "id" : "=", "args" : [["EXPRESSION", {
162
                  "args" : [["EXPRESSION", {
163
                    "args" : [["EXPRESSION", {
164
                      "args" : [["CALL", ["SIMPLE_NAME", "t"]]]}
165
                    ]]}
166
                  ]]}
167
                ], ["EXPRESSION", {
168
                  "args" : [["EXPRESSION", {
169
                    "args" : [["EXPRESSION", {
170
                      "args" : [["CONSTANT_VALUE", {
171
                        "value" : ["CST_LITERAL", "2"]}
172
                      ]]}
173
                    ]]}
174
                  ]]}
175
                ]]}
176
              ]}
177
            ]}
178
          ]}
179
        ]]}
180
      ]}
181
    , {
182
      "contexts" : [["LIBRARY_CLAUSE", [["IDENTIFIER", "ieee"]]], ["USE_CLAUSE", [["SELECTED_NAME", [["SIMPLE_NAME", "ieee"], ["SIMPLE_NAME", "std_logic_1164"]]]]]], "library" : ["ENTITY_DECLARATION", {
183
        "name" : ["IDENTIFIER", "top"], "ports" : [{
184
          "names" : [["IDENTIFIER", "x"]], "mode" : ["in"], "typ" : {
185
            "name" : ["SIMPLE_NAME", "boolean"]}
186
          }
187
        , {
188
          "names" : [["IDENTIFIER", "ok"]], "mode" : ["out"], "typ" : {
189
            "name" : ["SIMPLE_NAME", "boolean"]}
190
          }
191
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
192
      ]}
193
    , {
194
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
195
        "name" : ["IDENTIFIER", "top_most"], "entity" : ["IDENTIFIER", "top"], "ARCHITECTURE_DECLARATIVE_PART" : [{
196
          "declaration" : ["SIGNAL_DECLARATION", {
197
            "names" : [["IDENTIFIER", "b"], ["IDENTIFIER", "d"]], "typ" : {
198
              "name" : ["SIMPLE_NAME", "boolean"]}
199
            }
200
          ]}
201
        ], "ARCHITECTURE_STATEMENT_PART" : [["COMPONENT_INSTANTIATION_STATEMENT", {
202
          "name" : ["IDENTIFIER", "gc"], "inst_unit" : ["SELECTED_NAME", [["SIMPLE_NAME", "work"], ["IDENTIFIER", "counter"]]], "inst_unit_type" : "entity", "archi_name" : ["IDENTIFIER", "greycounter"], "port_map" : [{
203
            "actual_designator" : ["SIMPLE_NAME", "x"]}
204
          , {
205
            "actual_designator" : ["SIMPLE_NAME", "b"]}
206
          ]}
207
        ], ["COMPONENT_INSTANTIATION_STATEMENT", {
208
          "name" : ["IDENTIFIER", "ilc"], "inst_unit" : ["SELECTED_NAME", [["SIMPLE_NAME", "work"], ["IDENTIFIER", "counter"]]], "inst_unit_type" : "entity", "archi_name" : ["IDENTIFIER", "intloopcounter"], "port_map" : [{
209
            "actual_designator" : ["SIMPLE_NAME", "x"]}
210
          , {
211
            "actual_designator" : ["SIMPLE_NAME", "d"]}
212
          ]}
213
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
214
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "ok"], "rhs" : [{
215
            "expr" : [{
216
              "value" : ["EXPRESSION", {
217
                "id" : "=", "args" : [["EXPRESSION", {
218
                  "args" : [["EXPRESSION", {
219
                    "args" : [["EXPRESSION", {
220
                      "args" : [["CALL", ["SIMPLE_NAME", "b"]]]}
221
                    ]]}
222
                  ]]}
223
                ], ["EXPRESSION", {
224
                  "args" : [["EXPRESSION", {
225
                    "args" : [["EXPRESSION", {
226
                      "args" : [["CALL", ["SIMPLE_NAME", "d"]]]}
227
                    ]]}
228
                  ]]}
229
                ]]}
230
              ]}
231
            ]}
232
          ]}
233
        ]]}
234
      ]}
235
    ]}
236
  }