def genRxData(self): while self.getPhase() != PHASE_SIM: yield None for i in range(2): trans = Transaction() trans.last = 0 trans.fragment = 0x55 trans.nextDelay = 4 yield trans trans = Transaction() trans.last = 1 trans.fragment = 0x66 trans.nextDelay = 10 yield trans trans = Transaction() trans.last = 1 trans.fragment = 0x11 trans.nextDelay = 0 yield trans trans = Transaction() trans.last = 1 trans.fragment = 0x11 yield trans while True: yield None
def genRxCmd(self): while self.getPhase() != PHASE_SIM: yield None trans = Transaction() trans.ip = 0x11223344 trans.srcPort = 0x1234 trans.dstPort = 0x1111 trans.length = 2 trans.nextDelay = 6 yield trans trans = Transaction() trans.ip = 0x22334455 trans.srcPort = 0x2345 trans.dstPort = 37984 trans.length = 2 trans.nextDelay = 3 yield trans trans = Transaction() trans.ip = 0x33445566 trans.srcPort = 0x3456 trans.dstPort = 37984 trans.length = 1 trans.nextDelay = 6 yield trans trans = Transaction() trans.ip = 0x44556677 trans.srcPort = 0x4567 trans.dstPort = 37984 trans.length = 1 trans.nextDelay = 6 yield trans while True: yield None