# Creating SmartDesign "HoloLink_SD"
set sd_name {HoloLink_SD}
create_smartdesign -sd_name ${sd_name}

# Disable auto promotion of pins of type 'pad'
auto_promote_pad_pins -promote_all 0

# Create top level Scalar Ports
sd_create_scalar_port -sd_name ${sd_name} -port_name {APB_INITIATOR_i_apb_pready} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {APB_INITIATOR_i_apb_pserr} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {DI} -port_direction {IN} -port_is_pad {1}
sd_create_scalar_port -sd_name ${sd_name} -port_name {FLASH} -port_direction {IN} -port_is_pad {1}
sd_create_scalar_port -sd_name ${sd_name} -port_name {HIF_INITIATOR_0_i_hif_axis_tready_0} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {HIF_INITIATOR_1_i_hif_axis_tready_1} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {HIF_TARGET_0_i_hif_axis_tlast_0} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {HIF_TARGET_0_i_hif_axis_tvalid_0} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {HIF_TARGET_1_i_hif_axis_tlast_1} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {HIF_TARGET_1_i_hif_axis_tvalid_1} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {IFACE} -port_direction {IN} -port_is_pad {1}
sd_create_scalar_port -sd_name ${sd_name} -port_name {SIF_TARGET_0_i_sif_axis_tlast_0} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {SIF_TARGET_0_i_sif_axis_tvalid_0} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {SIF_TARGET_1_i_sif_axis_tlast_1} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {SIF_TARGET_1_i_sif_axis_tvalid_1} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {i_apb_clk} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {i_hif_clk} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {i_ptp_clk} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {i_sif_clk} -port_direction {IN}
sd_create_scalar_port -sd_name ${sd_name} -port_name {i_sys_rst} -port_direction {IN}

sd_create_scalar_port -sd_name ${sd_name} -port_name {APB_INITIATOR_o_apb_penable} -port_direction {OUT}
sd_create_scalar_port -sd_name ${sd_name} -port_name {APB_INITIATOR_o_apb_psel} -port_direction {OUT}
sd_create_scalar_port -sd_name ${sd_name} -port_name {APB_INITIATOR_o_apb_pwrite} -port_direction {OUT}
sd_create_scalar_port -sd_name ${sd_name} -port_name {DO} -port_direction {OUT} -port_is_pad {1}
sd_create_scalar_port -sd_name ${sd_name} -port_name {HIF_INITIATOR_0_o_hif_axis_tlast_0} -port_direction {OUT}
sd_create_scalar_port -sd_name ${sd_name} -port_name {HIF_INITIATOR_0_o_hif_axis_tvalid_0} -port_direction {OUT}
sd_create_scalar_port -sd_name ${sd_name} -port_name {HIF_INITIATOR_1_o_hif_axis_tlast_1} -port_direction {OUT}
sd_create_scalar_port -sd_name ${sd_name} -port_name {HIF_INITIATOR_1_o_hif_axis_tvalid_1} -port_direction {OUT}
sd_create_scalar_port -sd_name ${sd_name} -port_name {HIF_TARGET_0_o_hif_axis_tready_0} -port_direction {OUT}
sd_create_scalar_port -sd_name ${sd_name} -port_name {HIF_TARGET_1_o_hif_axis_tready_1} -port_direction {OUT}
sd_create_scalar_port -sd_name ${sd_name} -port_name {SIF_TARGET_0_o_sif_axis_tready_0} -port_direction {OUT}
sd_create_scalar_port -sd_name ${sd_name} -port_name {SIF_TARGET_1_o_sif_axis_tready_1} -port_direction {OUT}
sd_create_scalar_port -sd_name ${sd_name} -port_name {o_init_done} -port_direction {OUT}
sd_create_scalar_port -sd_name ${sd_name} -port_name {o_pps} -port_direction {OUT}
sd_create_scalar_port -sd_name ${sd_name} -port_name {o_ptp_rst} -port_direction {OUT}

sd_create_scalar_port -sd_name ${sd_name} -port_name {CAM1_SCL} -port_direction {INOUT} -port_is_pad {1}
sd_create_scalar_port -sd_name ${sd_name} -port_name {CAM1_SDA} -port_direction {INOUT} -port_is_pad {1}
sd_create_scalar_port -sd_name ${sd_name} -port_name {CAM2_SCL} -port_direction {INOUT} -port_is_pad {1}
sd_create_scalar_port -sd_name ${sd_name} -port_name {CAM2_SDA} -port_direction {INOUT} -port_is_pad {1}
sd_create_scalar_port -sd_name ${sd_name} -port_name {CLK} -port_direction {INOUT} -port_is_pad {1}
sd_create_scalar_port -sd_name ${sd_name} -port_name {EEPROM_SCL} -port_direction {INOUT} -port_is_pad {1}
sd_create_scalar_port -sd_name ${sd_name} -port_name {EEPROM_SDA} -port_direction {INOUT} -port_is_pad {1}
sd_create_scalar_port -sd_name ${sd_name} -port_name {SS} -port_direction {INOUT} -port_is_pad {1}

# Create top level Bus Ports
sd_create_bus_port -sd_name ${sd_name} -port_name {APB_INITIATOR_i_apb_prdata} -port_direction {IN} -port_range {[31:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {HIF_TARGET_0_i_hif_axis_tdata_0} -port_direction {IN} -port_range {[63:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {HIF_TARGET_0_i_hif_axis_tkeep_0} -port_direction {IN} -port_range {[7:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {HIF_TARGET_0_i_hif_axis_tuser_0} -port_direction {IN} -port_range {[0:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {HIF_TARGET_1_i_hif_axis_tdata_1} -port_direction {IN} -port_range {[63:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {HIF_TARGET_1_i_hif_axis_tkeep_1} -port_direction {IN} -port_range {[7:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {HIF_TARGET_1_i_hif_axis_tuser_1} -port_direction {IN} -port_range {[0:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {SIF_TARGET_0_i_sif_axis_tdata_0} -port_direction {IN} -port_range {[63:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {SIF_TARGET_0_i_sif_axis_tkeep_0} -port_direction {IN} -port_range {[7:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {SIF_TARGET_0_i_sif_axis_tuser_0} -port_direction {IN} -port_range {[1:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {SIF_TARGET_1_i_sif_axis_tdata_1} -port_direction {IN} -port_range {[63:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {SIF_TARGET_1_i_sif_axis_tkeep_1} -port_direction {IN} -port_range {[7:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {SIF_TARGET_1_i_sif_axis_tuser_1} -port_direction {IN} -port_range {[1:0]}

sd_create_bus_port -sd_name ${sd_name} -port_name {APB_INITIATOR_o_apb_paddr} -port_direction {OUT} -port_range {[31:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {APB_INITIATOR_o_apb_pwdata} -port_direction {OUT} -port_range {[31:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {HIF_INITIATOR_0_o_hif_axis_tdata_0} -port_direction {OUT} -port_range {[63:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {HIF_INITIATOR_0_o_hif_axis_tkeep_0} -port_direction {OUT} -port_range {[7:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {HIF_INITIATOR_0_o_hif_axis_tuser_0} -port_direction {OUT} -port_range {[0:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {HIF_INITIATOR_1_o_hif_axis_tdata_1} -port_direction {OUT} -port_range {[63:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {HIF_INITIATOR_1_o_hif_axis_tkeep_1} -port_direction {OUT} -port_range {[7:0]}
sd_create_bus_port -sd_name ${sd_name} -port_name {HIF_INITIATOR_1_o_hif_axis_tuser_1} -port_direction {OUT} -port_range {[0:0]}

sd_create_bus_port -sd_name ${sd_name} -port_name {GPIO} -port_direction {INOUT} -port_range {[15:0]}

# Create top level Bus interface Ports
sd_create_bif_port -sd_name ${sd_name} -port_name {HIF_INITIATOR_0} -port_bif_vlnv {AMBA:AMBA4:AXI4Stream:r0p0_1} -port_bif_role {master} -port_bif_mapping {\
"TVALID:HIF_INITIATOR_0_o_hif_axis_tvalid_0" \
"TREADY:HIF_INITIATOR_0_i_hif_axis_tready_0" \
"TDATA:HIF_INITIATOR_0_o_hif_axis_tdata_0" \
"TKEEP:HIF_INITIATOR_0_o_hif_axis_tkeep_0" \
"TLAST:HIF_INITIATOR_0_o_hif_axis_tlast_0" \
"TUSER:HIF_INITIATOR_0_o_hif_axis_tuser_0" } 

sd_create_bif_port -sd_name ${sd_name} -port_name {HIF_TARGET_0} -port_bif_vlnv {AMBA:AMBA4:AXI4Stream:r0p0_1} -port_bif_role {slave} -port_bif_mapping {\
"TVALID:HIF_TARGET_0_i_hif_axis_tvalid_0" \
"TREADY:HIF_TARGET_0_o_hif_axis_tready_0" \
"TDATA:HIF_TARGET_0_i_hif_axis_tdata_0" \
"TKEEP:HIF_TARGET_0_i_hif_axis_tkeep_0" \
"TLAST:HIF_TARGET_0_i_hif_axis_tlast_0" \
"TUSER:HIF_TARGET_0_i_hif_axis_tuser_0" } 

sd_create_bif_port -sd_name ${sd_name} -port_name {SIF_TARGET_0} -port_bif_vlnv {AMBA:AMBA4:AXI4Stream:r0p0_1} -port_bif_role {slave} -port_bif_mapping {\
"TVALID:SIF_TARGET_0_i_sif_axis_tvalid_0" \
"TREADY:SIF_TARGET_0_o_sif_axis_tready_0" \
"TDATA:SIF_TARGET_0_i_sif_axis_tdata_0" \
"TKEEP:SIF_TARGET_0_i_sif_axis_tkeep_0" \
"TLAST:SIF_TARGET_0_i_sif_axis_tlast_0" \
"TUSER:SIF_TARGET_0_i_sif_axis_tuser_0" } 

sd_create_bif_port -sd_name ${sd_name} -port_name {HIF_INITIATOR_1} -port_bif_vlnv {AMBA:AMBA4:AXI4Stream:r0p0_1} -port_bif_role {master} -port_bif_mapping {\
"TVALID:HIF_INITIATOR_1_o_hif_axis_tvalid_1" \
"TREADY:HIF_INITIATOR_1_i_hif_axis_tready_1" \
"TDATA:HIF_INITIATOR_1_o_hif_axis_tdata_1" \
"TKEEP:HIF_INITIATOR_1_o_hif_axis_tkeep_1" \
"TLAST:HIF_INITIATOR_1_o_hif_axis_tlast_1" \
"TUSER:HIF_INITIATOR_1_o_hif_axis_tuser_1" } 

sd_create_bif_port -sd_name ${sd_name} -port_name {HIF_TARGET_1} -port_bif_vlnv {AMBA:AMBA4:AXI4Stream:r0p0_1} -port_bif_role {slave} -port_bif_mapping {\
"TVALID:HIF_TARGET_1_i_hif_axis_tvalid_1" \
"TREADY:HIF_TARGET_1_o_hif_axis_tready_1" \
"TDATA:HIF_TARGET_1_i_hif_axis_tdata_1" \
"TKEEP:HIF_TARGET_1_i_hif_axis_tkeep_1" \
"TLAST:HIF_TARGET_1_i_hif_axis_tlast_1" \
"TUSER:HIF_TARGET_1_i_hif_axis_tuser_1" } 

sd_create_bif_port -sd_name ${sd_name} -port_name {SIF_TARGET_1} -port_bif_vlnv {AMBA:AMBA4:AXI4Stream:r0p0_1} -port_bif_role {slave} -port_bif_mapping {\
"TVALID:SIF_TARGET_1_i_sif_axis_tvalid_1" \
"TREADY:SIF_TARGET_1_o_sif_axis_tready_1" \
"TDATA:SIF_TARGET_1_i_sif_axis_tdata_1" \
"TKEEP:SIF_TARGET_1_i_sif_axis_tkeep_1" \
"TLAST:SIF_TARGET_1_i_sif_axis_tlast_1" \
"TUSER:SIF_TARGET_1_i_sif_axis_tuser_1" } 

sd_create_bif_port -sd_name ${sd_name} -port_name {APB_INITIATOR} -port_bif_vlnv {AMBA:AMBA2:APB:r0p0} -port_bif_role {master} -port_bif_mapping {\
"PADDR:APB_INITIATOR_o_apb_paddr" \
"PSELx:APB_INITIATOR_o_apb_psel" \
"PENABLE:APB_INITIATOR_o_apb_penable" \
"PWRITE:APB_INITIATOR_o_apb_pwrite" \
"PRDATA:APB_INITIATOR_i_apb_prdata" \
"PWDATA:APB_INITIATOR_o_apb_pwdata" \
"PREADY:APB_INITIATOR_i_apb_pready" \
"PSLVERR:APB_INITIATOR_i_apb_pserr" } 

# Add BIBUF_0 instance
sd_instantiate_macro -sd_name ${sd_name} -macro_name {BIBUF} -instance_name {BIBUF_0}
sd_connect_pins_to_constant -sd_name ${sd_name} -pin_names {BIBUF_0:D} -value {GND}
sd_invert_pins -sd_name ${sd_name} -pin_names {BIBUF_0:E}



# Add BIBUF_1 instance
sd_instantiate_macro -sd_name ${sd_name} -macro_name {BIBUF} -instance_name {BIBUF_1}
sd_connect_pins_to_constant -sd_name ${sd_name} -pin_names {BIBUF_1:D} -value {GND}
sd_invert_pins -sd_name ${sd_name} -pin_names {BIBUF_1:E}



# Add BIBUF_2 instance
sd_instantiate_macro -sd_name ${sd_name} -macro_name {BIBUF} -instance_name {BIBUF_2}
sd_connect_pins_to_constant -sd_name ${sd_name} -pin_names {BIBUF_2:D} -value {GND}
sd_invert_pins -sd_name ${sd_name} -pin_names {BIBUF_2:E}



# Add BIBUF_3 instance
sd_instantiate_macro -sd_name ${sd_name} -macro_name {BIBUF} -instance_name {BIBUF_3}
sd_connect_pins_to_constant -sd_name ${sd_name} -pin_names {BIBUF_3:D} -value {GND}
sd_invert_pins -sd_name ${sd_name} -pin_names {BIBUF_3:E}



# Add BIBUF_4 instance
sd_instantiate_macro -sd_name ${sd_name} -macro_name {BIBUF} -instance_name {BIBUF_4}
sd_connect_pins_to_constant -sd_name ${sd_name} -pin_names {BIBUF_4:D} -value {GND}
sd_invert_pins -sd_name ${sd_name} -pin_names {BIBUF_4:E}



# Add BIBUF_5 instance
sd_instantiate_macro -sd_name ${sd_name} -macro_name {BIBUF} -instance_name {BIBUF_5}
sd_connect_pins_to_constant -sd_name ${sd_name} -pin_names {BIBUF_5:D} -value {GND}
sd_invert_pins -sd_name ${sd_name} -pin_names {BIBUF_5:E}



# Add HOLOLINK_top_0 instance
sd_instantiate_hdl_core -sd_name ${sd_name} -hdl_core_name {HOLOLINK_top_wrapper} -instance_name {HOLOLINK_top_0}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:i_spi_sdio} -pin_slices {[0:0]}
sd_connect_pins_to_constant -sd_name ${sd_name} -pin_names {HOLOLINK_top_0:i_spi_sdio[0:0]} -value {GND}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:i_spi_sdio} -pin_slices {[1:1]}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:i_spi_sdio} -pin_slices {[3:2]}
sd_connect_pins_to_constant -sd_name ${sd_name} -pin_names {HOLOLINK_top_0:i_spi_sdio[3:2]} -value {GND}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:o_spi_sdio} -pin_slices {[0:0]}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:o_spi_sdio} -pin_slices {[3:1]}
sd_mark_pins_unused -sd_name ${sd_name} -pin_names {HOLOLINK_top_0:o_spi_sdio[3:1]}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:i_i2c_scl} -pin_slices {[0:0]}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:i_i2c_scl} -pin_slices {[1:1]}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:i_i2c_scl} -pin_slices {[2:2]}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:i_i2c_sda} -pin_slices {[0:0]}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:i_i2c_sda} -pin_slices {[1:1]}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:i_i2c_sda} -pin_slices {[2:2]}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:o_i2c_scl_en} -pin_slices {[0:0]}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:o_i2c_scl_en} -pin_slices {[1:1]}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:o_i2c_scl_en} -pin_slices {[2:2]}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:o_i2c_sda_en} -pin_slices {[0:0]}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:o_i2c_sda_en} -pin_slices {[1:1]}
sd_create_pin_slices -sd_name ${sd_name} -pin_name {HOLOLINK_top_0:o_i2c_sda_en} -pin_slices {[2:2]}
sd_mark_pins_unused -sd_name ${sd_name} -pin_names {HOLOLINK_top_0:o_apb_rst}
sd_mark_pins_unused -sd_name ${sd_name} -pin_names {HOLOLINK_top_0:o_sif_rst}
sd_mark_pins_unused -sd_name ${sd_name} -pin_names {HOLOLINK_top_0:o_hif_rst}
sd_mark_pins_unused -sd_name ${sd_name} -pin_names {HOLOLINK_top_0:o_sw_sys_rst}
sd_connect_pins_to_constant -sd_name ${sd_name} -pin_names {HOLOLINK_top_0:i_sif_event} -value {GND}
sd_mark_pins_unused -sd_name ${sd_name} -pin_names {HOLOLINK_top_0:o_ptp_sec}
sd_mark_pins_unused -sd_name ${sd_name} -pin_names {HOLOLINK_top_0:o_ptp_nanosec}



# Add PF_SPI_0 instance
sd_instantiate_macro -sd_name ${sd_name} -macro_name {PF_SPI} -instance_name {PF_SPI_0}
sd_mark_pins_unused -sd_name ${sd_name} -pin_names {PF_SPI_0:CLK_I}
sd_mark_pins_unused -sd_name ${sd_name} -pin_names {PF_SPI_0:SS_I}
sd_mark_pins_unused -sd_name ${sd_name} -pin_names {PF_SPI_0:FAB_SPI_OWNER}
sd_connect_pins_to_constant -sd_name ${sd_name} -pin_names {PF_SPI_0:CLK_OE} -value {VCC}
sd_connect_pins_to_constant -sd_name ${sd_name} -pin_names {PF_SPI_0:SS_OE} -value {VCC}



# Add scalar net connections
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_0:E" "HOLOLINK_top_0:o_i2c_scl_en[1:1]" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_0:PAD" "CAM1_SCL" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_0:Y" "HOLOLINK_top_0:i_i2c_scl[1:1]" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_1:E" "HOLOLINK_top_0:o_i2c_sda_en[1:1]" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_1:PAD" "CAM1_SDA" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_1:Y" "HOLOLINK_top_0:i_i2c_sda[1:1]" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_2:E" "HOLOLINK_top_0:o_i2c_sda_en[0:0]" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_2:PAD" "EEPROM_SDA" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_2:Y" "HOLOLINK_top_0:i_i2c_sda[0:0]" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_3:E" "HOLOLINK_top_0:o_i2c_scl_en[0:0]" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_3:PAD" "EEPROM_SCL" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_3:Y" "HOLOLINK_top_0:i_i2c_scl[0:0]" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_4:E" "HOLOLINK_top_0:o_i2c_scl_en[2:2]" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_4:PAD" "CAM2_SCL" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_4:Y" "HOLOLINK_top_0:i_i2c_scl[2:2]" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_5:E" "HOLOLINK_top_0:o_i2c_sda_en[2:2]" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_5:PAD" "CAM2_SDA" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"BIBUF_5:Y" "HOLOLINK_top_0:i_i2c_sda[2:2]" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"CLK" "PF_SPI_0:CLK" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"DI" "PF_SPI_0:DI" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"DO" "PF_SPI_0:DO" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"FLASH" "PF_SPI_0:FLASH" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HOLOLINK_top_0:i_apb_clk" "i_apb_clk" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HOLOLINK_top_0:i_hif_clk" "i_hif_clk" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HOLOLINK_top_0:i_ptp_clk" "i_ptp_clk" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HOLOLINK_top_0:i_sif_clk" "i_sif_clk" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HOLOLINK_top_0:i_spi_sdio[1:1]" "PF_SPI_0:D_I" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HOLOLINK_top_0:i_sys_rst" "i_sys_rst" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HOLOLINK_top_0:o_init_done" "o_init_done" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HOLOLINK_top_0:o_pps" "o_pps" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HOLOLINK_top_0:o_ptp_rst" "o_ptp_rst" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HOLOLINK_top_0:o_spi_csn" "PF_SPI_0:SS_O" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HOLOLINK_top_0:o_spi_oen" "PF_SPI_0:D_OE" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HOLOLINK_top_0:o_spi_sck" "PF_SPI_0:CLK_O" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HOLOLINK_top_0:o_spi_sdio[0:0]" "PF_SPI_0:D_O" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"IFACE" "PF_SPI_0:IFACE" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"PF_SPI_0:SS" "SS" }

# Add bus net connections
sd_connect_pins -sd_name ${sd_name} -pin_names {"GPIO" "HOLOLINK_top_0:GPIO" }

# Add bus interface net connections
sd_connect_pins -sd_name ${sd_name} -pin_names {"APB_INITIATOR" "HOLOLINK_top_0:APB_INITIATOR" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HIF_INITIATOR_0" "HOLOLINK_top_0:HIF_INITIATOR_0" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HIF_INITIATOR_1" "HOLOLINK_top_0:HIF_INITIATOR_1" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HIF_TARGET_0" "HOLOLINK_top_0:HIF_TARGET_0" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HIF_TARGET_1" "HOLOLINK_top_0:HIF_TARGET_1" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HOLOLINK_top_0:SIF_TARGET_0" "SIF_TARGET_0" }
sd_connect_pins -sd_name ${sd_name} -pin_names {"HOLOLINK_top_0:SIF_TARGET_1" "SIF_TARGET_1" }

# Re-enable auto promotion of pins of type 'pad'
auto_promote_pad_pins -promote_all 1
# Save the SmartDesign 
save_smartdesign -sd_name ${sd_name}
# Generate SmartDesign "HoloLink_SD"
generate_component -component_name ${sd_name}
