( ESNUG 366 Item 7 ) --------------------------------------------- [02/23/01]
Subject: ( ESNUG 365 #14 ) Non-Error "Errors", DC/PT Tcl Nasties & ACS
> I would suggest:
>
> if [llength [get_ports Reset]] {
> set_output_delay 5 -clock clk [get_ports Reset]
> }
>
> If the port exists the get_ports command returns a collection handle which
> has llength of 1. If the port does not exist the get_ports command returns
> an empty string which has an llength of zero.
>
> This avoids the SEL-005 error and gets only a UID-95 warning that can be
> suppressed with the suppress_message command.
>
> - Henry George Berkley
> Electronic Consulting Santa Cruz, CA
From: Steve Golson <sgolson@trilobyte.com>
John, even better is
if [llength [get_ports -filter {@full_name==reset}]] {
set_output_delay 5 -clock clk [get_ports reset]
}
which gives no messages at all, not even the UID-95 warning.
Note that the {*} argument to get_ports is implied; you don't need to add it.
- Steve Golson
Trilobyte Systems
|
|