Magic Blue Smoke

 

Level Shifter Insertion Rule in UPF

Recently found some interesting information on how to write proper level shifter rule, when designer does not want to insert LS in one particular direction.

For example say, we don’t want tools to insert High to Low LS. If we go by traditional approach as given below

set_level_shifter -domain LOW -applies_to outputs -rule low_to_high -location parent L2HLS_rule

Will the above rule ensure that no H2L LS are inserted? Probably not.

Now lets get into little more details on how the optimization tool looks at the above rule

one important thing to note here is that, set_level_shifter UPF command is a soft-constraint and LS insertion and optimization is done based on the PST table along with some information from set_level_shifter command.

First tool looks at the PST table and then decides, we need LS as source and sink voltage differ. Now the “set_level_shifter” command says that we need L2H LS on all the outputs of domain “LOW” and its location should be parent.  Based on the set_level_shifter command it decides that L2H LS need to be inserted at the parent of “LOW” domain.  Since there is no rule on inputs and PST says that voltage differ at the input level as well, it goes ahead and insert LS on inputs as well. This is not what we wanted, we wanted only L2H LS and no H2L LS, but tool inserted both H2L and L2H LS.

 

To accomplish only L2H LS, we need to have rules defined as below

set_level_shifter -domain LOW -applies_to outputs -rule low_to_high -location parent L2HLS_rule

set_level_shifter -domain LOW -applies_to inputs -rule high_to_low –no_shift L2HLS no_H2LLS_rule

To make it more explicit, we can also include

set_level_shifter -domain HIGH -applies_to outputs -rule high_to_low –no_shift no_H2L_LS_HIGH_rule