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
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.
write_checkpoint
command, or may be exported to a netlist file such as Verilog, VHDL, or EDIF, using the appropriate write_*
command.
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.
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.
-verbose
- (Optional) Temporarily override any message limits and return all messages from this command.
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
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