⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 net_editor.il

📁 skill语言在Cadence平台二次开发中大量使用
💻 IL
📖 第 1 页 / 共 5 页
字号:
                netdel = axlUIYesNo( pmptmess )
                axlDehighlightObject( netpickid)
                if( netdel == t then
                        netdelfl = outfile("ia_net_edit_tmp_in_file.txt")
                        fprintf( netdelfl "$NETS\n$DELETE\n%s\n$END\n" car(netpickid)->name)
                        close( netdelfl)
                else
                        doneit = t
                );endif
                allfound = t
        );endif
);end-prog
);enddefun
;----------------------------- Delete By Net Name -------------------------------
;       This function will find a net by giving the net name. This will verify
;       if the net name exists first, Verify the nets deletion, the create the
;       proper delete file.
;-------------------------------------------------------------------------------
defun( _INEDelNetname ()
prog( ()
        good = nil
        netname = axlUIPrompt( "Enter Net Name To Be Deleted" "")
        netname = upperCase(netname)
        if( netname != nil then
                netname = upperCase(netname)
                if( netname == "" then
                        axlMsgPut(" No Net Name Selected.")
                        doneit = t
                        allfound = t
                else
                        axlSetFindFilter( ?enabled '( "noall" "nets") ?onButtons '("nets"))
                        axlAddSelectAll()
                        netnamelist = axlGetSelSet()
                        foreach( net netnamelist
                                when( net->name == netname
                                        netid = list( net )
                                        good = t
                                );endwhen
                        );endeach
                        if( good == t then
                                axlHighlightObject( netid )
                                sprintf( pmptmess "Net Name %s Will Be Delete!" netname)
                                netdel = axlUIYesNo( pmptmess )
                                axlDehighlightObject( netid )
                                if( netdel == t then
                                        netdelfl = outfile("ia_net_edit_tmp_in_file.txt")
                                        fprintf( netdelfl "$NETS\n$DELETE\n%s\n$END\n" netname)
                                        close( netdelfl)
                                else
                                        doneit = t
                                );
                        else
                                axlClearSelSet()
                                axlMsgPut(" Net Name Not Found! Try Again!")
                                allfound = t
                        );endif
                );endif
        else
                doneit = t
        );endif
);endprog
);enddfun
;--------------------------Net IN Routine For Deleting  net ---------------------
; This funtion Operates the netin scripts, the suspends all funtions and leaves
; a done popup to exit this program
;--------------------------------------------------------------------------------
defun( _INEDelNetIn ()
        when( isFile("ia_net_edit_tmp_in_file.txt")
		    l_bBox=axlWindowBoxGet()	;Save the current window view
                axlMsgPut("Updating Database.")
                axlClearSelSet()
                axlUIPopupSet(nil)
                axlShell("scriptmode +invisible")
                axlShell("scriptmode +noinfo")
                axlShell("setwindow pcb")
                axlShell("netin param")
                axlShell("setwindow form.niparams")
		    axlShell("FORM niparams netin_netlist YES") 
                axlShell("FORM niparams filename ia_net_edit_tmp_in_file.txt")
                axlShell("FORM niparams options")
                axlShell("FORM niparams syntax_check_only NO")
                axlShell("FORM niparams supercede NO")
                axlShell("FORM niparams append_device_log NO")
                axlShell("FORM niparams remove_etch YES")
                axlShell("FORM niparams place_never YES")
                axlShell("FORM niparams Done")
                axlShell("setwindow pcb")
                axlShell("scriptmode -invisible")
                axlShell("scriptmode -noinfo")
                deleteFile("iane_tmp.txt")
                deleteFile( "ia_net_edit_tmp_in_file.txt")
		    axlWindowBoxSet(l_bBox)	;restore window view
                return()
        );endwhen
);enddefun
;--------------------Select Pin by Pick to Delete Pin from net ------------------
; This function will call routines to find a pin, verify the pin is assigned to a
; net, then verify to the user that the pin will be deleted from the net.
;--------------------------------------------------------------------------------
defun( _INEDel_Pin_Commands ()
prog( ()
        _INEInitVar()
        netdel = nil
        pindel = nil
        _INEPopUpDelPin()
        while( allfound == nil
                axlMsgPut(" Select Pin To Be Deleted.")
                axlSetFindFilter( ?enabled '( "noall" "pins") ?onButtons '("pins"))
                axlSingleSelectPoint()
                when( (allfound == nil && netdel == nil) pingrp = axlGetSelSet())
                if(pingrp != nil && ooped != t then
                        axlHighlightObject( pingrp )
                        if( car(pingrp)->net->name == "" then
                                axlMsgPut("Pin %s.%s Has No Net Assigned. No Action Taken"
                                        car( pingrp )->parent->refdes car(pingrp)->number)
                                axlDehighlightObject( pingrp )
                                pingrp = nil
                        else
                                sprintf( pmptmess "Pin %s.%s Will Be Deleted From\n Net %s."
                                        car( pingrp )->parent->refdes car(pingrp)->number car(pingrp)->net->name)
                                netdel = axlUIYesNo( pmptmess )
                                axlDehighlightObject( pingrp )
                                if(netdel == t then
                                        pindlf = outfile("ia_net_edit_tmp_in_file.txt")
                                        fprintf( pindlf "$PINS\n$DELETE\n%s.%s\n$END\n"
                                        car(pingrp)->parent->refdes car(pingrp)->number)
                                        close( pindlf)
                                        allfound = t
                                else
                                        pingrp = nil
                                        allfound = nil
                                        doneit = t
                                );endif
                        );endif
                else
                        when(ooped == nil axlMsgPut("No Pin Found, Try Again!"))
                        pingrp = nil
                );endif
        );endwhile
        unless( pingrp == nil
                _INENetIn()
        );endunless
        axlUIPopupSet(nil)
        axlClearSelSet()
        unless( doneit == t
                axlFormClose( _INESFormPtr )
                axlFlushDisplay()
                _INEStart()
        );endunless
);endprog
);enddefun
;-------------------------Delete_ Pin From Net By Name -------------------------
defun( _INEDelPinName ()
prog( ()
        axlCancelEnterFun()
        newpin_name = nil
        pincount = count = nil
        refdesids = nil
        axlClearSelSet()
        axlSetFindFilter( ?enabled (list "noall" "symbols") ?onButtons (list "symbols"))
        axlAddSelectAll()
        refdesids = axlGetSelSet()
        looking = plook = nil
        while( looking == nil && plook == nil
                axlSetFindFilter( ?enabled (list "noall" "pins") ?onButtons (list "pins"))
                newpin_name = axlUIPrompt("Enter Refdes.Pinnum" "")
                if( newpin_name == nil then
                        axlCancelEnterFun()
                        plook = t
                        looking = t
                        _INECancel()
                else
                        when( newpin_name != ""
                                newpin_name = upperCase(newpin_name)
                                rdpinlst = parseString( newpin_name ".")
                                refdesg = nthelem( 1 rdpinlst)
                                pinidno = nthelem( 2 rdpinlst)
                                count = 1
                                while( nthelem(count refdesids) && looking == nil
                                        when( nthelem(count refdesids)->refdes == refdesg
                                                pinlist = nthelem( count refdesids)->pins
                                                pcount = 1
                                                while( nthelem(pcount pinlist) && plook == nil
                                                        when( nthelem(pcount pinlist)->number == pinidno
                                                                if( nthelem(pcount pinlist)->net->name != "" then
                                                                        pingrp = list(nthelem( pcount pinlist))
                                                                        netdel = t
                                                                        axlMsgPut(" %s Selected" newpin_name)
                                                                else
                                                                        axlMsgPut(" Pin Not Assigned to a Net. Try Again.")
                                                                );endif
                                                                plook = t
                                                        );endwhen
                                                        ++pcount
                                                );endwhile
                                                unless( (plook == t) axlMsgPut("Pin Number Not Found. Try Again."))
                                                looking = t
                                        );endwhen
                                        ++count
                                );endwhile
                                unless( (looking == t) axlMsgPut("RefDes Not Found, Try Again."))
                        );endwhen
                );endif

                unless(pingrp == nil axlHighlightObject( pingrp))
        );endwhile
        axlClearSelSet()
        return( pingrp)
);endprog
);enddefun
;--------------------Select Pin by Pick to Add Pin To net -----------------------
; This function will call routines to find a pin, verify the pin is not assigned
; to a net. Then request a net name and verify that net exists. then Add pin to
; the net.
;--------------------------------------------------------------------------------
defun( _INEAdd_Pin_Commands ()
prog( ()
        _INEInitVar()
        good = nil
        pinfound = nil
        netfound = nil
        netnme = nil
        _INEPopUpAddPin()
        while( allfound == nil
                axlMsgPut(" Select Pin To Be Added.")
                axlSetFindFilter( ?enabled '( "noall" "pins") ?onButtons '("pins"))
                axlSingleSelectPoint()
                when( pinfound == nil pingrp = axlGetSelSet())
                unless( (pingrp == nil || ooped == t)
                        if( car(pingrp)->net->name != "" then
                                axlMsgPut("Pin %s.%s Is Assigned To A Net. Select Again "
                                        car( pingrp )->parent->refdes car(pingrp)->number)
                                pingrp = nil
                        else
                                axlMsgPut("Pin %s.%s Selected." car( pingrp )->parent->refdes
                                                 car(pingrp)->number)
                                pinfound = t
                        );endif
                );endunless
                while(pingrp != nil && netfound == nil
                        axlClearSelSet()
                        axlHighlightObject( car(pingrp))
                        axlUIPopupSet(nil)
                        _INEPopUpAddPinNet()
                        axlMsgPut(" Select Net to Add Pin To.")
                        axlSetFindFilter( ?enabled '( "noall" "nets") ?onButtons '("nets"))
                        axlSingleSelectPoint()
                        if( ooped == nil then
                                when(netnme == nil
                                        netnme = axlGetSelSet()
                                        good = t
                                );endwhen
                                if( car(netnme)->name  == "" then
                                        axlMsgPut("No Net Name, Please Select Again.")
                                        netfound = nil
                                else
                                        unless( netnme == nil
                                        when( (good == t && nthelem(2 netnme) == nil)
                                                allfound = t
                                                netfound = t
                                        );endwhen
                                        );endunless
                                );endif
                        else
                                ooped = nil
                                pinfound = nil
                        );endif
                );endwhile
        );endwhile
        unless(doneit == t
        when( (netfound == t && pinfound) == t
                sprintf( pmptmess "Pin %s.%s Will Be Added To\n Net %s."
                        car( pingrp )->parent->refdes car(pingrp)->number car(netnme)->name)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -