
基于ata的usb20控制器设计.pdf
73页Ab s t r a c t T h e U S B 2 . 0 i s a u n i v e r s a l s e r i a l B u s t e c h n o l o g y i n h i g h s p e e d . I t c a n s u p p o rt a c o m m u n i c a t i o n s y s t e m w i t h u p t o 1 2 7 d e v i c e s v i a a t ie r e d s t a r t o p o lo g y . I n g e n e r a l , t h e U S B 2 .0 t e c h n o l o g y t r a n s f e r s d a t a b y f o u r t r a n s f e r t y p e s -B u l k , I s o c h r o n o u s , I n t e r r u p t a n d C o n t r o l . T h e m a x i m u m t r a n s f e r s p e e d c a n b e 4 8 0 M b p s . T h e U S B 2 .0 t e c h n o l o g y c a n s u p p o rt a l l k i n d s o f a p p l i c a t i o n s fl e x i b l y , in t h i s p a p e r w e w i l l h a v e a d i s c u s s i o n m a i n l y f o c u s o n t h e d e s i g n o f a U S B 2 . 0 c o n t r o l le r f o r A T A d e v i c e a n d g i v e a s o lu t i o n o f it w i t h o p t i m i z i n g i n B u l k t r a n s f e r . T h i s p a p e r f ir s t g i v e s t h e d e f i n i t i o n o f b u s t o p o l o g y i n t h e U S B 2 . 0 t e c h n o l o g y , a n d t h e n d i s c u s s e s t h e t r a n s mi s s i o n p r i n c i p l e , m o d e l a n d a l l t h e f o u r t r a n s f e r t y p e . We a l s o g i v e t h e t r a n s f e r p a c k e t d e f i n i t i o n a n d f o r m a t , a n d t h e b e h a v i o r s o f t h e U S B 2 . 0 d e v i c e . B a s e d o n a l l t h i s s p e c i f i c a t i o n , t h e s t r u c t u r e o f t h e U S B 2 .0 c o n t r o l l e r i s d e s c r i b e d B e c a u s e o u r d e s i g n i s a U S B 2 . 0 c o n t r o l l e r f o r A T A d e v i c e , w e d i s c u s s t h e w h o l e d e s i g n i n t h i s p a p e r w i t h t w o p a rt s , t h e d e s i g n o f U S B 2 .0 c o n t r o l l e r a n d t h e i n t e r f a c e b e t w e e n U S B a n d A T A d e v i c e . We d e s c r i b e t h e U T MI , p a c k e t e n g i n e a n d o t h e r m o d u l e s i n U S B 2 . 0 c o n t r o l l e r d e s i g n f i r s t , a n d t h e n d i s c u s s t h e i r b e h a v i o r s i n s o m e d e t a i l . W e a l s o g i v e t h e t h r e e s u p p o rt e d A T A t r a n s f e r s t y l e s i n t h e d e s i g n o f t h e i n t e r f a c e b e t w e e n U S B a n d A T A d e v i c e , a n d g i v e t h e t o t a l a r c h i t e c t u r e o f t h e i n t e r f a c e d e s i g n . A s a d e s i g n w i t h b o t h h a r d w a r e a n d t h e e f f i c i e n c y o f t h e w h o l e d e s i g n i n t h e s o ft w a r e , t h e d e s i g n o f F i r m w a r e w i l l a f f e c t U S B 2 . 0 c o n t r o l l e r . I n t h i s p a p e r w e t h e ma i n Fi r mwa r e f u n c t i o n s a n d p r o c e s s i n g fl o w s o f t h e F i r m w a r e , t h e o p t i m i z a t i o n i s a l s o d e s c r i b e d . d i s c u s s o f t h e T h e d e s i g n i n t h i s p a p e r n o w w o r k s as a I P c o r e i n o t h e r A S I C d e s i g n s , s o w e w i l l g i v e t h e t e s t c i r c u ms t a n c e a n d r e s u l t s i n t h e e n d . K e y w o r d s : U S B 2 .O c o n t r o l l e r , i n t e r f a c e 第一章 U S B 2 . 0简介 1 . 1引言 1 9 8 3年初,美国著名的 《 时代》周刊在介绍上年度风云人物时写到: “ 在一 年的新闻里, 这个最吸引人的话题, 它代表着一种进程, 一种持续发展并被广泛 接收和欢迎的进程。
这就是为什么 《 时代》在风云激荡的当今世界中选择了这么 一位风云人物, 但这完全不是一个人, 而是一台机器 ” 这台机器就是I B M公司 于 1 9 8 1 年 8 月 1 2日在纽约宣布的I B M P C 5 1 5 0 ,它宣告着计算机历史由此进入 了 个人电 脑的新纪元 1 9 8 2 年1 1 月, 康柏 ( C o m p a q ) 电 脑公司推出 第一台“ 可 以提着走的电脑” —便携式 P C机 P o rt a b l e 紧接着而来的,是各个硬件厂商 纷纷开始了I B M P C兼容机的制造, 个人电脑开始大量走进学校、机关、工厂、 商店,走进了千百万家庭而在进入9 0 年代后,随着网络开始蔓延到全世界的 各个角落,个人P C更是由先前的运算工具、办公助手、娱乐中心开始逐步延伸 成为人们交流获取信息的重要平台, 成为人们娱乐、 生活、 交流所必不可少的重 要一环 然而近年来, 随着多媒体设备和移动数据外设的普及,一个越来越迫切的问 题开始摆放在了人们的面前o P C 外部设备的生产厂商所采用的接口标准不一 各 种接口 标准造就了数据传输效率的极端低下, 也大大增加了不必要的硬件接口开 销。
对此,设备接口的统一化, 尤其是一个统一的高速串行接口标准成为设备间 数据交流越来越重要的一个要求 U S B通用串行总线( U n i v e r s a l S e r i a l B u s ) 就是由众多计算机厂商和电讯厂 商共同开发的用于计算机外设连通到计算机的高速串行接口规范它是由 工 n t e l , N E C , C o m p a q , D E C 、工 B M , M i c r o s o f t , N o r t h e r n T e l e c o m 等公司在 1 9 9 4 年联合制定的,用来解决安装计算机外设时遇到的种种技术性问题,并且符合 M i c r o s o f t的即插即用规范1 9 9 9 年底,U S B 2 . 0 推出了速度草案,它的最高速 度将达到4 8 0 M b p s / s 极大地扩展了U S B 输入输出的带宽, 提高了 外设的性能, 并且不用再担心多个设备连接到U S B 端口上会有瓶颈制约 U S B 通过一个4 针的标准插头,采用星型链接把所有的外设连接起来,理论 七U S B 可以挂接 1 2 7 台设备。
U S B 设备有许多便捷的优点,首先,U S B 设备不会 有工 R Q 冲突的问题, 因为它会单独使用自己的保留中断, 所以不会使用电脑有限 的资源同时,U S B 设备不再需要有单独的供电系统,从而不像使用串口等其它 的设备那样需要一个独立电源 而且U S B 接口内置了电源, 可以向 低压设备提供 5 V ' 的电压此外, U S B 设备提供各种多媒体功能, 支持U S B的声卡和音箱可以更 好地减少噪声、 目 前,U S B凭借着其通用性、可靠性、易用性以及众多大的软硬件厂商的大 力支持,占据了 P C外部高速串行接口的大部分市场并且,U S B协议组织还不 断根据新的市场要求, 推出 更高速率、 更灵活可靠的U S B 适用协议 1 . 2 U S B技术的基本介绍 1 . 2 . 1 U S B 器件的硬件构成 U S B 系统的硬件部分一般由3 个部分组成: U S B 主机控制器、 U S B 集线器、 U S B 设备主机 ( H o s t )实际上就是U S B 连接的拓扑中心,是所有计算机U S B 设备的 集合点 具有H o s t 功能的硬件叫做U S B 主控器( U S B h o s t c o n t r o l l e r ) , 一般集 成在主板的南桥或者U S B附加设备上。
集线器( H u b ) 允许U S B 设备共享一个U S B 主控器( U S B h o s t c o n t r o l l e r ) 计算机后面板上的 H u b被称为根集线器( r o o t H u b ) , 另外扩展U S B 集线器( E x t e r n a l U S B h u b s ) 能够让计算机连接更多外设设 备是U S B 系统的功能( f u n c t i o n ) 终端, 就是所谓的U S B 外设。
