• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. How to highlight net in schematic when selecting a net in...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 25643
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to highlight net in schematic when selecting a net in layout

Sheppie
Sheppie over 5 years ago

HI,

After spending some time reading documentation and going through options in a Layout (XL) editor, I couldn't find an option to turn-on, what I would call, cross-probing. What I mean with that: when selecting a wire/path/polygon with net information, that the same net in the schematic view (which is already open) is highlighted. When in LayoutXL mode in a layout editor, if you select an instance, the same instance in schematic is highlighted/selected. I would like to have the same functionality for nets.

Is this possible by simply enabling an option (which I have completely missed)?

If this is not a build-in feature, I think it wouldn't be too difficult to write some SKILL code that does this:

  1. Re-define the bindkey for left-mouse-button click in layout editor (by default it triggers mouseSingleSelectPt()) to a custom procedure
  2. In this custom procedure, chech whether or not a path/wire/polygon with net information is selected, if so: proceed
  3. Check whether of not the schematic of the cell is opened in a window, if so: proceed
    BTW: how to perform this check? It should not only be opened, but also in a schematic editor window to get window ID, needed for next step...
  4. Use the procedure geAddNetProbe() to highlight the net
  5. If nothing or no wire/path/polygon is selected, the highlight(s) in schematic must be cleared

This could be made in such a way that when selecting multiple paths/wires/polygons, multiple nets are highlighted in the schematic.

Would this be possible, or does anyone already have somehting similar to this?

Thanks in advance.

Kind regards,

Sjoerd

ps:
We are currently using a custom procedure which is triggerd by a single left mouse button click, it checks whether or not a path/wire/polygon is selected, and then takes the LPP of that object and sets it to the entry layer in the LSW. This is the code to do that:

Fullscreen 1300.SCLLeMouseSingleSelectPt.il.txt Download
;;; This procedure is used to trigger custom code whenever something is selected in a layout editor window.
;;; Currently only one custom procedure is executed, but more may be added in the future.
procedure( SCLMouseSingleSelectPt()
	let( (	( selection nil ) )

		;;; Use the original selection function
		mouseSingleSelectPt()

		selection = geGetSelectedSet()

		;;; Put any custom code that should be triggered by selecting anything in a lay-out editor window below...
		SCLSetLSWEntryLayerByShape( selection )

	) ;;; end of let
) ;;; end of procedure SCLMouseSingleSelectPt

;;; Re-define the bindkey. I suggest to check the bindkey override
;;; from CIW -> Options -> Bindkeys; or with SKILL using:
;;; hiGetBindKey("Layout" "None<Btn1Down>")
hiSetBindKey("Layout" "None<Btn1Down>" "SCLMouseSingleSelectPt()")

Fullscreen 4113.SCLLeSetLSWEntryLayerByShape.il.txt Download
;;; This procedure is called from SCLMouseSingleSelectPt()
;;; This procedure sets the entry layer depending on lpp of the shape selected.
;;; This functionality is standard in Mentor Pyxis, and ported to Virtuoso using this procedure and bind-key re-mapping.
procedure( SCLSetLSWEntryLayerByShape( selection )
	let( (	( cvId nil )
		( tfId nil )
		( objId nil )
		( lpp nil )
		( proceed t ) )
		
		;;; If the selection has multiple items, then all object types have to be the same.
		;;; This is to get this script to work with wires. A wire is a special type of path.
		;;; A wire may consist of multiple segments, which will result in "selection" being
		;;; a list of more then 1 item. With the 'setof' part all items NOT equal to the first
		;;; item will be listed, thus signaling that not all items are from the same object type.
		;;; This works when only one object has been selected too.
		when( selection
			if( setof( item selection nequal( item~>objType car( selection )~>objType ) )
			then
				;;; Different object types have been selected (like rectangles/paths/instances)
				proceed = nil
			else
				foreach( item selection
					when( proceed
						cond(
							;;; The item must be a shape AND it must have an lpp.
							;;; If it doesn't comply to this, no use to proceed...
							;;; For instance: an instance does not have an lpp...
							( not( and( item~>isShape item~>lpp ) )
								proceed = nil
							)
							;;; It is a valid item (it did not past the first conditional test),
							;;; now see if the lpp has already been set: if not, this is the first item, thus set lpp.
							( not( lpp )
								lpp = item~>lpp
							)
							;;; It is a valid item, and the lpp has already been set, thus it is not the first item.
							;;; Chech whether or not the LPP different, if it is, no need to proceed: which lpp
							;;; should be used? 
							( nequal( lpp item~>lpp )
								proceed = nil
							)
						) ;;; end of cond
					) ;;; end of when
				) ;;; end of foreach item
			) ;;; end of if

			when( proceed
				objId = car( selection )
				cvId = objId~>cellView
				tfId = techGetTechFile( cvId )

				when( leIsLayerValid( lpp tfId )
					unless( leIsLayerVisible( lpp tfId )
						leSetLayerVisible( lpp t tfId )
					) ;;; end of unless

					leSetEntryLayer( lpp tfId )
				) ;;; end of when
			) ;;; end of when
		) ;;; end of when
	) ;;; end of let
) ;;; end of procedure SCLSetLSWEntryLayerByShape

Before using, remove the .txt file extension.

edit: added some text to number three and four of numbered list.

  • Cancel
Parents
  • Sheppie
    Sheppie over 5 years ago

    Hi,

    After consulting Cadence Support, this was suggested:

    You can use one of the following approach:

    Method A:

    1. Using Navigator Assistant, select desired net on the layout side.
    2. Change selection behavior using “Routing Object Granularity” on the layout side.
    3. Layout window: Options -> Selection, Routing Object Granularity -> Value as “Net”

    Method B:

    1. Via Right Mouse Context menu specify Routing Object Granularity as “Net”
      Now, selecting a portion of the net/path on the layout side, should highlight the complete net on the layout and schematic side.
    2. Use Connectivity -> XL Probe command, click on desired net in the layout window. The complete net will be probed and gets highlighted in the layout as well as schematic.

    These approaches are very useful during review. But during layout phase, “Routing Object Granularity” is normally on “Shapes and vias”. It would be handy if the schematic net will be highlighted when a shape or via is selected in the layout. Furthermore, you have ot be in LayoutXL mode for this to work, we want it to work in LayoutL mode as well.

    In order to get what we want, I wrote a bit of code, which works in both Layout L and XL mode, please see below the procedure SCLLeHighLightSchNetOnSel().

    Fullscreen 3581.mouseSingleSelectPt_addOns.il.txt Download
    ;;; This procedure is used to trigger custom code whenever something is selected in a layout editor window.
    ;;; Currently only one custom procedure is executed, but more may be added in the future.
    procedure( SCLLeMouseSingleSelectPt()
    	let( (	( selection nil ) )
    
    		;;; Use the original selection function
    		mouseSingleSelectPt()
    
    		selection = geGetSelectedSet()
    
    		;;; Put any custom code that should be triggered by selecting anything in a lay-out editor window below...
    		when( isCallable( 'SCLLeSetLSWEntryLayerByShape ) SCLLeSetLSWEntryLayerByShape( selection ) )
    		when( isCallable( 'SCLLeHighLightSchNetOnSel ) SCLLeHighLightSchNetOnSel( hiGetCurrentWindow() selection ) )
    	) ;;; end of let
    ) ;;; end of procedure SCLLeMouseSingleSelectPt
    
    ;;; Re-define the bindkey. I suggest to check the bindkey override
    ;;; from CIW -> Options -> Bindkeys; or with SKILL using:
    ;;; hiGetBindKey("Layout" "None<Btn1Down>")
    hiSetBindKey("Layout" "None<Btn1Down>" "SCLLeMouseSingleSelectPt()")
    
    ;;; This procedure is called from SCLLeMouseSingleSelectPt()
    ;;; This procedure sets the entry layer depending on lpp of the shape selected.
    ;;; This functionality is standard in Mentor Pyxis, and ported to Virtuoso using this procedure and bind-key re-mapping.
    procedure( SCLLeSetLSWEntryLayerByShape( selection )
    	let( (	( cvId nil )
    		( tfId nil )
    		( objId nil )
    		( lpp nil )
    		( proceed t ) )
    		
    		;;; If the selection has multiple items, then all object types have to be the same.
    		;;; This is to get this script to work with wires. A wire is a special type of path.
    		;;; A wire may consist of multiple segments, which will result in "selection" being
    		;;; a list of more then 1 item. With the 'setof' part all items NOT equal to the first
    		;;; item will be listed, thus signaling that not all items are from the same object type.
    		;;; This works when only one object has been selected too.
    		when( selection
    			if( setof( item selection nequal( item~>objType car( selection )~>objType ) )
    			then
    				;;; Different object types have been selected (like rectangles/paths/instances)
    				proceed = nil
    			else
    				foreach( item selection
    					when( proceed
    						cond(
    							;;; The item must be a shape AND it must have an lpp.
    							;;; If it doesn't comply to this, no use to proceed...
    							;;; For instance: an instance does not have an lpp...
    							( not( and( item~>isShape item~>lpp ) )
    								proceed = nil
    							)
    							;;; It is a valid item (it did not past the first conditional test),
    							;;; now see if the lpp has already been set: if not, this is the first item, thus set lpp.
    							( not( lpp )
    								lpp = item~>lpp
    							)
    							;;; It is a valid item, and the lpp has already been set, thus it is not the first item.
    							;;; Chech whether or not the LPP different, if it is, no need to proceed: which lpp
    							;;; should be used? 
    							( nequal( lpp item~>lpp )
    								proceed = nil
    							)
    						) ;;; end of cond
    					) ;;; end of when
    				) ;;; end of foreach item
    			) ;;; end of if
    
    			when( proceed
    				objId = car( selection )
    				cvId = objId~>cellView
    				tfId = techGetTechFile( cvId )
    
    				when( leIsLayerValid( lpp tfId )
    					unless( leIsLayerVisible( lpp tfId )
    						leSetLayerVisible( lpp t tfId )
    					) ;;; end of unless
    
    					leSetEntryLayer( lpp tfId )
    				) ;;; end of when
    			) ;;; end of when
    		) ;;; end of when
    	) ;;; end of let
    ) ;;; end of procedure SCLLeSetLSWEntryLayerByShape
    
    /*
    This procedure is called from SCLLeMouseSingleSelectPt()
    This procedure highlights the net which is selected in a layout window in the schematic window.
    If multiple nets are selected, all will be highlighted in the schematic window.
    This functionality is standard in Mentor Pyxis, and ported to Virtuoso using this procedure and bind-key re-mapping.
    
    Flow of actions (some actions might be combined into one action/check):
    1.	Check whether or not the schematic is opened in a window.
    	Yes: proceed to 2
    	No: stop
    	Hint: use the procedure geGetCellViewWindow(cvId)
    2.	Is anything selected?
    	Yes: proceed to 3
    	No: De-highlight any highlighted net in the schematic window and stop
    	Hint: use the procedure geDeleteAllProbe(windowId t)
    3.	What type(s) of object(s) is (are) selected?
    	Shape/via: filter the list of selected object to only contain shapes (path/wire/polygon) or vias and proceed to 4.
    	Anything else (like instance/ruler/etc.): De-highlight any highlighted net in the schematic window and stop
    4.	A valid object has been selected, now check whether or not it has connectivity information (i.e. a net)
    	Yes: proceed to 5
    	No: De-highlight any highlighted net in the schematic window and stop
    5.	Is the selected net available in the schematic?
    	Yes: proceed to 6
    	No: De-highlight any highlighted net in the schematic window and stop
    6.	All should be checked (have I missed anything?), now highlight the net(s) in the schematic window
    	First de-highlight all existing high-lights.
    	Hint: use procedure geAddNetProbe()
    	geAddNetProbe() needs as input the windowId, a layer-purpose-pair and a set of coordinates (x and y) of the net to highlight.
    	To find the coordinates: if the net is named using a label (in schematic) , get the coordinates of that label and use it for geAddNetProbe().
    	If no label is used, use the first coordinate of the the first section of the wire.
    	If the same net is selected more than once in the layout, obviously highlight it only once in schematic.
    */
    
    procedure( SCLLeHighLightSchNetOnSel( wIdLe selection )
    	let( (	( cvIdLe nil )
    		( cvIdSch nil ) ( wIdSch nil )
    		( lib nil ) ( cell nil ) ( view nil )
    		( validObjects nil ) ( validObjectIds nil )
    		( highLight t ) ( deHighLight nil  )
    		( hlLPPs nil ) ( hlLayNum 1 ) ( hlLPP nil )
    		( hlNetName nil ) ( hlNetNames nil )
    		( hlNetId nil ) ( hlNetFigs nil ) ( hlNetXY nil ) )
    
    		;;; First some house keeping...
    		validObjects = list( "path" "pathSeg" "polygon" "stdVia" "customVia" )
    		hlLPPs = list(	list( "hilite" "drawing1" )
    				list( "hilite" "drawing2" )
    				list( "hilite" "drawing3" )
    				list( "hilite" "drawing4" )
    				list( "hilite" "drawing5" )
    				list( "hilite" "drawing6" )
    				list( "hilite" "drawing7" )
    				list( "hilite" "drawing8" )
    				list( "hilite" "drawing9" ) )
    
    		;;; Derive information from the supplied arguments...
    		cvIdLe = wIdLe->cellView
    		lib = cvIdLe->libName
    		cell = cvIdLe->cellName
    		view = cvIdLe->viewName
    		cvIdSch = dbOpenCellViewByType( lib cell "schematic" )
    		wIdSch = geGetCellViewWindow( cvIdSch )
    
    		;;; Now filter the list of selected objects:
    		;;; - Is it a valid object?
    		;;; - Does it have connectivity information?
    		;;; - If it has connectivity, does the net exist in the schematic?
    		validObjectIds = setof( objId selection member( objId->objType validObjects ) )
    		validObjectIds = setof( objId validObjectIds objId~>net~>name )
    		validObjectIds = setof( objId validObjectIds member( objId~>net~>name cvIdSch~>nets~>name ) )
    
    		cond(
    			( !wIdSch
    				deHighLight = nil
    				highLight = nil
    			)
    			( !selection
    				deHighLight = t
    				highLight = nil
    			)
    			( !validObjectIds
    				deHighLight = t
    				highLight = nil
    			)
    			( t
    				deHighLight = t
    				highLight = t
    			)
    		) ;;; end of cond
    
    		when( deHighLight
    			geDeleteAllProbe( wIdSch t )
    		) ;;; end of when
    		
    		when( highLight
    			foreach( obj validObjectIds
    				when( hlLayNum > length( hlLPPs )
    					hlLayNum = 1
    				) ;;; end of when
    
    				hlNetName = obj~>net~>name
    				hlNetId = car( setof( net cvIdSch~>nets equal( hlNetName net~>name ) ) )
    				hlNetFigs = hlNetId~>figs
    
    				unless( hlNetXY = car( setof( fig hlNetFigs equal( fig~>objType "label" ) ) )~>xy
    					hlNetXY = caar( hlNetFigs~>points )
    				) ;;; end of unless
    
    				unless( member( hlNetName hlNetNames )
    					hlLPP = nthelem( hlLayNum hlLPPs )
    					geAddNetProbe( wIdSch hlLPP hlNetXY )
    					hlNetNames = append1( hlNetNames hlNetName )
    					hlLayNum++
    				) ;;; end of unless
    			) ;;; end of foreach obj
    		) ;;; end of when
    	) ;;; end of let
    ) ;;; end of procedure SCLLeHighLightSchNetOnSel
    

    After downloading remove the .txt from the filename...

    This works almost as wanted: when simply clicking on a shape with connectivity, it highlights the net, but when multiple shapes are selected (either by holding the <shift> key or by making a selection box (click-and-drag)) the custom procedures are not triggered. To reproduce the behavior:

    1. Load the code
    2. Open a cell in both layout and schematic
    3. Click on a shape (path/wire/polygon/via) in the layout editor which has connectivity (net information) and watch what happens in the schematic editor
    4. Now deselect all in the layout editor simply by clicking on the canvas: the highlight in schematic editor should be deleted
    5. Hold-down the <shift> key while selecting 1 or more shapes: when finished clicking, release the <shift> key -> nothing happens in the schematic editor

    When point 5 has been done, I want all the nets highlighted in the schematic editor which I selected in the layout editor.

    My question is: how do I trigger the custom call-back when multiple shapes are selected?

    Many thanks in advance.

    Kind regards,

    Sjoerd

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Sheppie
    Sheppie over 5 years ago in reply to Sheppie

    Hi,

    I've found part of the solution: when using the <shift> key while clicking, it is possible to trigger the high-light procedure. I had to create a new script to handle this:

    ;;; This procedure is used to trigger custom code whenever multiple items are selected (using the <shift>key) in a layout editor window.
    ;;; Currently only one custom procedure is executed, but more may be added in the future.
    procedure( SCLLeMouseAddSelectPt()
        let( (    ( selection nil ) )

            ;;; Use the original selection function
            mouseAddSelectPt()

            selection = geGetSelectedSet()

            ;;; Put any custom code that should be triggered by selecting anything in a lay-out editor window below...
            when( isCallable( 'SCLLeHighLightSchNetOnSel ) SCLLeHighLightSchNetOnSel( hiGetCurrentWindow() selection ) )
        ) ;;; end of let
    ) ;;; end of procedure SCLLeMouseAddSelectPt

    ;;; Re-define the bindkey. I suggest to check the bindkey override
    ;;; from CIW -> Options -> Bindkeys; or with SKILL using:
    ;;; hiGetBindKey("Layout" "Shift<Btn1Down>")
    hiSetBindKey("Layout" "Shift<Btn1Down>" "SCLLeMouseAddSelectPt()")

    I saved this to file SCLLeMouseAddSelectPt.il and loaded it.

    The only thing not working is when you drag a selection box with the mouse and select one or more things. I can't find the "bindkey" for this. I hope someone knows this.

    Kind regards,

    Sjoerd

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Sheppie

    Seems a bit complicated to do something that XL does fairly straightforwardly (and wanting it to work in L is a bit unusual since L doesn't preserve connectivity). Anyway, I probably would have used something like:

    selSet=geGetSelSet()
    geDeselectAll()
    netNames=selSet~>net~>name
    hsmSelect(?type 'net ?path hiGetCurrentWindow() ?name netNames)
    foreach(fig selSet geSelectFig(fig))

    Maybe with some uniquification of the net names. In XL this will cross-probe - but I guess it wouldn't in L so may not serve your purpose.

    For your drag selection box, I assume you'd just want to define a bind key for one of <DrawThru1> Shift<DrawThru1> or Ctrl<DrawThru1>

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Sheppie

    Seems a bit complicated to do something that XL does fairly straightforwardly (and wanting it to work in L is a bit unusual since L doesn't preserve connectivity). Anyway, I probably would have used something like:

    selSet=geGetSelSet()
    geDeselectAll()
    netNames=selSet~>net~>name
    hsmSelect(?type 'net ?path hiGetCurrentWindow() ?name netNames)
    foreach(fig selSet geSelectFig(fig))

    Maybe with some uniquification of the net names. In XL this will cross-probe - but I guess it wouldn't in L so may not serve your purpose.

    For your drag selection box, I assume you'd just want to define a bind key for one of <DrawThru1> Shift<DrawThru1> or Ctrl<DrawThru1>

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Sheppie
    Sheppie over 5 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thank you for your reply, and sorry for the delayed response.

    At the time of writing this code (have made a few updates to fix a bug where if the schematic does not exist, it would generate an error) we did not receive an answer from Cadence Support that worked for us. Now that we're a few days later, a colleague of you came back with the following:

    For VXL, You can set the variable "crossSelectLayoutShape" in appropriate .cdsinit file or from CIW as following
    envSetVal("layoutXL" "crossSelectLayoutShape" 'boolean t)
    or in .cdsenv file
    layoutXL crossSelectLayoutShape boolean t

    This suits our purpose in XL mode, but doesn't work in L mode.

    Regarding L mode: I know that in L mode connectivity is not preserved/updated, it is stil possible to use something like this since connectivity is nothing more than a net name being assigned to a shape (or shapes). If this wouldn't be the case, my script would stop working...

    We're not going to implement / use the "drag selection box" option. It might result in some delay if many shapes are being selected. But now I understand what the DrawThru means.

    With kind regards,

    Sjoerd

    PS: the final version of the code...

    /*
    This procedure is called from SCLLeMouseSingleSelectPt() and SCLLeMouseAddSelectPt().
    This procedure highlights the net which is selected in a layout window in the schematic window.
    If multiple nets are selected, all will be highlighted in the schematic window.
    This functionality is standard in Mentor Pyxis, and ported to Virtuoso using this procedure and bind-key re-mapping.

    Flow of actions (some actions might be combined into one action/check):
    1.    Check whether or not the schematic is opened in a window.
        Yes: proceed to 2
        No: stop
        Hint: use the procedure geGetCellViewWindow(cvId)
    2.    Is anything selected?
        Yes: proceed to 3
        No: Delete highlight any highlighted net in the schematic window and stop
        Hint: use the procedure geDeleteAllProbe(windowId t)
    3.    What type(s) of object(s) is (are) selected?
        Shape/via: filter the list of selected object to only contain shapes (path/wire/polygon) or vias and proceed to 4.
        Anything else (like instance/ruler/etc.): Delete highlight any highlighted net in the schematic window and stop
    4.    A valid object has been selected, now check whether or not it has connectivity information (i.e. a net)
        Yes: proceed to 5
        No: Delete highlight any highlighted net in the schematic window and stop
    5.    Is the selected net available in the schematic?
        Yes: proceed to 6
        No: Delete highlight any highlighted net in the schematic window and stop
    6.    All should be checked (have I missed anything?), now highlight the net(s) in the schematic window
        First delete highlight all existing high-lights.
        Hint: use procedure geAddNetProbe()
        geAddNetProbe() needs as input the windowId, a layer-purpose-pair and a set of coordinates (x and y) of the net to highlight.
        To find the coordinates: if the net is named using a label (in schematic) , get the coordinates of that label and use it for geAddNetProbe().
        If no label is used, use the first coordinate of the the first section of the wire.
        If the same net is selected more than once in the layout, obviously highlight it only once in schematic.
        As a last step, zoom-in on the highlighted net, so it is easy to find.
    */

    procedure( SCLLeHighLightSchNetOnSel( wIdLe selection )
        let( (    ( cvIdLe nil )
            ( cvIdSch nil ) ( wIdSch nil )
            ( validObjects nil ) ( validObjectIds nil )
            ( hlLPPs nil ) ( hlLayNum 1 ) ( hlLPP nil )
            ( hlNetName nil ) ( hlNetNames nil )
            ( hlNetId nil ) ( hlNetFigs nil ) ( hlNetXY nil )
            ( zoomNetFigs nil ) ( autoZoomScale nil ) ( gridSpacing nil )
            ( xCoords nil ) ( yCoords nil ) minX maxX minY maxY )

            ;;; First some house keeping...
            validObjects = list( "path" "pathSeg" "polygon" "stdVia" "customVia" )
            hlLPPs = list(    list( "hilite" "drawing1" )
                    list( "hilite" "drawing2" )
                    list( "hilite" "drawing3" )
                    list( "hilite" "drawing4" )
                    list( "hilite" "drawing5" )
                    list( "hilite" "drawing6" )
                    list( "hilite" "drawing7" )
                    list( "hilite" "drawing8" )
                    list( "hilite" "drawing9" ) )
            autoZoomScale = envGetVal("schematic" "autoZoomScale") / 100.0
            gridSpacing = envGetVal("schematic" "schGridSpacing")

            ;;; Derive information from the supplied arguments...
            cvIdLe = wIdLe->cellView
            cvIdSch = SCLOpenCellViewByType( cvIdLe->libName cvIdLe->cellName "schematic" )

            when( cvIdSch
                wIdSch = geGetCellViewWindow( cvIdSch )
            ) ;;; end of when

            ;;; Now filter the list of selected objects:
            ;;; - Is it a valid object?
            ;;; - If it has connectivity, does the net exist in the schematic?
            ;;; If nothing is selected, validObjectIds will automatically be nil.
            validObjectIds = setof( objId selection member( objId->objType validObjects ) )
            validObjectIds = setof( objId validObjectIds member( objId~>net~>name cvIdSch~>nets~>name ) )

            when( wIdSch
                geDeleteAllProbe( wIdSch t )
            ) ;;; end of when
            
            when( and( wIdSch validObjectIds )
                foreach( obj validObjectIds
                    when( hlLayNum > length( hlLPPs )
                        hlLayNum = 1
                    ) ;;; end of when

                    hlNetName = obj~>net~>name
                    hlNetId = car( setof( net cvIdSch~>nets equal( hlNetName net~>name ) ) )
                    hlNetFigs = hlNetId~>figs
                    zoomNetFigs = append( zoomNetFigs hlNetFigs )

                    unless( hlNetXY = car( setof( fig hlNetFigs equal( fig~>objType "label" ) ) )~>xy
                        hlNetXY = caar( hlNetFigs~>points )
                    ) ;;; end of unless

                    ;;; The actual high-lighting...
                    unless( member( hlNetName hlNetNames )
                        hlLPP = nthelem( hlLayNum hlLPPs )
                        geAddNetProbe( wIdSch hlLPP hlNetXY )
                        hlNetNames = append1( hlNetNames hlNetName )
                        hlLayNum++
                    ) ;;; end of unless

                ) ;;; end of foreach validObjectId

                ;;; Now zoom-in on all high-lights...
                ;;; A fig may be a label, and a label has no 'points' (will report 'nil'), thus filtering is needed...
                when( zoomNetFigs = setof( fig zoomNetFigs fig~>points )
                    ;;; Create 2 lists of all x-and y-coordinates to determine the min and max values.
                    ;;; Each fig is a line, thanks to the filtering, thus only two points to extract.
                    foreach( fig zoomNetFigs
                        xCoords = append1( xCoords xCoord( car(fig~>points) ) )
                        xCoords = append1( xCoords xCoord( cadr(fig~>points) ) )
                        yCoords = append1( yCoords yCoord( car(fig~>points) ) )
                        yCoords = append1( yCoords yCoord( cadr(fig~>points) ) )
                    ) ;;; end of foreach zoomNetFig

                    ;;; Add some extra space by adding or subtracting a few grids, to nicely center the high-lights...
                    minX = apply( 'min xCoords ) - 2*gridSpacing
                    maxX = apply( 'max xCoords ) + 2*gridSpacing
                    minY = apply( 'min yCoords ) - 2*gridSpacing
                    maxY = apply( 'max yCoords ) + 2*gridSpacing
                    hiZoomIn( wIdSch list( minX:minY maxX:maxY ) )
                ) ;;; end of when
            ) ;;; end of when
        ) ;;; end of let
    ) ;;; end of procedure SCLLeHighLightSchNetOnSel
    procedure( SCLOpenCellViewByType( @rest args )
        ;;; Define a global variable to store the null port in, to save reopening it next time
         unless( boundp( 'SCLNullPort ) && openportp( SCLNullPort )
            SCLNullPort = outfile( "/dev/null" )
        ) ;;; unless

        ;;; Be good - force any buffered warning to be displayed - this means
        ;;; we don't swallow any warning unrelated to opening a cellView.
        ;;; This is done by creating a new warning (which we'll swallow in a moment)
        ;;; which forces what is in the buffer to be output.
        warn("")

        ;;; use SKILL's dynamic scoping to redefine woport to send all
        ;;; warnings to /dev/null - and get the final (unprinted) warning
        ;;; with getWarn()
        let( ( cv ( woport SCLNullPort ) )
            cv = apply( 'dbOpenCellViewByType args )
            getWarn()
            cv
        ) ;;; end let
    ) ;;; end procedure SCLOpenCellViewByType
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information