ad9434_fmc: Fix SPI interface
parent
66baf6ac3e
commit
c1213ffe71
|
@ -12,7 +12,8 @@ set adc_or_n [create_bd_port -dir I adc_or_n]
|
||||||
set spi_clk_i [create_bd_port -dir I spi_clk_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_clk_o [create_bd_port -dir O spi_clk_o]
|
||||||
set spi_csn_i [create_bd_port -dir I spi_csn_i]
|
set spi_csn_i [create_bd_port -dir I spi_csn_i]
|
||||||
set spi_csn_o [create_bd_port -dir O spi_csn_o]
|
set spi_csn_adc_o [create_bd_port -dir O spi_csn_adc_o]
|
||||||
|
set spi_csn_clk_o [create_bd_port -dir O spi_csn_clk_o]
|
||||||
set spi_mosi_i [create_bd_port -dir I spi_mosi_i]
|
set spi_mosi_i [create_bd_port -dir I spi_mosi_i]
|
||||||
set spi_mosi_o [create_bd_port -dir O spi_mosi_o]
|
set spi_mosi_o [create_bd_port -dir O spi_mosi_o]
|
||||||
set spi_miso_i [create_bd_port -dir I spi_miso_i]
|
set spi_miso_i [create_bd_port -dir I spi_miso_i]
|
||||||
|
@ -55,9 +56,10 @@ set_property -dict [list CONFIG.PCW_SPI0_SPI0_IO {EMIO}] $sys_ps7
|
||||||
# spi connections
|
# spi connections
|
||||||
|
|
||||||
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_csn_i [get_bd_ports spi_csn_i] [get_bd_pins sys_ps7/SPI0_SS_I]
|
||||||
connect_bd_net -net spi_csn_o [get_bd_ports spi_csn_o] [get_bd_pins sys_ps7/SPI0_SS_O]
|
connect_bd_net -net spi_csn_adc_o [get_bd_ports spi_csn_adc_o] [get_bd_pins sys_ps7/SPI0_SS_O]
|
||||||
|
connect_bd_net -net spi_csn_clk_o [get_bd_ports spi_csn_clk_o] [get_bd_pins sys_ps7/SPI0_SS1_O]
|
||||||
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_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_0]
|
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_mosi_i [get_bd_ports spi_mosi_i] [get_bd_pins sys_ps7/SPI0_MOSI_I]
|
connect_bd_net -net spi_mosi_i [get_bd_ports spi_mosi_i] [get_bd_pins sys_ps7/SPI0_MOSI_I]
|
||||||
connect_bd_net -net spi_mosi_o [get_bd_ports spi_mosi_o] [get_bd_pins sys_ps7/SPI0_MOSI_O]
|
connect_bd_net -net spi_mosi_o [get_bd_ports spi_mosi_o] [get_bd_pins sys_ps7/SPI0_MOSI_O]
|
||||||
connect_bd_net -net spi_miso_i [get_bd_ports spi_miso_i] [get_bd_pins sys_ps7/SPI0_MISO_I]
|
connect_bd_net -net spi_miso_i [get_bd_ports spi_miso_i] [get_bd_pins sys_ps7/SPI0_MISO_I]
|
||||||
|
|
|
@ -33,10 +33,10 @@ set_property -dict {PACKAGE_PIN AC12 IOSTANDARD LVDS_25 DIFF_TERM TRUE} [get_
|
||||||
|
|
||||||
# spi
|
# spi
|
||||||
|
|
||||||
set_property -dict {PACKAGE_PIN Y30 IOSTANDARD LVDS_25} [get_ports spi_csn_clk] ; ## G36 FMC_LPC_LA33_P
|
set_property -dict {PACKAGE_PIN Y30 IOSTANDARD LVCMOS25} [get_ports spi_csn_clk] ; ## G36 FMC_LPC_LA33_P
|
||||||
set_property -dict {PACKAGE_PIN AA30 IOSTANDARD LVDS_25} [get_ports spi_csn_adc] ; ## G37 FMC_LPC_LA33_N
|
set_property -dict {PACKAGE_PIN AA30 IOSTANDARD LVCMOS25} [get_ports spi_csn_adc] ; ## G37 FMC_LPC_LA33_N
|
||||||
set_property -dict {PACKAGE_PIN Y27 IOSTANDARD LVDS_25} [get_ports spi_sclk] ; ## H38 FMC_LPC_LA32_N
|
set_property -dict {PACKAGE_PIN Y27 IOSTANDARD LVCMOS25} [get_ports spi_sclk] ; ## H38 FMC_LPC_LA32_N
|
||||||
set_property -dict {PACKAGE_PIN Y26 IOSTANDARD LVDS_25} [get_ports spi_dio] ; ## H37 FMC_LPC_LA32_P
|
set_property -dict {PACKAGE_PIN Y26 IOSTANDARD LVCMOS25} [get_ports spi_dio] ; ## H37 FMC_LPC_LA32_P
|
||||||
|
|
||||||
# clocks
|
# clocks
|
||||||
|
|
||||||
|
|
|
@ -142,10 +142,12 @@ module system_top (
|
||||||
wire [31:0] gpio_i;
|
wire [31:0] gpio_i;
|
||||||
wire [31:0] gpio_o;
|
wire [31:0] gpio_o;
|
||||||
wire [31:0] gpio_t;
|
wire [31:0] gpio_t;
|
||||||
wire [ 1:0] spi_csn;
|
|
||||||
wire spi_miso;
|
wire spi_miso;
|
||||||
wire spi_mosi;
|
wire spi_mosi;
|
||||||
|
|
||||||
|
wire spi_csn_adc;
|
||||||
|
wire spi_csn_clk;
|
||||||
|
|
||||||
// instantiations
|
// instantiations
|
||||||
|
|
||||||
genvar n;
|
genvar n;
|
||||||
|
@ -159,11 +161,8 @@ module system_top (
|
||||||
end
|
end
|
||||||
endgenerate
|
endgenerate
|
||||||
|
|
||||||
assign spi_csn_adc = spi_csn[0];
|
|
||||||
assign spi_csn_clk = spi_csn[1];
|
|
||||||
|
|
||||||
ad9434_spi i_spi (
|
ad9434_spi i_spi (
|
||||||
.spi_csn(spi_csn),
|
.spi_csn({spi_csn_clk, spi_csn_adc}),
|
||||||
.spi_clk(spi_sclk),
|
.spi_clk(spi_sclk),
|
||||||
.spi_mosi(spi_mosi),
|
.spi_mosi(spi_mosi),
|
||||||
.spi_miso(spi_miso),
|
.spi_miso(spi_miso),
|
||||||
|
@ -212,10 +211,11 @@ module system_top (
|
||||||
.spi_clk_i(1'b0),
|
.spi_clk_i(1'b0),
|
||||||
.spi_clk_o(spi_sclk),
|
.spi_clk_o(spi_sclk),
|
||||||
.spi_csn_i(1'b1),
|
.spi_csn_i(1'b1),
|
||||||
.spi_csn_o(spi_csn),
|
.spi_csn_adc_o(spi_csn_adc),
|
||||||
.spi_mosi_i(spi_miso),
|
.spi_csn_clk_o(spi_csn_clk),
|
||||||
.spi_mosi_o(1'b0),
|
.spi_mosi_i(spi_mosi),
|
||||||
.spi_miso_i(spi_mosi));
|
.spi_mosi_o(spi_mosi),
|
||||||
|
.spi_miso_i(spi_miso));
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue