resize_port_bus - 2020.2 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
UG835
Release Date
2020-11-18
Version
2020.2 English

Resize port bus in the current design

Syntax

resize_port_bus [‑from <arg>] [‑to <arg>] [‑quiet] [‑verbose]
    <port_bus_name>...

Usage

Name Description
[-from] New starting bus index
[-to] New ending bus index
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution
<port_bus_name> Name of the port bus to resize

Categories

PinPlanning

Description

Resize an existing bus port, to grow the bus, shrink the bus, or renumber the current range of port indexes. You can only do a single grow, shrink, or renumber operation with each command.
  • You can grow the bus by indicating a new range of port indexes outside the current range of indexes. Growing the bus leaves existing port indexes connected as they currently are.
  • You can shrink the bus by indicating a new range of port indexes inside the current range of indexes. Shrinking the bus, eliminates connections to removed bus ports, but leaves the remaining ports connected as they currently are.
  • You can renumber the current bus indexes by providing a new range of port indexes with the same width as the current range. Renumbering ports changes the port index, but does not otherwise change connections.
Netlist editing changes the in-memory view of the netlist in the current design. It does not change the files in the source fileset, or change the persistent design on the disk. Changes made to the netlist may be saved to a design checkpoint using the write_checkpoint command, or may be exported to a netlist file such as Verilog, VHDL, or EDIF, using the appropriate write_* command.
Note: Netlist editing is not allowed on the elaborated RTL design.

This command returns nothing if successful, and returns an error if it fails.

Arguments

-from <arg> - (Optional) The new starting index of the specified bus port.

-to <arg> - (Optional) The new ending index of the specified bus port.

-quiet - (Optional) Execute the command quietly, returning no messages from the command. The command also returns TCL_OK regardless of any errors encountered during execution.
Note: Any errors encountered on the command-line, while launching the command, will be returned. Only errors occurring inside the command will be trapped.
-verbose - (Optional) Temporarily override any message limits and return all messages from this command.
Note: Message limits can be defined with the set_msg_config command.

<bus_port_name> - (Required) The name of the bus port to modify.

Examples

The following example creates a 32-bit output bus port, then renumbers the ports to include negative bus indexes, then shrinks the bus width from 32-bits to 16-bits:
create_port -direction out -from 0 -to 31 outPorts  
resize_port_bus -from -16 -to 15 outPorts  
resize_port_bus -from -8 -to 7 outPorts