( 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


 Sign up for the DeepChip newsletter.
Email
 Read what EDA tool users really think.


Feedback About Wiretaps ESNUGs SIGN UP! Downloads Trip Reports Advertise

"Relax. This is a discussion. Anything said here is just one engineer's opinion. Email in your dissenting letter and it'll be published, too."
This Web Site Is Modified Every 2-3 Days
Copyright 1991-2024 John Cooley.  All Rights Reserved.
| Contact John Cooley | Webmaster | Legal | Feedback Form |

   !!!     "It's not a BUG,
  /o o\  /  it's a FEATURE!"
 (  >  )
  \ - / 
  _] [_     (jcooley 1991)