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

Commit 37182b3

Browse files
authored
Merge pull request #39 from analogdevicesinc/fix-bootbin-gen
Fix boot.bin generation
2 parents 3c67d6a + fff11e4 commit 37182b3

File tree

24 files changed

+353
-20
lines changed

24 files changed

+353
-20
lines changed

+adi/Version.m

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
classdef Version
2+
%Version
3+
% BSP Version information
4+
properties(Constant)
5+
HDL = 'hdl_2018_r1';
6+
Vivado = '2017.4.1';
7+
MATLAB = 'R2018b';
8+
Release = '18.2';
9+
end
10+
properties(Dependent)
11+
VivadoShort
12+
end
13+
14+
methods
15+
function value = get.VivadoShort(obj)
16+
value = obj.Vivado(1:6);
17+
end
18+
end
19+
end
20+

.gitlab-ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,24 @@ test_installer:2018_R1_Installer:
7878
reports:
7979
junit: test/BSPTestResults.xml
8080

81+
# Test weekly fully sythesized design
82+
test:Synthesize:
83+
when: manual
84+
tags:
85+
- matlab
86+
- vivado
87+
stage: test
88+
dependencies:
89+
- build:2018_R1
90+
script:
91+
- ./CI/scripts/dockermake test_synth
92+
artifacts:
93+
when: always
94+
name: "$CI_COMMIT_REF_NAME"
95+
paths:
96+
- test/
97+
- Report.pdf
98+
8199
# Test streaming interfaces with hardware
82100
test_hardware:Streaming_Hardware:
83101
tags:

CI/projects/adrv9371x/common/config_rxtx.tcl

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,22 @@ connect_bd_net [get_bd_pins util_ad9371_rx_cpack/adc_valid_0] [get_bd_pins util_
2020

2121
}
2222

23+
# Tie clocks to only use RX clocks
24+
if {$ref_design eq "Rx & Tx"} {
25+
delete_bd_objs [get_bd_nets axi_ad9371_tx_clkgen_clk_0]
26+
connect_bd_net [get_bd_pins util_ad9371_xcvr/tx_clk_0] [get_bd_pins axi_ad9371_rx_clkgen/clk_0]
27+
connect_bd_net [get_bd_pins util_ad9371_xcvr/tx_clk_1] [get_bd_pins axi_ad9371_rx_clkgen/clk_0]
28+
connect_bd_net [get_bd_pins util_ad9371_xcvr/tx_clk_2] [get_bd_pins axi_ad9371_rx_clkgen/clk_0]
29+
connect_bd_net [get_bd_pins util_ad9371_xcvr/tx_clk_3] [get_bd_pins axi_ad9371_rx_clkgen/clk_0]
30+
connect_bd_net [get_bd_pins axi_ad9371_tx_jesd/device_clk] [get_bd_pins axi_ad9371_rx_clkgen/clk_0]
31+
connect_bd_net [get_bd_pins util_ad9371_tx_upack/dac_clk] [get_bd_pins axi_ad9371_rx_clkgen/clk_0]
32+
connect_bd_net [get_bd_pins axi_ad9371_tx_jesd_rstgen/slowest_sync_clk] [get_bd_pins axi_ad9371_rx_clkgen/clk_0]
33+
connect_bd_net [get_bd_pins axi_ad9371_dacfifo/dac_clk] [get_bd_pins axi_ad9371_rx_clkgen/clk_0]
34+
connect_bd_net [get_bd_pins axi_ad9371_core/dac_clk] [get_bd_pins axi_ad9371_rx_clkgen/clk_0]
35+
}
36+
2337
# Connect clock
24-
if {$fpga_board eq "ZC706"} {
38+
if {$fpga_board eq "ZC706"} {
2539
if {$ref_design eq "Rx" || $ref_design eq "Rx & Tx"} {
2640
connect_bd_net -net [get_bd_nets axi_ad9371_rx_clkgen] [get_bd_pins axi_cpu_interconnect/M18_ACLK] [get_bd_pins axi_ad9371_rx_clkgen/clk_0]
2741
}
@@ -30,7 +44,7 @@ connect_bd_net -net [get_bd_nets axi_ad9371_tx_clkgen] [get_bd_pins axi_cpu_inte
3044
}
3145
}
3246

33-
if {$fpga_board eq "ZCU102"} {
47+
if {$fpga_board eq "ZCU102"} {
3448
if {$ref_design eq "Rx" || $ref_design eq "Rx & Tx"} {
3549
connect_bd_net -net [get_bd_nets axi_ad9371_rx_clkgen] [get_bd_pins axi_cpu_interconnect/M13_ACLK] [get_bd_pins axi_ad9371_rx_clkgen/clk_0]
3650
}

CI/projects/adrv9371x/zc706/system_project_rxtx.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ adi_project_files adrv9371x_zc706 [list \
1010
"system_top.v" \
1111
"system_constr.xdc"\
1212
"$ad_hdl_dir/library/xilinx/common/ad_iobuf.v" \
13+
"$ad_hdl_dir/projects/common/zc706/zc706_plddr3_constr.xdc" \
1314
"$ad_hdl_dir/projects/common/zc706/zc706_system_constr.xdc" ]
1415

1516
adi_project_run adrv9371x_zc706

CI/projects/common/boot/bl31.elf

95.5 KB
Binary file not shown.

CI/projects/common/boot/zynq.bif

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
the_ROM_image:
2+
{
3+
[bootloader]./fsbl.elf
4+
./system_top.bit
5+
./u-boot.elf
6+
}

CI/projects/common/boot/zynqmp.bif

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
the_ROM_image:
2+
{
3+
[fsbl_config] a53_x64
4+
[bootloader] ./fsbl.elf
5+
[pmufw_image] ./pmufw.elf
6+
[destination_device=pl] ./system_top.bit
7+
[destination_cpu=a53-0,exception_level=el-3,trustzone] ./bl31.elf
8+
[destination_cpu=a53-0,exception_level=el-2] ./u-boot-zcu.elf
9+
}

CI/projects/scripts/fixmake.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
grep "CC_FLAGS :=" pmufw/Makefile | grep -e "-Os" || sed -i '/-mxl-soft-mul/ s/$/ -Os -flto -ffat-lto-objects/' pmufw/Makefile
2+
cd pmufw
3+
make

CI/projects/scripts/fsbl_build.tcl

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2+
if { $argc != 3 } {
3+
set fpga_board "ZC706"
4+
} else {
5+
set fpga_board [lindex $argv 1]
6+
}
7+
puts "==========="
8+
puts $fpga_board
9+
puts "==========="
10+
111
set cdir [pwd]
212
set sdk_loc $cdir/vivado_prj.sdk
313

@@ -6,9 +16,26 @@ hsi open_hw_design $sdk_loc/system_top.hdf
616
set cpu_name [lindex [hsi get_cells -filter {IP_TYPE==PROCESSOR}] 0]
717
sdk set_workspace $sdk_loc
818
sdk create_hw_project -name hw_0 -hwspec $sdk_loc/system_top.hdf
9-
sdk create_app_project -name fsbl -hwproject hw_0 -proc $cpu_name -os standalone -lang C -app {Zynq FSBL}
19+
20+
# Create project
21+
if {$fpga_board eq "ZCU102"} {
22+
sdk create_app_project -name fsbl -hwproject hw_0 -proc $cpu_name -os standalone -lang C -app {Zynq MP FSBL}
23+
} else {
24+
sdk create_app_project -name fsbl -hwproject hw_0 -proc $cpu_name -os standalone -lang C -app {Zynq FSBL}
25+
}
26+
1027
sdk configapp -app fsbl build-config release
1128
sdk build_project -type all
1229

30+
# Collect necessary files
31+
file copy -force $cdir/projects/common/boot/zynq.bif $cdir/boot/zynq.bif
32+
file copy -force $sdk_loc/fsbl/Release/fsbl.elf $cdir/boot/fsbl.elf
33+
file copy -force $sdk_loc/hw_0/system_top.bit $cdir/boot/system_top.bit
34+
cd $cdir/boot
35+
1336
# Create the BOOT.bin
37+
if {$fpga_board eq "ZCU102"} {
38+
exec bootgen -image $cdir/boot/zynqmp.bif -w -o i $cdir/boot/BOOT.BIN
39+
} else {
1440
exec bootgen -image $cdir/boot/zynq.bif -w -o i $cdir/boot/BOOT.BIN
41+
}

0 commit comments

Comments
 (0)