################################################################ # This is a generated script based on design: bd # # Though there are limitations about the generated script, # the main purpose of this utility is to make learning # IP Integrator Tcl commands easier. ################################################################ namespace eval _tcl { proc get_script_folder {} { set script_path [file normalize [info script]] set script_folder [file dirname $script_path] return $script_folder } } variable script_folder set script_folder [_tcl::get_script_folder] cd $script_folder ################################################################ # Check if script is running in correct Vivado version. ################################################################ set scripts_vivado_version 2022.1 set current_vivado_version [version -short] if { [string first $scripts_vivado_version $current_vivado_version] == -1 } { puts "" catch {common::send_msg_id "BD_TCL-109" "ERROR" "This script was generated using Vivado <$scripts_vivado_version> and is being run in <$current_vivado_version> of Vivado. Please run the script in Vivado <$scripts_vivado_version> then open the design in Vivado <$current_vivado_version>. Upgrade the design by running \"Tools => Report => Report IP Status...\", then run write_bd_tcl to create an updated script."} return 1 } ################################################################ # START ################################################################ # To test this script, run the following commands from Vivado Tcl console: # source bd_script.tcl # If there is no project opened, this script will create a # project, but make sure you do not have an existing project # <./hw/hw.xpr> in the current working folder. set list_projs [get_projects -quiet] if { $list_projs eq "" } { create_project hw hw -part xc7s50csga324-1 } # CHANGE DESIGN NAME HERE variable design_name set design_name bd # If you do not already have an existing IP Integrator design open, # you can create a design using the following command: # create_bd_design $design_name # Creating design if needed set errMsg "" set nRet 0 set cur_design [current_bd_design -quiet] set list_cells [get_bd_cells -quiet] if { ${design_name} eq "" } { # USE CASES: # 1) Design_name not set set errMsg "Please set the variable to a non-empty value." set nRet 1 } elseif { ${cur_design} ne "" && ${list_cells} eq "" } { # USE CASES: # 2): Current design opened AND is empty AND names same. # 3): Current design opened AND is empty AND names diff; design_name NOT in project. # 4): Current design opened AND is empty AND names diff; design_name exists in project. if { $cur_design ne $design_name } { common::send_msg_id "BD_TCL-001" "INFO" "Changing value of from <$design_name> to <$cur_design> since current design is empty." set design_name [get_property NAME $cur_design] } common::send_msg_id "BD_TCL-002" "INFO" "Constructing design in IPI design <$cur_design>..." } elseif { ${cur_design} ne "" && $list_cells ne "" && $cur_design eq $design_name } { # USE CASES: # 5) Current design opened AND has components AND same names. set errMsg "Design <$design_name> already exists in your project, please set the variable to another value." set nRet 1 } elseif { [get_files -quiet ${design_name}.bd] ne "" } { # USE CASES: # 6) Current opened design, has components, but diff names, design_name exists in project. # 7) No opened design, design_name exists in project. set errMsg "Design <$design_name> already exists in your project, please set the variable to another value." set nRet 2 } else { # USE CASES: # 8) No opened design, design_name not in project. # 9) Current opened design, has components, but diff names, design_name not in project. common::send_msg_id "BD_TCL-003" "INFO" "Currently there is no design <$design_name> in project, so creating one..." create_bd_design $design_name common::send_msg_id "BD_TCL-004" "INFO" "Making design <$design_name> as current_bd_design." current_bd_design $design_name } common::send_msg_id "BD_TCL-005" "INFO" "Currently the variable is equal to \"$design_name\"." if { $nRet != 0 } { catch {common::send_msg_id "BD_TCL-114" "ERROR" $errMsg} return $nRet } set bCheckIPsPassed 1 ################################################################## # CHECK IPs ################################################################## set bCheckIPs 1 if { $bCheckIPs == 1 } { set list_check_ips "\ xilinx.com:ip:smartconnect:1.0\ xilinx.com:ip:axi_uartlite:2.0\ xilinx.com:ip:clk_wiz:5.4\ xilinx.com:ip:mdm:3.2\ xilinx.com:ip:microblaze:10.0\ xilinx.com:ip:mig_7series:4.0\ xilinx.com:ip:proc_sys_reset:5.0\ xilinx.com:ip:lmb_bram_if_cntlr:4.0\ xilinx.com:ip:lmb_v10:3.0\ xilinx.com:ip:blk_mem_gen:8.4\ " set list_ips_missing "" common::send_msg_id "BD_TCL-006" "INFO" "Checking if the following IPs exist in the project's IP catalog: $list_check_ips ." foreach ip_vlnv $list_check_ips { set ip_obj [get_ipdefs -all $ip_vlnv] if { $ip_obj eq "" } { lappend list_ips_missing $ip_vlnv } } if { $list_ips_missing ne "" } { catch {common::send_msg_id "BD_TCL-115" "ERROR" "The following IPs are not found in the IP Catalog:\n $list_ips_missing\n\nResolution: Please add the repository containing the IP(s) to the project." } set bCheckIPsPassed 0 } } if { $bCheckIPsPassed != 1 } { common::send_msg_id "BD_TCL-1003" "WARNING" "Will not continue with creation of design due to the error(s) above." return 3 } ################################################################## # MIG PRJ FILE TCL PROCs ################################################################## proc write_mig_file_bd_mig_7series_0_0 { str_mig_prj_filepath } { file mkdir [ file dirname "$str_mig_prj_filepath" ] set mig_prj_file [open $str_mig_prj_filepath w+] puts $mig_prj_file {} puts $mig_prj_file {} puts $mig_prj_file {} puts $mig_prj_file { bd_mig_7series_0_0} puts $mig_prj_file { 1} puts $mig_prj_file { 1} puts $mig_prj_file { OFF} puts $mig_prj_file { 1024} puts $mig_prj_file { ON} puts $mig_prj_file { Enabled} puts $mig_prj_file { xc7s50-csga324/-1} puts $mig_prj_file { 4.0} puts $mig_prj_file { No Buffer} puts $mig_prj_file { No Buffer} puts $mig_prj_file { ACTIVE HIGH} puts $mig_prj_file { FALSE} puts $mig_prj_file { 1} puts $mig_prj_file { 50 Ohms} puts $mig_prj_file { 0} puts $mig_prj_file { } puts $mig_prj_file { 7s/xc7s25-csga324} puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { DDR3_SDRAM/Components/MT41K64M16XX-125} puts $mig_prj_file { 3000} puts $mig_prj_file { 1.8V} puts $mig_prj_file { 2:1} puts $mig_prj_file { 333.333} puts $mig_prj_file { 0} puts $mig_prj_file { 666} puts $mig_prj_file { 1.000} puts $mig_prj_file { 1} puts $mig_prj_file { 1} puts $mig_prj_file { 1} puts $mig_prj_file { 1} puts $mig_prj_file { 16} puts $mig_prj_file { 1} puts $mig_prj_file { 1} puts $mig_prj_file { Disabled} puts $mig_prj_file { Strict} puts $mig_prj_file { 4} puts $mig_prj_file { FALSE} puts $mig_prj_file { } puts $mig_prj_file { 13} puts $mig_prj_file { 10} puts $mig_prj_file { 3} puts $mig_prj_file { 1.35V} puts $mig_prj_file { 134217728} puts $mig_prj_file { BANK_ROW_COLUMN} puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file { 8 - Fixed} puts $mig_prj_file { Sequential} puts $mig_prj_file { 5} puts $mig_prj_file { Normal} puts $mig_prj_file { No} puts $mig_prj_file { Slow Exit} puts $mig_prj_file { Enable} puts $mig_prj_file { RZQ/7} puts $mig_prj_file { Disable} puts $mig_prj_file { Disable} puts $mig_prj_file { RZQ/4} puts $mig_prj_file { 0} puts $mig_prj_file { Disabled} puts $mig_prj_file { Enabled} puts $mig_prj_file { Output Buffer Enabled} puts $mig_prj_file { Full Array} puts $mig_prj_file { 5} puts $mig_prj_file { Enabled} puts $mig_prj_file { Normal} puts $mig_prj_file { Dynamic ODT off} puts $mig_prj_file { AXI} puts $mig_prj_file { } puts $mig_prj_file { RD_PRI_REG} puts $mig_prj_file { 27} puts $mig_prj_file { 64} puts $mig_prj_file { 4} puts $mig_prj_file { 0} puts $mig_prj_file { } puts $mig_prj_file { } puts $mig_prj_file {} close $mig_prj_file } # End of write_mig_file_bd_mig_7series_0_0() ################################################################## # DESIGN PROCs ################################################################## # Hierarchical cell: microblaze_0_local_memory proc create_hier_cell_microblaze_0_local_memory { parentCell nameHier } { variable script_folder if { $parentCell eq "" || $nameHier eq "" } { catch {common::send_msg_id "BD_TCL-102" "ERROR" "create_hier_cell_microblaze_0_local_memory() - Empty argument(s)!"} return } # Get object for parentCell set parentObj [get_bd_cells $parentCell] if { $parentObj == "" } { catch {common::send_msg_id "BD_TCL-100" "ERROR" "Unable to find parent cell <$parentCell>!"} return } # Make sure parentObj is hier blk set parentType [get_property TYPE $parentObj] if { $parentType ne "hier" } { catch {common::send_msg_id "BD_TCL-101" "ERROR" "Parent <$parentObj> has TYPE = <$parentType>. Expected to be ."} return } # Save current instance; Restore later set oldCurInst [current_bd_instance .] # Set parent object as current current_bd_instance $parentObj # Create cell and set as current instance set hier_obj [create_bd_cell -type hier $nameHier] current_bd_instance $hier_obj # Create interface pins create_bd_intf_pin -mode MirroredMaster -vlnv xilinx.com:interface:lmb_rtl:1.0 DLMB create_bd_intf_pin -mode MirroredMaster -vlnv xilinx.com:interface:lmb_rtl:1.0 ILMB # Create pins create_bd_pin -dir I -type clk LMB_Clk create_bd_pin -dir I -type rst SYS_Rst # Create instance: dlmb_bram_if_cntlr, and set properties set dlmb_bram_if_cntlr [ create_bd_cell -type ip -vlnv xilinx.com:ip:lmb_bram_if_cntlr:4.0 dlmb_bram_if_cntlr ] set_property -dict [ list \ CONFIG.C_ECC {0} \ ] $dlmb_bram_if_cntlr # Create instance: dlmb_v10, and set properties set dlmb_v10 [ create_bd_cell -type ip -vlnv xilinx.com:ip:lmb_v10:3.0 dlmb_v10 ] # Create instance: ilmb_bram_if_cntlr, and set properties set ilmb_bram_if_cntlr [ create_bd_cell -type ip -vlnv xilinx.com:ip:lmb_bram_if_cntlr:4.0 ilmb_bram_if_cntlr ] set_property -dict [ list \ CONFIG.C_ECC {0} \ ] $ilmb_bram_if_cntlr # Create instance: ilmb_v10, and set properties set ilmb_v10 [ create_bd_cell -type ip -vlnv xilinx.com:ip:lmb_v10:3.0 ilmb_v10 ] # Create instance: lmb_bram, and set properties set lmb_bram [ create_bd_cell -type ip -vlnv xilinx.com:ip:blk_mem_gen:8.4 lmb_bram ] set_property -dict [ list \ CONFIG.Memory_Type {True_Dual_Port_RAM} \ CONFIG.use_bram_block {BRAM_Controller} \ ] $lmb_bram # Create interface connections connect_bd_intf_net -intf_net microblaze_0_dlmb [get_bd_intf_pins DLMB] [get_bd_intf_pins dlmb_v10/LMB_M] connect_bd_intf_net -intf_net microblaze_0_dlmb_bus [get_bd_intf_pins dlmb_bram_if_cntlr/SLMB] [get_bd_intf_pins dlmb_v10/LMB_Sl_0] connect_bd_intf_net -intf_net microblaze_0_dlmb_cntlr [get_bd_intf_pins dlmb_bram_if_cntlr/BRAM_PORT] [get_bd_intf_pins lmb_bram/BRAM_PORTA] connect_bd_intf_net -intf_net microblaze_0_ilmb [get_bd_intf_pins ILMB] [get_bd_intf_pins ilmb_v10/LMB_M] connect_bd_intf_net -intf_net microblaze_0_ilmb_bus [get_bd_intf_pins ilmb_bram_if_cntlr/SLMB] [get_bd_intf_pins ilmb_v10/LMB_Sl_0] connect_bd_intf_net -intf_net microblaze_0_ilmb_cntlr [get_bd_intf_pins ilmb_bram_if_cntlr/BRAM_PORT] [get_bd_intf_pins lmb_bram/BRAM_PORTB] # Create port connections connect_bd_net -net SYS_Rst_1 [get_bd_pins SYS_Rst] [get_bd_pins dlmb_bram_if_cntlr/LMB_Rst] [get_bd_pins dlmb_v10/SYS_Rst] [get_bd_pins ilmb_bram_if_cntlr/LMB_Rst] [get_bd_pins ilmb_v10/SYS_Rst] connect_bd_net -net microblaze_0_Clk [get_bd_pins LMB_Clk] [get_bd_pins dlmb_bram_if_cntlr/LMB_Clk] [get_bd_pins dlmb_v10/LMB_Clk] [get_bd_pins ilmb_bram_if_cntlr/LMB_Clk] [get_bd_pins ilmb_v10/LMB_Clk] # Restore current instance current_bd_instance $oldCurInst } # Procedure to create entire design; Provide argument to make # procedure reusable. If parentCell is "", will use root. proc create_root_design { parentCell } { variable script_folder variable design_name if { $parentCell eq "" } { set parentCell [get_bd_cells /] } # Get object for parentCell set parentObj [get_bd_cells $parentCell] if { $parentObj == "" } { catch {common::send_msg_id "BD_TCL-100" "ERROR" "Unable to find parent cell <$parentCell>!"} return } # Make sure parentObj is hier blk set parentType [get_property TYPE $parentObj] if { $parentType ne "hier" } { catch {common::send_msg_id "BD_TCL-101" "ERROR" "Parent <$parentObj> has TYPE = <$parentType>. Expected to be ."} return } # Save current instance; Restore later set oldCurInst [current_bd_instance .] # Set parent object as current current_bd_instance $parentObj # Create interface ports set ddr3 [ create_bd_intf_port -mode Master -vlnv xilinx.com:interface:ddrx_rtl:1.0 ddr3 ] set uart [ create_bd_intf_port -mode Master -vlnv xilinx.com:interface:uart_rtl:1.0 uart ] # Create ports set clk_100mhz [ create_bd_port -dir I -type clk clk_100mhz ] set init_calib_complete [ create_bd_port -dir O init_calib_complete ] set sys_rst [ create_bd_port -dir I -type rst sys_rst ] set_property -dict [ list \ CONFIG.POLARITY {ACTIVE_HIGH} \ ] $sys_rst # Create instance: axi_smc, and set properties set axi_smc [ create_bd_cell -type ip -vlnv xilinx.com:ip:smartconnect:1.0 axi_smc ] set_property -dict [ list \ CONFIG.NUM_CLKS {2} \ CONFIG.NUM_MI {2} \ CONFIG.NUM_SI {3} \ ] $axi_smc # Create instance: axi_uartlite_0, and set properties set axi_uartlite_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_uartlite:2.0 axi_uartlite_0 ] set_property -dict [ list \ CONFIG.C_BAUDRATE {115200} \ ] $axi_uartlite_0 # Create instance: clk_wiz_1, and set properties set clk_wiz_1 [ create_bd_cell -type ip -vlnv xilinx.com:ip:clk_wiz:5.4 clk_wiz_1 ] set_property -dict [ list \ CONFIG.CLKOUT2_JITTER {114.829} \ CONFIG.CLKOUT2_PHASE_ERROR {98.575} \ CONFIG.CLKOUT2_REQUESTED_OUT_FREQ {200.000} \ CONFIG.CLKOUT2_USED {true} \ CONFIG.CLKOUT3_JITTER {104.542} \ CONFIG.CLKOUT3_PHASE_ERROR {98.575} \ CONFIG.CLKOUT3_REQUESTED_OUT_FREQ {333.333} \ CONFIG.CLKOUT3_USED {true} \ CONFIG.MMCM_CLKOUT1_DIVIDE {5} \ CONFIG.MMCM_CLKOUT2_DIVIDE {3} \ CONFIG.MMCM_DIVCLK_DIVIDE {1} \ CONFIG.NUM_OUT_CLKS {3} \ CONFIG.PRIM_SOURCE {Single_ended_clock_capable_pin} \ CONFIG.RESET_PORT {reset} \ CONFIG.RESET_TYPE {ACTIVE_HIGH} \ ] $clk_wiz_1 # Create instance: mdm_1, and set properties set mdm_1 [ create_bd_cell -type ip -vlnv xilinx.com:ip:mdm:3.2 mdm_1 ] # Create instance: microblaze_0, and set properties set microblaze_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:microblaze:10.0 microblaze_0 ] set_property -dict [ list \ CONFIG.C_ADDR_TAG_BITS {13} \ CONFIG.C_CACHE_BYTE_SIZE {16384} \ CONFIG.C_DCACHE_ADDR_TAG {13} \ CONFIG.C_DCACHE_BYTE_SIZE {16384} \ CONFIG.C_DEBUG_ENABLED {1} \ CONFIG.C_D_AXI {1} \ CONFIG.C_D_LMB {1} \ CONFIG.C_I_LMB {1} \ CONFIG.G_TEMPLATE_LIST {10} \ ] $microblaze_0 # Create instance: microblaze_0_local_memory create_hier_cell_microblaze_0_local_memory [current_bd_instance .] microblaze_0_local_memory # Create instance: mig_7series_0, and set properties set mig_7series_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:mig_7series:4.0 mig_7series_0 ] # Generate the PRJ File for MIG set str_mig_folder [get_property IP_DIR [ get_ips [ get_property CONFIG.Component_Name $mig_7series_0 ] ] ] set str_mig_file_name mig_a.prj set str_mig_file_path ${str_mig_folder}/${str_mig_file_name} write_mig_file_bd_mig_7series_0_0 $str_mig_file_path set_property -dict [ list \ CONFIG.BOARD_MIG_PARAM {Custom} \ CONFIG.MIG_DONT_TOUCH_PARAM {Custom} \ CONFIG.RESET_BOARD_INTERFACE {Custom} \ CONFIG.XML_INPUT_FILE {mig_a.prj} \ ] $mig_7series_0 # Create instance: rst_clk_wiz_1_100M, and set properties set rst_clk_wiz_1_100M [ create_bd_cell -type ip -vlnv xilinx.com:ip:proc_sys_reset:5.0 rst_clk_wiz_1_100M ] # Create instance: rst_mig_7series_0_166M, and set properties set rst_mig_7series_0_166M [ create_bd_cell -type ip -vlnv xilinx.com:ip:proc_sys_reset:5.0 rst_mig_7series_0_166M ] # Create interface connections connect_bd_intf_net -intf_net axi_smc_M00_AXI [get_bd_intf_pins axi_smc/M00_AXI] [get_bd_intf_pins mig_7series_0/S_AXI] connect_bd_intf_net -intf_net axi_smc_M01_AXI [get_bd_intf_pins axi_smc/M01_AXI] [get_bd_intf_pins axi_uartlite_0/S_AXI] connect_bd_intf_net -intf_net axi_uartlite_0_UART [get_bd_intf_ports uart] [get_bd_intf_pins axi_uartlite_0/UART] connect_bd_intf_net -intf_net microblaze_0_M_AXI_DC [get_bd_intf_pins axi_smc/S00_AXI] [get_bd_intf_pins microblaze_0/M_AXI_DC] connect_bd_intf_net -intf_net microblaze_0_M_AXI_DP [get_bd_intf_pins axi_smc/S02_AXI] [get_bd_intf_pins microblaze_0/M_AXI_DP] connect_bd_intf_net -intf_net microblaze_0_M_AXI_IC [get_bd_intf_pins axi_smc/S01_AXI] [get_bd_intf_pins microblaze_0/M_AXI_IC] connect_bd_intf_net -intf_net microblaze_0_debug [get_bd_intf_pins mdm_1/MBDEBUG_0] [get_bd_intf_pins microblaze_0/DEBUG] connect_bd_intf_net -intf_net microblaze_0_dlmb_1 [get_bd_intf_pins microblaze_0/DLMB] [get_bd_intf_pins microblaze_0_local_memory/DLMB] connect_bd_intf_net -intf_net microblaze_0_ilmb_1 [get_bd_intf_pins microblaze_0/ILMB] [get_bd_intf_pins microblaze_0_local_memory/ILMB] connect_bd_intf_net -intf_net mig_7series_0_DDR3 [get_bd_intf_ports ddr3] [get_bd_intf_pins mig_7series_0/DDR3] # Create port connections connect_bd_net -net clk_in1_0_1 [get_bd_ports clk_100mhz] [get_bd_pins clk_wiz_1/clk_in1] connect_bd_net -net clk_wiz_1_clk_out2 [get_bd_pins clk_wiz_1/clk_out2] [get_bd_pins mig_7series_0/clk_ref_i] connect_bd_net -net clk_wiz_1_clk_out3 [get_bd_pins clk_wiz_1/clk_out3] [get_bd_pins mig_7series_0/sys_clk_i] connect_bd_net -net clk_wiz_1_locked [get_bd_pins clk_wiz_1/locked] [get_bd_pins rst_clk_wiz_1_100M/dcm_locked] connect_bd_net -net mdm_1_debug_sys_rst [get_bd_pins mdm_1/Debug_SYS_Rst] [get_bd_pins rst_clk_wiz_1_100M/mb_debug_sys_rst] [get_bd_pins rst_mig_7series_0_166M/mb_debug_sys_rst] connect_bd_net -net microblaze_0_Clk [get_bd_pins axi_smc/aclk1] [get_bd_pins clk_wiz_1/clk_out1] [get_bd_pins microblaze_0/Clk] [get_bd_pins microblaze_0_local_memory/LMB_Clk] [get_bd_pins rst_clk_wiz_1_100M/slowest_sync_clk] connect_bd_net -net mig_7series_0_init_calib_complete [get_bd_ports init_calib_complete] [get_bd_pins mig_7series_0/init_calib_complete] connect_bd_net -net mig_7series_0_mmcm_locked [get_bd_pins mig_7series_0/mmcm_locked] [get_bd_pins rst_mig_7series_0_166M/dcm_locked] connect_bd_net -net mig_7series_0_ui_clk [get_bd_pins axi_smc/aclk] [get_bd_pins axi_uartlite_0/s_axi_aclk] [get_bd_pins mig_7series_0/ui_clk] [get_bd_pins rst_mig_7series_0_166M/slowest_sync_clk] connect_bd_net -net mig_7series_0_ui_clk_sync_rst [get_bd_pins mig_7series_0/ui_clk_sync_rst] [get_bd_pins rst_mig_7series_0_166M/ext_reset_in] connect_bd_net -net reset_rtl_0_1 [get_bd_ports sys_rst] [get_bd_pins clk_wiz_1/reset] [get_bd_pins mig_7series_0/sys_rst] [get_bd_pins rst_clk_wiz_1_100M/ext_reset_in] connect_bd_net -net rst_clk_wiz_1_100M_bus_struct_reset [get_bd_pins microblaze_0_local_memory/SYS_Rst] [get_bd_pins rst_clk_wiz_1_100M/bus_struct_reset] connect_bd_net -net rst_clk_wiz_1_100M_mb_reset [get_bd_pins microblaze_0/Reset] [get_bd_pins rst_clk_wiz_1_100M/mb_reset] connect_bd_net -net rst_clk_wiz_1_100M_peripheral_aresetn [get_bd_pins axi_smc/aresetn] [get_bd_pins rst_clk_wiz_1_100M/peripheral_aresetn] connect_bd_net -net rst_mig_7series_0_166M_peripheral_aresetn [get_bd_pins axi_uartlite_0/s_axi_aresetn] [get_bd_pins mig_7series_0/aresetn] [get_bd_pins rst_mig_7series_0_166M/peripheral_aresetn] # Create address segments create_bd_addr_seg -range 0x00010000 -offset 0x40600000 [get_bd_addr_spaces microblaze_0/Data] [get_bd_addr_segs axi_uartlite_0/S_AXI/Reg] SEG_axi_uartlite_0_Reg create_bd_addr_seg -range 0x00010000 -offset 0x40600000 [get_bd_addr_spaces microblaze_0/Instruction] [get_bd_addr_segs axi_uartlite_0/S_AXI/Reg] SEG_axi_uartlite_0_Reg create_bd_addr_seg -range 0x00008000 -offset 0x00000000 [get_bd_addr_spaces microblaze_0/Data] [get_bd_addr_segs microblaze_0_local_memory/dlmb_bram_if_cntlr/SLMB/Mem] SEG_dlmb_bram_if_cntlr_Mem create_bd_addr_seg -range 0x00008000 -offset 0x00000000 [get_bd_addr_spaces microblaze_0/Instruction] [get_bd_addr_segs microblaze_0_local_memory/ilmb_bram_if_cntlr/SLMB/Mem] SEG_ilmb_bram_if_cntlr_Mem create_bd_addr_seg -range 0x08000000 -offset 0x80000000 [get_bd_addr_spaces microblaze_0/Data] [get_bd_addr_segs mig_7series_0/memmap/memaddr] SEG_mig_7series_0_memaddr create_bd_addr_seg -range 0x08000000 -offset 0x80000000 [get_bd_addr_spaces microblaze_0/Instruction] [get_bd_addr_segs mig_7series_0/memmap/memaddr] SEG_mig_7series_0_memaddr # Restore current instance current_bd_instance $oldCurInst save_bd_design } # End of create_root_design() ################################################################## # MAIN FLOW ################################################################## create_root_design "" regenerate_bd_layout validate_bd_design # Add top wrapper set bd_filename [get_property FILE_NAME [current_bd_design]] set wrapper_file [make_wrapper -files [get_files $bd_filename] -top] add_files -norecurse $wrapper_file # Add constraints if {[string equal [get_filesets -quiet constrs_1] ""]} { create_fileset -constrset constrs_1 } set obj [get_filesets constrs_1] set file "[file normalize "$script_folder/constraints/bd-mem.xdc"]" set file_imported [import_files -fileset constrs_1 [list $file]]