When vbin is built with a network config that enables only eth_0, both qsfp_0_n_1 and qsfp_2_n_3 blocks are instantiated, even though only qsfp_0_n_1 should be created. This results in a Vivado build error.
[network]
eth_0=1
eth_1=0
Expected Behavior:
Only qsfp_0_n_1 is instantiated. qsfp_2_n_3 should not be created, since only eth_0 is enabled.
Actual Behavior:
Both qsfp_0_n_1 and qsfp_2_n_3 blocks are created. Build fails with:
ERROR: [BD 41-758] The following clock pins are not connected to a valid clock source:
/qsfp_2_n_3/ap_clk
Root Cause:
In service_layer.tcl:
|
proc add_dcmac_inst {} { |
|
|
|
set DCMAC0_ENABLED 1 |
|
set DCMAC1_ENABLED 1 |
|
|
|
## Each DCMAC can support 2 QSFP56 interfaces |
|
## select how many QSFP56 you want for each DCMAC, provided they are enabled |
|
|
|
## Setup number of QSFP56 interfaces for DCMAC0 |
|
set DUAL_QSFP_DCMAC0 0 |
|
|
|
## Setup number of QSFP56 interfaces for DCMAC1 |
|
set DUAL_QSFP_DCMAC1 0 |
|
|
|
# Create network hierarchy |
|
if { ${DCMAC0_ENABLED} == "1" } { |
|
create_qsfp_hierarchy 0 ${DUAL_QSFP_DCMAC0} |
|
} |
|
if { ${DCMAC1_ENABLED} == "1" } { |
|
create_qsfp_hierarchy 1 ${DUAL_QSFP_DCMAC1} |
|
} |
|
} |
|
# ===== Service Layer (generated) ===== |
|
# create_service_layer "" |
|
|
|
# Absolute paths (normalized) |
|
set ::slash_dcmac_tcl [file normalize "{{ dcmac_tcl }}"] |
|
set ::slash_dcmac_hdl [file normalize "{{ dcmac_hdl_dir }}"] |
|
|
|
# Source the DCMAC Tcl helpers |
|
source $::slash_dcmac_tcl |
|
|
|
{% for vf in dcmac_hdl_files %} |
|
import_files -fileset sources_1 -norecurse [file normalize "{{ vf }}"] |
|
{% endfor %} |
|
|
|
# --- Drive DCMAC creation based on config --- |
|
{% if needs_dcmac %} |
|
set DCMAC0_ENABLED {{ dc_enable_0 }} |
|
set DCMAC1_ENABLED {{ dc_enable_1 }} |
|
set DUAL_QSFP_DCMAC0 {{ dual_qsfp_0 }} |
|
set DUAL_QSFP_DCMAC1 {{ dual_qsfp_1 }} |
|
|
|
# Calls proc add_dcmac_inst which expects the above variables |
|
add_dcmac_inst |
|
{% else %} |
|
set DCMAC0_ENABLED 0 |
|
set DCMAC1_ENABLED 0 |
|
set DUAL_QSFP_DCMAC0 0 |
|
set DUAL_QSFP_DCMAC1 0 |
|
# Ethernet disabled; no DCMAC hierarchy created. |
|
{% endif %} |
DCMAC0_ENABLED and DCMAC1_ENABLED are correctly set based on config at lines 1155–1156.
- However, these values are not propagated when used at line 1161.
- Instead, they are unconditionally overridden at lines 1119–1120. As a result, whenever any network interface is enabled, both QSFP blocks are instantiated.
Impact:
Any build enabling only a single DCMAC/ethernet interface will fail.
When
vbinis built with a network config that enables onlyeth_0, bothqsfp_0_n_1andqsfp_2_n_3blocks are instantiated, even though onlyqsfp_0_n_1should be created. This results in a Vivado build error.Expected Behavior:
Only
qsfp_0_n_1is instantiated.qsfp_2_n_3should not be created, since onlyeth_0is enabled.Actual Behavior:
Both
qsfp_0_n_1andqsfp_2_n_3blocks are created. Build fails with:Root Cause:
In
service_layer.tcl:SLASH/linker/slashkit/resources/templates/service_layer.tcl
Lines 1117 to 1168 in 4c79427
DCMAC0_ENABLEDandDCMAC1_ENABLEDare correctly set based on config at lines 1155–1156.Impact:
Any build enabling only a single DCMAC/ethernet interface will fail.