Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / ghdl / ghdl / testsuite / gna / issue50 / idct.d / sync_ram.json @ 2051e520

History | View | Annotate | Download (10 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", "sync_ram"], "ports" : [{
6
          "names" : [["IDENTIFIER", "clock"]], "mode" : ["in"], "typ" : {
7
            "name" : ["SIMPLE_NAME", "std_logic"]}
8
          }
9
        , {
10
          "names" : [["IDENTIFIER", "we"]], "mode" : ["in"], "typ" : {
11
            "name" : ["SIMPLE_NAME", "std_logic"]}
12
          }
13
        , {
14
          "names" : [["IDENTIFIER", "address"]], "mode" : ["in"], "typ" : {
15
            "name" : ["SIMPLE_NAME", "std_logic_vector"]}
16
          }
17
        , {
18
          "names" : [["IDENTIFIER", "datain"]], "mode" : ["in"], "typ" : {
19
            "name" : ["SIMPLE_NAME", "std_logic_vector"]}
20
          }
21
        , {
22
          "names" : [["IDENTIFIER", "dataout"]], "mode" : ["out"], "typ" : {
23
            "name" : ["SIMPLE_NAME", "std_logic_vector"]}
24
          }
25
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
26
      ]}
27
    , {
28
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
29
        "name" : ["IDENTIFIER", "rtl"], "entity" : ["IDENTIFIER", "sync_ram"], "ARCHITECTURE_DECLARATIVE_PART" : [{
30
          "definition" : ["TYPE_DECLARATION", {
31
            "name" : ["IDENTIFIER", "ram_type"], "definition" : ["ARRAY_TYPE_DEFINITION", {
32
              "const" : ["INDEX_CONSTRAINT", {
33
                "ranges" : [["RANGE_WITH_DIRECTION", {
34
                  "direction" : "to", "from" : ["EXPRESSION", {
35
                    "args" : [["EXPRESSION", {
36
                      "args" : [["CONSTANT_VALUE", {
37
                        "value" : ["CST_LITERAL", "0"]}
38
                      ]]}
39
                    ]]}
40
                  ], "_to" : ["EXPRESSION", {
41
                    "args" : [["EXPRESSION", {
42
                      "id" : "-", "args" : [["EXPRESSION", {
43
                        "args" : [["EXPRESSION", {
44
                          "args" : [["EXPRESSION", {
45
                            "args" : [["EXPRESSION", {
46
                              "args" : [["EXPRESSION", {
47
                                "id" : "**", "args" : [["CONSTANT_VALUE", {
48
                                  "value" : ["CST_LITERAL", "2"]}
49
                                ], ["CALL", ["ATTRIBUTE_NAME", {
50
                                  "id" : ["SIMPLE_NAME", "address"], "designator" : ["SIMPLE_NAME", "length"]}
51
                                ]]]}
52
                              ]]}
53
                            ]]}
54
                          ]]}
55
                        ]]}
56
                      ], ["EXPRESSION", {
57
                        "args" : [["CONSTANT_VALUE", {
58
                          "value" : ["CST_LITERAL", "1"]}
59
                        ]]}
60
                      ]]}
61
                    ]]}
62
                  ]}
63
                ]]}
64
              ], "definition" : {
65
                "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
66
                  "ranges" : [["NAMED_RANGE", ["ATTRIBUTE_NAME", {
67
                    "id" : ["SIMPLE_NAME", "datain"], "designator" : ["SIMPLE_NAME", "range"]}
68
                  ]]]}
69
                ]}
70
              }
71
            ]}
72
          ]}
73
        , {
74
          "declaration" : ["SIGNAL_DECLARATION", {
75
            "names" : [["IDENTIFIER", "ram"]], "typ" : {
76
              "name" : ["SIMPLE_NAME", "ram_type"]}
77
            }
78
          ]}
79
        , {
80
          "declaration" : ["SIGNAL_DECLARATION", {
81
            "names" : [["IDENTIFIER", "read_address"]], "typ" : {
82
              "name" : ["SIMPLE_NAME", "std_logic_vector"], "const" : ["INDEX_CONSTRAINT", {
83
                "ranges" : [["NAMED_RANGE", ["ATTRIBUTE_NAME", {
84
                  "id" : ["SIMPLE_NAME", "address"], "designator" : ["SIMPLE_NAME", "range"]}
85
                ]]]}
86
              ]}
87
            }
88
          ]}
89
        ], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
90
          "id" : ["IDENTIFIER", "ramproc"], "active_sigs" : [["SIMPLE_NAME", "clock"]], "PROCESS_STATEMENT_PART" : [["IF_STATEMENT", {
91
            "if_cases" : [{
92
              "if_cond" : ["EXPRESSION", {
93
                "args" : [["EXPRESSION", {
94
                  "args" : [["EXPRESSION", {
95
                    "args" : [["EXPRESSION", {
96
                      "args" : [["CALL", ["FUNCTION_CALL", {
97
                        "id" : ["SIMPLE_NAME", "rising_edge"], "assoc_list" : [{
98
                          "actual_designator" : ["SIMPLE_NAME", "clock"]}
99
                        ]}
100
                      ]]]}
101
                    ]]}
102
                  ]]}
103
                ]]}
104
              ], "if_block" : [["IF_STATEMENT", {
105
                "if_cases" : [{
106
                  "if_cond" : ["EXPRESSION", {
107
                    "id" : "=", "args" : [["EXPRESSION", {
108
                      "args" : [["EXPRESSION", {
109
                        "args" : [["EXPRESSION", {
110
                          "args" : [["CALL", ["SIMPLE_NAME", "we"]]]}
111
                        ]]}
112
                      ]]}
113
                    ], ["EXPRESSION", {
114
                      "args" : [["EXPRESSION", {
115
                        "args" : [["EXPRESSION", {
116
                          "args" : [["CONSTANT_VALUE", {
117
                            "value" : ["CST_LITERAL", "'1'"]}
118
                          ]]}
119
                        ]]}
120
                      ]]}
121
                    ]]}
122
                  ], "if_block" : [["SIGNAL_ASSIGNMENT_STATEMENT", {
123
                    "lhs" : ["INDEXED_NAME", {
124
                      "id" : ["SIMPLE_NAME", "ram"], "exprs" : [["EXPRESSION", {
125
                        "args" : [["EXPRESSION", {
126
                          "args" : [["EXPRESSION", {
127
                            "args" : [["EXPRESSION", {
128
                              "args" : [["CALL", ["FUNCTION_CALL", {
129
                                "id" : ["SIMPLE_NAME", "to_integer"], "assoc_list" : [{
130
                                  "actual_expr" : ["EXPRESSION", {
131
                                    "args" : [["EXPRESSION", {
132
                                      "args" : [["EXPRESSION", {
133
                                        "args" : [["EXPRESSION", {
134
                                          "args" : [["CALL", ["FUNCTION_CALL", {
135
                                            "id" : ["SIMPLE_NAME", "unsigned"], "assoc_list" : [{
136
                                              "actual_designator" : ["SIMPLE_NAME", "address"]}
137
                                            ]}
138
                                          ]]]}
139
                                        ]]}
140
                                      ]]}
141
                                    ]]}
142
                                  ]}
143
                                ]}
144
                              ]]]}
145
                            ]]}
146
                          ]]}
147
                        ]]}
148
                      ]]}
149
                    ], "rhs" : [{
150
                      "value" : ["EXPRESSION", {
151
                        "args" : [["EXPRESSION", {
152
                          "args" : [["EXPRESSION", {
153
                            "args" : [["EXPRESSION", {
154
                              "args" : [["CALL", ["SIMPLE_NAME", "datain"]]]}
155
                            ]]}
156
                          ]]}
157
                        ]]}
158
                      ]}
159
                    ]}
160
                  ]]}
161
                ]}
162
              ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
163
                "lhs" : ["SIMPLE_NAME", "read_address"], "rhs" : [{
164
                  "value" : ["EXPRESSION", {
165
                    "args" : [["EXPRESSION", {
166
                      "args" : [["EXPRESSION", {
167
                        "args" : [["EXPRESSION", {
168
                          "args" : [["CALL", ["SIMPLE_NAME", "address"]]]}
169
                        ]]}
170
                      ]]}
171
                    ]]}
172
                  ]}
173
                ]}
174
              ]]}
175
            ]}
176
          ]]}
177
        ], ["CONDITIONAL_SIGNAL_ASSIGNMENT", {
178
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "dataout"], "rhs" : [{
179
            "expr" : [{
180
              "value" : ["EXPRESSION", {
181
                "args" : [["EXPRESSION", {
182
                  "args" : [["EXPRESSION", {
183
                    "args" : [["EXPRESSION", {
184
                      "args" : [["CALL", ["FUNCTION_CALL", {
185
                        "id" : ["SIMPLE_NAME", "ram"], "assoc_list" : [{
186
                          "actual_expr" : ["EXPRESSION", {
187
                            "args" : [["EXPRESSION", {
188
                              "args" : [["EXPRESSION", {
189
                                "args" : [["EXPRESSION", {
190
                                  "args" : [["CALL", ["FUNCTION_CALL", {
191
                                    "id" : ["SIMPLE_NAME", "to_integer"], "assoc_list" : [{
192
                                      "actual_expr" : ["EXPRESSION", {
193
                                        "args" : [["EXPRESSION", {
194
                                          "args" : [["EXPRESSION", {
195
                                            "args" : [["EXPRESSION", {
196
                                              "args" : [["CALL", ["FUNCTION_CALL", {
197
                                                "id" : ["SIMPLE_NAME", "unsigned"], "assoc_list" : [{
198
                                                  "actual_designator" : ["SIMPLE_NAME", "read_address"]}
199
                                                ]}
200
                                              ]]]}
201
                                            ]]}
202
                                          ]]}
203
                                        ]]}
204
                                      ]}
205
                                    ]}
206
                                  ]]]}
207
                                ]]}
208
                              ]]}
209
                            ]]}
210
                          ]}
211
                        ]}
212
                      ]]]}
213
                    ]]}
214
                  ]]}
215
                ]]}
216
              ]}
217
            ]}
218
          ]}
219
        ]]}
220
      ]}
221
    ]}
222
  }