예제 #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)
예제 #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
예제 #3
0
파일: _Signal.py 프로젝트: Cadavis8/myhdl
    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