Skip to content

Commit 0b19cd6

Browse files
committed
projects: ad9084_ebz: common: ad9084_ebz_bd: Simplify connections for VCK190 Side B only
Signed-off-by: Bogdan Luncan <[email protected]>
1 parent a6dc054 commit 0b19cd6

File tree

1 file changed

+35
-33
lines changed

1 file changed

+35
-33
lines changed

projects/ad9084_ebz/common/ad9084_ebz_bd.tcl

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ if {$ADI_PHY_SEL} {
403403
NUM_PORTS 2 \
404404
]
405405
ad_ip_instance ilreduced_logic gt_powergood_and [list \
406-
C_SIZE $num_quads \
406+
C_SIZE 2 \
407407
]
408408
ad_connect jesd204_phy/gtpowergood gt_powergood_concat/In0
409409
if {!$ASYMMETRIC_A_B_MODE} {
@@ -750,57 +750,53 @@ if {$ADI_PHY_SEL} {
750750
}
751751

752752
# Export serial interfaces
753+
for {set j 0} {$j < $MAX_NUMBER_OF_QUADS} {incr j} {
754+
create_bd_port -dir I -from 3 -to 0 rx_${j}_p
755+
create_bd_port -dir I -from 3 -to 0 rx_${j}_n
756+
create_bd_port -dir O -from 3 -to 0 tx_${j}_p
757+
create_bd_port -dir O -from 3 -to 0 tx_${j}_n
758+
}
759+
753760
if {!$SIDE_B_ONLY} {
754-
for {set j 0} {$j < $num_quads} {incr j} {
755-
if {$j < $num_quads_a} {
756-
create_bd_port -dir I -from 3 -to 0 rx_${j}_p
757-
create_bd_port -dir I -from 3 -to 0 rx_${j}_n
758-
create_bd_port -dir O -from 3 -to 0 tx_${j}_p
759-
create_bd_port -dir O -from 3 -to 0 tx_${j}_n
761+
if {!$ASYMMETRIC_A_B_MODE} {
762+
set half_lanes [expr max($RX_NUM_OF_LANES, $TX_NUM_OF_LANES) / 2]
763+
set half_quads [expr int(ceil($half_lanes / 4.0))]
764+
for {set j 0} {$j < $half_quads} {incr j} {
765+
set jj [expr $j + 1]
766+
ad_connect rx_${j}_p jesd204_phy/rx_${j}_p
767+
ad_connect rx_${j}_n jesd204_phy/rx_${j}_n
768+
ad_connect tx_${j}_p jesd204_phy/tx_${j}_p
769+
ad_connect tx_${j}_n jesd204_phy/tx_${j}_n
770+
771+
ad_connect rx_${jj}_p jesd204_phy/rx_${jj}_p
772+
ad_connect rx_${jj}_n jesd204_phy/rx_${jj}_n
773+
ad_connect tx_${jj}_p jesd204_phy/tx_${jj}_p
774+
ad_connect tx_${jj}_n jesd204_phy/tx_${jj}_n
775+
}
776+
} else {
777+
for {set j 0} {$j < $num_quads_a} {incr j} {
760778
ad_connect rx_${j}_p jesd204_phy/rx_${j}_p
761779
ad_connect rx_${j}_n jesd204_phy/rx_${j}_n
762780
ad_connect tx_${j}_p jesd204_phy/tx_${j}_p
763781
ad_connect tx_${j}_n jesd204_phy/tx_${j}_n
764-
} else {
782+
}
783+
for {set j $num_quads_a} {$j < $num_quads} {incr j} {
765784
set jj [expr $j - $num_quads_a]
766-
create_bd_port -dir I -from 3 -to 0 rx_${j}_p
767-
create_bd_port -dir I -from 3 -to 0 rx_${j}_n
768-
create_bd_port -dir O -from 3 -to 0 tx_${j}_p
769-
create_bd_port -dir O -from 3 -to 0 tx_${j}_n
770785
ad_connect rx_${j}_p jesd204_phy_b/rx_${jj}_p
771786
ad_connect rx_${j}_n jesd204_phy_b/rx_${jj}_n
772787
ad_connect tx_${j}_p jesd204_phy_b/tx_${jj}_p
773788
ad_connect tx_${j}_n jesd204_phy_b/tx_${jj}_n
774789
}
775790
}
776-
777-
if {$num_quads < $MAX_NUMBER_OF_QUADS} {
778-
# Create dummy ports for non-existing lanes
779-
for {set j $num_quads} {$j < $MAX_NUMBER_OF_QUADS} {incr j} {
780-
create_bd_port -dir I -from 3 -to 0 rx_${j}_p
781-
create_bd_port -dir I -from 3 -to 0 rx_${j}_n
782-
create_bd_port -dir O -from 3 -to 0 tx_${j}_p
783-
create_bd_port -dir O -from 3 -to 0 tx_${j}_n
784-
}
785-
}
786791
} else {
787792
# Map the serial lanes to side B only
788793
for {set j 0} {$j < $num_quads} {incr j} {
789794
set idx [expr $j + 1]
790-
create_bd_port -dir I -from 3 -to 0 rx_${idx}_p
791-
create_bd_port -dir I -from 3 -to 0 rx_${idx}_n
792-
create_bd_port -dir O -from 3 -to 0 tx_${idx}_p
793-
create_bd_port -dir O -from 3 -to 0 tx_${idx}_n
794795
ad_connect rx_${idx}_p jesd204_phy/rx_${j}_p
795796
ad_connect rx_${idx}_n jesd204_phy/rx_${j}_n
796797
ad_connect tx_${idx}_p jesd204_phy/tx_${j}_p
797798
ad_connect tx_${idx}_n jesd204_phy/tx_${j}_n
798799
}
799-
# Crete dummy ports for non-existing lanes
800-
create_bd_port -dir I -from 3 -to 0 rx_0_p
801-
create_bd_port -dir I -from 3 -to 0 rx_0_n
802-
create_bd_port -dir O -from 3 -to 0 tx_0_p
803-
create_bd_port -dir O -from 3 -to 0 tx_0_n
804800
}
805801
}
806802

@@ -1044,7 +1040,10 @@ if {$ADI_PHY_SEL} {
10441040
ad_cpu_interconnect 0x44a60000 axi_apollo_rx_xcvr
10451041
ad_cpu_interconnect 0x44b60000 axi_apollo_tx_xcvr
10461042
} else {
1047-
# ad_cpu_interconnect 0x44a40000 jesd204_phy
1043+
for {set i 0} {$i < $num_quads} {incr i} {
1044+
set addr [expr 0x44040000 + $i * 0x40000]
1045+
ad_cpu_interconnect $addr jesd204_phy s_axi_${i}
1046+
}
10481047
}
10491048
ad_cpu_interconnect 0x44a10000 rx_apollo_tpl_core
10501049
ad_cpu_interconnect 0x44b10000 tx_apollo_tpl_core
@@ -1065,7 +1064,10 @@ if {$ASYMMETRIC_A_B_MODE} {
10651064
ad_cpu_interconnect 0x44aa0000 axi_apollo_rx_b_xcvr
10661065
ad_cpu_interconnect 0x44ba0000 axi_apollo_tx_b_xcvr
10671066
} else {
1068-
# ad_cpu_interconnect 0x45a40000 jesd204_phy_b
1067+
for {set i 0} {$i < $num_quads} {incr i} {
1068+
set addr [expr 0x44140000 + $i * 0x40000]
1069+
ad_cpu_interconnect $addr jesd204_phy_b s_axi_${i}
1070+
}
10691071
}
10701072
ad_cpu_interconnect 0x44ab0000 rx_b_apollo_tpl_core
10711073
ad_cpu_interconnect 0x44bb0000 tx_b_apollo_tpl_core

0 commit comments

Comments
 (0)