Пример #1
0
 def configure(self, detectdelay=None, **kwargs):
     """Call `CSPHY.configure()`; add ports, `FSM`, and other members."""
     if detectdelay is None:
         self.detectdelay = self.__class__.detectdelay
     CSPHY.configure(self, **kwargs)
     # add ports and FSM
     self.addport("RXU"), self.addport("TXU")
     self.addport("TXD"), self.addport("RXD")
     # create FSM to manage send/recv execution of phy
     txfsm = self.newchild("txfsm", FSM, tracename=self.tracename + ".TX")
     rxfsm = self.newchild("rxfsm", FSM, tracename=self.tracename + ".RX")
     txfsm.goto(self.SEND)
     rxfsm.goto(self.LISTEN)
     # set up other members
     mod = self.newchild("mod", MQAM, tracename=self.tracename + ".MQAM")
     coder = self.newchild("coder", RCPC, tracename=self.tracename + ".RCPC")
Пример #2
0
 def __init__(self, **kwargs):
     """Constructor."""
     self.detect = SimEvent(name=".detect")
     self.detectdelay = None
     CSPHY.__init__(self, **kwargs)
     self.detect.name = "%s%s" % (self.name, ".detect")