Пример #1
0
 def visit_For(self, node):
     for_visitor = VerilogBlockingVisitor()
     pre = for_visitor.visit(node.pre)
     cond = self.visit(node.condition)
     post = for_visitor.visit(node.post)
     statement = self.visit(node.statement)
     return vast.ForStatement(pre, cond, post, statement)
Пример #2
0
 def visit_GenerateFor(self, node):
     genfor_visitor = VerilogBlockingVisitor()
     pre = genfor_visitor.visit(node.pre)
     cond = genfor_visitor.visit(node.cond)
     post = genfor_visitor.visit(node.post)
     items = self._visit_Generate(node)
     block = vast.Block(items, scope=node.scope)
     _for = vast.ForStatement(pre, cond, post, block)
     return vast.GenerateStatement(tuple([_for]))