ADM-XRC SDK 2.8.1 User Guide (Linux)
© Copyright 2001-2009 Alpha Data


DDMA sample VHDL FPGA design

Model support

Location

Synopsis

FPGA space usage

Source files

Project Navigator files

Modelsim scripts

Model support

ModelSupported
ADM-XRC
ADM-XRC-P
ADM-XRC-II-Lite
ADM-XRC-II
ADM-XPL
ADM-XP
ADP-WRC-II
ADP-DRC-II
ADP-XPI
ADM-XRC-4LX
ADM-XRC-4SX
ADM-XRC-4FX
ADPE-XRC-4FX
ADM-XRC-5LX
ADM-XRC-5T1
ADM-XRC-5T2 / ADM-XRC-5T2-ADV
ADM-XRC-5TZ
ADM-XRC-5T-DA1

Note: the ADM-XRC-5T2-ADV version of this design uses the same source files and bitstreams as the ADM-XRC-5T2, so separate files are not included within this SDK.

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 write data into the FIFO. Similarly, any DMA transfer on DMA channel 1 is assumed to be reading data out of the FIFO; hence any read where LDACK#[1] is asserted will remove data from the FIFO. 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 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
ADM-XRC with Virtex ddma-xrc-v.scr ddma-xrc-v.prj ddma-xrc.ucf
ADM-XRC with Virtex-E ddma-xrc-ve.scr ddma-xrc-ve.prj ddma-xrc.ucf
ADM-XRC-P with Virtex ddma-xrcp-v.scr ddma-xrcp-v.prj ddma-xrcp.ucf
ADM-XRC-P with Virtex-E ddma-xrcp-ve.scr ddma-xrcp-ve.prj ddma-xrcp.ucf
ADM-XRC-II-Lite ddma-xrc2l-v2.scr ddma-xrc2l-v2.prj ddma-xrc2l.ucf
ADM-XRC-II ddma-xrc2-v2.scr ddma-xrc2-v2.prj ddma-xrc2.ucf
ADM-XPL ddma-xpl-v2p.scr ddma-xpl-v2p.prj ddma-xpl.ucf
ADM-XP ddma-xp-v2p.scr ddma-xp-v2p.prj ddma-xp.ucf
ADP-WRC-II ddma-wrc2-v2.scr ddma-wrc2-v2.prj ddma-wrc2.ucf
ADP-DRC-II ddma-drc2-v2.scr ddma-drc2-v2.prj ddma-drc2.ucf
ADP-XPI ddma-xpi-v2p.scr ddma-xpi-v2p.prj ddma-xpi.ucf
ADM-XRC-4LX ddma-xrc4lx-v4lx.scr ddma-xrc4lx-v4lx.prj ddma-xrc4lx.ucf
ADM-XRC-4SX ddma-xrc4sx-v4sx.scr ddma-xrc4sx-v4sx.prj ddma-xrc4sx.ucf
ADM-XRC-4FX with 4VFX100 ddma-xrc4fx-v4fx.scr ddma-xrc4fx-v4fx.prj ddma-xrc4fx-4vfx100.ucf
ADM-XRC-4FX with 4VFX140 ddma-xrc4fx-v4fx.scr ddma-xrc4fx-v4fx.prj ddma-xrc4fx-4vfx140.ucf
ADPE-XRC-4FX with 4VFX100 ddma-xrce4fx-v4fx.scr ddma-xrce4fx-v4fx.prj ddma-xrce4fx-4vfx100.ucf
ADPE-XRC-4FX with 4VFX140 ddma-xrce4fx-v4fx.scr ddma-xrce4fx-v4fx.prj ddma-xrce4fx-4vfx140.ucf
ADM-XRC-5LX ddma-xrc5lx-v5lx.scr ddma-xrc5lx-v5lx.prj ddma-xrc5lx.ucf
ADM-XRC-5T1 with FXT ddma-xrc5t1-v5fxt.scr ddma-xrc5t1-v5fxt.prj ddma-xrc5t1-5vfxt.ucf
ADM-XRC-5T1 with LXT ddma-xrc5t1-v5lxt.scr ddma-xrc5t1-v5lxt.prj ddma-xrc5t1.ucf
ADM-XRC-5T1 with SXT ddma-xrc5t1-v5sxt.scr ddma-xrc5t1-v5sxt.prj ddma-xrc5t1.ucf
ADM-XRC-5T2 or ADM-XRC-5T2-ADV with FXT ddma-xrc5t2-v5fxt.scr ddma-xrc5t2-v5fxt.prj ddma-xrc5t2-5vfxt.ucf
ADM-XRC-5T2 or ADM-XRC-5T2-ADV with LXT ddma-xrc5t2-v5lxt.scr ddma-xrc5t2-v5lxt.prj ddma-xrc5t2.ucf
ADM-XRC-5T2 or ADM-XRC-5T2-ADV with SXT ddma-xrc5t2-v5sxt.scr ddma-xrc5t2-v5sxt.prj ddma-xrc5t2.ucf
ADM-XRC-5TZ with FXT ddma-xrc5tz-v5fxt.scr ddma-xrc5tz-v5fxt.prj ddma-xrc5tz-5vfxt.ucf
ADM-XRC-5TZ with LXT ddma-xrc5tz-v5lxt.scr ddma-xrc5tz-v5lxt.prj ddma-xrc5tz.ucf
ADM-XRC-5TZ with SXT ddma-xrc5tz-v5sxt.scr ddma-xrc5tz-v5sxt.prj ddma-xrc5tz.ucf
ADM-XRC-5T-DA1 with FXT ddma-xrc5tda1-v5fxt.scr ddma-xrc5tda1-v5fxt.prj ddma-xrc5tda1-5vfxt.ucf
ADM-XRC-5T-DA1 with LXT ddma-xrc5tda1-v5lxt.scr ddma-xrc5tda1-v5lxt.prj ddma-xrc5tda1.ucf
ADM-XRC-5T-DA1 with SXT ddma-xrc5tda1-v5sxt.scr ddma-xrc5tda1-v5sxt.prj ddma-xrc5tda1.ucf

Project Navigator files

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

Model Project Navigator project file
ADM-XRC projnav/xrc/<device>
ADM-XRC-P projnav/xrcp/<device>
ADM-XRC-II-Lite projnav/xrc2l/<device>
ADM-XRC-II projnav/xrc2/<device>
ADM-XPL projnav/xpl/<device>
ADM-XP projnav/xp/<device>
ADP-WRC-II projnav/wrc2/<device>
ADP-DRC-II projnav/drc2/<device>
ADP-XPI projnav/xpi/<device>
ADM-XRC-4LX projnav/xrc4lx/<device>
ADM-XRC-4SX projnav/xrc4sx/<device>
ADM-XRC-4FX projnav/xrc4fx/<device>
ADPE-XRC-4FX projnav/xrce4fx/<device>
ADM-XRC-5LX projnav/xrc5lx/<device>
ADM-XRC-5T1 projnav/xrc5t1/<device>
ADM-XRC-5T2
ADM-XRC-5T2-ADV
projnav/xrc5t2/<device>
ADM-XRC-5TZ projnav/xrc5tz/<device>
ADM-XRC-5T-DA1 projnav/xrc5tda1/<device>

Modelsim scripts

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

Model Shell command
ADM-XRC vsim -do "do ddma.do"
ADM-XRC-P vsim -do "do ddma.do"
ADM-XRC-II-Lite vsim -do "do ddma-xrc2l.do"
ADM-XRC-II vsim -do "do ddma-xrc2.do"
ADM-XPL vsim -do "do ddma-xpl.do"
ADM-XP vsim -do "do ddma-xpl.do"
ADP-WRC-II vsim -do "do ddma-wrc2.do"
ADP-DRC-II vsim -do "do ddma-wrc2.do"
ADP-XPI vsim -do "do ddma-xpi.do"
ADM-XRC-4LX vsim -do "do ddma-xrc4lx.do"
ADM-XRC-4SX vsim -do "do ddma-xrc4lx.do"
ADM-XRC-4FX vsim -do "do ddma-xrc4fx.do"
ADPE-XRC-4FX vsim -do "do ddma-xrce4fx.do"
ADM-XRC-5LX vsim -do "do ddma-xrc5.do"
ADM-XRC-5T1 vsim -do "do ddma-xrc5.do"
ADM-XRC-5T2
ADM-XRC-5T2-ADV
vsim -do "do ddma-xrc5.do"
ADM-XRC-5TZ vsim -do "do ddma-xrc5.do"
ADM-XRC-5T-DA1 vsim -do "do ddma-xrc5.do"

 


 Top of page