2014-04-11 14:40:34 +00:00
|
|
|
|
2017-10-03 08:07:42 +00:00
|
|
|
package require qsys
|
2019-01-11 08:54:16 +00:00
|
|
|
package require quartus::device
|
|
|
|
|
2014-04-11 14:40:34 +00:00
|
|
|
source ../scripts/adi_env.tcl
|
2018-08-14 10:08:06 +00:00
|
|
|
source ../scripts/adi_ip_intel.tcl
|
2014-04-11 14:40:34 +00:00
|
|
|
|
2016-10-31 19:34:32 +00:00
|
|
|
ad_ip_create axi_ad9361 {AXI AD9361 Interface} axi_ad9361_elab
|
2019-01-11 08:54:16 +00:00
|
|
|
set_module_property VALIDATION_CALLBACK info_param_validate
|
|
|
|
|
2016-10-31 19:34:32 +00:00
|
|
|
ad_ip_files axi_ad9361 [list\
|
2018-08-13 13:59:02 +00:00
|
|
|
$ad_hdl_dir/library/intel/common/ad_mul.v \
|
|
|
|
$ad_hdl_dir/library/intel/common/ad_dcfilter.v \
|
2016-10-31 19:34:32 +00:00
|
|
|
$ad_hdl_dir/library/common/ad_rst.v \
|
|
|
|
$ad_hdl_dir/library/common/ad_pnmon.v \
|
2018-02-07 12:42:35 +00:00
|
|
|
$ad_hdl_dir/library/common/ad_dds_cordic_pipe.v \
|
|
|
|
$ad_hdl_dir/library/common/ad_dds_sine_cordic.v \
|
2016-10-31 19:34:32 +00:00
|
|
|
$ad_hdl_dir/library/common/ad_dds_sine.v \
|
2018-06-06 09:24:47 +00:00
|
|
|
$ad_hdl_dir/library/common/ad_dds_2.v \
|
2016-10-31 19:34:32 +00:00
|
|
|
$ad_hdl_dir/library/common/ad_dds_1.v \
|
|
|
|
$ad_hdl_dir/library/common/ad_dds.v \
|
|
|
|
$ad_hdl_dir/library/common/ad_datafmt.v \
|
|
|
|
$ad_hdl_dir/library/common/ad_iqcor.v \
|
|
|
|
$ad_hdl_dir/library/common/ad_addsub.v \
|
|
|
|
$ad_hdl_dir/library/common/ad_tdd_control.v \
|
2017-07-31 13:06:50 +00:00
|
|
|
$ad_hdl_dir/library/common/ad_pps_receiver.v \
|
2016-10-31 19:34:32 +00:00
|
|
|
$ad_hdl_dir/library/common/up_axi.v \
|
|
|
|
$ad_hdl_dir/library/common/up_xfer_cntrl.v \
|
|
|
|
$ad_hdl_dir/library/common/up_xfer_status.v \
|
|
|
|
$ad_hdl_dir/library/common/up_clock_mon.v \
|
|
|
|
$ad_hdl_dir/library/common/up_delay_cntrl.v \
|
|
|
|
$ad_hdl_dir/library/common/up_adc_common.v \
|
|
|
|
$ad_hdl_dir/library/common/up_adc_channel.v \
|
|
|
|
$ad_hdl_dir/library/common/up_dac_common.v \
|
|
|
|
$ad_hdl_dir/library/common/up_dac_channel.v \
|
|
|
|
$ad_hdl_dir/library/common/up_tdd_cntrl.v \
|
2018-08-13 13:59:02 +00:00
|
|
|
intel/axi_ad9361_lvds_if_10.v \
|
|
|
|
intel/axi_ad9361_lvds_if_c5.v \
|
|
|
|
intel/axi_ad9361_lvds_if.v \
|
|
|
|
intel/axi_ad9361_cmos_if.v \
|
2016-10-31 19:34:32 +00:00
|
|
|
axi_ad9361_rx_pnmon.v \
|
|
|
|
axi_ad9361_rx_channel.v \
|
|
|
|
axi_ad9361_rx.v \
|
|
|
|
axi_ad9361_tx_channel.v \
|
|
|
|
axi_ad9361_tx.v \
|
|
|
|
axi_ad9361_tdd.v \
|
|
|
|
axi_ad9361_tdd_if.v \
|
|
|
|
axi_ad9361.v \
|
2018-08-13 13:59:02 +00:00
|
|
|
$ad_hdl_dir/library/intel/common/up_xfer_cntrl_constr.sdc \
|
|
|
|
$ad_hdl_dir/library/intel/common/up_xfer_status_constr.sdc \
|
|
|
|
$ad_hdl_dir/library/intel/common/up_clock_mon_constr.sdc \
|
|
|
|
$ad_hdl_dir/library/intel/common/up_rst_constr.sdc \
|
2017-07-28 09:09:17 +00:00
|
|
|
axi_ad9361_constr.sdc]
|
2014-04-11 14:40:34 +00:00
|
|
|
|
|
|
|
# parameters
|
|
|
|
|
2016-10-31 19:34:32 +00:00
|
|
|
ad_ip_parameter ID INTEGER 0
|
|
|
|
ad_ip_parameter MODE_1R1T INTEGER 0
|
|
|
|
ad_ip_parameter TDD_DISABLE INTEGER 0
|
|
|
|
ad_ip_parameter CMOS_OR_LVDS_N INTEGER 0
|
|
|
|
ad_ip_parameter ADC_DATAPATH_DISABLE INTEGER 0
|
|
|
|
ad_ip_parameter ADC_USERPORTS_DISABLE INTEGER 0
|
|
|
|
ad_ip_parameter ADC_DATAFORMAT_DISABLE INTEGER 0
|
|
|
|
ad_ip_parameter ADC_DCFILTER_DISABLE INTEGER 0
|
|
|
|
ad_ip_parameter ADC_IQCORRECTION_DISABLE INTEGER 0
|
|
|
|
ad_ip_parameter DAC_IODELAY_ENABLE INTEGER 0
|
|
|
|
ad_ip_parameter DAC_DATAPATH_DISABLE INTEGER 0
|
|
|
|
ad_ip_parameter DAC_DDS_DISABLE INTEGER 0
|
|
|
|
ad_ip_parameter DAC_USERPORTS_DISABLE INTEGER 0
|
|
|
|
ad_ip_parameter DAC_IQCORRECTION_DISABLE INTEGER 0
|
|
|
|
ad_ip_parameter IO_DELAY_GROUP STRING {dev_if_delay_group}
|
2019-06-11 11:39:07 +00:00
|
|
|
ad_ip_parameter MIMO_ENABLE INTEGER 0
|
2019-08-28 13:10:19 +00:00
|
|
|
ad_ip_parameter RX_NODPA INTEGER 0
|
2016-10-28 18:09:04 +00:00
|
|
|
|
2019-01-11 08:54:16 +00:00
|
|
|
adi_add_auto_fpga_spec_params
|
|
|
|
|
2016-10-28 18:09:04 +00:00
|
|
|
# interfaces
|
2014-04-11 14:40:34 +00:00
|
|
|
|
2016-10-28 18:09:04 +00:00
|
|
|
ad_ip_intf_s_axi s_axi_aclk s_axi_aresetn
|
2017-10-03 08:07:42 +00:00
|
|
|
|
2018-08-14 13:53:45 +00:00
|
|
|
ad_interface signal dac_sync_in input 1
|
|
|
|
ad_interface signal dac_sync_out output 1
|
|
|
|
ad_interface signal tdd_sync input 1
|
|
|
|
ad_interface signal tdd_sync_cntr output 1
|
2014-06-25 19:26:06 +00:00
|
|
|
|
2018-08-14 13:53:45 +00:00
|
|
|
ad_interface clock delay_clk input 1
|
|
|
|
ad_interface clock l_clk output 1
|
|
|
|
ad_interface clock clk input 1
|
2015-11-24 09:21:08 +00:00
|
|
|
|
2018-08-14 13:53:45 +00:00
|
|
|
ad_interface reset rst output 1 if_clk
|
2016-05-16 17:24:51 +00:00
|
|
|
set_interface_property if_rst associatedResetSinks s_axi_reset
|
2016-04-28 19:36:44 +00:00
|
|
|
|
2016-05-16 16:18:31 +00:00
|
|
|
add_interface adc_ch_0 conduit end
|
|
|
|
add_interface_port adc_ch_0 adc_enable_i0 enable Output 1
|
|
|
|
add_interface_port adc_ch_0 adc_valid_i0 valid Output 1
|
|
|
|
add_interface_port adc_ch_0 adc_data_i0 data Output 16
|
|
|
|
|
|
|
|
set_interface_property adc_ch_0 associatedClock if_clk
|
2016-05-18 17:21:30 +00:00
|
|
|
set_interface_property adc_ch_0 associatedReset none
|
2016-05-16 16:18:31 +00:00
|
|
|
|
|
|
|
add_interface adc_ch_1 conduit end
|
|
|
|
add_interface_port adc_ch_1 adc_enable_q0 enable Output 1
|
|
|
|
add_interface_port adc_ch_1 adc_valid_q0 valid Output 1
|
|
|
|
add_interface_port adc_ch_1 adc_data_q0 data Output 16
|
|
|
|
|
|
|
|
set_interface_property adc_ch_1 associatedClock if_clk
|
2016-05-18 17:21:30 +00:00
|
|
|
set_interface_property adc_ch_1 associatedReset none
|
2016-05-16 16:18:31 +00:00
|
|
|
|
|
|
|
add_interface adc_ch_2 conduit end
|
|
|
|
add_interface_port adc_ch_2 adc_enable_i1 enable Output 1
|
|
|
|
add_interface_port adc_ch_2 adc_valid_i1 valid Output 1
|
|
|
|
add_interface_port adc_ch_2 adc_data_i1 data Output 16
|
|
|
|
|
|
|
|
set_interface_property adc_ch_2 associatedClock if_clk
|
2016-05-18 17:21:30 +00:00
|
|
|
set_interface_property adc_ch_2 associatedReset none
|
2016-05-16 16:18:31 +00:00
|
|
|
|
|
|
|
add_interface adc_ch_3 conduit end
|
|
|
|
add_interface_port adc_ch_3 adc_enable_q1 enable Output 1
|
|
|
|
add_interface_port adc_ch_3 adc_valid_q1 valid Output 1
|
|
|
|
add_interface_port adc_ch_3 adc_data_q1 data Output 16
|
|
|
|
|
|
|
|
set_interface_property adc_ch_3 associatedClock if_clk
|
2016-05-18 17:21:30 +00:00
|
|
|
set_interface_property adc_ch_3 associatedReset none
|
2015-11-24 09:21:08 +00:00
|
|
|
|
2018-08-14 13:53:45 +00:00
|
|
|
ad_interface signal adc_dovf input 1 ovf
|
|
|
|
ad_interface signal adc_r1_mode output 1 r1_mode
|
2015-11-24 09:21:08 +00:00
|
|
|
|
2016-05-16 16:18:31 +00:00
|
|
|
add_interface dac_ch_0 conduit end
|
|
|
|
add_interface_port dac_ch_0 dac_enable_i0 enable Output 1
|
|
|
|
add_interface_port dac_ch_0 dac_valid_i0 valid Output 1
|
|
|
|
add_interface_port dac_ch_0 dac_data_i0 data Input 16
|
2015-11-24 09:21:08 +00:00
|
|
|
|
2016-05-16 16:18:31 +00:00
|
|
|
set_interface_property dac_ch_0 associatedClock if_clk
|
2016-05-18 17:21:30 +00:00
|
|
|
set_interface_property dac_ch_0 associatedReset none
|
2015-11-24 09:21:08 +00:00
|
|
|
|
2016-05-16 16:18:31 +00:00
|
|
|
add_interface dac_ch_1 conduit end
|
|
|
|
add_interface_port dac_ch_1 dac_enable_q0 enable Output 1
|
|
|
|
add_interface_port dac_ch_1 dac_valid_q0 valid Output 1
|
|
|
|
add_interface_port dac_ch_1 dac_data_q0 data Input 16
|
2015-11-24 09:21:08 +00:00
|
|
|
|
2016-05-16 16:18:31 +00:00
|
|
|
set_interface_property dac_ch_1 associatedClock if_clk
|
2016-05-18 17:21:30 +00:00
|
|
|
set_interface_property dac_ch_1 associatedReset none
|
2016-05-16 16:18:31 +00:00
|
|
|
|
|
|
|
add_interface dac_ch_2 conduit end
|
|
|
|
add_interface_port dac_ch_2 dac_enable_i1 enable Output 1
|
|
|
|
add_interface_port dac_ch_2 dac_valid_i1 valid Output 1
|
|
|
|
add_interface_port dac_ch_2 dac_data_i1 data Input 16
|
|
|
|
|
|
|
|
set_interface_property dac_ch_2 associatedClock if_clk
|
2016-05-18 17:21:30 +00:00
|
|
|
set_interface_property dac_ch_2 associatedReset none
|
2016-05-16 16:18:31 +00:00
|
|
|
|
|
|
|
add_interface dac_ch_3 conduit end
|
|
|
|
add_interface_port dac_ch_3 dac_enable_q1 enable Output 1
|
|
|
|
add_interface_port dac_ch_3 dac_valid_q1 valid Output 1
|
|
|
|
add_interface_port dac_ch_3 dac_data_q1 data Input 16
|
|
|
|
|
|
|
|
set_interface_property dac_ch_3 associatedClock if_clk
|
2016-05-18 17:21:30 +00:00
|
|
|
set_interface_property dac_ch_3 associatedReset none
|
2016-05-04 17:39:52 +00:00
|
|
|
|
2018-08-14 13:53:45 +00:00
|
|
|
ad_interface signal dac_dunf input 1 unf
|
|
|
|
ad_interface signal dac_r1_mode output 1 r1_mode
|
2016-05-04 17:39:52 +00:00
|
|
|
|
2018-08-14 13:53:45 +00:00
|
|
|
ad_interface signal up_enable input 1
|
|
|
|
ad_interface signal up_txnrx input 1
|
|
|
|
ad_interface signal up_dac_gpio_in input 32
|
|
|
|
ad_interface signal up_dac_gpio_out output 32
|
|
|
|
ad_interface signal up_adc_gpio_in input 32
|
|
|
|
ad_interface signal up_adc_gpio_out output 32
|
2016-05-04 17:39:52 +00:00
|
|
|
|
2017-10-03 08:07:42 +00:00
|
|
|
# updates
|
2016-04-28 19:36:44 +00:00
|
|
|
|
2017-10-03 08:07:42 +00:00
|
|
|
proc axi_ad9361_elab {} {
|
2016-04-28 19:36:44 +00:00
|
|
|
|
2019-01-11 08:54:16 +00:00
|
|
|
set m_fpga_technology [get_parameter_value "FPGA_TECHNOLOGY"]
|
2017-10-03 08:07:42 +00:00
|
|
|
set m_cmos_or_lvds_n [get_parameter_value "CMOS_OR_LVDS_N"]
|
2020-02-13 08:48:57 +00:00
|
|
|
set rx_nodpa [get_parameter_value "RX_NODPA"]
|
|
|
|
|
|
|
|
# 103 - stands for "Arria 10" see adi_intel_device_info_enc.tcl
|
|
|
|
if {$m_fpga_technology == 103} {
|
2017-05-26 14:48:00 +00:00
|
|
|
|
2018-08-14 11:14:20 +00:00
|
|
|
add_hdl_instance axi_ad9361_serdes_clk intel_serdes
|
2019-08-28 13:10:19 +00:00
|
|
|
set_instance_parameter_value axi_ad9361_serdes_clk {DEVICE_FAMILY} {Arria 10}
|
2017-07-21 14:31:56 +00:00
|
|
|
set_instance_parameter_value axi_ad9361_serdes_clk {MODE} {CLK}
|
|
|
|
set_instance_parameter_value axi_ad9361_serdes_clk {DDR_OR_SDR_N} {1}
|
|
|
|
set_instance_parameter_value axi_ad9361_serdes_clk {SERDES_FACTOR} {4}
|
|
|
|
set_instance_parameter_value axi_ad9361_serdes_clk {CLKIN_FREQUENCY} {250.0}
|
2017-10-03 08:07:42 +00:00
|
|
|
|
2019-08-28 13:10:19 +00:00
|
|
|
set rx_serdes_mode IN
|
|
|
|
if {$rx_nodpa == 1} {set rx_serdes_mode IN_NODPA}
|
|
|
|
|
2018-08-14 11:14:20 +00:00
|
|
|
add_hdl_instance axi_ad9361_serdes_in intel_serdes
|
2019-08-28 13:10:19 +00:00
|
|
|
set_instance_parameter_value axi_ad9361_serdes_in {DEVICE_FAMILY} {Arria 10}
|
|
|
|
set_instance_parameter_value axi_ad9361_serdes_in {MODE} $rx_serdes_mode
|
2017-07-21 14:31:56 +00:00
|
|
|
set_instance_parameter_value axi_ad9361_serdes_in {DDR_OR_SDR_N} {1}
|
|
|
|
set_instance_parameter_value axi_ad9361_serdes_in {SERDES_FACTOR} {4}
|
|
|
|
set_instance_parameter_value axi_ad9361_serdes_in {CLKIN_FREQUENCY} {250.0}
|
2017-10-03 08:07:42 +00:00
|
|
|
|
2018-08-14 11:14:20 +00:00
|
|
|
add_hdl_instance axi_ad9361_serdes_out intel_serdes
|
2019-08-28 13:10:19 +00:00
|
|
|
set_instance_parameter_value axi_ad9361_serdes_out {DEVICE_FAMILY} {Arria 10}
|
2017-07-21 14:31:56 +00:00
|
|
|
set_instance_parameter_value axi_ad9361_serdes_out {MODE} {OUT}
|
|
|
|
set_instance_parameter_value axi_ad9361_serdes_out {DDR_OR_SDR_N} {1}
|
|
|
|
set_instance_parameter_value axi_ad9361_serdes_out {SERDES_FACTOR} {4}
|
|
|
|
set_instance_parameter_value axi_ad9361_serdes_out {CLKIN_FREQUENCY} {250.0}
|
|
|
|
|
|
|
|
add_hdl_instance axi_ad9361_data_out altera_gpio
|
2020-02-13 08:48:57 +00:00
|
|
|
set_instance_parameter_value axi_ad9361_data_out {DEVICE_FAMILY} {Arria 10}
|
2017-07-21 14:31:56 +00:00
|
|
|
set_instance_parameter_value axi_ad9361_data_out {PIN_TYPE_GUI} {Output}
|
|
|
|
set_instance_parameter_value axi_ad9361_data_out {SIZE} {1}
|
|
|
|
set_instance_parameter_value axi_ad9361_data_out {gui_io_reg_mode} {DDIO}
|
2019-08-28 13:10:19 +00:00
|
|
|
|
|
|
|
add_hdl_instance clk_buffer altclkctrl
|
|
|
|
set_instance_parameter_value clk_buffer {DEVICE_FAMILY} {Arria 10}
|
|
|
|
|
2017-05-26 14:48:00 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 17:39:52 +00:00
|
|
|
add_interface device_if conduit end
|
|
|
|
set_interface_property device_if associatedClock none
|
|
|
|
set_interface_property device_if associatedReset none
|
|
|
|
|
|
|
|
if {$m_cmos_or_lvds_n == 1} {
|
|
|
|
|
2016-05-18 17:21:30 +00:00
|
|
|
add_interface_port device_if rx_clk_in rx_clk_in Input 1
|
|
|
|
add_interface_port device_if rx_frame_in rx_frame_in Input 1
|
|
|
|
add_interface_port device_if rx_data_in rx_data_in Input 12
|
|
|
|
add_interface_port device_if tx_clk_out tx_clk_out Output 1
|
|
|
|
add_interface_port device_if tx_frame_out tx_frame_out Output 1
|
|
|
|
add_interface_port device_if tx_data_out tx_data_out Output 12
|
2016-05-04 17:39:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if {$m_cmos_or_lvds_n == 0} {
|
|
|
|
|
|
|
|
add_interface_port device_if rx_clk_in_p rx_clk_in_p Input 1
|
|
|
|
add_interface_port device_if rx_clk_in_n rx_clk_in_n Input 1
|
|
|
|
add_interface_port device_if rx_frame_in_p rx_frame_in_p Input 1
|
|
|
|
add_interface_port device_if rx_frame_in_n rx_frame_in_n Input 1
|
|
|
|
add_interface_port device_if rx_data_in_p rx_data_in_p Input 6
|
|
|
|
add_interface_port device_if rx_data_in_n rx_data_in_n Input 6
|
|
|
|
add_interface_port device_if tx_clk_out_p tx_clk_out_p Output 1
|
|
|
|
add_interface_port device_if tx_clk_out_n tx_clk_out_n Output 1
|
|
|
|
add_interface_port device_if tx_frame_out_p tx_frame_out_p Output 1
|
|
|
|
add_interface_port device_if tx_frame_out_n tx_frame_out_n Output 1
|
|
|
|
add_interface_port device_if tx_data_out_p tx_data_out_p Output 6
|
|
|
|
add_interface_port device_if tx_data_out_n tx_data_out_n Output 6
|
|
|
|
}
|
|
|
|
|
|
|
|
add_interface_port device_if enable enable Output 1
|
|
|
|
add_interface_port device_if txnrx txnrx Output 1
|
2016-04-28 19:36:44 +00:00
|
|
|
}
|
|
|
|
|