Example #1
0
    def dump(self, dumpFile=sys.stdout):
        for proc in self.tbArch.processes:
            proc.statements.append(WaitStm(None))

        hasToBeOpened = isinstance(dumpFile, str)
        if hasToBeOpened:
            _dumpFile = open(dumpFile, 'w')
        else:
            _dumpFile = dumpFile

        sc = VhdlSerializer.getBaseNameScope()
        _dumpFile.write(
            VhdlSerializer.formater(VhdlSerializer.Entity(self.tbEnt, sc)))
        _dumpFile.write(
            VhdlSerializer.formater(
                VhdlSerializer.Architecture(self.tbArch, sc)))
Example #2
0
    def dump(self, dumpFile=sys.stdout):
        for proc in self.tbArch.processes:
            proc.statements.append(WaitStm(None))

        hasToBeOpened = isinstance(dumpFile, str)
        if hasToBeOpened:
            _dumpFile = open(dumpFile, 'w')
        else:
            _dumpFile = dumpFile

        ctx = VhdlSerializer.getBaseContext()
        ctx.scope.setLevel(2)
        VhdlSerializer.Entity_prepare(self.tbArch.components[0], ctx)
        ctx.scope.setLevel(1)

        _dumpFile.write(VhdlSerializer.formatter(
            VhdlSerializer.Entity(self.tbEnt, ctx)))
        _dumpFile.write(VhdlSerializer.formatter(
            VhdlSerializer.Architecture(self.tbArch, ctx)))
Example #3
0
 def __repr__(self):
     from hwt.serializer.vhdl.serializer import VhdlSerializer
     return VhdlSerializer.Entity(self, VhdlSerializer.getBaseNameScope())