Radiant: Why does the eco_config_memory command not working on scripting flow?

Radiant: Why does the eco_config_memory command not working on scripting flow?

The eco_config_memory command only works when used via Radiant GUI flow since the ECO editor is readily available in the software.
When using non-GUI project flow (TCL), the ECO editor must be called using "ecoc" command and the ECO commands should be inside a different script which will then be used as an argument to the "ecoc" command.

This is the command line syntax for ecoc:

ecoc [-s <script_file>] [-o <output.udb>] <input.udb>]

where:
<script file> is the script containing the ECO commands (such as eco_config_memory)
<input udb> is the Place and Route output .udb file that you want to apply the ECO changes
<output.udb> is the new output .udb file. Note that this is an optional argument if you want to save the output .udb into a new file rather than overriding the current .udb that your design is using. If you do not need to save the .udb file into a new file, then you don't need to use this argument.

Here is an example script:

=================================
set project_path C:/Users/jmanguba/Desktop/Cases/Radiant
set impl_path $project_path/impl1
set project_name rev1

prj_open $project_path/$project_name

prj_run_synthesis

prj_run_map

prj_run_par

exec ecoc -s $project_path/eco_commands.tcl $impl_path/counter_impl1.udb

prj_run_bitstream

prj_save

prj_close
=================================

Notes:
1. You may have noticed that I have added "exec" command before ecoc. This is a requirement to invoke Radiant software tools when calling them in a script.

2. In the above example script, I did not use the -o <output.udb> argument which means the current PAR output udb will be overwritten with the ECO changes and will be used to generate the bitstream.
If you use the argument to create a new udb file and you want to use that new udb file for bitstream generation while maintaining the old udb file, then you will have to use "bitgen" command because the prj_run_bitstream or prj_run Export commands will always use the default output udb file of the PAR Phase.

Example:

=================================
set project_path C:/Users/jmanguba/Desktop/Cases/Radiant
set impl_path $project_path/impl1
set project_name rev1

prj_open $project_path/$project_name

prj_run_synthesis

prj_run_map

prj_run_par

exec ecoc -s $project_path/eco_commands.tcl -o $impl_path/counter_impl1_modified.udb $impl_path/counter_impl1.udb

exec bitgen -w $impl_path/counter_impl1_modified.udb

prj_save

prj_close
=================================

For more information on ecoc and bitgen command, please refer to the following sections in Lattice Radiant Software Help:
> ECO Editor
> Running Bit Generation from the Command Line