daq2: 2014.2 and ver.d
parent
c375b5b26e
commit
bca8ec0160
|
@ -1,8 +1,19 @@
|
|||
|
||||
# daq2
|
||||
|
||||
set spi_csn_i [create_bd_port -dir I -from 2 -to 0 spi_csn_i]
|
||||
if {$sys_zynq == 1} {
|
||||
|
||||
set spi_csn_2_o [create_bd_port -dir O spi_csn_2_o]
|
||||
set spi_csn_1_o [create_bd_port -dir O spi_csn_1_o]
|
||||
set spi_csn_0_o [create_bd_port -dir O spi_csn_0_o]
|
||||
set spi_csn_i [create_bd_port -dir I spi_csn_i]
|
||||
|
||||
} else {
|
||||
|
||||
set spi_csn_o [create_bd_port -dir O -from 2 -to 0 spi_csn_o]
|
||||
set spi_csn_i [create_bd_port -dir I -from 2 -to 0 spi_csn_i]
|
||||
}
|
||||
|
||||
set spi_clk_i [create_bd_port -dir I spi_clk_i]
|
||||
set spi_clk_o [create_bd_port -dir O spi_clk_o]
|
||||
set spi_sdo_i [create_bd_port -dir I spi_sdo_i]
|
||||
|
@ -63,7 +74,7 @@ if {$sys_zynq == 0} {
|
|||
set axi_ad9144_core [create_bd_cell -type ip -vlnv analog.com:user:axi_ad9144:1.0 axi_ad9144_core]
|
||||
set_property -dict [list CONFIG.PCORE_QUAD_DUAL_N {0}] $axi_ad9144_core
|
||||
|
||||
set axi_ad9144_jesd [create_bd_cell -type ip -vlnv xilinx.com:ip:jesd204:5.1 axi_ad9144_jesd]
|
||||
set axi_ad9144_jesd [create_bd_cell -type ip -vlnv xilinx.com:ip:jesd204:5.2 axi_ad9144_jesd]
|
||||
set_property -dict [list CONFIG.C_NODE_IS_TRANSMIT {1}] $axi_ad9144_jesd
|
||||
set_property -dict [list CONFIG.C_LANES {4}] $axi_ad9144_jesd
|
||||
|
||||
|
@ -90,7 +101,7 @@ if {$sys_zynq == 1} {
|
|||
|
||||
set axi_ad9680_core [create_bd_cell -type ip -vlnv analog.com:user:axi_ad9680:1.0 axi_ad9680_core]
|
||||
|
||||
set axi_ad9680_jesd [create_bd_cell -type ip -vlnv xilinx.com:ip:jesd204:5.1 axi_ad9680_jesd]
|
||||
set axi_ad9680_jesd [create_bd_cell -type ip -vlnv xilinx.com:ip:jesd204:5.2 axi_ad9680_jesd]
|
||||
set_property -dict [list CONFIG.C_NODE_IS_TRANSMIT {0}] $axi_ad9680_jesd
|
||||
set_property -dict [list CONFIG.C_LANES {4}] $axi_ad9680_jesd
|
||||
|
||||
|
@ -129,7 +140,7 @@ if {$sys_zynq == 1} {
|
|||
|
||||
if {$sys_zynq == 0} {
|
||||
|
||||
set axi_daq2_spi [create_bd_cell -type ip -vlnv xilinx.com:ip:axi_quad_spi:3.1 axi_daq2_spi]
|
||||
set axi_daq2_spi [create_bd_cell -type ip -vlnv xilinx.com:ip:axi_quad_spi:3.2 axi_daq2_spi]
|
||||
set_property -dict [list CONFIG.C_USE_STARTUP {0}] $axi_daq2_spi
|
||||
set_property -dict [list CONFIG.C_NUM_SS_BITS {3}] $axi_daq2_spi
|
||||
set_property -dict [list CONFIG.C_SCK_RATIO {8}] $axi_daq2_spi
|
||||
|
@ -188,22 +199,16 @@ if {$sys_zynq == 0} {
|
|||
connect_bd_net -net spi_sdi_i [get_bd_ports spi_sdi_i] [get_bd_pins axi_daq2_spi/io1_i]
|
||||
|
||||
} else {
|
||||
set sys_spi_csn_concat [create_bd_cell -type ip -vlnv xilinx.com:ip:xlconcat:1.0 sys_spi_csn_concat]
|
||||
set_property -dict [list CONFIG.NUM_PORTS {3}] $sys_spi_csn_concat
|
||||
|
||||
set sys_const_vcc [create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.0 sys_const_vcc]
|
||||
set_property -dict [list CONFIG.CONST_WIDTH {1} CONFIG.CONST_VAL {1}] $sys_const_vcc
|
||||
|
||||
connect_bd_net -net spi_csn0 [get_bd_pins sys_spi_csn_concat/In2] [get_bd_pins sys_ps7/SPI0_SS_O]
|
||||
connect_bd_net -net spi_csn1 [get_bd_pins sys_spi_csn_concat/In1] [get_bd_pins sys_ps7/SPI0_SS1_O]
|
||||
connect_bd_net -net spi_csn2 [get_bd_pins sys_spi_csn_concat/In0] [get_bd_pins sys_ps7/SPI0_SS2_O]
|
||||
connect_bd_net -net spi_csn_o [get_bd_ports spi_csn_o] [get_bd_pins sys_spi_csn_concat/dout]
|
||||
connect_bd_net -net spi_csn_i [get_bd_pins sys_const_vcc/const] [get_bd_pins sys_ps7/SPI0_SS_I]
|
||||
connect_bd_net -net spi_clk_i [get_bd_ports spi_clk_i] [get_bd_pins sys_ps7/SPI0_SCLK_I]
|
||||
connect_bd_net -net spi_clk_o [get_bd_ports spi_clk_o] [get_bd_pins sys_ps7/SPI0_SCLK_O]
|
||||
connect_bd_net -net spi_sdo_i [get_bd_ports spi_sdo_i] [get_bd_pins sys_ps7/SPI0_MOSI_I]
|
||||
connect_bd_net -net spi_sdo_o [get_bd_ports spi_sdo_o] [get_bd_pins sys_ps7/SPI0_MOSI_O]
|
||||
connect_bd_net -net spi_sdi_i [get_bd_ports spi_sdi_i] [get_bd_pins sys_ps7/SPI0_MISO_I]
|
||||
connect_bd_net -net spi_csn_2_o [get_bd_ports spi_csn_2_o] [get_bd_pins sys_ps7/SPI0_SS2_O]
|
||||
connect_bd_net -net spi_csn_1_o [get_bd_ports spi_csn_1_o] [get_bd_pins sys_ps7/SPI0_SS1_O]
|
||||
connect_bd_net -net spi_csn_0_o [get_bd_ports spi_csn_0_o] [get_bd_pins sys_ps7/SPI0_SS_O]
|
||||
connect_bd_net -net spi_csn_i [get_bd_ports spi_csn_i] [get_bd_pins sys_ps7/SPI0_SS_I]
|
||||
connect_bd_net -net spi_clk_i [get_bd_ports spi_clk_i] [get_bd_pins sys_ps7/SPI0_SCLK_I]
|
||||
connect_bd_net -net spi_clk_o [get_bd_ports spi_clk_o] [get_bd_pins sys_ps7/SPI0_SCLK_O]
|
||||
connect_bd_net -net spi_sdo_i [get_bd_ports spi_sdo_i] [get_bd_pins sys_ps7/SPI0_MOSI_I]
|
||||
connect_bd_net -net spi_sdo_o [get_bd_ports spi_sdo_o] [get_bd_pins sys_ps7/SPI0_MOSI_O]
|
||||
connect_bd_net -net spi_sdi_i [get_bd_ports spi_sdi_i] [get_bd_pins sys_ps7/SPI0_MISO_I]
|
||||
}
|
||||
|
||||
if {$sys_zynq == 0} {
|
||||
|
@ -451,7 +456,8 @@ if {$sys_zynq == 0} {
|
|||
|
||||
# ila
|
||||
|
||||
set ila_jesd_rx_mon [create_bd_cell -type ip -vlnv xilinx.com:ip:ila:3.0 ila_jesd_rx_mon]
|
||||
set ila_jesd_rx_mon [create_bd_cell -type ip -vlnv xilinx.com:ip:ila:4.0 ila_jesd_rx_mon]
|
||||
set_property -dict [list CONFIG.C_MONITOR_TYPE {Native}] $ila_jesd_rx_mon
|
||||
set_property -dict [list CONFIG.C_NUM_OF_PROBES {4}] $ila_jesd_rx_mon
|
||||
set_property -dict [list CONFIG.C_PROBE0_WIDTH {334}] $ila_jesd_rx_mon
|
||||
set_property -dict [list CONFIG.C_PROBE1_WIDTH {6}] $ila_jesd_rx_mon
|
||||
|
@ -466,7 +472,8 @@ if {$sys_zynq == 0} {
|
|||
connect_bd_net -net axi_daq2_gt_rx_data [get_bd_pins ila_jesd_rx_mon/PROBE2]
|
||||
connect_bd_net -net axi_ad9680_adc_ddata [get_bd_pins ila_jesd_rx_mon/PROBE3]
|
||||
|
||||
set ila_jesd_tx_mon [create_bd_cell -type ip -vlnv xilinx.com:ip:ila:3.0 ila_jesd_tx_mon]
|
||||
set ila_jesd_tx_mon [create_bd_cell -type ip -vlnv xilinx.com:ip:ila:4.0 ila_jesd_tx_mon]
|
||||
set_property -dict [list CONFIG.C_MONITOR_TYPE {Native}] $ila_jesd_tx_mon
|
||||
set_property -dict [list CONFIG.C_NUM_OF_PROBES {2}] $ila_jesd_tx_mon
|
||||
set_property -dict [list CONFIG.C_PROBE0_WIDTH {150}] $ila_jesd_tx_mon
|
||||
set_property -dict [list CONFIG.C_PROBE1_WIDTH {6}] $ila_jesd_tx_mon
|
||||
|
|
|
@ -44,7 +44,8 @@ module daq2_spi (
|
|||
spi_mosi,
|
||||
spi_miso,
|
||||
|
||||
spi_sdio);
|
||||
spi_sdio,
|
||||
spi_dir);
|
||||
|
||||
// 4 wire
|
||||
|
||||
|
@ -56,6 +57,7 @@ module daq2_spi (
|
|||
// 3 wire
|
||||
|
||||
inout spi_sdio;
|
||||
output spi_dir;
|
||||
|
||||
// internal registers
|
||||
|
||||
|
@ -71,6 +73,7 @@ module daq2_spi (
|
|||
// check on rising edge and change on falling edge
|
||||
|
||||
assign spi_csn_s = & spi_csn;
|
||||
assign spi_dir = ~spi_enable_s;
|
||||
assign spi_enable_s = spi_enable & ~spi_csn_s;
|
||||
|
||||
always @(posedge spi_clk or posedge spi_csn_s) begin
|
||||
|
|
|
@ -40,18 +40,17 @@ connect_bd_net -net axi_ad9680_adc_dsync [get_bd_ports adc_dsync]
|
|||
connect_bd_net -net axi_ad9680_adc_clk [get_bd_ports adc_clk]
|
||||
connect_bd_net -net axi_ad9680_adc_ddata [get_bd_pins ila_jesd_rx_mon/PROBE3]
|
||||
|
||||
set ila_dma_mon [create_bd_cell -type ip -vlnv xilinx.com:ip:ila:3.0 ila_dma_mon]
|
||||
set_property -dict [list CONFIG.C_NUM_OF_PROBES {4}] $ila_dma_mon
|
||||
set ila_dma_mon [create_bd_cell -type ip -vlnv xilinx.com:ip:ila:4.0 ila_dma_mon]
|
||||
set_property -dict [list CONFIG.C_MONITOR_TYPE {Native}] $ila_dma_mon
|
||||
set_property -dict [list CONFIG.C_NUM_OF_PROBES {3}] $ila_dma_mon
|
||||
set_property -dict [list CONFIG.C_PROBE0_WIDTH {1}] $ila_dma_mon
|
||||
set_property -dict [list CONFIG.C_PROBE1_WIDTH {1}] $ila_dma_mon
|
||||
set_property -dict [list CONFIG.C_PROBE2_WIDTH {64}] $ila_dma_mon
|
||||
set_property -dict [list CONFIG.C_PROBE3_WIDTH {5}] $ila_dma_mon
|
||||
|
||||
connect_bd_net -net axi_ad9680_dma_clk [get_bd_pins ila_dma_mon/clk]
|
||||
connect_bd_net -net axi_ad9680_dma_dwr [get_bd_pins ila_dma_mon/probe0]
|
||||
connect_bd_net -net axi_ad9680_dma_xfer_req [get_bd_pins ila_dma_mon/probe1]
|
||||
connect_bd_net -net axi_ad9680_dma_ddata [get_bd_pins ila_dma_mon/probe2]
|
||||
connect_bd_net -net axi_xfer_status [get_bd_pins ila_dma_mon/probe3] [get_bd_pins plddr3_fifo/axi_xfer_status]
|
||||
|
||||
|
||||
create_bd_addr_seg -range 0x40000000 -offset 0x80000000 [get_bd_addr_spaces plddr3_fifo/axi_fifo2s/axi] [get_bd_addr_segs plddr3_fifo/axi_ddr_cntrl/memmap/memaddr] SEG_axi_ddr_cntrl_memaddr
|
||||
|
|
|
@ -36,10 +36,9 @@ set_property -dict {PACKAGE_PIN AG24 IOSTANDARD LVCMOS25} [get_ports spi_csn_
|
|||
set_property -dict {PACKAGE_PIN AE21 IOSTANDARD LVCMOS25} [get_ports spi_csn_adc] ; ## D15 FMC_HPC_LA09_N
|
||||
set_property -dict {PACKAGE_PIN AH24 IOSTANDARD LVCMOS25} [get_ports spi_clk] ; ## D12 FMC_HPC_LA05_N
|
||||
set_property -dict {PACKAGE_PIN AD21 IOSTANDARD LVCMOS25} [get_ports spi_sdio] ; ## D14 FMC_HPC_LA09_P
|
||||
set_property -dict {PACKAGE_PIN AG19 IOSTANDARD LVCMOS25} [get_ports spi_dir] ; ## G13 FMC_HPC_LA08_N
|
||||
|
||||
set_property -dict {PACKAGE_PIN AH22 IOSTANDARD LVCMOS25} [get_ports clkd_reset] ; ## C11 FMC_HPC_LA06_N
|
||||
set_property -dict {PACKAGE_PIN AF19 IOSTANDARD LVCMOS25} [get_ports clkd_sync] ; ## G12 FMC_HPC_LA08_P
|
||||
set_property -dict {PACKAGE_PIN AG19 IOSTANDARD LVCMOS25} [get_ports clkd_pd] ; ## G13 FMC_HPC_LA08_N
|
||||
set_property -dict {PACKAGE_PIN AG25 IOSTANDARD LVCMOS25} [get_ports dac_reset] ; ## C15 FMC_HPC_LA10_N
|
||||
set_property -dict {PACKAGE_PIN AF24 IOSTANDARD LVCMOS25} [get_ports dac_txen] ; ## G16 FMC_HPC_LA12_N
|
||||
set_property -dict {PACKAGE_PIN AG22 IOSTANDARD LVCMOS25} [get_ports adc_pd] ; ## C10 FMC_HPC_LA06_P
|
||||
|
@ -50,6 +49,9 @@ set_property -dict {PACKAGE_PIN AF23 IOSTANDARD LVCMOS25} [get_ports dac_irq]
|
|||
set_property -dict {PACKAGE_PIN AD23 IOSTANDARD LVCMOS25} [get_ports adc_fda] ; ## H16 FMC_HPC_LA11_P
|
||||
set_property -dict {PACKAGE_PIN AE23 IOSTANDARD LVCMOS25} [get_ports adc_fdb] ; ## H17 FMC_HPC_LA11_N
|
||||
|
||||
set_property -dict {PACKAGE_PIN AJ23 IOSTANDARD LVDS_25 DIFF_TERM TRUE} [get_ports trig_p] ; ## H13 FMC_HPC_LA07_P
|
||||
set_property -dict {PACKAGE_PIN AJ24 IOSTANDARD LVDS_25 DIFF_TERM TRUE} [get_ports trig_n] ; ## H14 FMC_HPC_LA07_N
|
||||
|
||||
# clocks
|
||||
|
||||
create_clock -name tx_ref_clk -period 2.00 [get_ports tx_ref_clk_p]
|
||||
|
|
|
@ -114,6 +114,9 @@ module system_top (
|
|||
tx_data_p,
|
||||
tx_data_n,
|
||||
|
||||
trig_p,
|
||||
trig_n,
|
||||
|
||||
adc_fdb,
|
||||
adc_fda,
|
||||
dac_irq,
|
||||
|
@ -122,15 +125,14 @@ module system_top (
|
|||
adc_pd,
|
||||
dac_txen,
|
||||
dac_reset,
|
||||
clkd_pd,
|
||||
clkd_sync,
|
||||
clkd_reset,
|
||||
|
||||
spi_csn_clk,
|
||||
spi_csn_dac,
|
||||
spi_csn_adc,
|
||||
spi_clk,
|
||||
spi_sdio);
|
||||
spi_sdio,
|
||||
spi_dir);
|
||||
|
||||
input sys_clk_p;
|
||||
input sys_clk_n;
|
||||
|
@ -204,7 +206,10 @@ module system_top (
|
|||
input tx_sync_n;
|
||||
output [ 3:0] tx_data_p;
|
||||
output [ 3:0] tx_data_n;
|
||||
|
||||
|
||||
input trig_p;
|
||||
input trig_n;
|
||||
|
||||
inout adc_fdb;
|
||||
inout adc_fda;
|
||||
inout dac_irq;
|
||||
|
@ -213,15 +218,14 @@ module system_top (
|
|||
inout adc_pd;
|
||||
inout dac_txen;
|
||||
inout dac_reset;
|
||||
inout clkd_pd;
|
||||
inout clkd_sync;
|
||||
inout clkd_reset;
|
||||
|
||||
output spi_csn_clk;
|
||||
output spi_csn_dac;
|
||||
output spi_csn_adc;
|
||||
output spi_clk;
|
||||
inout spi_sdio;
|
||||
output spi_dir;
|
||||
|
||||
// internal registers
|
||||
|
||||
|
@ -236,9 +240,10 @@ module system_top (
|
|||
|
||||
// internal signals
|
||||
|
||||
wire [42:0] gpio_i;
|
||||
wire [42:0] gpio_o;
|
||||
wire [42:0] gpio_t;
|
||||
wire trig;
|
||||
wire [43:0] gpio_i;
|
||||
wire [43:0] gpio_o;
|
||||
wire [43:0] gpio_t;
|
||||
wire rx_ref_clk;
|
||||
wire rx_sysref;
|
||||
wire rx_sync;
|
||||
|
@ -420,18 +425,24 @@ module system_top (
|
|||
.spi_clk (spi_clk),
|
||||
.spi_mosi (spi_mosi),
|
||||
.spi_miso (spi_miso),
|
||||
.spi_sdio (spi_sdio));
|
||||
.spi_sdio (spi_sdio),
|
||||
.spi_dir (spi_dir));
|
||||
|
||||
ad_iobuf #(.DATA_WIDTH(26)) i_iobuf (
|
||||
.dt ({gpio_t[42:32], gpio_t[14:0]}),
|
||||
.di ({gpio_o[42:32], gpio_o[14:0]}),
|
||||
.do ({gpio_i[42:32], gpio_i[14:0]}),
|
||||
IBUFDS i_ibufds_trig (
|
||||
.I (trig_p),
|
||||
.IB (trig_n),
|
||||
.O (trig));
|
||||
|
||||
assign gpio_i[43] = trig;
|
||||
|
||||
ad_iobuf #(.DATA_WIDTH(24)) i_iobuf (
|
||||
.dt ({gpio_t[42:40], gpio_t[38], gpio_t[36:32], gpio_t[14:0]}),
|
||||
.di ({gpio_o[42:40], gpio_o[38], gpio_o[36:32], gpio_o[14:0]}),
|
||||
.do ({gpio_i[42:40], gpio_i[38], gpio_i[36:32], gpio_i[14:0]}),
|
||||
.dio ({ adc_pd, // 42
|
||||
dac_txen, // 41
|
||||
dac_reset, // 40
|
||||
clkd_pd, // 39
|
||||
clkd_sync, // 38
|
||||
clkd_reset, // 37
|
||||
adc_fdb, // 36
|
||||
adc_fda, // 35
|
||||
dac_irq, // 34
|
||||
|
@ -518,8 +529,10 @@ module system_top (
|
|||
.spdif (spdif),
|
||||
.spi_clk_i (spi_clk),
|
||||
.spi_clk_o (spi_clk),
|
||||
.spi_csn_i (spi_csn),
|
||||
.spi_csn_o (spi_csn),
|
||||
.spi_csn_i (1'b1),
|
||||
.spi_csn_0_o (spi_csn[0]),
|
||||
.spi_csn_1_o (spi_csn[1]),
|
||||
.spi_csn_2_o (spi_csn[2]),
|
||||
.spi_sdi_i (spi_miso),
|
||||
.spi_sdo_i (spi_mosi),
|
||||
.spi_sdo_o (spi_mosi),
|
||||
|
|
Loading…
Reference in New Issue