
file copy -force "./src/softconsole/miv-rv32i-cxp-device.hex" "./$Prjname/miv-rv32i-cxp-device.hex"

# Import source files
build_design_hierarchy 

# Create, configure and generate core components
#
source ./src/components/CORERESET_PF_C1.tcl
source ./src/components/COREAHBTOAPB3_C0.tcl
source ./src/components/CoreAPB3_C0.tcl
source ./src/components/COREAXI4INTERCONNECT_C0.tcl
source ./src/components/COREAXITOAHBL_C0.tcl
source ./src/components/CoreGPIO_C0.tcl
source ./src/components/COREI2C_C0.tcl
source ./src/components/CoreUARTapb_C0.tcl
source ./src/components/MIV_RV32_C0.tcl
source ./src/components/PF_SRAM_AHBL_AXI_C0.tcl
source ./src/components/COREJTAGDEBUG_C0.tcl
source ./src/components/PROC_SS.tcl

source ./src/components/MIPI_TRAINING_LITE_C0.tcl
source ./src/components/PF_IOD_GENERIC_RX_C0.tcl
source ./src/components/CAM_IOD_TIP_TOP.tcl
source ./src/components/PF_CCC_C2.tcl
source ./src/components/mipicsi2rxdecoderPF_C1.tcl
source ./src/components/IMX334_IF_TOP_C1_C2.tcl

source ./src/components/CoaXpress_TOP_C0.tcl
source ./src/components/hs8b10b_encoder.tcl
source ./src/components/hsi_refclk.tcl
source ./src/components/hsi_txpll.tcl
source ./src/components/PF_XCVR_ERM_C0.tcl
source ./src/components/pll250m.tcl
source ./src/components/CXP_DEVICE_TOP.tcl

source ./src/components/PF_INIT_MONITOR_C0.tcl
source ./src/components/PF_DRI_C0.tcl


# Generate SmartDesign Components
build_design_hierarchy 
source ./src/components/top.tcl

# Set top level module
build_design_hierarchy 
set_root -module {top::work} 

save_project
puts "Design generated successfully\n"
