ADM-XRC SDK 2.4.0 User Guide (Linux)
© Copyright 2001-2004 Alpha Data


DDMA sample VHDL FPGA design

Model support

Location

Synopsis

FPGA space usage

Source files

Project Navigator files

Modelsim scripts

Model support

XRC XRC-P XRCII-Lite XRCII XRCIIPro-Lite XRCIIPro WRCII DRCII

Location
$ADMXRC_SDK4/fpga/vhdl/ddma
Synopsis

The DDMA FPGA design demonstrates demand-mode DMA with bursting. Data is read from an application buffer in host memory and then simply written back to another application buffer unchanged (a 'loopback' operation). In order to use demand-mode DMA, the host must specify the appropriate mode when performing DMA transfers. This is demonstrated by the DMA sample application.

FPGA Space Usage

The design assumes that any DMA transfer on DMA channel 0 is transferring data into the FIFO; hence any direct-slave write where LDACK#[0] is asserted will fill the FIFO with data. Similarly, any DMA transfer on DMA channel 1 is assumed to tbe emptying the FIFO; hence any read where LDACK#[1] is asserted will empty the FIFO of data. The local bus address is ignored during these demand-mode DMA transfers. In other words, the FIFO is visible over the entire FPGA space during demand-mode DMA transfers.

There are two write-only registers that reside in the FPGA direct-slave space. These registers must be written by the host with a DMA transfer count that matches the size of the DMA transfer being performed, prior to the host starting the DMA transfer. Note that these registers cannot be inadvertantly overwritten by demand-mode DMA transfers, as the design qualifies FPGA register accesses using LDACK#[1:0].

Inbound count register (ICOUNT, local bus address 0x0)
Bits Mnemonic Type Function
1:0   MBZ  
31:2 N WO Inbound DMA transfer count, in 32-bit words

The inbound count register (ICOUNT) specifies how many words will be transferred in the next DMA transfer in channel 0, in order to transfer data into the FPGA's FIFO. When ICOUNT.N is zero, the FPGA will not assert LDREQ#[0]. The FPGA decrements ICOUNT.N whenever a word of data is transferred on DMA channel 0.

Outbound count register (OCOUNT, local bus address 0x4)
Bits Mnemonic Type Function
1:0   MBZ  
31:2 N WO Outbound DMA transfer count, in 32-bit words

The outbound count register (OCOUNT) specifies how many words will be transferred in the next DMA transfer in channel 1, in order to transfer data into the FPGA's FIFO. When OCOUNT.N is zero, the FPGA will not assert LDREQ#[1]. The FPGA decrements OCOUNT.N whenever a word of data is transferred on DMA channel 1.

Source files

For a list of the VHDL source files, refer to the appropriate XST project file, as referenced in the following table:

Model XST script file XST project file UCF file
XRC with Virtex ddma-xrc-v.scr ddma-xrc-v.prj ddma-xrc.ucf
XRC with Virtex-E ddma-xrc-ve.scr ddma-xrc-ve.prj ddma-xrc.ucf
XRC-P with Virtex ddma-xrcp-v.scr ddma-xrcp-v.prj ddma-xrcp.ucf
XRC-P with Virtex-E ddma-xrcp-ve.scr ddma-xrcp-ve.prj ddma-xrcp.ucf
XRCII-Lite ddma-xrc2l-v2.scr ddma-xrc2l-v2.prj ddma-xrc2l.ucf
XRCII ddma-xrc2-v2.scr ddma-xrc2-v2.prj ddma-xrc2.ucf
XRCIIPro-Lite ddma-xrc2pl-v2p.scr ddma-xrc2pl-v2p.prj ddma-xrc2pl.ucf
WRCII ddma-wrc2-v2.scr ddma-wrc2-v2.prj ddma-wrc2.ucf
DRCII ddma-drc2-v2.scr ddma-drc2-v2.prj ddma-drc2.ucf

Project Navigator files

Project Navigator projects can be found in the projnav directory as follows:

Model Project Navigator project file
XRC projnav/xrc/<device>
XRC-P projnav/xrcp/<device>
XRCII-Lite projnav/xrc2l/<device>
XRCII projnav/xrc2/<device>
XRCIIPro-Lite projnav/xrc2pl/<device>
WRCII projnav/wrc2/<device>
DRCII projnav/drc2/<device>

Modelsim scripts

Example Modelsim-compatible script files simulating this design are provided. Refer to the following table for the appropriate command line for a particular model:

Model Shell command
XRC vsim -do "do ddma.do"
XRC-P vsim -do "do ddma.do"
XRCII-Lite vsim -do "do ddma.do"
XRCII vsim -do "do ddma.do"
XRCIIPro-Lite vsim -do "do ddma-xrc2pl.do"
WRCII vsim -do "do ddma-wrc2.do"
DRCII vsim -do "do ddma-wrc2.do"

 


 Top of page