I'm trying to disable shift enable in function mode.
This is the VHDL code: i_scan_shift_enable <= '0' when scan_mode_in = '0' else scan_shift_enable;
So "scan_shift_enable" is driven from a pad and "i_scan_shift_enable" drives the flops.
However I can't seem to keep net i_scan_shift_enable preserved and even if I did would it be a valid pin for the DFT tools to hookup to.
How is this generally done? Is it necessary to instantiate tech cell, preserve and hookup to the output pin?
I have seen tech cells instantiated for this purpuse, but it isn't absolutely necessary.
Using a hierarchical pin for this purpose is quite useful. If you can make i_scan_shift_enable a hierarchical pin, then you can define your shift_enable as follows:
define_dft shift_enable -name SE -hookup_pin [find / -pin <hier_path>/i_scan_shift_enable] -hookup_polarity non_inverted [find / -port scan_shift_enable]
When connecting scan chains, RC will know to connect to the <hier_path>/i_scan_shift_enable pin. But, when writing out interface files for Encounter Test, RC will know that the shift_enable port is scan_shift_enable.
You are correct that you cannot rely on net names to be preserved throughout the flow. But, you can generally rely on hierarchical pins to remain throughout the flow (at least through synthesis), as long as you prevent them from being ungrouped.