Author Topic: USB Data Transaction view in a bus interval  (Read 13558 times)

ChongHan

  • Member
  • ***
  • Posts: 41
USB Data Transaction view in a bus interval
« on: August 26, 2014, 04:36:36 am »
Hi

Good evening to all. Please see the attachment photo.

For the view in bus interval in SuperSpeed bus, if I send separate data to device 1 and 2 at the same time, is it they will locate the transaction from both devices in to a bus interval?


Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
Re: USB Data Transaction view in a bus interval
« Reply #1 on: August 26, 2014, 01:30:36 pm »
I'm not sure what your question is.

The answer also probably depends on the transaction type, which you don't specify. is this an asynchronous or periodic transaction.

Also do you want to know what must happen, as the spec says it must. Or what may happen, depending on the implementation?

Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
Re: USB Data Transaction view in a bus interval
« Reply #2 on: August 26, 2014, 01:31:24 pm »
And another very good question is, why does this matter to you?

ChongHan

  • Member
  • ***
  • Posts: 41
Re: USB Data Transaction view in a bus interval
« Reply #3 on: August 26, 2014, 10:39:44 pm »
I want clarify on how is the bus interval be occupy by all type of transaction.

If there are two devices connected, and both devices is sending data to host and the same time, so how is the bus interval is occupy for the transaction.

**Assume it is bulk transfer.

Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
Re: USB Data Transaction view in a bus interval
« Reply #4 on: August 27, 2014, 12:23:35 am »
You haven't said why you care.

Also are you meaning anything special by "bus interval"? Bulk is asynchronous, it does not care about the periodic bus interval. The periodic bus interval is totally irrelevant to bulk.

I'm not sure you realise that all data sent to the host is solicited. The device only sends data to the host when the host requests it by sending an ACK to the device. Two devices can not be sending data to the host at the same time.

How the host schedules these transfers among devices is entirely up to the host controller. The only constraint is that it is "fair" (section 4.4.6.2).

One would hope that a host controller would schedule the transfers most efficiently, but this is not required. The host controller might use other scheduling strategies, for example to save power.

The device can specify a maximum burst it is capable of, but the host controller does not have to take any notice of this.

ChongHan

  • Member
  • ***
  • Posts: 41
Re: USB Data Transaction view in a bus interval
« Reply #5 on: August 27, 2014, 04:28:19 am »
I am curious about the 125us bus interval, how it is occupy the data from 2 devices. Is that same like what i draw the attached photo?

I need to know because i have multiple devices connected to host.

If there are two external hard drive connected, i copy a movie from each hard drive to PC, so how is data flow, and how is the content in a 125us bus interval?

Thanks for replying me :)

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB Data Transaction view in a bus interval
« Reply #6 on: August 27, 2014, 10:26:49 am »
Barry answered this in his previous reply. The host is obligated to be "fair." Exactly how the host implements that can vary. You could view the traffic on an analyzer, but a different host controller might do things differently.

Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
Re: USB Data Transaction view in a bus interval
« Reply #7 on: August 27, 2014, 12:29:44 pm »
You seem to think that the bus interval has some relationship to bulk transfers is doesn't. Set that completely aside and forget about it.

You diagram shows the host driver partitioning up the data into bus intervals, it does not do this. It could not do this, bus intervals have no relationship to bulk transfers. The host driver has not visibility into bus intervals when doing bulk transfers. You seem to think that a SuperSpeed controller (XHCI) works like UHCI, it does not.

With XHCI the host controller driver sends a message to the host controller which says something like "Transfer the data X bytes at Y address to function Z." The host controller driver has no more to do with the process until the controller sends a message back with the result. All of the details of how the transaction moves on the bus are not visible to the host controller driver, it happens purely in the XHCI controller.

As Jan says, you could observe the traffic you see from a particular controller. That is specific to that controller only. The only constraint is that the transfers be "fair" among the various devices.

if you have multiple devices, you really should not be concerned about this, unless the host controller is causing you a problem. If the host controller is causing you a problem, there's probably very little you can do about it. So you can worry about it, but it would be pointless.

ChongHan

  • Member
  • ***
  • Posts: 41
Re: USB Data Transaction view in a bus interval
« Reply #8 on: September 04, 2014, 11:22:17 pm »
Yes. Now i understand. There is nothing to do on bus interval for arranging the packet to be sent. It is depend on host controller link and physical layer for how to arrange in "fair".

Thanks.