The set_drive command models the drive strength of input ports by setting resistive attributes, which influences transition times and delays during static timing analysis. By default, analysis tools assume an ideal zero transition time on inputs. This command allows for a more realistic model by specifying a pull-up/pull-down resistance value.
A higher resistance value indicates weaker drive strength, while a lower value indicates stronger drive. The command syntax is:
set_drive resistance port_list [-rise] [-fall] [-min] [-max]
The resistance parameter is a non-negative value whose unit must match the resistance unit defined in the technology libray. The port_list specifies input or inout ports.
Basic Application
Consider a design with a clock defined on port clk:
create_clock -period 10 [get_ports clk]
Input delays are set on ports data_in and ctrl_in relative to this clock:
set_input_delay 0.5 -clock clk [get_ports data_in]
set_input_delay 0.5 -clock clk [get_ports ctrl_in]
Applying a drive resistance to data_in:
set_drive 1.2 [get_ports data_in]
Timing reports generated with the -transition_time option will show a non-zero transition time and an additional delay on data_in. This delay is calculated as the product of the specified resistance and the total capacitance of the net connected to the input port. The net capacitance can be verified with:
report_net -significant_digits 7 [get_nets data_in]
Specifying Signal Edges
Use the -rise and -fall options to apply the drive resistance to specific signal transitions. If neither is specified, the resistance applies to both edges.
# Apply only to rising edge
set_drive -rise 0.8 [get_ports ctrl_in]
The current drive settings can be reviewed with:
report_port -drive
Min and Max Analysis Conditions
The -max option applies the resistance for maximum delay analysis (typically setup checks). The -min option applies it for minimum delay analysis (typically hold checks). If neither is specified, the resistance is set only for maximum analysis. However, during minimum delay analysis, the tool will use the max condition value if no min-specific value is defined.
# Set resistance for min analysis on the rising edge
set_drive -rise -min 0.9 [get_ports ctrl_in]
Operational Context
This command is effective only within the current analysis scenario (corner/mode). It does not apply globally across all Multicorner-Multimode (MCMM) contexts.
Note on Usage
The set_drive command is considered legacy. For modern design flows, using set_driving_cell or set_input_transition is recommended for more accurate modeling of input drive characteristics.