arradio/c5soc- qsys-script flow

main
Rejeesh Kutty 2017-03-20 15:42:33 -04:00
parent b39fecadd9
commit 589e6b53d8
4 changed files with 104 additions and 105 deletions

View File

@ -0,0 +1,5 @@
source $ad_hdl_dir/projects/common/c5soc/c5soc_system_qsys.tcl
source ../common/arradio_qsys.tcl

View File

@ -148,28 +148,28 @@ module system_top (
// internal signals
wire sys_resetn;
wire [ 31:0] sys_gpio_bd_i;
wire [ 31:0] sys_gpio_bd_o;
wire [ 31:0] sys_gpio_i;
wire [ 31:0] sys_gpio_o;
wire [ 4:0] gpio;
// defaults
assign gpio_bd_o = sys_gpio_o[3:0];
assign sys_gpio_i[31:8] = sys_gpio_o[31:8];
assign sys_gpio_i[ 7:0] = gpio_bd_i;
assign vga_blank_n = 1'b1;
assign vga_sync_n = 1'b0;
assign ad9361_resetb = gpio[4];
assign ad9361_en_agc = gpio[3];
assign ad9361_sync = gpio[2];
assign gpio_bd_o = sys_gpio_bd_o[3:0];
assign sys_gpio_bd_i[31:8] = sys_gpio_bd_o[31:8];
assign sys_gpio_bd_i[ 7:0] = gpio_bd_i;
assign ad9361_resetb = sys_gpio_o[4];
assign ad9361_en_agc = sys_gpio_o[3];
assign ad9361_sync = sys_gpio_o[2];
// instantiations
system_bd i_system_bd (
.axi_ad9361_delay_clk_clk (1'd0),
.axi_ad9361_device_if_rx_clk_in_p (rx_clk_in),
.axi_ad9361_device_if_rx_clk_in_n (1'd0),
.axi_ad9361_device_if_rx_frame_in_p (rx_frame_in),
@ -184,88 +184,89 @@ module system_top (
.axi_ad9361_device_if_tx_data_out_n (),
.axi_ad9361_device_if_enable (enable),
.axi_ad9361_device_if_txnrx (txnrx),
.axi_ad9361_up_enable_up_enable (gpio[1]),
.axi_ad9361_up_txnrx_up_txnrx (gpio[0]),
.gpio_export (gpio),
.spi_MISO (spi_miso),
.spi_MOSI (spi_mosi),
.spi_SCLK (spi_clk),
.spi_SS_n (spi_csn),
.axi_ad9361_up_enable_up_enable (sys_gpio_o[1]),
.axi_ad9361_up_txnrx_up_txnrx (sys_gpio_o[0]),
.sys_clk_clk (sys_clk),
.sys_gpio_in_port (sys_gpio_i),
.sys_gpio_out_port (sys_gpio_o),
.sys_hps_io_hps_io_emac1_inst_TX_CLK (eth1_tx_clk),
.sys_hps_io_hps_io_emac1_inst_TXD0 (eth1_tx_d[0]),
.sys_hps_io_hps_io_emac1_inst_TXD1 (eth1_tx_d[1]),
.sys_hps_io_hps_io_emac1_inst_TXD2 (eth1_tx_d[2]),
.sys_hps_io_hps_io_emac1_inst_TXD3 (eth1_tx_d[3]),
.sys_hps_io_hps_io_emac1_inst_RXD0 (eth1_rx_d[0]),
.sys_hps_io_hps_io_emac1_inst_MDIO (eth1_mdio),
.sys_hps_io_hps_io_emac1_inst_MDC (eth1_mdc),
.sys_hps_io_hps_io_emac1_inst_RX_CTL (eth1_rx_ctl),
.sys_hps_io_hps_io_emac1_inst_TX_CTL (eth1_tx_ctl),
.sys_hps_io_hps_io_emac1_inst_RX_CLK (eth1_rx_clk),
.sys_hps_io_hps_io_emac1_inst_RXD1 (eth1_rx_d[1]),
.sys_hps_io_hps_io_emac1_inst_RXD2 (eth1_rx_d[2]),
.sys_hps_io_hps_io_emac1_inst_RXD3 (eth1_rx_d[3]),
.sys_hps_io_hps_io_qspi_inst_IO0 (qspi_io[0]),
.sys_hps_io_hps_io_qspi_inst_IO1 (qspi_io[1]),
.sys_hps_io_hps_io_qspi_inst_IO2 (qspi_io[2]),
.sys_hps_io_hps_io_qspi_inst_IO3 (qspi_io[3]),
.sys_hps_io_hps_io_qspi_inst_SS0 (qspi_ss0),
.sys_hps_io_hps_io_qspi_inst_CLK (qspi_clk),
.sys_hps_io_hps_io_sdio_inst_CMD (sdio_cmd),
.sys_hps_io_hps_io_sdio_inst_D0 (sdio_d[0]),
.sys_hps_io_hps_io_sdio_inst_D1 (sdio_d[1]),
.sys_hps_io_hps_io_sdio_inst_CLK (sdio_clk),
.sys_hps_io_hps_io_sdio_inst_D2 (sdio_d[2]),
.sys_hps_io_hps_io_sdio_inst_D3 (sdio_d[3]),
.sys_hps_io_hps_io_usb1_inst_D0 (usb1_d[0]),
.sys_hps_io_hps_io_usb1_inst_D1 (usb1_d[1]),
.sys_hps_io_hps_io_usb1_inst_D2 (usb1_d[2]),
.sys_hps_io_hps_io_usb1_inst_D3 (usb1_d[3]),
.sys_hps_io_hps_io_usb1_inst_D4 (usb1_d[4]),
.sys_hps_io_hps_io_usb1_inst_D5 (usb1_d[5]),
.sys_hps_io_hps_io_usb1_inst_D6 (usb1_d[6]),
.sys_hps_io_hps_io_usb1_inst_D7 (usb1_d[7]),
.sys_hps_io_hps_io_usb1_inst_CLK (usb1_clk),
.sys_hps_io_hps_io_usb1_inst_STP (usb1_stp),
.sys_hps_io_hps_io_usb1_inst_DIR (usb1_dir),
.sys_hps_io_hps_io_usb1_inst_NXT (usb1_nxt),
.sys_hps_io_hps_io_spim1_inst_CLK (spim1_clk),
.sys_hps_io_hps_io_spim1_inst_MOSI (spim1_mosi),
.sys_hps_io_hps_io_spim1_inst_MISO (spim1_miso),
.sys_hps_io_hps_io_spim1_inst_SS0 (spim1_ss0),
.sys_hps_io_hps_io_uart0_inst_RX (uart0_rx),
.sys_hps_io_hps_io_uart0_inst_TX (uart0_tx),
.sys_hps_mem_mem_a (ddr3_a),
.sys_hps_mem_mem_ba (ddr3_ba),
.sys_hps_mem_mem_ck (ddr3_ck_p),
.sys_hps_mem_mem_ck_n (ddr3_ck_n),
.sys_hps_mem_mem_cke (ddr3_cke),
.sys_hps_mem_mem_cs_n (ddr3_cs_n),
.sys_hps_mem_mem_ras_n (ddr3_ras_n),
.sys_hps_mem_mem_cas_n (ddr3_cas_n),
.sys_hps_mem_mem_we_n (ddr3_we_n),
.sys_hps_mem_mem_reset_n (ddr3_reset_n),
.sys_hps_mem_mem_dq (ddr3_dq),
.sys_hps_mem_mem_dqs (ddr3_dqs_p),
.sys_hps_mem_mem_dqs_n (ddr3_dqs_n),
.sys_hps_mem_mem_odt (ddr3_odt),
.sys_hps_mem_mem_dm (ddr3_dm),
.sys_hps_mem_oct_rzqin (ddr3_rzq),
.sys_hps_reset_reset_n (sys_resetn),
.sys_reset_reset_n (sys_resetn),
.vga_clk_clk (vga_clk),
.vga_if_vid_clk (vga_clk),
.vga_if_vid_data ({vga_red, vga_grn, vga_blu}),
.vga_if_underflow (),
.vga_if_vid_datavalid (),
.vga_if_vid_v_sync (vga_vsync),
.vga_if_vid_h_sync (vga_hsync),
.vga_if_vid_f (),
.vga_if_vid_h (),
.vga_if_vid_v ());
.sys_gpio_bd_in_port (sys_gpio_bd_i),
.sys_gpio_bd_out_port (sys_gpio_bd_o),
.sys_gpio_in_export (sys_gpio_i),
.sys_gpio_out_export (sys_gpio_o),
.sys_hps_h2f_reset_reset_n (sys_resetn),
.sys_hps_hps_io_hps_io_emac1_inst_TX_CLK (eth1_tx_clk),
.sys_hps_hps_io_hps_io_emac1_inst_TXD0 (eth1_tx_d[0]),
.sys_hps_hps_io_hps_io_emac1_inst_TXD1 (eth1_tx_d[1]),
.sys_hps_hps_io_hps_io_emac1_inst_TXD2 (eth1_tx_d[2]),
.sys_hps_hps_io_hps_io_emac1_inst_TXD3 (eth1_tx_d[3]),
.sys_hps_hps_io_hps_io_emac1_inst_RXD0 (eth1_rx_d[0]),
.sys_hps_hps_io_hps_io_emac1_inst_MDIO (eth1_mdio),
.sys_hps_hps_io_hps_io_emac1_inst_MDC (eth1_mdc),
.sys_hps_hps_io_hps_io_emac1_inst_RX_CTL (eth1_rx_ctl),
.sys_hps_hps_io_hps_io_emac1_inst_TX_CTL (eth1_tx_ctl),
.sys_hps_hps_io_hps_io_emac1_inst_RX_CLK (eth1_rx_clk),
.sys_hps_hps_io_hps_io_emac1_inst_RXD1 (eth1_rx_d[1]),
.sys_hps_hps_io_hps_io_emac1_inst_RXD2 (eth1_rx_d[2]),
.sys_hps_hps_io_hps_io_emac1_inst_RXD3 (eth1_rx_d[3]),
.sys_hps_hps_io_hps_io_qspi_inst_IO0 (qspi_io[0]),
.sys_hps_hps_io_hps_io_qspi_inst_IO1 (qspi_io[1]),
.sys_hps_hps_io_hps_io_qspi_inst_IO2 (qspi_io[2]),
.sys_hps_hps_io_hps_io_qspi_inst_IO3 (qspi_io[3]),
.sys_hps_hps_io_hps_io_qspi_inst_SS0 (qspi_ss0),
.sys_hps_hps_io_hps_io_qspi_inst_CLK (qspi_clk),
.sys_hps_hps_io_hps_io_sdio_inst_CMD (sdio_cmd),
.sys_hps_hps_io_hps_io_sdio_inst_D0 (sdio_d[0]),
.sys_hps_hps_io_hps_io_sdio_inst_D1 (sdio_d[1]),
.sys_hps_hps_io_hps_io_sdio_inst_CLK (sdio_clk),
.sys_hps_hps_io_hps_io_sdio_inst_D2 (sdio_d[2]),
.sys_hps_hps_io_hps_io_sdio_inst_D3 (sdio_d[3]),
.sys_hps_hps_io_hps_io_usb1_inst_D0 (usb1_d[0]),
.sys_hps_hps_io_hps_io_usb1_inst_D1 (usb1_d[1]),
.sys_hps_hps_io_hps_io_usb1_inst_D2 (usb1_d[2]),
.sys_hps_hps_io_hps_io_usb1_inst_D3 (usb1_d[3]),
.sys_hps_hps_io_hps_io_usb1_inst_D4 (usb1_d[4]),
.sys_hps_hps_io_hps_io_usb1_inst_D5 (usb1_d[5]),
.sys_hps_hps_io_hps_io_usb1_inst_D6 (usb1_d[6]),
.sys_hps_hps_io_hps_io_usb1_inst_D7 (usb1_d[7]),
.sys_hps_hps_io_hps_io_usb1_inst_CLK (usb1_clk),
.sys_hps_hps_io_hps_io_usb1_inst_STP (usb1_stp),
.sys_hps_hps_io_hps_io_usb1_inst_DIR (usb1_dir),
.sys_hps_hps_io_hps_io_usb1_inst_NXT (usb1_nxt),
.sys_hps_hps_io_hps_io_spim1_inst_CLK (spim1_clk),
.sys_hps_hps_io_hps_io_spim1_inst_MOSI (spim1_mosi),
.sys_hps_hps_io_hps_io_spim1_inst_MISO (spim1_miso),
.sys_hps_hps_io_hps_io_spim1_inst_SS0 (spim1_ss0),
.sys_hps_hps_io_hps_io_uart0_inst_RX (uart0_rx),
.sys_hps_hps_io_hps_io_uart0_inst_TX (uart0_tx),
.sys_hps_memory_mem_a (ddr3_a),
.sys_hps_memory_mem_ba (ddr3_ba),
.sys_hps_memory_mem_ck (ddr3_ck_p),
.sys_hps_memory_mem_ck_n (ddr3_ck_n),
.sys_hps_memory_mem_cke (ddr3_cke),
.sys_hps_memory_mem_cs_n (ddr3_cs_n),
.sys_hps_memory_mem_ras_n (ddr3_ras_n),
.sys_hps_memory_mem_cas_n (ddr3_cas_n),
.sys_hps_memory_mem_we_n (ddr3_we_n),
.sys_hps_memory_mem_reset_n (ddr3_reset_n),
.sys_hps_memory_mem_dq (ddr3_dq),
.sys_hps_memory_mem_dqs (ddr3_dqs_p),
.sys_hps_memory_mem_dqs_n (ddr3_dqs_n),
.sys_hps_memory_mem_odt (ddr3_odt),
.sys_hps_memory_mem_dm (ddr3_dm),
.sys_hps_memory_oct_rzqin (ddr3_rzq),
.sys_rst_reset_n (sys_resetn),
.sys_spi_MISO (spi_miso),
.sys_spi_MOSI (spi_mosi),
.sys_spi_SCLK (spi_clk),
.sys_spi_SS_n (spi_csn),
.vga_out_clk_clk (vga_clk),
.vga_out_data_vid_clk (vga_clk),
.vga_out_data_vid_data ({vga_red, vga_grn, vga_blu}),
.vga_out_data_underflow (),
.vga_out_data_vid_datavalid (),
.vga_out_data_vid_v_sync (vga_vsync),
.vga_out_data_vid_h_sync (vga_hsync),
.vga_out_data_vid_f (),
.vga_out_data_vid_h (),
.vga_out_data_vid_v ());
endmodule

View File

@ -536,14 +536,6 @@ set_global_assignment -name TIMEQUEST_DO_CCPP_REMOVAL ON
set_global_assignment -name TIMEQUEST_REPORT_SCRIPT $ad_hdl_dir/projects/scripts/adi_tquest.tcl
set_global_assignment -name ON_CHIP_BITSTREAM_DECOMPRESSION OFF
# set libraries
set ad_lib_folders "../common/;../../common/c5soc/;../../../library/**/*"
set_user_option -name USER_IP_SEARCH_PATHS $ad_lib_folders
set_global_assignment -name IP_SEARCH_PATHS $ad_lib_folders
# source defaults
source $ad_hdl_dir/projects/common/altera/sys_gen.tcl

View File

@ -110,7 +110,7 @@ add_connection sys_clk.clk sys_hps.h2f_lw_axi_clock
proc ad_cpu_interrupt {m_irq m_port} {
add_connection sys_hps.f2h_irq0 ${m_port}
set_connection_parameter_value sys_hsp.f2h_irq0/${m_port} irqNumber ${m_irq}
set_connection_parameter_value sys_hps.f2h_irq0/${m_port} irqNumber ${m_irq}
}
proc ad_cpu_interconnect {m_base m_port} {
@ -121,9 +121,10 @@ proc ad_cpu_interconnect {m_base m_port} {
proc ad_dma_interconnect {m_port m_id} {
if {${id} == 1} {
if {${m_id} == 1} {
add_connection ${m_port} sys_hps.f2h_sdram1_data
set_connection_parameter_value ${m_port}/sys_hps.f2h_sdram1_data baseAddress {0x0000}
return
}
add_connection ${m_port} sys_hps.f2h_sdram2_data
@ -164,7 +165,7 @@ add_connection sys_clk.clk_reset vga_pll.reset
# display (vga-frame-reader)
add_instance vga_frame_reader alt_vip_vfr 16.0
add_instance vga_frame_reader alt_vip_vfr 14.0
set_instance_parameter_value vga_frame_reader {BITS_PER_PIXEL_PER_COLOR_PLANE} {8}
set_instance_parameter_value vga_frame_reader {NUMBER_OF_CHANNELS_IN_PARALLEL} {4}
set_instance_parameter_value vga_frame_reader {NUMBER_OF_CHANNELS_IN_SEQUENCE} {1}
@ -247,7 +248,7 @@ set_instance_parameter_value sys_gpio_bd {width} {32}
add_connection sys_clk.clk sys_gpio_bd.clk
add_connection sys_clk.clk_reset sys_gpio_bd.reset
add_interface sys_gpio_bd conduit end
set_interface_property sys_gpio_bd EXPORT_OF sys_gpio.external_connection
set_interface_property sys_gpio_bd EXPORT_OF sys_gpio_bd.external_connection
# gpio-in