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)
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)
def visit_SystemTask(self, node): cmd = node.cmd args = tuple([self.visit(a) for a in node.args]) return vast.SystemCall(cmd, args)
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))