Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / ghdl / ghdl / testsuite / vests / vhdl-93 / ashenden / compliant / ch_12_ch_12_03.json @ 3fd18385

History | View | Annotate | Download (6.19 KB)

1
{
2
  "DESIGN_FILE" : {
3
    "design_units" : [{
4
      "contexts" : [], "library" : ["ENTITY_DECLARATION", {
5
        "name" : ["IDENTIFIER", "reg"], "generics" : [{
6
          "names" : [["IDENTIFIER", "width"]], "typ" : {
7
            "name" : ["SIMPLE_NAME", "positive"]}
8
          }
9
        ], "ports" : [{
10
          "names" : [["IDENTIFIER", "d"]], "mode" : ["in"], "typ" : {
11
            "name" : ["SIMPLE_NAME", "bit_vector"], "const" : ["INDEX_CONSTRAINT", {
12
              "ranges" : [["RANGE_WITH_DIRECTION", {
13
                "direction" : "to", "from" : ["EXPRESSION", {
14
                  "args" : [["EXPRESSION", {
15
                    "args" : [["CONSTANT_VALUE", {
16
                      "value" : ["CST_LITERAL", "0"]}
17
                    ]]}
18
                  ]]}
19
                ], "_to" : ["EXPRESSION", {
20
                  "args" : [["EXPRESSION", {
21
                    "id" : "-", "args" : [["EXPRESSION", {
22
                      "args" : [["CALL", ["SIMPLE_NAME", "width"]]]}
23
                    ], ["EXPRESSION", {
24
                      "args" : [["CONSTANT_VALUE", {
25
                        "value" : ["CST_LITERAL", "1"]}
26
                      ]]}
27
                    ]]}
28
                  ]]}
29
                ]}
30
              ]]}
31
            ]}
32
          }
33
        , {
34
          "names" : [["IDENTIFIER", "q"]], "mode" : ["out"], "typ" : {
35
            "name" : ["SIMPLE_NAME", "bit_vector"], "const" : ["INDEX_CONSTRAINT", {
36
              "ranges" : [["RANGE_WITH_DIRECTION", {
37
                "direction" : "to", "from" : ["EXPRESSION", {
38
                  "args" : [["EXPRESSION", {
39
                    "args" : [["CONSTANT_VALUE", {
40
                      "value" : ["CST_LITERAL", "0"]}
41
                    ]]}
42
                  ]]}
43
                ], "_to" : ["EXPRESSION", {
44
                  "args" : [["EXPRESSION", {
45
                    "id" : "-", "args" : [["EXPRESSION", {
46
                      "args" : [["CALL", ["SIMPLE_NAME", "width"]]]}
47
                    ], ["EXPRESSION", {
48
                      "args" : [["CONSTANT_VALUE", {
49
                        "value" : ["CST_LITERAL", "1"]}
50
                      ]]}
51
                    ]]}
52
                  ]]}
53
                ]}
54
              ]]}
55
            ]}
56
          }
57
        , {
58
          "names" : [["IDENTIFIER", "other_port"]], "mode" : ["in"], "typ" : {
59
            "name" : ["SIMPLE_NAME", "bit"]}
60
          , "expr" : ["EXPRESSION", {
61
            "args" : [["EXPRESSION", {
62
              "args" : [["EXPRESSION", {
63
                "args" : [["EXPRESSION", {
64
                  "args" : [["CONSTANT_VALUE", {
65
                    "value" : ["CST_LITERAL", "'0'"]}
66
                  ]]}
67
                ]]}
68
              ]]}
69
            ]]}
70
          ]}
71
        ], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
72
      ]}
73
    , {
74
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
75
        "name" : ["IDENTIFIER", "test"], "entity" : ["IDENTIFIER", "reg"], "ARCHITECTURE_DECLARATIVE_PART" : [], "ARCHITECTURE_STATEMENT_PART" : [["CONDITIONAL_SIGNAL_ASSIGNMENT", {
76
          "postponed" : false, "lhs" : ["SIMPLE_NAME", "q"], "rhs" : [{
77
            "expr" : [{
78
              "value" : ["EXPRESSION", {
79
                "args" : [["EXPRESSION", {
80
                  "args" : [["EXPRESSION", {
81
                    "args" : [["EXPRESSION", {
82
                      "args" : [["CALL", ["SIMPLE_NAME", "d"]]]}
83
                    ]]}
84
                  ]]}
85
                ]]}
86
              ]}
87
            ]}
88
          ]}
89
        ]]}
90
      ]}
91
    , {
92
      "contexts" : [], "library" : ["ENTITY_DECLARATION", {
93
        "name" : ["IDENTIFIER", "ch_12_03"], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
94
      ]}
95
    , {
96
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
97
        "name" : ["IDENTIFIER", "test"], "entity" : ["IDENTIFIER", "ch_12_03"], "ARCHITECTURE_DECLARATIVE_PART" : [{
98
          "declaration" : ["CONSTANT_DECLARATION", {
99
            "names" : [["IDENTIFIER", "bus_size"]], "typ" : {
100
              "name" : ["SIMPLE_NAME", "positive"]}
101
            , "init_val" : ["EXPRESSION", {
102
              "args" : [["EXPRESSION", {
103
                "args" : [["EXPRESSION", {
104
                  "args" : [["EXPRESSION", {
105
                    "args" : [["CONSTANT_VALUE", {
106
                      "value" : ["CST_LITERAL", "16"]}
107
                    ]]}
108
                  ]]}
109
                ]]}
110
              ]]}
111
            ]}
112
          ]}
113
        , {
114
          "declaration" : ["SIGNAL_DECLARATION", {
115
            "names" : [["IDENTIFIER", "in_data"], ["IDENTIFIER", "out_data"]], "typ" : {
116
              "name" : ["SIMPLE_NAME", "bit_vector"], "const" : ["INDEX_CONSTRAINT", {
117
                "ranges" : [["RANGE_WITH_DIRECTION", {
118
                  "direction" : "to", "from" : ["EXPRESSION", {
119
                    "args" : [["EXPRESSION", {
120
                      "args" : [["CONSTANT_VALUE", {
121
                        "value" : ["CST_LITERAL", "0"]}
122
                      ]]}
123
                    ]]}
124
                  ], "_to" : ["EXPRESSION", {
125
                    "args" : [["EXPRESSION", {
126
                      "id" : "-", "args" : [["EXPRESSION", {
127
                        "args" : [["CALL", ["SIMPLE_NAME", "bus_size"]]]}
128
                      ], ["EXPRESSION", {
129
                        "args" : [["CONSTANT_VALUE", {
130
                          "value" : ["CST_LITERAL", "1"]}
131
                        ]]}
132
                      ]]}
133
                    ]]}
134
                  ]}
135
                ]]}
136
              ]}
137
            }
138
          ]}
139
        ], "ARCHITECTURE_STATEMENT_PART" : [["COMPONENT_INSTANTIATION_STATEMENT", {
140
          "name" : ["IDENTIFIER", "ok_reg"], "inst_unit" : ["SELECTED_NAME", [["SIMPLE_NAME", "work"], ["IDENTIFIER", "reg"]]], "inst_unit_type" : "entity", "generic_map" : [{
141
            "formal_name" : ["SIMPLE_NAME", "width"], "actual_designator" : ["SIMPLE_NAME", "bus_size"]}
142
          ], "port_map" : [{
143
            "formal_name" : ["SIMPLE_NAME", "d"], "actual_designator" : ["SIMPLE_NAME", "in_data"]}
144
          , {
145
            "formal_name" : ["SIMPLE_NAME", "q"], "actual_designator" : ["SIMPLE_NAME", "out_data"]}
146
          , {
147
            "formal_name" : ["SIMPLE_NAME", "other_port"], "actual_designator" : ["OPEN"]}
148
          ]}
149
        ]]}
150
      ]}
151
    ]}
152
  }