Skip to content

Commit 501cad4

Browse files
committed
Fix quirky axi bus connection to cpu
Signed-off-by: Holotronic <producer@holotronic.dk>
1 parent 15eeaf9 commit 501cad4

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

HW/VivadoProjects/avnet/ultra96/scripts/soc_system.tcl

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,20 @@ if { [string first $scripts_vivado_version $current_vivado_version] == -1 } {
3434
# START
3535
################################################################
3636

37-
# CHECKING IF PROJECT EXISTS
38-
if { [get_projects -quiet] eq "" } {
39-
puts "ERROR: Please open or create a project!"
40-
return 1
37+
# To test this script, run the following commands from Vivado Tcl console:
38+
# source soc_system_script.tcl
39+
40+
# If there is no project opened, this script will create a
41+
# project, but make sure you do not have an existing project
42+
# <./myproj/project_1.xpr> in the current working folder.
43+
44+
set list_projs [get_projects -quiet]
45+
if { $list_projs eq "" } {
46+
create_project project_1 myproj -part xczu3eg-sbva484-1-e
47+
set_property BOARD_PART em.avnet.com:ultra96v1:part0:1.2 [current_project]
4148
}
4249

50+
4351
# CHANGE DESIGN NAME HERE
4452
variable design_name
4553
set design_name soc_system
@@ -81,7 +89,7 @@ if { ${design_name} eq "" } {
8189
set errMsg "Design <$design_name> already exists in your project, please set the variable <design_name> to another value."
8290
set nRet 1
8391
} elseif { [get_files -quiet ${design_name}.bd] ne "" } {
84-
# USE CASES:
92+
# USE CASES:
8593
# 6) Current opened design, has components, but diff names, design_name exists in project.
8694
# 7) No opened design, design_name exists in project.
8795

@@ -115,7 +123,7 @@ set bCheckIPsPassed 1
115123
##################################################################
116124
set bCheckIPs 1
117125
if { $bCheckIPs == 1 } {
118-
set list_check_ips "\
126+
set list_check_ips "\
119127
machinekit.io:user:HostMot2_ip_wrap:1.0\
120128
xilinx.com:ip:clk_wiz:6.0\
121129
machinekit.io:user:hm2_axilite_int:1.0\
@@ -229,7 +237,7 @@ proc create_root_design { parentCell } {
229237
set ps8_0_axi_periph [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_interconnect:2.1 ps8_0_axi_periph ]
230238
set_property -dict [ list \
231239
CONFIG.NUM_MI {1} \
232-
CONFIG.NUM_SI {2} \
240+
CONFIG.NUM_SI {1} \
233241
] $ps8_0_axi_periph
234242

235243
# Create instance: rst_ps8_0_100M, and set properties
@@ -601,7 +609,7 @@ proc create_root_design { parentCell } {
601609
CONFIG.PSU__CRL_APB__PL0_REF_CTRL__DIVISOR0 {15} \
602610
CONFIG.PSU__CRL_APB__PL0_REF_CTRL__DIVISOR1 {1} \
603611
CONFIG.PSU__CRL_APB__PL0_REF_CTRL__SRCSEL {IOPLL} \
604-
CONFIG.PSU__CRL_APB__PL1_REF_CTRL__ACT_FREQMHZ {100.000000} \
612+
CONFIG.PSU__CRL_APB__PL1_REF_CTRL__ACT_FREQMHZ {100} \
605613
CONFIG.PSU__CRL_APB__PL1_REF_CTRL__DIVISOR0 {15} \
606614
CONFIG.PSU__CRL_APB__PL1_REF_CTRL__DIVISOR1 {1} \
607615
CONFIG.PSU__CRL_APB__PL1_REF_CTRL__FREQMHZ {100} \
@@ -826,7 +834,7 @@ proc create_root_design { parentCell } {
826834
CONFIG.PSU__IOU_SLCR__WDT_CLK_SEL__SELECT {APB} \
827835
CONFIG.PSU__LPD_SLCR__CSUPMU__ACT_FREQMHZ {100.000000} \
828836
CONFIG.PSU__LPD_SLCR__CSUPMU__FREQMHZ {100.000000} \
829-
CONFIG.PSU__MAXIGP0__DATA_WIDTH {128} \
837+
CONFIG.PSU__MAXIGP0__DATA_WIDTH {32} \
830838
CONFIG.PSU__MAXIGP1__DATA_WIDTH {32} \
831839
CONFIG.PSU__MAXIGP2__DATA_WIDTH {32} \
832840
CONFIG.PSU__OVERRIDE__BASIC_CLOCK {1} \
@@ -952,15 +960,14 @@ proc create_root_design { parentCell } {
952960
CONFIG.PSU__USB__RESET__POLARITY {Active Low} \
953961
CONFIG.PSU__USE__IRQ0 {1} \
954962
CONFIG.PSU__USE__M_AXI_GP0 {1} \
955-
CONFIG.PSU__USE__M_AXI_GP1 {1} \
963+
CONFIG.PSU__USE__M_AXI_GP1 {0} \
956964
CONFIG.PSU__USE__M_AXI_GP2 {0} \
957965
CONFIG.SUBPRESET1 {Custom} \
958966
] $zynq_ultra_ps_e_0
959967

960968
# Create interface connections
969+
connect_bd_intf_net -intf_net S00_AXI_1 [get_bd_intf_pins ps8_0_axi_periph/S00_AXI] [get_bd_intf_pins zynq_ultra_ps_e_0/M_AXI_HPM0_FPD]
961970
connect_bd_intf_net -intf_net ps8_0_axi_periph_M00_AXI [get_bd_intf_pins hm2_axilite_int_0/S_AXI] [get_bd_intf_pins ps8_0_axi_periph/M00_AXI]
962-
connect_bd_intf_net -intf_net zynq_ultra_ps_e_0_M_AXI_HPM0_FPD [get_bd_intf_pins ps8_0_axi_periph/S01_AXI] [get_bd_intf_pins zynq_ultra_ps_e_0/M_AXI_HPM0_FPD]
963-
connect_bd_intf_net -intf_net zynq_ultra_ps_e_0_M_AXI_HPM1_FPD [get_bd_intf_pins ps8_0_axi_periph/S00_AXI] [get_bd_intf_pins zynq_ultra_ps_e_0/M_AXI_HPM1_FPD]
964971

965972
# Create port connections
966973
connect_bd_net -net HostMot2_ip_wrap_0_interrupt [get_bd_pins HostMot2_ip_wrap_0/interrupt] [get_bd_pins xlconcat_0/In0]
@@ -978,11 +985,11 @@ proc create_root_design { parentCell } {
978985
connect_bd_net -net hm2_axilite_int_0_READSTB [get_bd_pins HostMot2_ip_wrap_0/readstb] [get_bd_pins hm2_axilite_int_0/READSTB]
979986
connect_bd_net -net hm2_axilite_int_0_WRITESTB [get_bd_pins HostMot2_ip_wrap_0/writestb] [get_bd_pins hm2_axilite_int_0/WRITESTB]
980987
connect_bd_net -net hm2_io_ts_0_i_bits [get_bd_pins HostMot2_ip_wrap_0/inbits] [get_bd_pins hm2_io_ts_0/i_bits]
981-
connect_bd_net -net rst_ps8_0_100M_peripheral_aresetn [get_bd_pins hm2_axilite_int_0/S_AXI_aresetn] [get_bd_pins ps8_0_axi_periph/ARESETN] [get_bd_pins ps8_0_axi_periph/M00_ARESETN] [get_bd_pins ps8_0_axi_periph/S00_ARESETN] [get_bd_pins ps8_0_axi_periph/S01_ARESETN] [get_bd_pins rst_ps8_0_100M/peripheral_aresetn]
988+
connect_bd_net -net rst_ps8_0_100M_peripheral_aresetn [get_bd_pins hm2_axilite_int_0/S_AXI_aresetn] [get_bd_pins ps8_0_axi_periph/ARESETN] [get_bd_pins ps8_0_axi_periph/M00_ARESETN] [get_bd_pins ps8_0_axi_periph/S00_ARESETN] [get_bd_pins rst_ps8_0_100M/peripheral_aresetn]
982989
connect_bd_net -net xlconcat_0_dout [get_bd_pins xlconcat_0/dout] [get_bd_pins zynq_ultra_ps_e_0/pl_ps_irq0]
983990
connect_bd_net -net xlconstant_0_dout [get_bd_ports FAN_PWM] [get_bd_pins xlconstant_0/dout]
984991
connect_bd_net -net zynq_ultra_ps_e_0_emio_uart0_rtsn [get_bd_ports bt_rtsn] [get_bd_pins zynq_ultra_ps_e_0/emio_uart0_rtsn]
985-
connect_bd_net -net zynq_ultra_ps_e_0_pl_clk0 [get_bd_pins HostMot2_ip_wrap_0/clklow] [get_bd_pins HostMot2_ip_wrap_0/clkmed] [get_bd_pins clk_wiz_0/clk_in1] [get_bd_pins hm2_axilite_int_0/S_AXI_aclk] [get_bd_pins ps8_0_axi_periph/ACLK] [get_bd_pins ps8_0_axi_periph/M00_ACLK] [get_bd_pins ps8_0_axi_periph/S00_ACLK] [get_bd_pins ps8_0_axi_periph/S01_ACLK] [get_bd_pins rst_ps8_0_100M/slowest_sync_clk] [get_bd_pins zynq_ultra_ps_e_0/maxihpm0_fpd_aclk] [get_bd_pins zynq_ultra_ps_e_0/maxihpm1_fpd_aclk] [get_bd_pins zynq_ultra_ps_e_0/pl_clk0]
992+
connect_bd_net -net zynq_ultra_ps_e_0_pl_clk0 [get_bd_pins HostMot2_ip_wrap_0/clklow] [get_bd_pins HostMot2_ip_wrap_0/clkmed] [get_bd_pins clk_wiz_0/clk_in1] [get_bd_pins hm2_axilite_int_0/S_AXI_aclk] [get_bd_pins ps8_0_axi_periph/ACLK] [get_bd_pins ps8_0_axi_periph/M00_ACLK] [get_bd_pins ps8_0_axi_periph/S00_ACLK] [get_bd_pins rst_ps8_0_100M/slowest_sync_clk] [get_bd_pins zynq_ultra_ps_e_0/maxihpm0_fpd_aclk] [get_bd_pins zynq_ultra_ps_e_0/pl_clk0]
986993
connect_bd_net -net zynq_ultra_ps_e_0_pl_resetn0 [get_bd_pins rst_ps8_0_100M/ext_reset_in] [get_bd_pins zynq_ultra_ps_e_0/pl_resetn0]
987994

988995
# Create address segments

0 commit comments

Comments
 (0)