复杂的数字系统中需要一个高速的外部接口,因此SoC系统中集成USB主机控制器必然会成为一种新的趋势,而软件驱动是其重要的组成部分.通过基于SRISC-I处理器的增强型USB主机控制器的研究,采用软硬件协同设计的方法,设计和实现了一种分层结构的USB主机控制器软件驱动程序.采用了基于EHCI协议的软硬件接口,支持控制、批量、中断、同步4种传输模式.传输描述符数据结构的灵活性极大地降低了硬件软件复杂性,也使得传输时可以最大程度的减小内存的平均访问次数.同时,由于采用动态内存管理技术,充分地提高了专用内存的利用效率.为了提高验证的效率和保证系统的可靠性,采用了一种基于事件驱动的软硬件协同验证结构,并在流片后进行了验证,成功的实现了对大容量存储设备的访存.
Complex digital systems require high-performance external interfaces,then providing with USB host controller IP core in System-on-a-chip,which embedded software design is essential ingredient of the resolution,is becoming a growing tendency.Researching on the Enhanced Host Controller Interface(EHCI)with integrated processor SRISC-I,a hierarchy of driver is designed and implemented with the method of hardware and software co-design.The hardware/software interface between system software and the host controller hardware is described by EHCI specification,and four basic types of data transfer—Control transfer,Bulk transfer,Interrupt transfer,Isochronous transfer,are supported.The flexible data structure of transfer descriptors Minimizes Hardware Complexity,and also decreases the average number of memory accesses required to execute a USB transaction.Furthermore,the dynamic memory management technology brings a big boost in memory access efficiency.A transaction drove software and hardware co-verification structure is proposed to improve the performance and efficiency of verification,which guarantees the design reliability of SOC.The validation results of accessing mass storage device after the chip taped out demonstrate the correctness of the design.