Skip to content

Instantly share code, notes, and snippets.

@02015678
Last active August 15, 2022 18:23
Show Gist options
  • Save 02015678/1a2aabd799ff35168120c77ff59ebc25 to your computer and use it in GitHub Desktop.
Save 02015678/1a2aabd799ff35168120c77ff59ebc25 to your computer and use it in GitHub Desktop.
Open xterm right into your ADE netlist directory
; ==============================
Append below code to your effective .cdsinit file
; ==============================
; first, define xterm function
procedure(xterm()
let((current_session netlist_directory top_cellview currentWorkingDir)
;get current session
current_session = asiGetCurrentSession()
;get netlist directory
netlist_directory = asiGetNetlistDir(current_session)
;get top cellview
top_cellview = asiGetTopCellView(current_session)
;goto the netlist directory in a new xterm
currentWorkingDir=getWorkingDir()
changeWorkingDir(netlist_directory)
system(sprintf(nil "xterm -title \"%s\" &" top_cellview~>cellName))
changeWorkingDir(currentWorkingDir)
) ; let
) ; procedure
; then insert a menu entry in CIW
ciwMenuInit()
myItem = hiCreateMenuItem(?name 'myItem
?itemText "Opem xterm in netlist folder"
?callback "xterm()"
)
hiAddMenuItem( ciwFileMenu myItem )
hiCreateMenu( 'myPulldown "Debug" list( myItem ) )
hiInsertBannerMenu( window(1) 'myPulldown 2 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment