Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / cnes_guidelines / rule / data / best-chronometer-ever / src / crossdomain_sync.json @ 2051e520

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