6603 - Radiant: How to perform IP re-generation using ipgen?

6603 - Radiant: How to perform IP re-generation using ipgen?

First, run "ipgen.exe -h" from the tcl console to view all the command options as shown below.
usage: ipgen.exe [-h] [-o OUTPUT_DIR] [-proj_dir PROJ_DIR] -ip IP_MODULE_DIR
                 [-cfg IP_CONFIG_FILE] [-skip_uniquify SKIP_UNIQUIFY_HDL]
                 [-cfg_value IP_CONFIG_VALUE] -name IP_INSTANCE_NAME
                 [-platform IPGEN_PLATFORM] [-a ARCHITECTURE] [-p DEVICE]
                 [-t PACKAGE] [-sp PERFORMANCE] [-f FAMILY]
Lattice soft IP generation engine.
optional arguments:
Options Description
-h help show this help message and exit
-o
OUTPUT_DIR. Location to generate IP instance package. (default is current directory)
-proj_dir
PROJ_DIR. Location of Radiant Project, which owns generated IP instance package. (default is current directory)
 -ip IP_MODULE_DIR. Location of IP module package.
-cfg IP_CONFIG_FILE. Location of IP configuration file.
 -skip_uniquify
SKIP_UNIQUIFY_HDL. Control weather uniquify hdl files: True/False.
-cfg_value
IP_CONFIG_VALUE. IP configuration value: 'id:value'.
-name
IP_INSTANCE_NAME. Name of IP instance package.
-platform
IPGEN_PLATFORM. Name of ipgen's runtime environment: Radiant or Propel, Default is Radiant.
-a
ARCHITECTURE. Target architecture name.
-p
DEVICE. Target device name.
-t
PACKAGE. Target package name.
-sp
PERFORMANCE. Target performance name.
-f
FAMILY. Target family name.
ipgen sample commands for ip re-generation:
ipgen.exe -o <location of the IP in your project> -ip <location of the ip in Radiant> -name <IP instance name> -cfg <location of the cfg file of the ip> -cfg_value <ID:Value> -p <DEVICE> -t <PACKAGE> -sp <PERFORMANCE> -a <ARCHITECTURE>

example for IP on Local: 
MIPI_DPHY: ipgen.exe -o <proj_path>/<ip_module_name> -ip <radiant_install_path>/ip/lifcl/mipi_dphy -name test_mipi -cfg <proj_path>/<ip_module_name>/test_mipi.cfg -p LIFCL-17 -t UWG72 -sp 8_Low-Power_1.0V -a LIFCL
Note: The important part to perform the ip re-generation is to define the IP folder location from your project under the option -o. In this manner, it will update/overwrite all the necessary files including the cfg data.

Updating setting during IP re-generation example for IP on Local: 
MIPI_DPHY: ipgen.exe -o C:/Users/wbasbas/Documents/Radiant/ipgen_test/test_mipi -ip C:/lscc/radiant/3.2/ip/lifcl/mipi_dphy -name test_mipi -cfg C:/Users/wbasbas/Documents/Radiant/ipgen_test/test_mipi/test_mipi.cfg -cfg_value INTF:CSI2_APP -p LIFCL-17 -t UWG72 -sp 8_Low-Power_1.0V -a LIFCL
Note: -cfg_value is use to modify the existing options for specific IP setting ID. The information of id and options can be located on the metadata.xml under the ip folder (for this example: <radiant_install_path>\ip\lifcl\mipi_dphy\metadata.xml)