I am write test for usb hub using vip host and devices. I have a testbench with vip usb host, DUT(hub) and 4 vip usbdevices on each hub downstream port.
In test Hub is successfully enumerated by vip host, host enabling and reset hub port #1 which connected to vip device. After this I try to send SetAddress(2) from host to device via hub. Host is do not send packet to hub.
So, Hub is addressed and have address=1. Transactions to hub (Addr=1) sended successfully, but transactions to device is not sended by host.
.denalircHistoryDebug OnHistoryFile denali.hisTraceFile denali.trcReportTimeUnits nsUsbBypassReset 0UsbBypassTraining 0UsbBypassInit 0UsbBypassLmpInit 0UsbAutoLmpInit 0UsbAutoDeviceEnumeration 0UsbAcceptSe0ForHSIdle 1UsbSOFRightAfterReset 1UsbAcceptJKForChirp 1
Finally test is hanging on infinitely waiting of transaction finishing: forever begin @ seqr.trEvent; item = tr; if (seqr.matchTr(item)) begin break; end end
Problem is solved.
It's need to polling hub port status and when port is in state 'enabled', host can send request to device.
It doesn't worked if use only delay for resetting device.