dmafifo: common interface with fifo2s

main
Rejeesh Kutty 2014-11-12 15:24:31 -05:00
parent 8761db438e
commit 074662a622
1 changed files with 12 additions and 18 deletions

View File

@ -2,7 +2,7 @@
# sys bram (use only when dma is not capable of keeping up). # sys bram (use only when dma is not capable of keeping up).
# generic fifo interface - existence is oblivious to software. # generic fifo interface - existence is oblivious to software.
proc p_sys_dmafifo {p_name m_name m_width} { proc p_sys_dmafifo {p_name m_name adc_data_width} {
global ad_hdl_dir global ad_hdl_dir
@ -14,43 +14,37 @@ proc p_sys_dmafifo {p_name m_name m_width} {
set m_instance [create_bd_cell -type hier $m_name] set m_instance [create_bd_cell -type hier $m_name]
current_bd_instance $m_instance current_bd_instance $m_instance
create_bd_pin -dir I -type clk axi_clk
create_bd_pin -dir I axi_xfer_req
create_bd_pin -dir O -from 4 -to 0 axi_xfer_status
create_bd_pin -dir I adc_rst create_bd_pin -dir I adc_rst
create_bd_pin -dir I -type clk adc_clk create_bd_pin -dir I -type clk adc_clk
create_bd_pin -dir I adc_wr create_bd_pin -dir I adc_wr
create_bd_pin -dir I -from [expr ($adc_data_width-1)] -to 0 adc_wdata
create_bd_pin -dir O adc_wovf create_bd_pin -dir O adc_wovf
create_bd_pin -dir I -from [expr ($m_width-1)] -to 0 adc_wdata
create_bd_pin -dir I dma_rstn
create_bd_pin -dir I -type clk dma_clk create_bd_pin -dir I -type clk dma_clk
create_bd_pin -dir O dma_wvalid create_bd_pin -dir O dma_wr
create_bd_pin -dir I dma_wready
create_bd_pin -dir I dma_wovf
create_bd_pin -dir O -from 63 -to 0 dma_wdata create_bd_pin -dir O -from 63 -to 0 dma_wdata
create_bd_pin -dir I dma_wready
create_bd_pin -dir I dma_xfer_req
create_bd_pin -dir O -from 3 -to 0 dma_xfer_status
set axi_fifo2f [create_bd_cell -type ip -vlnv analog.com:user:axi_fifo2f:1.0 axi_fifo2f] set axi_fifo2f [create_bd_cell -type ip -vlnv analog.com:user:axi_fifo2f:1.0 axi_fifo2f]
set_property -dict [list CONFIG.ADC_ADDR_WIDTH {8}] $axi_fifo2f set_property -dict [list CONFIG.ADC_DATA_WIDTH $adc_data_width] $axi_fifo2f
set_property -dict [list CONFIG.ADC_DATA_WIDTH $m_width] $axi_fifo2f
set_property -dict [list CONFIG.DMA_ADDR_WIDTH {10}] $axi_fifo2f
set_property -dict [list CONFIG.DMA_DATA_WIDTH {64}] $axi_fifo2f set_property -dict [list CONFIG.DMA_DATA_WIDTH {64}] $axi_fifo2f
set_property -dict [list CONFIG.DMA_READY_ENABLE {1}] $axi_fifo2f set_property -dict [list CONFIG.DMA_READY_ENABLE {1}] $axi_fifo2f
set_property -dict [list CONFIG.DMA_ADDR_WIDTH {10}] $axi_fifo2f
connect_bd_net -net adc_clk [get_bd_pins adc_clk] [get_bd_pins axi_fifo2f/adc_clk]
connect_bd_net -net adc_rst [get_bd_pins adc_rst] [get_bd_pins axi_fifo2f/adc_rst] connect_bd_net -net adc_rst [get_bd_pins adc_rst] [get_bd_pins axi_fifo2f/adc_rst]
connect_bd_net -net adc_clk [get_bd_pins adc_clk] [get_bd_pins axi_fifo2f/adc_clk]
connect_bd_net -net adc_wr [get_bd_pins adc_wr] [get_bd_pins axi_fifo2f/adc_wr] connect_bd_net -net adc_wr [get_bd_pins adc_wr] [get_bd_pins axi_fifo2f/adc_wr]
connect_bd_net -net adc_wdata [get_bd_pins adc_wdata] [get_bd_pins axi_fifo2f/adc_wdata] connect_bd_net -net adc_wdata [get_bd_pins adc_wdata] [get_bd_pins axi_fifo2f/adc_wdata]
connect_bd_net -net adc_wovf [get_bd_pins adc_wovf] [get_bd_pins axi_fifo2f/adc_wovf] connect_bd_net -net adc_wovf [get_bd_pins adc_wovf] [get_bd_pins axi_fifo2f/adc_wovf]
connect_bd_net -net dma_rstn [get_bd_pins dma_rstn] [get_bd_pins axi_fifo2f/dma_rstn]
connect_bd_net -net dma_clk [get_bd_pins dma_clk] [get_bd_pins axi_fifo2f/dma_clk] connect_bd_net -net dma_clk [get_bd_pins dma_clk] [get_bd_pins axi_fifo2f/dma_clk]
connect_bd_net -net dma_wvalid [get_bd_pins dma_wvalid] [get_bd_pins axi_fifo2f/dma_wr] connect_bd_net -net dma_wr [get_bd_pins dma_wr] [get_bd_pins axi_fifo2f/dma_wr]
connect_bd_net -net dma_wdata [get_bd_pins dma_wdata] [get_bd_pins axi_fifo2f/dma_wdata] connect_bd_net -net dma_wdata [get_bd_pins dma_wdata] [get_bd_pins axi_fifo2f/dma_wdata]
connect_bd_net -net dma_wready [get_bd_pins dma_wready] [get_bd_pins axi_fifo2f/dma_wready] connect_bd_net -net dma_wready [get_bd_pins dma_wready] [get_bd_pins axi_fifo2f/dma_wready]
connect_bd_net -net dma_wovf [get_bd_pins dma_wovf] [get_bd_pins axi_fifo2f/dma_wovf] connect_bd_net -net dma_xfer_req [get_bd_pins dma_xfer_req] [get_bd_pins axi_fifo2f/dma_xfer_req]
connect_bd_net -net axi_xfer_req [get_bd_pins axi_xfer_req] [get_bd_pins axi_fifo2f/dma_xfer_req] connect_bd_net -net dma_xfer_status [get_bd_pins dma_xfer_status] [get_bd_pins axi_fifo2f/dma_xfer_status]
connect_bd_net -net axi_xfer_status [get_bd_pins axi_xfer_status] [get_bd_pins axi_fifo2f/dma_xfer_status]
current_bd_instance $c_instance current_bd_instance $c_instance
} }