DMA内部的block diagram:
DMAC包含一个instruction processing block,来process program code,control DMA transfer.
program code一般放在一个system memory中,DMA通过AXI接口来访问.
DMA内部有一个cache来临时保存instructions,cache的length和depth可配.
该IP DMAC内部可配8个DMA channel,每个channel都支持一个concurrent thread DMA operation.
DMA内部通过round-robin的方式来调度每个channel的thread,来执行.
DMA内部使用variable-length instructions,由1-6byte组成。
当一个thread需要instruction时,首先进行look-up cache,如果 cache hit occur,cache立刻提供数据.
如果cache miss,thread stalled,DMAC 通过AXI master interface进行cache line fill.
当DMA进行load/store instruction,DMA将相应的指令加载到read/write queue.
通过multi First-In-First-Out(MFIFO)进行data buffer.
peripheral request interface支持DMA-capable peripherals connection,
同时提供multiple interrupt outputs/events 来与external processor进行通信.
BUS:
APB bus可以访问到:
1)DMA manager thread/channel thread的状态;
2)issue an instruction;DMAGO----start a dma transaction, DMASEV------signals the occurrence of an event
DMAKILL----Terminates a thread,
3)enable/clear interrupt;
DMA channel进行访问时,AXI的ID号,由channel的号码来决定.
DMA manager进行访问时,AXI的ID号,由channel的总数来决定.
Peripheral request interafce:
支持具备DMA-capable的peripheral.
通过命令DMAWFP来将一个peripheral request interface映射到一个DMA channel.
每一个peripheral interface,DMAC都有一个FIFO来capture peripheral request,这个FIFO的depth表示
可以同时active的request的数量.这个FIFO之后,drready便为0,无效。
dr信号表示peripheral request bus;
da信号表示DMAC acknowledge bus;
valid/ready handshake信号,
drtype表示:request a single transfer/ request a burst transfer/ acknowledge a flush request.(只支持fixed/incrementing address)
不支持wrapping-address的burst传输,不支持unaligned burst传输。
drlast信号表示:DMA transfer sequence的最后一个request.
datype信号表示:complete single transfer/ complete burst transfer/ issue a flush request.
Interrupt interface:
Reset initialization interface:
初始化operating state,当DMA rst之后.
在integration过程中,一些tie-off的值.
boot_manager_ns,唯一的确定DMA manager的security state的信号.
boot_from_pc,rst后,决定DMA进入executing state,由boot_addr提供start address
还是进入Stopped state,由APB interface提供第一个instruction.
boot_irq_ns,使得每个irq signal带有一个security state.
boot_periph_ns,使得每个peripheral req interface带有一个security state.
Operating states:
在rst之后,所有的DMA channel thread都在stopped state.之后根据tie-off的值进行initialization(到Executing state).
虚线外部分,表示都是在AXI传输中的一些可能state.
Using events and interrupt:
可以通过配置寄存器INTEN来控制event-interrupt resource为一个event或者interrupt.
DMAWFE命令与DMASEV命令:
DMAWFE命令先发,thread stall 等待event occur,DMASEV用同样的event number,来重新启动thread.
如果DMASEV已经先发出,在发同一个event number的DMAWFE时,halt execution one aclk cycle, 然后继续执行.
Abort handing
DMAC设计中并没有针对abort的设计,所以发生这种情况时,需要external agent(processor)来进行处理.
通过发出irq_abort来通知processor.
Security usage:
三个对象DMA manager thread/ Events and interrupts/ Peripheral request interfaces.
DNS为0,manager thread在security state时,可以访问security/non-security
DNS为1,manager thread在non-security state时,不能访问security的Events Interrupts和security的Peripheral.
CNS为1,channel thread的security/non_security类似.