Ejemplo n.º 1
0
 def __init__(self, sig, left, right=None):
     ### XXX error checks
     if right is None:
         _ShadowSignal.__init__(self, sig[left])
     else:
         _ShadowSignal.__init__(self, sig[left:right])
     self._sig = sig
     self._left = left
     self._right = right
     if right is None:
         gen = self._genfuncIndex()
     else:
         gen = self._genfuncSlice()
     self._waiter = _SignalWaiter(gen)
Ejemplo n.º 2
0
    def assign(self, sig):

        self.driven = "wire"

        def genFunc():
            while 1:
                self.next = sig._val
                yield sig

        self._waiter = _SignalWaiter(genFunc())

        def toVHDL():
            return "%s <= %s;" % (self._name, sig._name)

        def toVerilog():
            return "assign %s = %s;" % (self._name, sig._name)

        self.toVHDL = toVHDL
        self.toVerilog = toVerilog
Ejemplo n.º 3
0
    def assign(self, sig):

        self.driven = "wire"

        def genFunc():
            while 1:
                self.next = sig._val
                yield sig

        self._waiter = _SignalWaiter(genFunc())

        def toVHDL():
            return "%s <= %s;" % (self._name, sig._name)

        def toVerilog():
            return "assign %s = %s;" % (self._name, sig._name)

        self.toVHDL = toVHDL
        self.toVerilog = toVerilog