|
From: Tim R. <ti...@pr...> - 2018-10-23 06:45:33
|
On Oct 22, 2018, at 9:18 PM, zheng rong <zhe...@gm...> wrote: > > Tim Roberts wrote: > > How much buffering do you have in your design? > > On the device side, I set a 512*4=2K buffer for the data streaming. That's not very much. In a camera, the pixel stream is usually continuous. Pixels keep coming in whether they go out or not. If retries cause the bus side to get delayed, that buffer is going to fill, and the incoming pixels will get thrown on the floor. At 10MB/sec, that 2048 bytes will get filled in 200us. If you should happen to miss one microframe, you'd be screwed. > On the host app side, I have a 16*360960 (space for 16 image frames) buffer for transfer queue(length=16). > I tried larger host app buffer, but got the similar result. Much larger queue length (e.g. 64) even cause xfer failure. > Is this buffer large enough? Yes, you don't really need that much buffering. If you can't keep up with one frame of buffering, then no amount will be enough. > > If you were delayed for a millisecond, would you lose data? > > What do you mean? Do you mean the buffer is not enough for the data streaming, in the case of xfer delayed? Right. > Another thing that makes me confused is only a part of data lose, e.g. 80 bytes. This is not the size of packet (512 Bytes) or the xfer size (360960 Bytes). > It seems the xfer didn't lose the entire packet. Right. As I said, the pixels just keep coming and coming. If the FIFO fills, then there's no place for new pixels to go, and they will get dropped, one at a time. > Do you mean that, even for a USB3.0 hub, if several USB2.0 devices is connected with it, the upstream (interfacing with a USB3.0 host computer) bandwidth for the hub is only 480Mbps? No. A USB 3 cable has two wires for USB 2 traffic and two wires for USB 3 traffic. The two protocols travel on separate paths. They do not intermix. > But for the host computer with xHCI controller, if directly connected with USB2.0 devices, the upstream can run at USB3.0 speed. > Is my understanding right? No. The USB 2 devices communicate over the USB 2 wires to the EHCI controller. The USB 3 devices communicate over the USB 3 wires to the xHCI controller. > In the USB physical interface, USB high speed signal and super speed signal use different signal path. I am just wondering if the USB 3.0 hub chip can transit the data from downstream USB2.0 device to upstream USB3.0. No. The USB 2 traffic will always travel on the USB 2 wires. > For example, can a USB3.0 hub handle data transfer from 4 USB2.0 cameras (each has 20MB/s datarate) to a USB3.0 host computer, as the following connection structure? No. The bandwidth limits on USB 2 are the same whether you are plugged into a USB 2 jack or a USB 3 jack. — Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |