def __init__(self, name, parent, axi, dut): Infrastructure.__init__(self, name, parent) self.axi = axi self.dut = dut self.writeRspCounter = 0 self.writeRspScoreboard = ScorboardOutOfOrder("writeRspScoreboard", self)
def __init__(self,name,parent,idBase,axi,dut): Infrastructure.__init__(self,name,parent) self.idBase = idBase self.axi = axi self.dut = dut self.closeIt = False self.readCmdIdleRand = BoolRandomizer()
def __init__(self,name,parent,dut): Infrastructure.__init__(self,name,parent) StreamDriverMaster(Stream(dut,"io_rx_cmd"),self.genRxCmd(), dut.clk, dut.reset) StreamDriverMaster(Stream(dut, "io_rx_data"), self.genRxData(), dut.clk, dut.reset) StreamDriverSlave(Stream(dut, "io_tx_cmd"), dut.clk, dut.reset) StreamDriverSlave(Stream(dut, "io_tx_data"), dut.clk, dut.reset)
def __init__(self,name,parent,dut): Infrastructure.__init__(self,name,parent) self.txCmdScordboard = ScorboardInOrder("txCmdScordboard",self) self.txDataScordboard = ScorboardInOrder("txDataScordboard",self) StreamMonitor(Stream(dut,"io_tx_cmd"), self.txCmdScordboard.uutPush, dut.clk, dut.reset) StreamMonitor(Stream(dut, "io_tx_data"), self.txDataScordboard.uutPush, dut.clk, dut.reset) cmd = Transaction() cmd.ip = 0x33445566 cmd.dstPort = 0x3456 cmd.srcPort = 37984 cmd.length = 1+8 self.txCmdScordboard.refPush(cmd) cmd = Transaction() cmd.ip = 0x44556677 cmd.dstPort = 0x4567 cmd.srcPort = 37984 cmd.length = 1+8 self.txCmdScordboard.refPush(cmd) for i in range(2): data = Transaction() data.fragment = 0x22 data.last = 0 self.txDataScordboard.refPush(data) message = "test1234" for f in range(len(message)): data = Transaction() data.fragment = ord(message[f]) data.last = (f == len(message)-1) self.txDataScordboard.refPush(data)
def __init__(self, name, parent, axi, addressWidth, clk, reset): Infrastructure.__init__(self, name, parent) self.axi = axi if hasattr(axi.arw.payload, "hid"): self.idWidth = len(axi.arw.payload.hid) self.addressWidth = addressWidth self.dataWidth = len(axi.w.payload.data) self.maxDataBytes = int(log2Up(self.dataWidth) / 8) self.ram = bytearray(b'\x00' * ((1 << addressWidth) * self.maxDataBytes)) self.doReadWriteCmdRand = BoolRandomizer() self.readWriteRand = BoolRandomizer() self.writeDataRand = BoolRandomizer() self.writeRspScoreboard = ScorboardOutOfOrder("writeRspScoreboard", self) self.readRspScoreboard = ScorboardOutOfOrder("readRspScoreboard", self) self.writeRspScoreboard.addListener(self.freeReservatedAddresses) self.readRspScoreboard.addListener(self.freeReservatedAddresses) self.cmdTasks = Queue() self.writeTasks = Queue() self.nonZeroReadRspCounter = 0 self.nonZeroReadRspCounterTarget = 1000 self.reservedAddresses = {} StreamDriverSlave(axi.r, clk, reset) StreamDriverSlave(axi.b, clk, reset) StreamDriverMaster(axi.arw, self.genReadWriteCmd, clk, reset) StreamDriverMaster(axi.w, self.genWriteData, clk, reset) StreamMonitor(axi.r, self.onReadRsp, clk, reset) StreamMonitor(axi.b, self.onWriteRsp, clk, reset) axi.w.payload.last <= 0 axi.r.payload.last <= 0
def __init__(self, name, parent, idBase, axi, dut): Infrastructure.__init__(self, name, parent) self.idBase = idBase self.axi = axi self.dut = dut self.closeIt = False self.readCmdIdleRand = BoolRandomizer()
def __init__(self,name,parent,dut): Infrastructure.__init__(self,name,parent) StreamDriverMaster(Stream(dut,"io_cmdA"),self.genCmdA, dut.clk, dut.reset) StreamDriverMaster(Stream(dut, "io_cmdB"), self.genCmdB, dut.clk, dut.reset) StreamDriverSlave(Stream(dut, "io_rsp"), dut.clk, dut.reset) self.memInitDone = False
def __init__(self,name,parent,idBase,axi,dut): Infrastructure.__init__(self,name,parent) self.dut = dut self.axi = axi self.idBase = idBase self.writeCmdQueue = Queue() self.writeDataQueue = Queue() self.writeCmdIdleRand = BoolRandomizer() self.writeDataIdleRand = BoolRandomizer() self.closeIt = False
def __init__(self, name, parent, idBase, axi, dut): Infrastructure.__init__(self, name, parent) self.dut = dut self.axi = axi self.idBase = idBase self.writeCmdQueue = Queue() self.writeDataQueue = Queue() self.writeCmdIdleRand = BoolRandomizer() self.writeDataIdleRand = BoolRandomizer() self.closeIt = False
def __init__(self,name,parent,dut): Infrastructure.__init__(self,name,parent) self.dut = dut self.mem = [0 for i in xrange(1<<8)] self.cmdA = Queue() self.cmdB = Queue() self.scoreboard = ScorboardInOrder("rspScordboard",self) StreamMonitor(Stream(dut,"io_cmdA"), self.onCmdA, dut.clk, dut.reset) StreamMonitor(Stream(dut, "io_cmdB"), self.onCmdB, dut.clk, dut.reset) StreamMonitor(Stream(dut, "io_rsp"), self.scoreboard.uutPush, dut.clk, dut.reset) cocotb.fork(self.onMemWrite())
def __init__(self,name,parent,pushStream,popStream,transactionGenerator,dutCounterTarget,clk,reset): Infrastructure.__init__(self,name,parent) self.pushStream = pushStream self.popStream = popStream self.clk = clk self.reset = reset self.dutCounter = 0 self.closeIt = False self.transactionGenerator = transactionGenerator self.dutCounterTarget = dutCounterTarget self.pushRandomizer = BoolRandomizer() self.scoreboard = ScorboardInOrder("scoreboard", self)
def __init__(self,name,parent,cmd,rsp,clk,reset): Infrastructure.__init__(self, name, parent) StreamDriverMaster(cmd, self.genCmd, clk, reset) self.nonZeroRspCounter = 0 self.cmdRandomizer = BoolRandomizer() self.writeRandomizer = BoolRandomizer() self.burstRandomizer = BoolRandomizer() self.lastAddr = 0 self.closeIt = False self.ram = bytearray(b'\x00' * (1 << (9+2+2+1))) self.scorboard = ScorboardInOrder("scoreboard", self) StreamDriverSlave(rsp, clk, reset) # rsp.ready <= 1 StreamMonitor(rsp, self.scorboard.uutPush, clk, reset)
def __init__(self, name, parent, cmd, rsp, clk, reset): Infrastructure.__init__(self, name, parent) StreamDriverMaster(cmd, self.genCmd, clk, reset) self.nonZeroRspCounter = 0 self.cmdRandomizer = BoolRandomizer() self.writeRandomizer = BoolRandomizer() self.burstRandomizer = BoolRandomizer() self.lastAddr = 0 self.closeIt = False self.ram = bytearray(b'\x00' * (1 << (9 + 2 + 2 + 1))) self.scorboard = ScorboardInOrder("scoreboard", self) StreamDriverSlave(rsp, clk, reset) # rsp.ready <= 1 StreamMonitor(rsp, self.scorboard.uutPush, clk, reset)
def __init__(self, name, parent, dut, sock): Infrastructure.__init__(self, name, parent) self.sock = sock self.txCmdQueue = Queue() self.txDataQueue = Queue() StreamMonitor(Stream(dut, "io_tx_cmd"), self.onTxCmd, dut.clk, dut.reset) StreamMonitor(Stream(dut, "io_tx_data"), self.onTxData, dut.clk, dut.reset) self.bootTime = time.time()
def __init__(self, name, parent, dut, sock, clkTocken): Infrastructure.__init__(self, name, parent) self.clkTocken = clkTocken self.rxCmdQueue = Queue() self.rxDataQueue = Queue() self.sock = sock StreamDriverMaster(Stream(dut, "io_rx_cmd"), self.genRxCmd, dut.clk, dut.reset) StreamDriverMaster(Stream(dut, "io_rx_data"), self.genRxData, dut.clk, dut.reset) StreamDriverSlave(Stream(dut, "io_tx_cmd"), dut.clk, dut.reset) StreamDriverSlave(Stream(dut, "io_tx_data"), dut.clk, dut.reset) try: thread.start_new_thread(self.rxThread, ()) except Exception as errtxt: print errtxt
def __init__(self, name, parent): Infrastructure.__init__(self, name, parent) self.refs = Queue() self.uuts = Queue() self.refsCounter = 0 self.uutsCounter = 0
def __init__(self, name, parent): Infrastructure.__init__(self, name, parent) self.refsDic = {} self.uutsDic = {} self.listeners = []
def __init__(self, name, parent, message): Infrastructure.__init__(self, name, parent) self.message = message
def __init__(self,name,parent,axi,dut): Infrastructure.__init__(self,name,parent) self.axi = axi self.dut = dut self.dataScoreboard = ScorboardInOrder("scoreboard", self)
def __init__(self,name,parent,axi,dut): Infrastructure.__init__(self,name,parent) self.axi = axi self.dut = dut self.readRspCounter = 0 self.readRspScoreboard = ScorboardOutOfOrder("readRspScoreboard", self)
def __init__(self,name,parent,axi,dut): Infrastructure.__init__(self,name,parent) self.axi = axi self.dut = dut self.dataScoreboard = ScorboardInOrder("scoreboard", self)
def __init__(self,name,parent,message): Infrastructure.__init__(self,name,parent) self.message = message