DMA接口,即DMA控制器(DMAC:DMA Controller)
在DMA传送方式中,对数据传送过程进行控制的硬件称为DMA控制控制器(DMA接口)
当具有DMA接口的IO设备需要进行数据传送时,通过DMA接口向cpu提出DMA传送请求
cpu响应后,让出系统总线,有DMA接口接管总线进行数据传送
产生DMA请求的部件
能够产生DMA请求的总线部件是具有DMA接口的设备
高速设备只有具有DMA接口,才可以委托DMA接口,产生DMA请求(信号)
DRQ(DREQ) stands for Data request;
DACK for Data acknowledge.
What is the difference between the DREQ/DACK and DCS DMA modes?
Both DREQ/DACK mode and dedicated chip select (DCS) are DMA modes.
DCS mode allows more control of the data through the FFTHRC register, since DREQ/DACK modes are fixed to single or the programmed burst sizes.
In DREQ/DACK DMA mode,
DREQ/DACK mode and DCS mode require the DREQ/ and DACK/ pins. However, the functionality of these pins is slightly different in the two modes.
In DREQ/DACK DMA mode, DREQ/ is asserted as soon as sufficient data is present to fullfill the DMA burst or DMA single access settings in the EDMOD register.
In DCS mode, DREQ/ is asserted as long as there is data greater than or equal to the threshold value in the FIFO to be read out (in encode) or as long as there is space available greater than or equal to the threshold value in the FIFO (in decode). Accesses to data require the DACK/ pin to be asserted with RD/ or WE/.
See the ADV212 Programming Guide for more information on DREQ/DACK and DCS DMA modes. See the ADV212 User’s Guide for more information on the threshold registers.
HLDA:lt is signal for HOLD ACKNOWLEDGEMENT.
传送单位可以是以数据块为传送单位,具体可能为:
该阶段由硬件控制(不同于IO中断以程序控制)
主存地址计数器
传送长度计数器
数据缓冲寄存器
DMA请求触发器
DMA控制/状态逻辑
DMA控制逻辑负责管理DMA的传送过程,由以下几部分组成
每当设备准备好一个数据字后(或者传输完一个字),
设备就向DMA接口提出申请(DREQ信号)
DMA接口中的DMA控制逻辑便向cpu请求DMA服务
待收到cpu发送回来的响应信号HLDA(确认同意)后,DMA控制逻辑便开始负责管理DMA传送的全过程
中断机构
设备地址寄存器DAR
中断方式和DMA方式的共同点是:
差异
中断方式是程序切换,需要保护和回复现场
DMA优先级高于IO中断请求
非屏蔽中断(不可屏蔽中断)(关中断无法屏蔽部分外中断)中断方式具有对异常处理的能力
中断方式靠程序传送,DMA靠硬件传送
对中断的响应