예제 #1
0
파일: aloha.py 프로젝트: reidlindsay/wins
 def configure(self, **kwargs):
     """Configure `MAC`, add ports, and create `FSM`."""
     MAC.configure(self, **kwargs)
     # add downstream ports
     self.addport("TXD")     # port to send traffic to downstream protocol
     self.addport("RXD")     # port to recv traffic from downstream protocol
     # create FSM to manage send/recv execution of mac
     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.RECV)
예제 #2
0
파일: csmac.py 프로젝트: reidlindsay/wins
 def set_phy(self, p):
     """Check for valid `CSPHY` for MAC layer."""
     assert isinstance(p, CSPHY) or (p is None), \
            "[CSMAC]: set_phy() cannot set pointer to non-CSPHY object!"
     MAC.set_phy(self, p)
예제 #3
0
파일: csmac.py 프로젝트: reidlindsay/wins
 def __init__(self, **kwargs):
     """Constructor."""
     MAC.__init__(self, **kwargs)