@@ -158,112 +158,103 @@ python pyverilog/examples/example_parser.py test.v
158
158
Then you got the result as below. The result of syntax analysis is displayed.
159
159
160
160
```
161
- Source:
162
- Description:
163
- ModuleDef: top
164
- Paramlist:
165
- Portlist:
166
- Ioport:
167
- Input: CLK, False
168
- Width:
169
- IntConst: 0
170
- IntConst: 0
171
- Ioport:
172
- Input: RST, False
173
- Width:
174
- IntConst: 0
175
- IntConst: 0
176
- Ioport:
177
- Input: enable, False
178
- Width:
179
- IntConst: 0
180
- IntConst: 0
181
- Ioport:
182
- Input: value, False
183
- Width:
184
- IntConst: 31
185
- IntConst: 0
186
- Ioport:
187
- Output: led, False
188
- Width:
189
- IntConst: 7
190
- IntConst: 0
191
- Decl:
192
- Reg: count, False
193
- Width:
194
- IntConst: 31
195
- IntConst: 0
196
- Decl:
197
- Reg: state, False
198
- Width:
199
- IntConst: 7
200
- IntConst: 0
201
- Assign:
202
- Lvalue:
203
- Identifier: led
204
- Rvalue:
205
- Partselect:
206
- Identifier: count
207
- IntConst: 23
208
- IntConst: 16
209
- Always:
210
- SensList:
211
- Sens: posedge
212
- Identifier: CLK
213
- Block: None
214
- IfStatement:
215
- Identifier: RST
216
- Block: None
217
- NonblockingSubstitution:
218
- Lvalue:
219
- Identifier: count
220
- Rvalue:
221
- IntConst: 0
222
- NonblockingSubstitution:
223
- Lvalue:
224
- Identifier: state
225
- Rvalue:
226
- IntConst: 0
227
- Block: None
228
- IfStatement:
229
- Eq:
230
- Identifier: state
231
- IntConst: 0
232
- Block: None
233
- IfStatement:
234
- Identifier: enable
235
- NonblockingSubstitution:
236
- Lvalue:
237
- Identifier: state
238
- Rvalue:
239
- IntConst: 1
240
- IfStatement:
241
- Eq:
242
- Identifier: state
243
- IntConst: 1
244
- Block: None
245
- NonblockingSubstitution:
246
- Lvalue:
247
- Identifier: state
248
- Rvalue:
249
- IntConst: 2
250
- IfStatement:
251
- Eq:
252
- Identifier: state
253
- IntConst: 2
254
- Block: None
255
- NonblockingSubstitution:
256
- Lvalue:
257
- Identifier: count
258
- Rvalue:
259
- Plus:
260
- Identifier: count
261
- Identifier: value
262
- NonblockingSubstitution:
263
- Lvalue:
264
- Identifier: state
265
- Rvalue:
266
- IntConst: 0
161
+ Source: (at 1)
162
+ Description: (at 1)
163
+ ModuleDef: top (at 1)
164
+ Paramlist: (at 0)
165
+ Portlist: (at 2)
166
+ Ioport: (at 3)
167
+ Input: CLK, False (at 3)
168
+ Ioport: (at 4)
169
+ Input: RST, False (at 4)
170
+ Ioport: (at 5)
171
+ Input: enable, False (at 5)
172
+ Ioport: (at 6)
173
+ Input: value, False (at 6)
174
+ Width: (at 6)
175
+ IntConst: 31 (at 6)
176
+ IntConst: 0 (at 6)
177
+ Ioport: (at 7)
178
+ Output: led, False (at 7)
179
+ Width: (at 7)
180
+ IntConst: 7 (at 7)
181
+ IntConst: 0 (at 7)
182
+ Decl: (at 9)
183
+ Reg: count, False (at 9)
184
+ Width: (at 9)
185
+ IntConst: 31 (at 9)
186
+ IntConst: 0 (at 9)
187
+ Decl: (at 10)
188
+ Reg: state, False (at 10)
189
+ Width: (at 10)
190
+ IntConst: 7 (at 10)
191
+ IntConst: 0 (at 10)
192
+ Assign: (at 11)
193
+ Lvalue: (at 11)
194
+ Identifier: led (at 11)
195
+ Rvalue: (at 11)
196
+ Partselect: (at 11)
197
+ Identifier: count (at 11)
198
+ IntConst: 23 (at 11)
199
+ IntConst: 16 (at 11)
200
+ Always: (at 12)
201
+ SensList: (at 12)
202
+ Sens: posedge (at 12)
203
+ Identifier: CLK (at 12)
204
+ Block: None (at 12)
205
+ IfStatement: (at 13)
206
+ Identifier: RST (at 13)
207
+ Block: None (at 13)
208
+ NonblockingSubstitution: (at 14)
209
+ Lvalue: (at 14)
210
+ Identifier: count (at 14)
211
+ Rvalue: (at 14)
212
+ IntConst: 0 (at 14)
213
+ NonblockingSubstitution: (at 15)
214
+ Lvalue: (at 15)
215
+ Identifier: state (at 15)
216
+ Rvalue: (at 15)
217
+ IntConst: 0 (at 15)
218
+ Block: None (at 16)
219
+ IfStatement: (at 17)
220
+ Eq: (at 17)
221
+ Identifier: state (at 17)
222
+ IntConst: 0 (at 17)
223
+ Block: None (at 17)
224
+ IfStatement: (at 18)
225
+ Identifier: enable (at 18)
226
+ NonblockingSubstitution: (at 18)
227
+ Lvalue: (at 18)
228
+ Identifier: state (at 18)
229
+ Rvalue: (at 18)
230
+ IntConst: 1 (at 18)
231
+ IfStatement: (at 19)
232
+ Eq: (at 19)
233
+ Identifier: state (at 19)
234
+ IntConst: 1 (at 19)
235
+ Block: None (at 19)
236
+ NonblockingSubstitution: (at 20)
237
+ Lvalue: (at 20)
238
+ Identifier: state (at 20)
239
+ Rvalue: (at 20)
240
+ IntConst: 2 (at 20)
241
+ IfStatement: (at 21)
242
+ Eq: (at 21)
243
+ Identifier: state (at 21)
244
+ IntConst: 2 (at 21)
245
+ Block: None (at 21)
246
+ NonblockingSubstitution: (at 22)
247
+ Lvalue: (at 22)
248
+ Identifier: count (at 22)
249
+ Rvalue: (at 22)
250
+ Plus: (at 22)
251
+ Identifier: count (at 22)
252
+ Identifier: value (at 22)
253
+ NonblockingSubstitution: (at 23)
254
+ Lvalue: (at 23)
255
+ Identifier: state (at 23)
256
+ Rvalue: (at 23)
257
+ IntConst: 0 (at 23)
267
258
```
268
259
269
260
Dataflow analyzer
0 commit comments