Get_port_info, Get_port_info –107 – Altera SDC and TimeQuest API User Manual

Page 117

Advertising
background image

Chapter 2: SDC and TimeQuest API Package and Commands

2–107

sta

© December 2009

Altera Corporation

SDC and TimeQuest API Reference Manual

get_port_info

Usage

get_port_info [-edge_rate] [-is_inout_port] [-is_input_port] [-is_output_port] [-name]
[-type] <port_object>

Options

-edge_rate: Return the edge_rate value

-is_inout_port: Return true if it is an inout port, or false otherwise

-is_input_port: Return true if it is an input port, or false otherwise

-is_output_port: Return true if it is an output port, or false otherwise

-name: Return the port name

-type: Return the port type

<port_object>: Port object

Description

Returns information about the specified port (referenced by port ID). Port ID's can be obtained by Tcl
commands such as get_ports. The -type option returns "port". The -name, -type, -edge_rate, -is_input_port,
-is_output_port and is_inout_port options are mutually exclusive.

Example

project_open chiptrip
create_timing_netlist
set ports [get_ports]
foreach_in_collection port $ports {
set port_type ""
if [get_port_info $port -is_inout_port] {
set port_type "bidir"
} elseif [get_port_info $port -is_input_port {
set port_type "in"
} else {
set port_type "out"
}
puts "[get_port_info $port -name]: $port_type"
}
delete_timing_netlist
project_close

Advertising