create_port - 2020.2 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

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

Create scalar or bus port

Syntax

create_port ‑direction <arg> [‑from <arg>] [‑to <arg>] [‑diff_pair]
    [‑interface <arg>] [‑quiet] [‑verbose] <name> [<negative_name>]

Returns

list of port objects that were created

Usage

Name Description
-direction Direction of port. Valid arguments are IN, OUT and INOUT
[-from] Beginning index of new bus
[-to] Ending index of new bus
[-diff_pair] Create differential pair of ports
[-interface] Assign new port to this interface
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution
<name> Name of the port
[<negative_name>] Optional negative name of a diff-pair

Categories

PinPlanning

Description

Creates a port and specifies such parameters as direction, width, single-ended or differential, and optionally assigns it to an existing interface. New ports are added at the top-level of the design hierarchy.

Bus ports can be created with increasing or decreasing bus indexes, using negative and positive index values.

The create_port command can be used to create a new port in an I/O Planning project, or while editing the netlist of an open Synthesized or Implemented design.

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.

Arguments

-direction - (Required) The direction of the port. Valid arguments are IN, OUT, and INOUT.

-from <arg> - (Optional) The beginning index of a new bus. A bus can start from a negative index value.

-to <arg> - (Optional) The ending index of a new bus. A bus can end on a negative index value.

-diff_pair - (Optional) Create the specified port as a differential pair of ports. In this case both a positive and negative side port will be created. If only <name> is specified, the positive side port will be assigned the specified <name>, and the negative side port will be assigned <name_N>. If both <name> and <negative_name> are specified, the positive side port will be assigned <name>, and the negative side port will be assigned <negative_name>.

-interface <arg> - (Optional) Assign the port to the specified interface.
Note: The interface must first be defined with the create_interface command.
-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.

<name> - (Required) The name of the port to create. If -diff_pair is specified, <name> is assigned to the positive side port, and the negative side port is <name>_N.

<negative_name> - (Optional) Use this option to specify the name of the negative side port when -diff_pair is specified. In this case, <name> will be assigned to the positive side port, and <negative_name> will be assigned to the negative side port.

Examples

The following example creates a new input port, named PORT0:
create_port -direction IN PORT0
The following example creates a new interface called Group1, and then creates a four-bit, differential pair output bus using the specified interface. Since the bus ports are defined as differential pairs, and only <name> is specified, the negative side ports are automatically named D_BUS_N:
create_interface Group1  
create_port -direction OUT -from 0 -to 3 -diff_pair -interface Group1 D_BUS
Note: This command results in the creation of eight ports: D_BUS[0] D_BUS_N[0] D_BUS[1] D_BUS_N[1] D_BUS[2] D_BUS_N[2] D_BUS[3] D_BUS_N[3]
With only <name> specified, the following example creates differential pair output ports named data and data_N.
create_port -direction OUT -diff_pair data
With both <name> and <negative_name> specified, the following example creates differential pair output ports named data_P and data_N.
create_port -direction OUT -diff_pair data_P data_N