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

History | View | Annotate | Download (7.05 KB)

1
{
2
  "DESIGN_FILE" : {
3
    "design_units" : [{
4
      "contexts" : [], "library" : ["ENTITY_DECLARATION", {
5
        "name" : ["IDENTIFIER", "ch_07_03"], "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_03"], "ARCHITECTURE_DECLARATIVE_PART" : [{
10
          "declaration" : ["CONSTANT_DECLARATION", {
11
            "names" : [["IDENTIFIER", "T_delay_adder"]], "typ" : {
12
              "name" : ["SIMPLE_NAME", "delay_length"]}
13
            , "init_val" : ["EXPRESSION", {
14
              "args" : [["EXPRESSION", {
15
                "args" : [["EXPRESSION", {
16
                  "args" : [["EXPRESSION", {
17
                    "args" : [["CONSTANT_VALUE", {
18
                      "value" : ["CST_LITERAL", "10"], "unit_name" : ["SIMPLE_NAME", "ns"]}
19
                    ]]}
20
                  ]]}
21
                ]]}
22
              ]]}
23
            ]}
24
          ]}
25
        , {
26
          "declaration" : ["SUBPROGRAM_BODY", {
27
            "spec" : {
28
              "name" : "bv_add", "subprogram_type" : "function", "parameters" : [{
29
                "names" : [["IDENTIFIER", "bv1"], ["IDENTIFIER", "bv2"]], "mode" : ["in"], "typ" : {
30
                  "name" : ["SIMPLE_NAME", "bit_vector"]}
31
                }
32
              ], "typeMark" : ["SIMPLE_NAME", "bit_vector"], "isPure" : false}
33
            , "stmts" : [["RETURN_STATEMENT", {
34
              "expr" : ["EXPRESSION", {
35
                "args" : [["EXPRESSION", {
36
                  "args" : [["EXPRESSION", {
37
                    "args" : [["EXPRESSION", {
38
                      "id" : "+", "args" : [["EXPRESSION", {
39
                        "args" : [["CALL", ["SIMPLE_NAME", "bv1"]]]}
40
                      ], ["EXPRESSION", {
41
                        "args" : [["CALL", ["SIMPLE_NAME", "bv2"]]]}
42
                      ]]}
43
                    ]]}
44
                  ]]}
45
                ]]}
46
              ]}
47
            ]]}
48
          ]}
49
        , {
50
          "declaration" : ["SIGNAL_DECLARATION", {
51
            "names" : [["IDENTIFIER", "source1"], ["IDENTIFIER", "source2"], ["IDENTIFIER", "sum"]], "typ" : {
52
              "name" : ["SIMPLE_NAME", "bit_vector"], "const" : ["INDEX_CONSTRAINT", {
53
                "ranges" : [["RANGE_WITH_DIRECTION", {
54
                  "direction" : "to", "from" : ["EXPRESSION", {
55
                    "args" : [["EXPRESSION", {
56
                      "args" : [["CONSTANT_VALUE", {
57
                        "value" : ["CST_LITERAL", "0"]}
58
                      ]]}
59
                    ]]}
60
                  ], "_to" : ["EXPRESSION", {
61
                    "args" : [["EXPRESSION", {
62
                      "args" : [["CONSTANT_VALUE", {
63
                        "value" : ["CST_LITERAL", "31"]}
64
                      ]]}
65
                    ]]}
66
                  ]}
67
                ]]}
68
              ]}
69
            }
70
          ]}
71
        ], "ARCHITECTURE_STATEMENT_PART" : [["CONDITIONAL_SIGNAL_ASSIGNMENT", {
72
          "postponed" : false, "label" : ["IDENTIFIER", "adder"], "lhs" : ["SIMPLE_NAME", "sum"], "rhs" : [{
73
            "expr" : [{
74
              "value" : ["EXPRESSION", {
75
                "args" : [["EXPRESSION", {
76
                  "args" : [["EXPRESSION", {
77
                    "args" : [["EXPRESSION", {
78
                      "args" : [["CALL", ["INDEXED_NAME", {
79
                        "id" : ["SIMPLE_NAME", "bv_add"], "exprs" : [["EXPRESSION", {
80
                          "args" : [["EXPRESSION", {
81
                            "args" : [["EXPRESSION", {
82
                              "args" : [["EXPRESSION", {
83
                                "args" : [["CALL", ["SIMPLE_NAME", "source1"]]]}
84
                              ]]}
85
                            ]]}
86
                          ]]}
87
                        ], ["EXPRESSION", {
88
                          "args" : [["EXPRESSION", {
89
                            "args" : [["EXPRESSION", {
90
                              "args" : [["EXPRESSION", {
91
                                "args" : [["CALL", ["SIMPLE_NAME", "source2"]]]}
92
                              ]]}
93
                            ]]}
94
                          ]]}
95
                        ]]}
96
                      ]]]}
97
                    ]]}
98
                  ]]}
99
                ]]}
100
              ], "delay" : ["EXPRESSION", {
101
                "args" : [["EXPRESSION", {
102
                  "args" : [["EXPRESSION", {
103
                    "args" : [["EXPRESSION", {
104
                      "args" : [["CALL", ["SIMPLE_NAME", "T_delay_adder"]]]}
105
                    ]]}
106
                  ]]}
107
                ]]}
108
              ]}
109
            ]}
110
          ]}
111
        ], ["PROCESS_STATEMENT", {
112
          "id" : ["IDENTIFIER", "stimulus"], "PROCESS_STATEMENT_PART" : [["WAIT_STATEMENT"], ["SIGNAL_ASSIGNMENT_STATEMENT", {
113
            "lhs" : ["SIMPLE_NAME", "source1"], "rhs" : [{
114
              "value" : ["EXPRESSION", {
115
                "args" : [["EXPRESSION", {
116
                  "args" : [["EXPRESSION", {
117
                    "args" : [["EXPRESSION", {
118
                      "args" : [["CONSTANT_VALUE", {
119
                        "value" : ["CST_LITERAL", "X\"00000002\""]}
120
                      ]]}
121
                    ]]}
122
                  ]]}
123
                ]]}
124
              ]}
125
            ]}
126
          ], ["SIGNAL_ASSIGNMENT_STATEMENT", {
127
            "lhs" : ["SIMPLE_NAME", "source2"], "rhs" : [{
128
              "value" : ["EXPRESSION", {
129
                "args" : [["EXPRESSION", {
130
                  "args" : [["EXPRESSION", {
131
                    "args" : [["EXPRESSION", {
132
                      "args" : [["CONSTANT_VALUE", {
133
                        "value" : ["CST_LITERAL", "X\"00000003\""]}
134
                      ]]}
135
                    ]]}
136
                  ]]}
137
                ]]}
138
              ]}
139
            ]}
140
          ], ["WAIT_STATEMENT"], ["SIGNAL_ASSIGNMENT_STATEMENT", {
141
            "lhs" : ["SIMPLE_NAME", "source2"], "rhs" : [{
142
              "value" : ["EXPRESSION", {
143
                "args" : [["EXPRESSION", {
144
                  "args" : [["EXPRESSION", {
145
                    "args" : [["EXPRESSION", {
146
                      "args" : [["CONSTANT_VALUE", {
147
                        "value" : ["CST_LITERAL", "X\"FFFFFFF0\""]}
148
                      ]]}
149
                    ]]}
150
                  ]]}
151
                ]]}
152
              ]}
153
            ]}
154
          ], ["WAIT_STATEMENT"], ["SIGNAL_ASSIGNMENT_STATEMENT", {
155
            "lhs" : ["SIMPLE_NAME", "source1"], "rhs" : [{
156
              "value" : ["EXPRESSION", {
157
                "args" : [["EXPRESSION", {
158
                  "args" : [["EXPRESSION", {
159
                    "args" : [["EXPRESSION", {
160
                      "args" : [["CONSTANT_VALUE", {
161
                        "value" : ["CST_LITERAL", "X\"00000010\""]}
162
                      ]]}
163
                    ]]}
164
                  ]]}
165
                ]]}
166
              ]}
167
            ]}
168
          ], ["WAIT_STATEMENT"], ["WAIT_STATEMENT"]]}
169
        ]]}
170
      ]}
171
    ]}
172
  }