adcfifo/dacfifo: Use proc to create infrastructure
Create the dacfifo/adcfifo infrastructure with procedures. This will allow moving the parameters of the dac/adcfifo inside the block design so it can be calculated based on other parameters.main
parent
c6c825c90a
commit
a3766b464b
|
@ -1,3 +1,4 @@
|
|||
proc ad_dacfifo_create {dac_fifo_name dac_data_width dac_dma_data_width dac_fifo_address_width} {
|
||||
|
||||
# pl-ddr4 settings
|
||||
|
||||
|
@ -77,3 +78,4 @@ add_connection sys_ddr4_cntrl.emif_usr_clk_clock_source $dac_fifo_name.avl_clock
|
|||
add_connection $dac_fifo_name.amm_ddr sys_ddr4_cntrl.ctrl_amm_avalon_slave_0
|
||||
set_connection_parameter_value $dac_fifo_name.amm_ddr/sys_ddr4_cntrl.ctrl_amm_avalon_slave_0 baseAddress {0x0}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
proc ad_dacfifo_create {dac_fifo_name dac_data_width dac_dma_data_width dac_fifo_address_width} {
|
||||
|
||||
if {$dac_data_width != $dac_dma_data_width} {
|
||||
return -code error [format "ERROR: util_dacfifo dac/dma widths must be the same!"]
|
||||
}
|
||||
|
@ -7,4 +9,5 @@ add_instance $dac_fifo_name util_dacfifo
|
|||
set_instance_parameter_value $dac_fifo_name {ADDRESS_WIDTH} $dac_fifo_address_width
|
||||
set_instance_parameter_value $dac_fifo_name {DATA_WIDTH} $dac_data_width
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
# sys bram (use only when dma is not capable of keeping up).
|
||||
# generic fifo interface - existence is oblivious to software.
|
||||
|
||||
proc ad_adcfifo_create {adc_fifo_name adc_data_width adc_dma_data_width adc_fifo_address_width} {
|
||||
|
||||
ad_ip_instance util_adcfifo $adc_fifo_name
|
||||
ad_ip_parameter $adc_fifo_name CONFIG.ADC_DATA_WIDTH $adc_data_width
|
||||
ad_ip_parameter $adc_fifo_name CONFIG.DMA_DATA_WIDTH $adc_dma_data_width
|
||||
ad_ip_parameter $adc_fifo_name CONFIG.DMA_READY_ENABLE 1
|
||||
ad_ip_parameter $adc_fifo_name CONFIG.DMA_ADDRESS_WIDTH $adc_fifo_address_width
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# sys bram (use only when dma is not capable of keeping up).
|
||||
# generic fifo interface - existence is oblivious to software.
|
||||
proc ad_dacfifo_create {dac_fifo_name dac_data_width dac_dma_data_width dac_fifo_address_width} {
|
||||
|
||||
if {$dac_data_width != $dac_dma_data_width} {
|
||||
return -code error [format "ERROR: util_dacfifo dac/dma widths must be the same!"]
|
||||
|
@ -9,3 +10,4 @@ ad_ip_instance util_dacfifo $dac_fifo_name
|
|||
ad_ip_parameter $dac_fifo_name CONFIG.DATA_WIDTH $dac_data_width
|
||||
ad_ip_parameter $dac_fifo_name CONFIG.ADDRESS_WIDTH $dac_fifo_address_width
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
# pl ddr3 (use only when dma is not capable of keeping up).
|
||||
# generic fifo interface - existence is oblivious to software.
|
||||
|
||||
proc ad_adcfifo_create {adc_fifo_name adc_data_width adc_dma_data_width adc_fifo_address_width} {
|
||||
|
||||
upvar ad_hdl_dir ad_hdl_dir
|
||||
|
||||
ad_ip_instance proc_sys_reset axi_rstgen
|
||||
ad_ip_instance mig_7series axi_ddr_cntrl
|
||||
|
||||
|
@ -38,3 +42,4 @@ ad_connect axi_ddr_cntrl/device_temp_i GND
|
|||
|
||||
assign_bd_address [get_bd_addr_segs -of_objects [get_bd_cells axi_ddr_cntrl]]
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
# pl ddr3 (use only when dma is not capable of keeping up).
|
||||
# generic fifo interface - existence is oblivious to software.
|
||||
|
||||
proc ad_dacfifo_create {dac_fifo_name dac_data_width dac_dma_data_width dac_fifo_address_width} {
|
||||
|
||||
upvar ad_hdl_dir ad_hdl_dir
|
||||
|
||||
ad_ip_instance proc_sys_reset axi_rstgen
|
||||
ad_ip_instance mig_7series axi_ddr_cntrl
|
||||
|
||||
|
@ -37,3 +41,4 @@ ad_connect axi_ddr_cntrl/device_temp_i GND
|
|||
|
||||
assign_bd_address [get_bd_addr_segs -of_objects [get_bd_cells axi_ddr_cntrl]]
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue