Esempio n. 1
0
    def visit_SystemTask(self, node):
        cmd = node.cmd
        if (self.for_verilator and (cmd == 'dumpfile' or cmd == 'dumpvars')):
            return vast.SystemCall('write', (vast.StringConst(''),))
        if (self.for_verilator and self.in_initial and cmd == 'finish'):
            return vast.SystemCall('write', (vast.StringConst(''),))

        args = tuple([self.visit(a) for a in node.args])
        return vast.SystemCall(cmd, args)
Esempio n. 2
0
 def visit_Forever(self, node):
     if self.for_verilator:
         return vast.SingleStatement(
             vast.SystemCall('write', (vast.StringConst(''), )))
     statement = self._optimize_block(
         vast.Block(tuple([self.visit(s) for s in node.statement])))
     return vast.ForeverStatement(statement)
Esempio n. 3
0
 def visit_SystemTask(self, node):
     cmd = node.cmd
     args = tuple([self.visit(a) for a in node.args])
     return vast.SystemCall(cmd, args)
Esempio n. 4
0
 def visit_Delay(self, node):
     if self.for_verilator:
         return vast.SingleStatement(vast.SystemCall('write', (vast.StringConst(''),)))
     delay = self.visit(node.value)
     return vast.SingleStatement(vast.DelayStatement(delay))