From f9899e9b0e606aee09391a78e0e17c654bc128b2 Mon Sep 17 00:00:00 2001 From: dam1n19 <dam1n19@soton.ac.uk> Date: Tue, 4 Jul 2023 09:51:35 +0100 Subject: [PATCH] Moved package component script into soctools --- resources/fpga/package_component.tcl | 57 ++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 resources/fpga/package_component.tcl diff --git a/resources/fpga/package_component.tcl b/resources/fpga/package_component.tcl new file mode 100644 index 0000000..110594e --- /dev/null +++ b/resources/fpga/package_component.tcl @@ -0,0 +1,57 @@ +###----------------------------------------------------------------------------- +### Vivado Component Package TCL Script +### A joint work commissioned on behalf of SoC Labs, under Arm Academic Access license. +### +### Contributors +### +### David Flynn (d.w.flynn@soton.ac.uk) +### +### Copyright � 2022, SoC Labs (www.soclabs.org) +###----------------------------------------------------------------------------- +# +# developed & tested using vivado_version 2021.1 +# + +# +# STEP#0: setup design sources and constraints +# + +set component_lib $env(FPGA_COMPONENT_LIB) + +# Read in TCL Filelist +source $env(FPGA_COMPONENT_FILELIST) + +# Read in Design Defines +source $env(FPGA_COMPONENT_DEFINES) + +# Set Top-level +set_property top $env(FPGA_DESIGN_TOP) [current_fileset] + +# +# STEP#1: run synthesis, report utilization and timing estimates, write checkpoint design +# + +update_compile_order -fileset sources_1 + +ipx::package_project -root_dir $component_lib -vendor $env(FPGA_VENDOR) -library user -taxonomy /UserIP -import_files -set_current false -force -force_update_compile_order + +ipx::unload_core $component_lib/component.xml +ipx::edit_ip_in_project -upgrade true -name tmp_edit_project -directory $component_lib $component_lib/component.xml + +update_compile_order -fileset sources_1 +set_property ipi_drc {ignore_freq_hz true} [ipx::current_core] +ipx::merge_project_changes files [ipx::current_core] + +set_property core_revision $env(FPGA_CORE_REV) [ipx::current_core] +ipx::update_source_project_archive -component [ipx::current_core] +ipx::create_xgui_files [ipx::current_core] +ipx::update_checksums [ipx::current_core] +ipx::check_integrity [ipx::current_core] + +ipx::save_core [ipx::current_core] +ipx::check_integrity -quiet -xrt [ipx::current_core] +ipx::move_temp_component_back -component [ipx::current_core] +close_project + +update_ip_catalog +close_project -- GitLab