Inverting the logical value of a net can be as simple as modifying the
existing LUT equations of a LUTx primitive. Or it can require inserting a LUT1 that
is configured to invert the output from its input. The schematic in the following
figure shows a FDRE primitive that is driving the output port wbOutputData[0] through an OBUF.
The following Tcl commands show how to add an inverter between the output of the FDRE and the OBUF:
create_cell -reference LUT1 ECO_INV set_property INIT 2'h1 [get_cells ECO_INV]
disconnect_net -net {n_0_SuspendM_pad_0_o_reg} -objects \ [get_pins {SuspendM_pad_0_o_reg/Q}]
connect_net -net {n_0_SuspendM_pad_0_o_reg} -objects [get_pins {ECO_INV/O}] create_net ECO_INV_in
connect_net -net ECO_INV_in -objects [get_pins {SuspendM_pad_0_o_reg/Q ECO_INV/I0}]
In this example script, LUT1 cell ECO_INV is created, and the INIT value is set to 2'h1, which implements an inversion. The net between the FDRE and OBUF is disconnected from the Q output pin of the FDRE. The output of the inverting LUT1 cell ECO_INV is connected to the I input pin of the OBUF. Finally, a net is created and connected between the Q output pin of the FDRE and the I0 input pin of the inverting LUT1 cell.
The following figure shows the schematic of the resulting logical netlist changes.
After you modify the netlist successfully, implement the logical
changes. The LUT1 cell must be placed, and the nets to and from the cell routed.
This must occur without modifying placement or routing of parts of the design that
have not been modified. The Vivado
implementation commands automatically use incremental mode when you run place_design on the modified netlist. The log file
reflects that by showing the Incremental Placement Summary:
---------------------------------------------------------------------------
| Incremental Placement Summary |
---------------------------------------------------------------------------
| Type | Count | Percentage |
---------------------------------------------------------------------------
| Total instances | 3834 | 100.00 |
| Reused instances | 3833 | 99.97 |
| Non-reused instances | 1 | 0.03 |
| New | 1 | 0.03 |
---------------------------------------------------------------------------
To preserve existing routing and route only the modified nets, use
the route_design command. This incrementally routes
only the changes, as you can see in the Incremental Routing Reuse Summary in the log
file:
---------------------------------------------------------------------------
| Incremental Routing Reuse Summary |
---------------------------------------------------------------------------
| Type | Count | Percentage |
---------------------------------------------------------------------------
| Fully reused nets | 6401 | 99.97 |
| Partially reused nets | 0 | 0.00 |
| Non-reused nets | 2 | 0.03 |
---------------------------------------------------------------------------
Instead of automatically placing and routing the modified netlist
using the incremental place_design and route_design commands, the logical changes can be
committed using manual placement and routing constraints. For more information see
the Modifying Placement and Modifying Routing sections earlier in this chapter.