Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit 0aacd07

Browse files
authored
Add HDL targeting support for Pluto with fixes for AD9363 targeted devices. (#55)
Signed-off-by: Travis Collins <travis.collins@analog.com>
1 parent eceaf3c commit 0aacd07

21 files changed

+1118
-4
lines changed

CI/projects/pluto/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
####################################################################################
2+
## Copyright 2018(c) Analog Devices, Inc.
3+
## Auto-generated, do not modify!
4+
####################################################################################
5+
6+
PROJECT_NAME := pluto
7+
8+
M_DEPS += ../../library/xilinx/common/ad_iobuf.v
9+
M_DEPS += ../../library/axi_ad9361/axi_ad9361_delay.tcl
10+
11+
LIB_DEPS += axi_ad9361
12+
LIB_DEPS += axi_dmac
13+
LIB_DEPS += util_fir_dec
14+
LIB_DEPS += util_fir_int
15+
16+
include ../scripts/project-xilinx.mk

CI/projects/pluto/config_prj.tcl

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
global ref_design
2+
global fpga_board
3+
global dma
4+
5+
# Add System Reset IP
6+
startgroup
7+
create_bd_cell -type ip -vlnv xilinx.com:ip:proc_sys_reset:5.0 proc_sys_reset_0
8+
endgroup
9+
connect_bd_net [get_bd_pins proc_sys_reset_0/ext_reset_in] [get_bd_pins sys_rstgen/peripheral_aresetn]
10+
connect_bd_net [get_bd_pins proc_sys_reset_0/slowest_sync_clk] [get_bd_pins axi_ad9361/l_clk]
11+
12+
# Add 1 extra AXI master ports to the interconnect
13+
set_property -dict [list CONFIG.NUM_MI {5}] [get_bd_cells axi_cpu_interconnect]
14+
connect_bd_net [get_bd_pins axi_cpu_interconnect/M04_ACLK] [get_bd_pins axi_ad9361/l_clk]
15+
connect_bd_net [get_bd_pins axi_cpu_interconnect/M04_ARESETN] [get_bd_pins proc_sys_reset_0/peripheral_aresetn]
16+
17+
# Remove filters
18+
delete_bd_objs [get_bd_cells fir_decimator]
19+
delete_bd_objs [get_bd_cells fir_interpolator]
20+
21+
# Configure DMA
22+
if {$dma eq "Packetized"} {
23+
set_property -dict [list CONFIG.DMA_DATA_WIDTH_SRC {32} CONFIG.DMA_DATA_WIDTH_DEST {256} CONFIG.SYNC_TRANSFER_START {false} CONFIG.DMA_AXI_PROTOCOL_DEST {0} CONFIG.DMA_TYPE_SRC {1} CONFIG.MAX_BYTES_PER_BURST {32768}] [get_bd_cells axi_ad9361_adc_dma]
24+
connect_bd_net [get_bd_pins axi_ad9361_adc_dma/s_axis_aclk] [get_bd_pins axi_ad9361/l_clk]
25+
}
26+
27+
# Insert pack cores
28+
startgroup
29+
create_bd_cell -type ip -vlnv analog.com:user:util_cpack:1.0 util_cpack_0
30+
endgroup
31+
set_property -dict [list CONFIG.CHANNEL_DATA_WIDTH {16} CONFIG.NUM_OF_CHANNELS {2}] [get_bd_cells util_cpack_0]
32+
33+
# Clocks and resets
34+
connect_bd_net [get_bd_pins util_cpack_0/adc_clk] [get_bd_pins axi_ad9361/l_clk]
35+
connect_bd_net [get_bd_pins util_cpack_0/adc_rst] [get_bd_pins proc_sys_reset_0/peripheral_reset]
36+
37+
# Connect enables
38+
connect_bd_net [get_bd_pins axi_ad9361/adc_enable_i0] [get_bd_pins util_cpack_0/adc_enable_0]
39+
connect_bd_net [get_bd_pins axi_ad9361/adc_enable_q0] [get_bd_pins util_cpack_0/adc_enable_1]
40+
# Connect valids together
41+
connect_bd_net [get_bd_pins util_cpack_0/adc_valid_1] [get_bd_pins util_cpack_0/adc_valid_0]
42+
43+
44+
############ DMA MODE
45+
if {$dma eq "Packetized"} {
46+
# Packetized DMA
47+
connect_bd_net [get_bd_pins util_cpack_0/adc_data] [get_bd_pins axi_ad9361_adc_dma/s_axis_data]
48+
connect_bd_net [get_bd_pins util_cpack_0/adc_valid] [get_bd_pins axi_ad9361_adc_dma/s_axis_valid]
49+
} else {
50+
# FIFO DMA
51+
connect_bd_net [get_bd_pins util_cpack_0/adc_data] [get_bd_pins axi_ad9361_adc_dma/fifo_wr_din]
52+
connect_bd_net [get_bd_pins util_cpack_0/adc_valid] [get_bd_pins axi_ad9361_adc_dma/fifo_wr_en]
53+
}
54+
55+
###### UnPack
56+
startgroup
57+
create_bd_cell -type ip -vlnv analog.com:user:util_upack:1.0 util_upack_0
58+
endgroup
59+
set_property -dict [list CONFIG.CHANNEL_DATA_WIDTH {16} CONFIG.NUM_OF_CHANNELS {2}] [get_bd_cells util_upack_0]
60+
# Connect data
61+
connect_bd_net [get_bd_pins util_upack_0/dac_data_0] [get_bd_pins axi_ad9361/dac_data_i0]
62+
connect_bd_net [get_bd_pins util_upack_0/dac_data_1] [get_bd_pins axi_ad9361/dac_data_q0]
63+
connect_bd_net [get_bd_pins axi_ad9361_dac_dma/fifo_rd_dout] [get_bd_pins util_upack_0/dac_data]
64+
# Connect Clock
65+
connect_bd_net [get_bd_pins util_upack_0/dac_clk] [get_bd_pins axi_ad9361/l_clk]
66+
# Valid from pack to DMA
67+
connect_bd_net [get_bd_pins util_upack_0/dac_valid] [get_bd_pins axi_ad9361_dac_dma/fifo_rd_en]
68+
69+
#
70+
#connect_bd_net [get_bd_pins axi_ad9361_dac_dma/fifo_rd_valid] [get_bd_pins util_upack_0/dac_valid_0]
71+
#connect_bd_net [get_bd_pins util_upack_0/dac_valid_1] [get_bd_pins axi_ad9361_dac_dma/fifo_rd_valid]
72+
73+
# Input valids
74+
connect_bd_net [get_bd_pins axi_ad9361_dac_dma/fifo_rd_valid] [get_bd_pins util_upack_0/dac_enable_0]
75+
connect_bd_net [get_bd_pins util_upack_0/dac_valid_0] [get_bd_pins axi_ad9361_dac_dma/fifo_rd_valid]
76+
connect_bd_net [get_bd_pins util_upack_0/dac_valid_1] [get_bd_pins axi_ad9361_dac_dma/fifo_rd_valid]
77+
connect_bd_net [get_bd_pins util_upack_0/dac_enable_1] [get_bd_pins axi_ad9361_dac_dma/fifo_rd_valid]
78+
79+

CI/projects/pluto/config_rxtx.tcl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set ad_hdl_dir [pwd]
2+
set proj_dir $ad_hdl_dir/projects/pluto
3+
4+
source $proj_dir/config_prj.tcl
5+
source $ad_hdl_dir/projects/pluto/config_rxtx_board.tcl
6+
7+
regenerate_bd_layout
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
global ref_design
2+
global fpga_board
3+
4+
# Configure DMA
5+
#set_property -dict [list CONFIG.DMA_DATA_WIDTH_SRC {32} CONFIG.DMA_DATA_WIDTH_DEST {256} CONFIG.SYNC_TRANSFER_START {false} CONFIG.DMA_AXI_PROTOCOL_DEST {0} CONFIG.DMA_TYPE_SRC {1} CONFIG.MAX_BYTES_PER_BURST {32768}] [get_bd_cells axi_ad9361_adc_dma]
6+
#connect_bd_net [get_bd_pins axi_ad9361_adc_dma/s_axis_aclk] [get_bd_pins axi_ad9361/l_clk]
7+
#connect_bd_net [get_bd_pins fir_decimator/m_axis_data_tdata] [get_bd_pins axi_ad9361_adc_dma/s_axis_data]
8+
#connect_bd_net [get_bd_pins fir_decimator/m_axis_data_tvalid] [get_bd_pins axi_ad9361_adc_dma/s_axis_valid]
9+
10+
if {$ref_design eq "Rx" || $ref_design eq "Rx & Tx"} {
11+
# Disconnect the ADC PACK pins
12+
delete_bd_objs [get_bd_nets axi_ad9361_adc_data_i0]
13+
delete_bd_objs [get_bd_nets axi_ad9361_adc_data_q0]
14+
# Disconnect valid
15+
delete_bd_objs [get_bd_nets axi_ad9361_adc_valid_i0]
16+
}
17+
18+
if {$ref_design eq "Tx" || $ref_design eq "Rx & Tx"} {
19+
# Disconnect the DAC UNPACK pins
20+
delete_bd_objs [get_bd_nets fir_interpolator_channel_0]
21+
delete_bd_objs [get_bd_nets fir_interpolator_channel_1]
22+
# Disconnect valid
23+
#delete_bd_objs [get_bd_nets axi_ad9361_dac_dma_fifo_rd_valid]
24+
}

CI/projects/pluto/pluto_fpga.tcl

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Build the project
2+
update_compile_order -fileset sources_1
3+
reset_run impl_1
4+
reset_run synth_1
5+
launch_runs synth_1
6+
wait_on_run synth_1
7+
launch_runs impl_1 -to_step write_bitstream
8+
wait_on_run impl_1
9+
10+
# Define local variables
11+
set cdir [pwd]
12+
set sdk_loc vivado_prj.sdk
13+
14+
# Export the hdf
15+
file delete -force $sdk_loc
16+
file mkdir $sdk_loc
17+
file copy -force vivado_prj.runs/impl_1/system_top.sysdef $sdk_loc/system_top.hdf
18+
19+
# Close the Vivado project
20+
close_project
21+
22+
puts "------------------------------------"
23+
puts "Embedded system build completed."
24+
puts "You may close this shell."
25+
puts "------------------------------------"
26+
exit

0 commit comments

Comments
 (0)