Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / ghdl / ghdl / testsuite / gna / bug23165 / mwe_working / counter.json @ 3fd18385

History | View | Annotate | Download (7.29 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"]]]]]], "library" : ["ENTITY_DECLARATION", {
5
        "name" : ["IDENTIFIER", "counter"], "generics" : [{
6
          "names" : [["IDENTIFIER", "width"]], "typ" : {
7
            "name" : ["SIMPLE_NAME", "positive"]}
8
          , "expr" : ["EXPRESSION", {
9
            "args" : [["EXPRESSION", {
10
              "args" : [["EXPRESSION", {
11
                "args" : [["EXPRESSION", {
12
                  "args" : [["CONSTANT_VALUE", {
13
                    "value" : ["CST_LITERAL", "16"]}
14
                  ]]}
15
                ]]}
16
              ]]}
17
            ]]}
18
          ]}
19
        ], "ports" : [{
20
          "names" : [["IDENTIFIER", "clk"]], "mode" : ["in"], "typ" : {
21
            "name" : ["SIMPLE_NAME", "std_logic"]}
22
          }
23
        , {
24
          "names" : [["IDENTIFIER", "q"]], "mode" : ["out"], "typ" : {
25
            "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
26
              "ranges" : [["RANGE_WITH_DIRECTION", {
27
                "direction" : "downto", "from" : ["EXPRESSION", {
28
                  "args" : [["EXPRESSION", {
29
                    "id" : "-", "args" : [["EXPRESSION", {
30
                      "args" : [["CALL", ["SIMPLE_NAME", "width"]]]}
31
                    ], ["EXPRESSION", {
32
                      "args" : [["CONSTANT_VALUE", {
33
                        "value" : ["CST_LITERAL", "1"]}
34
                      ]]}
35
                    ]]}
36
                  ]]}
37
                ], "_to" : ["EXPRESSION", {
38
                  "args" : [["EXPRESSION", {
39
                    "args" : [["CONSTANT_VALUE", {
40
                      "value" : ["CST_LITERAL", "0"]}
41
                    ]]}
42
                  ]]}
43
                ]}
44
              ]]}
45
            ]}
46
          }
47
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
48
      ]}
49
    , {
50
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
51
        "name" : ["IDENTIFIER", "behav"], "entity" : ["IDENTIFIER", "counter"], "ARCHITECTURE_DECLARATIVE_PART" : [{
52
          "declaration" : ["SIGNAL_DECLARATION", {
53
            "names" : [["IDENTIFIER", "cnt"]], "typ" : {
54
              "name" : ["SIMPLE_NAME", "unsigned"], "const" : ["INDEX_CONSTRAINT", {
55
                "ranges" : [["RANGE_WITH_DIRECTION", {
56
                  "direction" : "downto", "from" : ["EXPRESSION", {
57
                    "args" : [["EXPRESSION", {
58
                      "id" : "-", "args" : [["EXPRESSION", {
59
                        "args" : [["CALL", ["SIMPLE_NAME", "width"]]]}
60
                      ], ["EXPRESSION", {
61
                        "args" : [["CONSTANT_VALUE", {
62
                          "value" : ["CST_LITERAL", "1"]}
63
                        ]]}
64
                      ]]}
65
                    ]]}
66
                  ], "_to" : ["EXPRESSION", {
67
                    "args" : [["EXPRESSION", {
68
                      "args" : [["CONSTANT_VALUE", {
69
                        "value" : ["CST_LITERAL", "0"]}
70
                      ]]}
71
                    ]]}
72
                  ]}
73
                ]]}
74
              ]}
75
            , "init_val" : ["EXPRESSION", {
76
              "args" : [["EXPRESSION", {
77
                "args" : [["EXPRESSION", {
78
                  "args" : [["EXPRESSION", {
79
                    "args" : [["CALL", ["INDEXED_NAME", {
80
                      "id" : ["SIMPLE_NAME", "to_unsigned"], "exprs" : [["EXPRESSION", {
81
                        "args" : [["EXPRESSION", {
82
                          "args" : [["EXPRESSION", {
83
                            "args" : [["EXPRESSION", {
84
                              "args" : [["CONSTANT_VALUE", {
85
                                "value" : ["CST_LITERAL", "0"]}
86
                              ]]}
87
                            ]]}
88
                          ]]}
89
                        ]]}
90
                      ], ["EXPRESSION", {
91
                        "args" : [["EXPRESSION", {
92
                          "args" : [["EXPRESSION", {
93
                            "args" : [["EXPRESSION", {
94
                              "args" : [["CALL", ["SIMPLE_NAME", "width"]]]}
95
                            ]]}
96
                          ]]}
97
                        ]]}
98
                      ]]}
99
                    ]]]}
100
                  ]]}
101
                ]]}
102
              ]]}
103
            ]}
104
          ]}
105
        ], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
106
          "PROCESS_STATEMENT_PART" : [["WAIT_STATEMENT"], ["SIGNAL_ASSIGNMENT_STATEMENT", {
107
            "lhs" : ["SIMPLE_NAME", "cnt"], "rhs" : [{
108
              "value" : ["EXPRESSION", {
109
                "args" : [["EXPRESSION", {
110
                  "args" : [["EXPRESSION", {
111
                    "args" : [["EXPRESSION", {
112
                      "id" : "+", "args" : [["EXPRESSION", {
113
                        "args" : [["CALL", ["SIMPLE_NAME", "cnt"]]]}
114
                      ], ["EXPRESSION", {
115
                        "args" : [["CALL", ["INDEXED_NAME", {
116
                          "id" : ["SIMPLE_NAME", "to_unsigned"], "exprs" : [["EXPRESSION", {
117
                            "args" : [["EXPRESSION", {
118
                              "args" : [["EXPRESSION", {
119
                                "args" : [["EXPRESSION", {
120
                                  "args" : [["CONSTANT_VALUE", {
121
                                    "value" : ["CST_LITERAL", "1"]}
122
                                  ]]}
123
                                ]]}
124
                              ]]}
125
                            ]]}
126
                          ], ["EXPRESSION", {
127
                            "args" : [["EXPRESSION", {
128
                              "args" : [["EXPRESSION", {
129
                                "args" : [["EXPRESSION", {
130
                                  "args" : [["CALL", ["ATTRIBUTE_NAME", {
131
                                    "id" : ["SIMPLE_NAME", "cnt"], "designator" : ["SIMPLE_NAME", "length"]}
132
                                  ]]]}
133
                                ]]}
134
                              ]]}
135
                            ]]}
136
                          ]]}
137
                        ]]]}
138
                      ]]}
139
                    ]]}
140
                  ]]}
141
                ]]}
142
              ]}
143
            ]}
144
          ]]}
145
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
146
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "q"], "rhs" : [{
147
            "expr" : [{
148
              "value" : ["EXPRESSION", {
149
                "args" : [["EXPRESSION", {
150
                  "args" : [["EXPRESSION", {
151
                    "args" : [["EXPRESSION", {
152
                      "args" : [["CALL", ["INDEXED_NAME", {
153
                        "id" : ["SIMPLE_NAME", "std_logic_vector"], "exprs" : [["EXPRESSION", {
154
                          "args" : [["EXPRESSION", {
155
                            "args" : [["EXPRESSION", {
156
                              "args" : [["EXPRESSION", {
157
                                "args" : [["CALL", ["SIMPLE_NAME", "cnt"]]]}
158
                              ]]}
159
                            ]]}
160
                          ]]}
161
                        ]]}
162
                      ]]]}
163
                    ]]}
164
                  ]]}
165
                ]]}
166
              ]}
167
            ]}
168
          ]}
169
        ]]}
170
      ]}
171
    ]}
172
  }