88 lines
4.4 KiB
Tcl
88 lines
4.4 KiB
Tcl
|
set data_width 63
|
||
|
|
||
|
#
|
||
|
# Port definitions
|
||
|
#
|
||
|
|
||
|
set clk [create_bd_port -dir O clk]
|
||
|
|
||
|
# define ports for tx
|
||
|
set dma_dac_dunf [create_bd_port -dir O dma_dac_dunf]
|
||
|
set core_dac_dunf [create_bd_port -dir I core_dac_dunf]
|
||
|
set dma_dac_ddata [create_bd_port -dir O -from $data_width -to 0 dma_dac_ddata]
|
||
|
set core_dac_ddata [create_bd_port -dir I -from $data_width -to 0 core_dac_ddata]
|
||
|
set dma_dac_drd [create_bd_port -dir I dma_dac_drd]
|
||
|
set core_dac_drd [create_bd_port -dir O core_dac_drd]
|
||
|
|
||
|
# define ports for rx
|
||
|
set dma_adc_ovf [create_bd_port -dir O dma_adc_ovf]
|
||
|
set core_adc_ovf [create_bd_port -dir I core_adc_ovf]
|
||
|
set dma_adc_ddata [create_bd_port -dir I -from $data_width -to 0 dma_adc_ddata]
|
||
|
set core_adc_ddata [create_bd_port -dir O -from $data_width -to 0 core_adc_ddata]
|
||
|
set dma_adc_dwr [create_bd_port -dir I dma_adc_dwr]
|
||
|
set core_adc_dwr [create_bd_port -dir O core_adc_dwr]
|
||
|
set dma_adc_dsync [create_bd_port -dir I dma_adc_dsync]
|
||
|
set core_adc_dsync [create_bd_port -dir O core_adc_dsync]
|
||
|
|
||
|
# define gpio input/outpu ports
|
||
|
set up_dac_gpio_in [create_bd_port -dir I -from 31 -to 0 up_dac_gpio_in]
|
||
|
set up_adc_gpio_in [create_bd_port -dir I -from 31 -to 0 up_adc_gpio_in]
|
||
|
set up_dac_gpio_out [create_bd_port -dir O -from 31 -to 0 up_dac_gpio_out]
|
||
|
set up_adc_gpio_out [create_bd_port -dir O -from 31 -to 0 up_adc_gpio_out]
|
||
|
|
||
|
# define additional ila probes
|
||
|
set_property -dict [list CONFIG.C_NUM_OF_PROBES {9}] $ila_adc
|
||
|
set_property -dict [list CONFIG.C_PROBE5_WIDTH {64}] $ila_adc
|
||
|
set_property -dict [list CONFIG.C_PROBE6_WIDTH {64}] $ila_adc
|
||
|
set_property -dict [list CONFIG.C_PROBE7_WIDTH {64}] $ila_adc
|
||
|
set_property -dict [list CONFIG.C_PROBE8_WIDTH {64}] $ila_adc
|
||
|
|
||
|
#
|
||
|
# Net definitions
|
||
|
#
|
||
|
|
||
|
# connect clock signal
|
||
|
connect_bd_net [get_bd_pins axi_ad9361/clk] [get_bd_ports clk]
|
||
|
|
||
|
# connections for tx path
|
||
|
|
||
|
# clear the existing datapath
|
||
|
delete_bd_objs [get_bd_nets axi_ad9361_dac_dunf] [get_bd_nets fifo_data] [get_bd_nets axi_ad9361_dac_drd]
|
||
|
|
||
|
# connect pins to port
|
||
|
connect_bd_net -net rp_dma_unf_tx [get_bd_pins axi_ad9361_dac_dma/fifo_rd_underflow] [get_bd_ports dma_dac_dunf]
|
||
|
connect_bd_net -net rp_dma_data_tx [get_bd_pins axi_ad9361_dac_dma/fifo_rd_dout] [get_bd_ports dma_dac_ddata]
|
||
|
connect_bd_net -net rp_dma_rdy_tx [get_bd_pins axi_ad9361_dac_dma/fifo_rd_en] [get_bd_ports dma_dac_drd]
|
||
|
|
||
|
connect_bd_net -net rp_core_unf_tx [get_bd_pins axi_ad9361/dac_dunf] [get_bd_ports core_dac_dunf]
|
||
|
connect_bd_net -net rp_core_data_tx [get_bd_pins util_dac_unpack/dma_data] [get_bd_ports core_dac_ddata]
|
||
|
connect_bd_net -net rp_core_rdy_tx [get_bd_pins util_dac_unpack/dma_rd] [get_bd_ports core_dac_drd]
|
||
|
|
||
|
# connections for rx path
|
||
|
|
||
|
# clear the existing datapath
|
||
|
delete_bd_objs [get_bd_nets axi_ad9361_adc_dovf] [get_bd_nets util_adc_pack_ddata] [get_bd_nets util_adc_pack_dvalid] [get_bd_nets util_adc_pack_dsync]
|
||
|
|
||
|
# connect pins to port
|
||
|
connect_bd_net -net rp_dma_ovf_rx [get_bd_pins axi_ad9361_adc_dma/fifo_wr_overflow] [get_bd_ports dma_adc_ovf]
|
||
|
connect_bd_net -net rp_dma_data_rx [get_bd_pins axi_ad9361_adc_dma/fifo_wr_din] [get_bd_ports dma_adc_ddata]
|
||
|
connect_bd_net -net rp_dma_rdy_rx [get_bd_pins axi_ad9361_adc_dma/fifo_wr_en] [get_bd_ports dma_adc_dwr]
|
||
|
connect_bd_net -net rp_dma_sync_rx [get_bd_pins axi_ad9361_adc_dma/fifo_wr_sync] [get_bd_ports dma_adc_dsync]
|
||
|
|
||
|
connect_bd_net -net rp_core_ovf_rx [get_bd_pins axi_ad9361/adc_dovf] [get_bd_ports core_adc_ovf]
|
||
|
connect_bd_net -net rp_core_data_rx [get_bd_pins util_adc_pack/ddata] [get_bd_ports core_adc_ddata]
|
||
|
connect_bd_net -net rp_core_rdy_rx [get_bd_pins util_adc_pack/dvalid] [get_bd_ports core_adc_dwr]
|
||
|
connect_bd_net -net rp_core_sync_rx [get_bd_pins util_adc_pack/dsync] [get_bd_ports core_adc_dsync]
|
||
|
|
||
|
connect_bd_net -net dac_gpio_in [get_bd_pins axi_ad9361/up_dac_gpio_in] [get_bd_ports up_dac_gpio_in]
|
||
|
connect_bd_net -net adc_gpio_in [get_bd_pins axi_ad9361/up_adc_gpio_in] [get_bd_ports up_adc_gpio_in]
|
||
|
connect_bd_net -net dac_gpio_out [get_bd_pins axi_ad9361/up_dac_gpio_out] [get_bd_ports up_dac_gpio_out]
|
||
|
connect_bd_net -net adc_gpio_out [get_bd_pins axi_ad9361/up_adc_gpio_out] [get_bd_ports up_adc_gpio_out]
|
||
|
|
||
|
# connect ila probes
|
||
|
connect_bd_net -net rp_core_data_tx [get_bd_pins ila_adc/probe5]
|
||
|
connect_bd_net -net rp_core_data_rx [get_bd_pins ila_adc/probe6]
|
||
|
connect_bd_net -net rp_dma_data_tx [get_bd_pins ila_adc/probe7]
|
||
|
connect_bd_net -net rp_dma_data_rx [get_bd_pins ila_adc/probe8]
|
||
|
|