• 第二十六篇:USB3.0高带宽ISO(48KBytes/125us)实战


    USB3.1技术已经推出, 10Gbps的速率足以满足数据, HD视频传输的要求.

    要步入USB3.1的研发, 还得将USB3.0的基础打扎实.


    微软提供的SUPER MUTT仅仅包括一个接口0, 其下有两个ALT, ALT 1与ALT 2, 分别包括了两对ISO IN/OUT端点, 只是, 仅仅有ALT 2下的ISO OUT EP的bMaxBurst为1, 而其他三个ISO EP的bMaxBurst均为0, 而全部的ISO EP的Mult均为0.

    即仅仅有一个ISO EP支持2KBytes/125us的能力, 其余三个ISO EP仅仅支持1KBytes/125us的能力, 技术上来讲, 远远未达到高带宽(48KBytes/125us)的上限.


    这种设备,甚至都不如一个高带宽的USB2.0的设备(3KBytes/125us),用来衡量系统中USB3.0 xHCI HOST的高带宽能力也就无从谈起了.

    于是, 利用自开发的USB3.0 silicon, 对设备端驱动稍作改动, 经过Lecory Advisor T3 USB3.0分析仪的验证, 证明设备端的ISO EP具有接收与发送48KBytes/125us的能力.


    接下来, 则须要用该设备来验证xHCI USB3.0 HOST的ISO高带宽能力.

    測试平台为INTEL xHCI USB3.0 HOST, Win8 USB3 STACK.

    先给出測试结果:

    (1.1) HOST发送48*8KBYTES的数据

    ISO MaxPacketSize = 49152

    000000830.01842206read-write irp failed with status C0000001

    000000850.01842534urb header status C0000B00
    00000089 0.01843355IsoPacket[0].offset = 0           IsoPacket[0].Length = 49152 IsoPacket[0].Status = c0030000
    00000091 0.01843889IsoPacket[1].offset = 49152   IsoPacket[1].Length = 49152 IsoPacket[1].Status = c0030000
    00000093 0.01844382IsoPacket[2].offset = 98304   IsoPacket[2].Length = 49152 IsoPacket[2].Status = c0030000
    00000095 0.01844915IsoPacket[3].offset = 147456 IsoPacket[3].Length = 49152 IsoPacket[3].Status = c0030000
    00000097 0.01846065IsoPacket[4].offset = 196608 IsoPacket[4].Length = 49152 IsoPacket[4].Status = c0030000
    00000099 0.01846393IsoPacket[5].offset = 245760 IsoPacket[5].Length = 49152 IsoPacket[5].Status = c0030000
    00000101 0.01846763IsoPacket[6].offset = 294912 IsoPacket[6].Length = 49152 IsoPacket[6].Status = c0030000
    00000103 0.01847091IsoPacket[7].offset = 344064 IsoPacket[7].Length = 49152 IsoPacket[7].Status = c0030000

    Total data transferred = 0(dec), 0(hex)


    (1.2)  HOST接收48*8KBYTES的数据

    000001690.02440798IsoPacket[0].offset = 0           IsoPacket[0].Length = 49152     IsoPacket[0].Status = 0
    00000171 0.02441290IsoPacket[1].offset = 49152   IsoPacket[1].Length = 49152     IsoPacket[1].Status = 0
    00000173 0.02441824IsoPacket[2].offset = 98304   IsoPacket[2].Length = 0             IsoPacket[2].Status = c0030000
    00000175 0.02442317IsoPacket[3].offset = 147456 IsoPacket[3].Length = 0             IsoPacket[3].Status = c0030000
    00000177 0.02442850IsoPacket[4].offset = 196608 IsoPacket[4].Length = 49152     IsoPacket[4].Status = c0030000
    00000179 0.02443343IsoPacket[5].offset = 245760 IsoPacket[5].Length = 0             IsoPacket[5].Status = c0030000
    00000181 0.02444533IsoPacket[6].offset = 294912 IsoPacket[6].Length = 0             IsoPacket[6].Status = c0030000
    00000183 0.02444821IsoPacket[7].offset = 344064 IsoPacket[7].Length = 49152     IsoPacket[7].Status = 0

    这里比較有意思的是:

    8个包中, 有三个(0, 1, 7)是成功传输了48K的, 另一个尽管也传输了48K, 但系统USB3.0 STACK觉得该ISO PACKET(4)是不成功的.

    这个不成功的原因, 后文中会解释原因.

    我所说的有意思是, USB3 STACK在填UrbIsochronousTransfer.TransferBufferLength的时候, 却是4*48K, 而不是3*48K.



    从以上USB分析仪中的数据能够发现, 这8次写失败的原因有两个:

    1. xHCI HOST没有在一个UFRAME中将数据发完,

    2. XHCI HOST根本没有发数据, 甚至都没有在这个UFRAME中发出PING

    归结起来, 就是系统USB SUBSYSTEM, 甚至包括MEMORY CONTROLLER, 系统总线等一系列的因素所导致.


    对于读成功的情况, 则是在一个UFRAME中, XHCI HOST引发了(32+16)个1K的包的读.

    对于不成功的情况, 则是UFRAME中, XHCI HOST没有发出ACK IN来读取设备端的数据, 也甚至连PING都没有发出.


    (2.1) 48K*1写:

    00000082 0.00891627 read-write irp failed with status C0000001
    00000084 0.00891914 urb header status C0000B00
    00000088 0.00892735 IsoPacket[0].offset = 0           IsoPacket[0].Length = 49152 IsoPacket[0].Status = c0030000
    00000090 0.00893269 IsoPacket[1].offset = 49152   IsoPacket[1].Length = 0         IsoPacket[1].Status = c0020000
    00000092 0.00893803 IsoPacket[2].offset = 98304   IsoPacket[2].Length = 0         IsoPacket[2].Status = c0020000
    00000094 0.00894295 IsoPacket[3].offset = 147456 IsoPacket[3].Length = 0         IsoPacket[3].Status = c0020000 
    00000096 0.00895527 IsoPacket[4].offset = 196608 IsoPacket[4].Length = 0         IsoPacket[4].Status = c0020000
    00000098 0.00895855 IsoPacket[5].offset = 245760 IsoPacket[5].Length = 0         IsoPacket[5].Status = c0020000
    00000100 0.00896184 IsoPacket[6].offset = 294912 IsoPacket[6].Length = 0         IsoPacket[6].Status = c0020000
    00000102 0.00896471 IsoPacket[7].offset = 344064 IsoPacket[7].Length = 0         IsoPacket[7].Status = c0020000
    00000110 0.00897498 Total data transferred = 0(dec), 0(hex)


    当中, 写没成功, 原因与48*8K同样, 没有在一个UFRAME将数据发完.

    后面的ERROR CODE c0020000并不是真正的错误, 而是上层没有数据可发导致.


    (2.2)48K*1读:

    00000168 0.01482911 IsoPacket[0].offset = 0           IsoPacket[0].Length = 49152   IsoPacket[0].Status = 0
    00000170 0.01483404 IsoPacket[1].offset = 49152   IsoPacket[1].Length = 0           IsoPacket[1].Status = c0030000
    00000172 0.01483938 IsoPacket[2].offset = 98304   IsoPacket[2].Length = 0           IsoPacket[2].Status = c0030000
    00000174 0.01484389 IsoPacket[3].offset = 147456 IsoPacket[3].Length = 49152   IsoPacket[3].Status = 0
    00000176 0.01485498 IsoPacket[4].offset = 196608 IsoPacket[4].Length = 0           IsoPacket[4].Status = c0030000
    00000178 0.01485826 IsoPacket[5].offset = 245760 IsoPacket[5].Length = 0           IsoPacket[5].Status = c0030000
    00000182 0.01486196 IsoPacket[6].offset = 294912 IsoPacket[6].Length = 49152   IsoPacket[6].Status = 0
    00000186 0.01486524 IsoPacket[7].offset = 344064 IsoPacket[7].Length = 0           IsoPacket[7].Status = c0030000

    情况和48K*8情况同样.

    仅仅是这里没有出现既传输了数据, 又是出错的情况.


    (3.1) 32K*8 WRITE

    (3.2) 32K*8 READ

    都成功.



    总结:

    INTEL的xHCI系统加上WIN8的USB3 STACK能够达到32KB/UFRAME的能力, 但不能达到48KB/UFRAME的能力.


  • 相关阅读:
    How to add a button in the seletions "More"
    Tags Used In OpenERP 7.0
    OpenERP Web Client设置闲置有效时间
    OpenERP7.0中非admin帐号新增其它用户问题
    Docker 使用docker-compose部署项目
    Docker 安装docker-compose多容器管理服务
    Jenkins集成Docker实现镜像构建和线上发布
    Centos下安装JDK、Maven和Git
    服务注册发现与调度
    Spring boot centos部署启动停止脚本
  • 原文地址:https://www.cnblogs.com/mqxnongmin/p/10755829.html
Copyright © 2020-2023  润新知