; Electric VLSI Design System
; Graphical user interface for EVE: VLSI System
; Written by: Steven M. Rubin, Static Free Software.
; (c) Static Free Software 2000.
; All or a portion of this program is subject to the restrictions
; contained in a license granted by, and remains the unpublished
; property of, Static Free Software.

; Keyboard commands
; -----------------
; A  Select All
; B  Size
; C  Copy
; D  Down Hierarchy
; E  Create port
; F  Focus on highlighted
; G  Toggle grid
; H  Project management
; I  Get Info
; J  Rotate 90 degrees counterclockwise
; K  Show network
; L  Find text
; M  Duplicate
; N  Edit Facet
; O  Open Library
; P  Peek inside highlighted
; Q  Quit
; R  Redo
; S  Save Library
; T  Negated
; U  Up Hierarchy
; V  Paste text
; W  Delete window
; X  Cut text
; Y  Outline Edit
; Z  Undo
; 0  Zoom out
; 1  Push Selection
; 2  Pan down
; 3  Pop Selection
; 4  Pan left
; 5  
; 6  Pan right
; 7  Zoom in
; 8  Pan up
; 9  Fill Window

; -------BUTTON------|-----UNIX------|----Windows----|-----Macintosh----|----------------Command----------------
; S  Select          |           Left|           Left|               Clk|find port extra-info interactive
; T  Toggle Select   |Sh-        Left|Sh-        Left|Sh-            Clk|find port comp-interactive
; A  Select Other    |   Ctr-    Left|   Ctr-    Left|   Ctr-        Clk|find port extra-info more interactive
; L  Toggle Sel Other|Sh-Ctr-    Left|Sh-Ctr-    Left|Sh-Ctr-        Clk|find port more comp-interactive
; P  Special Select  |       Met-Left|       Alt-Left|           Opt-Clk|find port extra-info special interactive
; O  Toggle Sp Select|Sh-   -Met-Left|Sh-    Alt-Left|Sh-        Opt-Clk|find port special comp-interactive
; N  Sp Sel Another  |   Ctr-Met-Left|   Ctr-Alt-Left|   Ctr-    Opt-Clk|find port extra-info special more interactive
; X  Tog Sp Sel Other|Sh-Ctr-Met-Left|Sh-Ctr-Alt-Left|Sh-Ctr-    Opt-Clk|find port special more comp-interactive
; I  Info            |--Double-- Left|--Double-- Left|--Double--     Clk|terminal input b "getinfo" show
; C  Creation        |           Rght|           Rght|       Cmd-    Clk|create join-angle
; R  Rectangle Select|       Met-Rght|       Alt-Rght|       Cmd-Opt Clk|find area-define
; Z  Rectangle Zoom  |Sh-    Met-Rght|Sh-    Alt-Rght|Sh-    Cmd-Opt Clk|find area-define/window highlight-displayed
; W  Wire/Tech. Edit |Sh-        Rght|Sh-        Rght|Sh-    Cmd-    Clk|create angle / menu dopopup technology edit change
; M  Constrained Move|   Ctr-    Rght|   Ctr-    Rght|   Ctr-Cmd-    Clk|find port extra-info constrained interactive
; K  Erase key code
; E  Name of Technology Edit (W) button
; F  Name of Selection (S) button
; G  Name of Creation (C) button
;
; These command interpreter variables are used by the package:
;    a b c d e   g h i j k   m n
;    A B C   E F G H I   K L M N O P   R S T   V W X   Z

rename getproto pmgetproto
macbegin getproto no-execute
pmgetproto %1 %2
if %1 != "arc" create wait-for-down
macend

; macro to ensure that there is only 1 node selected.  Sets %b nonzero if so
macbegin pmonenode no-execute
var set b 1
var set a $~c
if %a == 1 macdone
var set b 0
if %a == 0 echo "First select one" %1
if %a > 1 echo "Select only one" %1
macend

; macro to ensure that there is a current facet.  Sets %b zero on error
macbegin pmgotfacet no-execute
var set b 1
var set a $facet:~
if %ax != x macdone
var set b 0
echo "Must be editing a facet first"
macend

macbegin buttonsmac no-execute
var set S button
var set T sbutton
var set A cbutton
var set L scbutton
var set P obutton
var set O sobutton
var set N cobutton
var set X scobutton
var set I dbutton
var set C mbutton
var set R mobutton
var set Z smobutton
var set W sobutton
var set M cmbutton
var set K ^010
var set E "Command-Option-Button"
var set F "Button"
var set G "Command-Button"
macend

macbegin buttonsunix no-execute
var set S left
var set T sleft
var set A cleft
var set L scleft
var set P mleft
var set O smleft
var set N cmleft
var set X scmleft
var set I dleft
var set C right
var set R mright
var set Z smright
var set W sright
var set M cright
var set K ^0177
var set E "Shift-Right Button"
var set F "Left Button"
var set G "Right Button"
bind set button middle -
bind set button smiddle -
macend

macbegin buttonswindows no-execute
var set S left
var set T sleft
var set A cleft
var set L scleft
var set P aleft
var set O saleft
var set N caleft
var set X scaleft
var set I dleft
var set C right
var set R aright
var set Z saright
var set W sright
var set M cright
var set K ^010
var set E "Shift-Right Button"
var set F "Left Button"
var set G "Right Button"
macend

if $aid:user.USER_machine == Macintosh buttonsmac
if $aid:user.USER_machine == UNIX buttonsunix
if $aid:user.USER_machine == Windows buttonswindows

;******************************* ARROW KEY MOVEMENT *******************************

var set m 1
var set n 8
var set B 0.6

macbegin setarrowstep no-execute
var set m %1
var set n %2
macend

bind set key l var set B 0.6
bind set key s var set B 0.3
bind set key q setarrowstep .25 2
bind set key h setarrowstep .5 4
bind set key f setarrowstep 1 8
bind set key "^034" move left ^%m
bind set key "^035" move right ^%m
bind set key "^036" move up ^%m
bind set key "^037" move down ^%m
bind set key "^0234" move left ^%n
bind set key "^0235" move right ^%n
bind set key "^0236" move up ^%n
bind set key "^0237" move down ^%n

;******************************* TECHNOLOGY CONTROL *******************************

macbegin pmtercmos no-execute
find constraint-angle 2
tellaid io cif input rounded-wires
macend

macbegin pmtercmosX no-execute
tellaid io cif input squared-wires
macend

macbegin pmteschematicd no-execute
menu size 1 17
bind set menu                                                             2 0w getproto Wire_Pin
bind set menu                                                             3 0w getproto Bus_Pin
bind set menu                                                             4 0w getproto Wire_Con
bind set menu                                                             5 0w getproto Buffer
bind set menu                                                             6 0w getproto And
bind set menu                                                             7 0w getproto Or
bind set menu                                                             8 0w getproto Xor
bind set menu glyph schematic:Off-Page                                    9 0w pmteoff
bind set menu                                                            10 0w getproto Power
bind set menu                                                            11 0w getproto Ground
bind set menu                                                            12 0w getproto Mux
bind set menu glyph schematic:Flip-Flop message "SCHEM_flipflop_type.rs" 13 0w pmteff rs
bind set menu glyph schematic:Flip-Flop message "SCHEM_flipflop_type.jk" 14 0w pmteff jk
bind set menu glyph schematic:Flip-Flop message "SCHEM_flipflop_type.d"  15 0w pmteff d
bind set menu glyph schematic:Flip-Flop message "SCHEM_flipflop_type.t"  16 0w pmteff t
find constraint-angle 45
macend

macbegin pmteschematica no-execute
menu size 2 14
bind set menu                                                                   0 0w getproto node schematic:Wire_Pin
bind set menu glyph schematic:Source message "SCHEM_source.v/"                  1 0w pmesou v/ Voltage Source
bind set menu                                                                   2 0w getproto node schematic:Substrate 
bind set menu                                                                   3 0w getproto node schematic:Power 
bind set menu glyph schematic:Resistor                                          4 0w pmeitem Resistor SCHEM_resistance Resistor resistance
bind set menu glyph schematic:Capacitor                                         5 0w pmecap
bind set menu glyph schematic:Diode                                             6 0w pmedio
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.njfet"  7 0w pmetrn njfet
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.dmes"   8 0w pmetrn dmes
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.npn"    9 0w pmetrn npn
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.nmos"  10 0w pmetrnlw nmos
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.dmos"  11 0w pmetrnlw dmos
bind set menu glyph schematic:Two-Port message "SCHEM_twoport_type.h"          12 0w pmetwo h CCVS resistance
bind set menu glyph schematic:Two-Port message "SCHEM_twoport_type.u"          13 0w pmetwo u VCVS gain
bind set menu                                                                   0 1w getproto node schematic:Switch 
bind set menu                                                                   1 1w getproto node schematic:Meter 
bind set menu                                                                   2 1w getproto node schematic:Well 
bind set menu                                                                   3 1w getproto node schematic:Ground 
bind set menu glyph schematic:Inductor                                          4 1w pmeitem Inductor SCHEM_inductance x inductance
bind set menu glyph schematic:Capacitor message "SCHEM_capacitance.e"           5 1w pmecap e
bind set menu glyph schematic:Diode message "SCHEM_diode.z"                     6 1w pmedio z
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.pjfet"  7 1w pmetrn pjfet
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.emes"   8 1w pmetrn emes
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.pnp"    9 1w pmetrn pnp
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.pmos"  10 1w pmetrnlw pmos
bind set menu glyph schematic:Two-Port message "SCHEM_twoport_type.l"          11 1w pmetwo l Transmission
bind set menu glyph schematic:Two-Port message "SCHEM_twoport_type.f"          12 1w pmetwo f CCCS gain
bind set menu glyph schematic:Two-Port message "SCHEM_twoport_type.g"          13 1w pmetwo g VCCS siemens
find constraint-angle 45
macend

macbegin pmtefpga no-execute
menu left size 1 6
bind set menu message "Read Arch."        textsize 12p background light-blue  5 0w pmtefreadarch
bind set menu message "Read Prims."       textsize 12p background light-blue  4 0w pmtefreadprims
bind set menu message "See Active"        textsize 12p background red         3 0w pmtefseeact
bind set menu message "Wires: Active"     textsize 12p background red         2 0w pmtefwdisp
bind set menu message "Text: On"          textsize 12p background red         1 0w pmteftdisp
bind set menu message "Edit Pips"         textsize 12p background green       0 0w pmtefeditpips
offaid drc
var options ignore
defnode * locked-primitives
defnode * instances-locked
var options track
var set l active
macend

macbegin pmtefpgaX no-execute
defnode * not locked-primitives
defnode * not instances-locked
macend

macbegin pmteswitch no-execute
if %1 == "schematic, analog" technology use schematic
if %1 == "schematic, analog" macdone
if %1 == "schematic, digital" technology use schematic
if %1 == "schematic, digital" macdone
technology use %1
macend

; always call this macro "pmtesetup" (see "us_logplayback()")
macbegin pmtesetup no-execute
if %1x == x macdone
if $tech:~ == "fpga" pmtefpgaX
if $tech:~ == "rcmos" pmtercmosX
var options ignore
pmteswitch %1
var options track
; always store current technology here (see "us_logstartrecord()")
var set H %1
menu size auto
find constraint-angle 90
if %1 == "artwork" find constraint-angle 2
if %1 == "efido" find constraint-angle 45
if %1 == "rcmos" pmtercmos
if %1 == "schematic, analog" pmteschematica
if %1 == "schematic, digital" pmteschematicd
if %1 == "fpga" pmtefpga
macend

;******************************* FILE MENU *******************************

macbegin pmfinew no-execute
terminal input a "New library name" string
if x%a != x library use %a
macend

macbegin pmfibin no-execute
terminal input a "blib/Library File" file
if x%a == x macdone
library read %a make-current
pmtesetup $~t
macend

macbegin pmficlo no-execute
terminal input a "Library to close" library
if x%a != x library kill %a
macend

macbegin pmfiwbin no-execute
library write $library:~
macend

macbegin pmfisa no-execute
var set a $library:~.userbits
var and a 04
var and library:~.userbits 073
var or  library:~.userbits 01
library write $library:~
var set b $library:~.userbits
var and b 01
if %b == 0 macdone
var or  library:~.userbits %a
macend

macbegin pmfiprint no-execute
if $aid:user.USER_machine == Macintosh library write $library:~ quickdraw
if $aid:user.USER_machine == Windows   system print
if $aid:user.USER_machine == UNIX      library write $library:~ printed-postscript
macend

macbegin pmfiextr no-execute
var set b %1
var |   b " File"
terminal input a %b file
if x%a == x macdone
if %2 != text offaid drc
library read %a %2 make-current
macend

macbegin pmfiextsr no-execute
terminal input a "sdf/SDF File" file
if x%a == x macdone
library read %a sdf merge $library:~
macend

macbegin pmfiextw no-execute
library write $library:~ %2
macend

menu popup pmfiext size 10
bind set popup pmfiext message "&CIF (Caltech Intermediate Format)"           0 pmfiextr "cif/CIF" cif
bind set popup pmfiext message "&GDS II (Stream)"                             1 pmfiextr "multi-gds/GDSII" gds
bind set popup pmfiext message "&EDIF (Electronic Design Interchange Format)" 2 pmfiextr "edif/EDIF" edif
bind set popup pmfiext message "&VHDL"                                        3 pmfiextr "vhdl/VHDL" vhdl
bind set popup pmfiext message "&LEF (Library Exchange Format)"               4 pmfiextr "lef/LEF" lef
bind set popup pmfiext message "&DEF (Design Exchange Format)"                5 pmfiextr "def/DEF" def
bind set popup pmfiext message "D&XF (AutoCAD)"                               6 pmfiextr "dxf/DXF" dxf
bind set popup pmfiext message "&SDF (Standard Delay Format)"                 7 pmfiextsr
bind set popup pmfiext message "S&UE (Schematic User Environment)"            8 pmfiextr "sue/SUE" sue
bind set popup pmfiext message "&Readable Dump"                               9 pmfiextr "tlib/Dump" text

var set a 11
if $aid:user.USER_have_cadence == 1 var + a 1
menu popup pmfiwext size %a
bind set popup pmfiwext message "&CIF (Caltech Intermediate Format)"           0 pmfiextw "CIF" cif
bind set popup pmfiwext message "&GDS II (Stream)"                             1 pmfiextw "GDSII" gds
bind set popup pmfiwext message "&EDIF (Electronic Design Interchange Format)" 2 pmfiextw "EDIF" edif
bind set popup pmfiwext message "LE&F (Library Exchange Format)"               3 pmfiextw "LEF" lef
bind set popup pmfiwext message "EAGLE"                                        4 pmfiextw "EAGLE" eagle
bind set popup pmfiwext message "PADS"                                         5 pmfiextw "PADS" pads
bind set popup pmfiwext message "D&XF (AutoCAD)"                               6 pmfiextw "DXF" dxf
bind set popup pmfiwext message "&L"                                           7 pmfiextw "L" l
bind set popup pmfiwext message "&PostScript"                                  8 pmfiextw "PostScript" postscript
bind set popup pmfiwext message "&HPGL"                                        9 pmfiextw "HPGL" hpgl
bind set popup pmfiwext message "&Readable Dump"                              10 pmfiextw "Dump" text
if $aid:user.USER_have_cadence == 1 bind set popup pmfiwext message "&SKILL (Cadence commands)"      11 pmfiextw "SKILL" skill

var set a 5
if $aid:user.USER_have_cadence == 1 var + a 1
menu popup pmfiio size %a
bind set popup pmfiio message "&CIF Options..."              0 terminal input a x cifopt
bind set popup pmfiio message "&GDS II Options..."           1 terminal input a x gdsopt
bind set popup pmfiio message "&EDIF Options..."             2 terminal input a x edifopt
bind set popup pmfiio message "&DEF Options..."              3 terminal input a x defopt
bind set popup pmfiio message "D&XF Options..."              4 terminal input a x dxfopt
if $aid:user.USER_have_cadence == 1 bind set popup pmfiio message "&SKILL Options..."  5 terminal input a x skillopt

menu popup pmfile size 15
menu popup pmfile header "&File"
bind set popup pmfile message "&New Library..."             0 pmfinew
bind set popup pmfile message "&Open Library.../O"          1 pmfibin
bind set popup pmfile message "&Import"                     2 pmfiext
bind set popup pmfile message "&Foreign File Options"       3 pmfiio
bind set popup pmfile                                       4 -
bind set popup pmfile message "&Close Library"              5 pmficlo
bind set popup pmfile message "&Save Library/S"             6 pmfiwbin
bind set popup pmfile message "Save &As..."                 7 pmfisa
bind set popup pmfile message "&Export"                     8 pmfiwext
bind set popup pmfile message "Change Current &Library..."  9 terminal input a x chglibrary
bind set popup pmfile                                      10 -
bind set popup pmfile message "&Print"                     11 pmfiprint
bind set popup pmfile message "P&rint Options..."          12 terminal input a x plot
bind set popup pmfile                                      13 -
bind set popup pmfile message "&Quit/Q"                    14 quit

;******************************* EDIT MENU *******************************

macbegin pmefaci no-execute
terminal input a "Facet to create" facet
if x%a == x macdone
pmgetproto node %a
create wait-for-down
macend

macbegin pmepur no-execute
terminal input a "Pure-layer node to create" purelayer
if x%a == x macdone
pmgetproto node %a
create wait-for-down
macend

macbegin pmearr no-execute
terminal input a "Array" array
if x%a != x tellaid user array %a
macend

macbegin pmespr no-execute
pmonenode node
if %b == 0 macdone
terminal input a "Spread" spread
if x%a != x tellaid user spread %a
macend

menu popup pmemir size 2
bind set popup pmemir message "&Horizontally"  0 mirror h ^%e
bind set popup pmemir message "&Vertically"    1 mirror v ^%e

macbegin pmedorot no-execute
tellaid user rotate %1 %d
macend

macbegin pmearot no-execute
terminal input b "Number of degrees counterclockwise to rotate"
if x%b == x macdone
tellaid user rotate %b %d
macend

macbegin pmefind no-execute
var set a "Locate:["
var  |  a %l
var  |  a "]"
terminal input l %a string
if x%l != x text find %l
macend

macbegin pmepol no-execute
pmonenode node
if %b == 0 macdone
var set a $~.proto.userbits
if x%a == x var set a 0
var and a 04000
if %a == 0 echo "Highlighted component cannot hold an outline"
if %a == 0 macdone
var set d "about-trace-point"
var set e "about-trace-point"
var set h %g
var set g "pen"
window normal-cursor %g
bind set popup pmedit message "&Erase Point"               11 node trace delete-point
bind set popup pmespf message "Exit &Outline Edit/Y"        0 pmepolx
bind set popup pmedit message "&Rotate about Point"        17 pmerot
bind set popup pmedit message "&Mirror about Point"        18 pmemir
bind set popup pminfo message "Get Outline &Info/I"         0 terminal input a "x" trace
bind set key %K node trace delete-point
bind get j button %S
bind get k button %C
bind set button %S find within vertex interactive
bind set button %C node trace add-point
bind set button %A    -
bind set button %T    -
bind set button %L    -
bind set button %W    -
bind set button %R    -
bind set button %M    -
bind set button %P    -
bind set key "^034" node trace prev-point
bind set key "^035" node trace next-point
bind set key "^036" -
bind set key "^037" -
echo "OUTLINE EDIT MODE:"
echo "Use %F to select/move point"
echo "Use %G to create point"
macend

macbegin pmepolx no-execute
var set g %h
window normal-cursor %g
var set d "more sensibly"
var set e "sensibly"
bind set popup pmedit message "&Erase"                     11 erase
bind set popup pmespf message "&Outline Edit/Y"             0 pmepol
bind set popup pmedit message "&Rotate"                    17 pmerot
bind set popup pmedit message "&Mirror"                    18 pmemir
bind set popup pminfo message "Get &Info/I"                 0 terminal input b "getinfo" show
bind set key %K erase
bind set button %S %j
bind set button %C %k
bind set button %A   find port extra-info more interactive
bind set button %T   find comp-interactive
bind set button %L   find port more comp-interactive
bind set button %W   create angle
bind set button %R   find area-define
bind set button %M   find port extra-info constrained interactive
bind set button %P   find port extra-info special interactive
bind set key "^034" move left ^%m
bind set key "^035" move right ^%m
bind set key "^036" move up ^%m
bind set key "^037" move down ^%m
echo "LEAVING OUTLINE EDIT MODE"
macend

macbegin pmemake no-execute
getproto node schematic:%1
if x$~ == x macdone
var set ~.%2 %3 display
macend

macbegin pmetrnlw no-execute
pmemake Transistor SCHEM_transistor_type %1
if x$~ == x macdone
terminal input a "Transistor width/length" widlen
if x%a != x var | ~.SCHEM_transistor_type %a
macend

macbegin pmetrn no-execute
pmemake Transistor SCHEM_transistor_type %1
if x$~ == x macdone
terminal input a Transistor area
if x%a != x var | ~.SCHEM_transistor_type %a
macend

macbegin pmedio no-execute
var set b " "
var |   b %1
pmemake Diode SCHEM_diode %b
if x$~ == x macdone
terminal input a Diode area
if x%a != x var | ~.SCHEM_diode %a
macend

macbegin pmecap no-execute
var set b " "
var |   b %1
pmemake Capacitor SCHEM_capacitance %b
if x$~ == x macdone
terminal input a x capacitance
if x%a != x var | ~.SCHEM_capacitance %a
macend

macbegin pmesou no-execute
pmemake Source SCHEM_source %1
if x$~ == x macdone
var set b "SPICE Card for "
var |   b %2
var |   b " "
var |   b %3
terminal input a %b string
if x%a != x var | ~.SCHEM_source %a
macend

macbegin pmeitem no-execute
getproto node schematic:%1
if x$~ == x macdone
tellaid user terminal input a %3 %4
var set b " "
var   | b %a
var set ~.%2 %b display
macend

menu popup pmesch size 22
bind set popup pmesch message "&nMOS Transistor"         0 pmetrnlw nmos
bind set popup pmesch message "D&MOS Transistor"         1 pmetrnlw dmos
bind set popup pmesch message "&PMOS Transistor"         2 pmetrnlw pmos
bind set popup pmesch message "NPN &Transistor"          3 pmetrn npn
bind set popup pmesch message "PNP Tr&ansistor"          4 pmetrn pnp
bind set popup pmesch message "N&JFET Transistor"        5 pmetrn njfet
bind set popup pmesch message "PJ&FET Transistor"        6 pmetrn pjfet
bind set popup pmesch message "DME&S Transistor"         7 pmetrn dmes
bind set popup pmesch message "&EMES Transistor"         8 pmetrn emes
bind set popup pmesch                                    9 -
bind set popup pmesch message "&Diode"                  10 pmedio
bind set popup pmesch message "&Zener Diode"            11 pmedio z
bind set popup pmesch                                   12 -
bind set popup pmesch message "&Capacitor"              13 pmecap
bind set popup pmesch message "E&lectrolytic Capacitor" 14 pmecap e
bind set popup pmesch                                   15 -
bind set popup pmesch message "&Resistor"               16 pmeitem Resistor SCHEM_resistance Resistor resistance
bind set popup pmesch message "&Inductor"               17 pmeitem Inductor SCHEM_inductance x inductance
bind set popup pmesch                                   18 -
bind set popup pmesch message "&Black Box"              19 pmeitem Bbox SCHEM_function "Function"
bind set popup pmesch message "S&witch"                 20 getproto node schematic:Switch
bind set popup pmesch message "&Off-page"               21 getproto node schematic:Off-Page

menu popup pmespi size 16
bind set popup pmespi message "&Voltage Source"         0 pmesou v/ Voltage Source
bind set popup pmespi message "&Current Source"         1 pmesou c/ Current Source
bind set popup pmespi                                   2 -
bind set popup pmespi message "Volta&ge Meter"          3 getproto node schematic:Meter
bind set popup pmespi message "Cu&rrent Meter"          4 pmesou cm/ Current Meter
bind set popup pmespi                                   5 -
bind set popup pmespi message "&Transient Analysis"     6 pmesou t/ Transient Analysis
bind set popup pmespi message "&DC Analysis"            7 pmesou vd/ DC Analysis
bind set popup pmespi message "&AC Analysis"            8 pmesou a/ AC Analysis
bind set popup pmespi                                   9 -
bind set popup pmespi message "&Bulk Declaration"      10 pmemake Source SCHEM_source b/
bind set popup pmespi message "&Well"                  11 getproto node schematic:Well
bind set popup pmespi message "&Substrate"             12 getproto node schematic:Substrate
bind set popup pmespi                                  13 -
bind set popup pmespi message "&Node Set"              14 pmesou n/ Node Set
bind set popup pmespi message "&Extension"             15 pmesou x/ Extension

macbegin pmespet no-execute
getproto node generic:Invisible-Pin
if x$~ == x macdone
size 0 0
var set ~.ART_message[0] "text" display
var textedit ~.ART_message in-place
find clear
macend

menu popup pmespe size 5
bind set popup pmespe message "&Text (nonlayout)"     0 pmespet
bind set popup pmespe message "Text (&layout)..."     1 terminal input a x placetext
bind set popup pmespe message "&Facet Center"         2 getproto node generic:Facet-Center
bind set popup pmespe message "&DRC Exclusion"        3 getproto node generic:DRC-Node
bind set popup pmespe message "&Annular Ring..."      4 terminal input a x annulus

menu popup pmerot size 4
bind set popup pmerot message "90 Degrees Clock&wise"          0 pmedorot 270
bind set popup pmerot message "90 Degrees &Counterclockwise/J" 1 pmedorot 90
bind set popup pmerot message "180 &Degrees"                   2 pmedorot 180
bind set popup pmerot message "&Other..."                      3 pmearot

menu popup pmesiz size 3
bind set popup pmesiz message "&Interactively/B"        0 size corner-fixed
bind set popup pmesiz message "All Selected &Nodes..."  1 size nodes
bind set popup pmesiz message "All Selected &Arcs..."   2 size arcs

menu popup pmesel size 15
bind set popup pmesel message "Sele&ct All/A"           0 find all
bind set popup pmesel message "Select All &Easy"        1 find all easy
bind set popup pmesel message "Select All &Hard"        2 find all hard
bind set popup pmesel                                   3 -
bind set popup pmesel message "Select Port..."          4 terminal input a x selectport
bind set popup pmesel message "Select Network..."       5 terminal input a x selectnet
bind set popup pmesel message "Deselect All &Arcs"      6 find deselect-arcs
bind set popup pmesel                                   7 -
bind set popup pmesel message "Make Selected Eas&y"     8 find set-easy-selection
bind set popup pmesel message "Make Selected Har&d"     9 find set-hard-selection
bind set popup pmesel                                  10 -
bind set popup pmesel message "P&ush Selection/1"      11 find down-stack
bind set popup pmesel message "P&op Selection/3"       12 find up-stack
bind set popup pmesel                                  13 -
bind set popup pmesel message "Selection O&ptions..."  14 terminal input a x selectopt

macbegin pmecha no-execute
pmonenode object
if %b == 0 macdone
terminal input a "change" change
if x%a != x tellaid user replace %a
macend

menu popup pmecln size 5
bind set popup pmecln message "Cleanup &Pins"            0 erase clean-up
bind set popup pmecln message "Cleanup Pins &Everywhere" 1 erase clean-up-all
bind set popup pmecln message "&Align to Grid"           2 node regrid-facet
bind set popup pmecln message "&Cover Implants"          3 node cover-implant
bind set popup pmecln message "Show &Nonmanhattan"       4 find nonmanhattan

; DO NOT REARRANGE MENU ENTRIES WITHOUT FIXING pmepol, pmepolx
menu popup pmespf size 3
bind set popup pmespf message "&Outline Edit/Y"        0 pmepol
bind set popup pmespf message "&Artwork Color..."      1 terminal input a "x" artlook
bind set popup pmespf message "&Find Text.../L"        2 pmefind

menu popup pmedit size 29
menu popup pmedit header "&Edit"
bind set popup pmedit message "Ne&w Facet Instance..."  0 pmefaci
bind set popup pmedit message "New Analo&g Part"        1 pmesch
bind set popup pmedit message "New SP&ICE Part"         2 pmespi
bind set popup pmedit message "New Pure-Layer &Node..." 3 pmepur
bind set popup pmedit message "New Special Ob&ject"     4 pmespe
bind set popup pmedit                                   5 -
bind set popup pmedit message "Cu&t/X"                  6 text cut
bind set popup pmedit message "Cop&y/C"                 7 text copy
bind set popup pmedit message "&Paste/V"                8 text paste
bind set popup pmedit message "Dup&licate/M"            9 duplicate
bind set popup pmedit                                  10 -
bind set popup pmedit message "&Undo/Z"                11 undo
bind set popup pmedit message "Re&do/R"                12 undo redo
bind set popup pmedit                                  13 -
bind set popup pmedit message "&Rotate"                14 pmerot
bind set popup pmedit message "&Mirror"                15 pmemir
bind set popup pmedit message "Si&ze"                  16 pmesiz
bind set popup pmedit                                  17 -
bind set popup pmedit message "&Erase"                 18 erase
bind set popup pmedit message "Erase and Rec&onnect"   19 erase pass-through
bind set popup pmedit message "Erase Geometry"         20 erase geometry
bind set popup pmedit                                  21 -
bind set popup pmedit message "&Array..."              22 pmearr
bind set popup pmedit message "&Spread..."             23 pmespr
bind set popup pmedit message "Insert &Break in Arc"   24 create breakpoint
bind set popup pmedit message "C&hange..."             25 pmecha
bind set popup pmedit message "Cleanup &Facet"         26 pmecln
bind set popup pmedit message "Sele&ction"             27 pmesel
bind set popup pmedit message "Special Function"       28 pmespf

;******************************* FACETS MENU *******************************

macbegin pmfedit no-execute
terminal input a "Facet to edit" editfacet
macend

macbegin pmfkill no-execute
terminal input a "Facet to delete" delfacet
if x%a == x macdone
tellaid user killfacet %a
macend

macbegin pmfdupv no-execute
var set a $facet:~
copyfacet %a %a
editfacet %a
macend

macbegin pmfdupf no-execute
terminal input a "New Cell Name:"
if x%a == x macdone
copyfacet $facet:~ %a
editfacet %a
macend

macbegin pmfdwn no-execute
pmonenode instance
if %b == 0 macdone
if $~.proto.primindex != 0 echo "Select a facet instance to decend"
if $~.proto.primindex == 0 editfacet
macend

macbegin pmfpack no-execute
terminal input a "New facet name for packaged layout" string
if x%a != x package %a
macend

macbegin pmfrtxt no-execute
terminal input a "text/Text File" file
if x%a == x macdone
text read %a
macend

macbegin pmfwtxt no-execute
var set b "unknown"
var set a $facet:~.cellview.viewstate
if x%a == x var set a 0
var and a 1
if %a != 0 var set b $facet:~.cell
text write %b
macend

macbegin pmfthis no-execute
pmgotfacet
if %b == 0 macdone
var set a $facet:~
show facets dates matching %a
macend

macbegin pmfflist no-execute
terminal input a "text/Facet Information Dump" ofile
if x%a == x macdone
show facets file %a dates
macend

macbegin pmffuse no-execute
terminal input a "Show usage for which facet" facet
if x%a != x show usage %a
macend

macbegin pmflisg no-execute
show facets graphically
editfacet FacetStructure new-window
macend

macbegin pmfexpa no-execute
terminal input a "Number of Levels Down to Expand"
if x%a == x macdone
node expand %a
macend

macbegin pmfuexpa no-execute
terminal input a "Number of Levels Up to Unexpand"
if x%a == x macdone
node not expand %a
macend

menu popup pmfexp size 3
bind set popup pmfexp message "One Level Down"              0 node expand 1
bind set popup pmfexp message "All the Way"                 1 node expand 999
bind set popup pmfexp message "Specified Amount..."         2 pmfexpa

menu popup pmfuexp size 3
bind set popup pmfuexp message "One Level Up"               0 node not expand 1
bind set popup pmfuexp message "All the Way"                1 node not expand 999
bind set popup pmfuexp message "Specified Amount..."        2 pmfuexpa

menu popup pmfproj size 12
bind set popup pmfproj message "&Check In and Out.../H"     0 tellaid project list-facets
bind set popup pmfproj message "&Update"                    1 tellaid project update
bind set popup pmfproj message "Check &Out This Facet"      2 tellaid project check-out
bind set popup pmfproj message "Check &In This Facet"       3 tellaid project check-in
bind set popup pmfproj                                      4 -
bind set popup pmfproj message "&Add This Facet"            5 tellaid project add-facet
bind set popup pmfproj message "&Delete This Facet"         6 tellaid project delete-facet
bind set popup pmfproj message "Old &Version of This Facet" 7 tellaid project get-old-version
bind set popup pmfproj                                      8 -
bind set popup pmfproj message "&Set User..."               9 tellaid project set-user
bind set popup pmfproj                                     10 -
bind set popup pmfproj message "&Build Project"            11 tellaid project build-project

menu popup pmfinfo size 5
bind set popup pmfinfo message "Describe &this Facet"            0 pmfthis
bind set popup pmfinfo message "Describe &all Facets"            1 show facets dates
bind set popup pmfinfo message "Describe all Facets to &File..." 2 pmfflist
bind set popup pmfinfo message "List Facet &Instances"           3 show facets contained-in-this
bind set popup pmfinfo message "List Facet &Usage..."            4 pmffuse

menu popup pmfacets size 26
menu popup pmfacets header "Fa&cets"
; &-keys in use: "A CDEFG IJ LMNOP RSTUVWX  "
bind set popup pmfacets message "&Edit Facet.../N"               0 pmfedit
bind set popup pmfacets message "De&lete Facet..."               1 pmfkill
bind set popup pmfacets message "Cross-Library &Copy..."         2 terminal input a x copyfacet
bind set popup pmfacets message "Duplic&ate Current Facet..."    3 pmfdupf
bind set popup pmfacets message "Pro&ject Management"            4 pmfproj
bind set popup pmfacets                                          5 -
bind set popup pmfacets message "&Facet Options..."              6 terminal input a x facetinfo
bind set popup pmfacets message "Facet E&xplorer..."             7 window explore
bind set popup pmfacets message "Show Facets &Graphically"       8 pmflisg
bind set popup pmfacets message "Facet Infor&mation"             9 pmfinfo
bind set popup pmfacets                                         10 -
bind set popup pmfacets message "&Down Hierarchy/D"             11 pmfdwn
bind set popup pmfacets message "&Up Hierarchy/U"               12 outhier
bind set popup pmfacets                                         13 -
bind set popup pmfacets message "Expand Facet In&stances"       14 pmfexp
bind set popup pmfacets message "U&nexpand Facet Instances"     15 pmfuexp
bind set popup pmfacets message "Look &Inside Highlighted/P"    16 window peek
bind set popup pmfacets                                         17 -
bind set popup pmfacets message "&Package into Facet..."        18 pmfpack
bind set popup pmfacets message "Extrac&t Facet Instance"       19 yanknode
bind set popup pmfacets                                         20 -
bind set popup pmfacets message "New &Version of Current Facet" 21 pmfdupv
bind set popup pmfacets message "Delete Unused &Old Versions"   22 library purge
bind set popup pmfacets                                         23 -
bind set popup pmfacets message "&Read Text Facet..."           24 pmfrtxt
bind set popup pmfacets message "&Write Text Facet..."          25 pmfwtxt

;******************************* ARC MENU *******************************

macbegin pmacur no-execute
pmonenode arc
if %b == 0 macdone
find down-stack
defnode generic:invisible-pin size 0 0
pmgetproto node generic:invisible-pin
create
erase
defnode generic:invisible-pin size 1 1
find up-stack
arc %1
macend

menu popup pmarc size 12
menu popup pmarc header "&Arc"
bind set popup pmarc message "&Rigid"                 0 arc rigid
bind set popup pmarc message "&Non-Rigid"             1 arc not rigid
bind set popup pmarc message "&Fixed-angle"           2 arc fixed-angle
bind set popup pmarc message "Not Fixed-&angle"       3 arc not fixed-angle
bind set popup pmarc                                  4 -
bind set popup pmarc message "Ne&gated/T"             5 arc toggle negated
bind set popup pmarc message "&Directional"           6 arc toggle directional
bind set popup pmarc message "Re&verse"               7 arc reverse
bind set popup pmarc                                  8 -
bind set popup pmarc message "Curve &through Cursor"  9 pmacur curve
bind set popup pmarc message "Curve a&bout Cursor"   10 pmacur center
bind set popup pmarc message "Remove &Curvature"     11 arc not curve

;******************************* PORT MENU *******************************

macbegin pmpexp no-execute
pmonenode node
if %b == 0 macdone
terminal input a "Port name" port
if x%a != x tellaid user port export %a
macend

macbegin pmpsync no-execute
terminal input a "Library with ports" library
if x%a == x macdone
port synchronize-library %a
macend

menu popup pmport size 11
menu popup pmport header "&Port"
bind set popup pmport message "&Create Port.../E"                0 pmpexp
bind set popup pmport                                            1 -
bind set popup pmport message "Re-Export &Everything"            2 port re-export-all
bind set popup pmport message "Re-Export &Highlighted"           3 port highlighted-re-export
bind set popup pmport                                            4 -
bind set popup pmport message "&Delete Port"                     5 port not export
bind set popup pmport message "De&lete All Ports on Highlighted" 6 port not export all
bind set popup pmport message "De&lete Ports in Area"            7 port not export geometry
bind set popup pmport message "&Move Port"                       8 port move
bind set popup pmport                                            9 -
bind set popup pmport message "&Add Ports from Library..."      10 pmpsync

;******************************* VIEW MENU *******************************

macbegin pmvnewv no-execute
terminal input a "VIEW" newview
if x%a != x tellaid user view new %a
macend

macbegin pmvdelv no-execute
terminal input a "View to delete" view
if x%a != x view delete %a
macend

macbegin pmvchgv no-execute
pmgotfacet
if %b == 0 macdone
var set a $facet:~
var set b "New view for facet "
var |   b %a
terminal input a %b view
if x%a != x view change $facet:~ %a
macend

macbegin pmvevie no-execute
var set a $facet:~.cell.cellname
if x%a == x macdone
var |   a %1
editfacet %a new-window non-redundant
macend

macbegin pmvemsch no-execute
var set b $facet:~.cell.cellname
if %bx == x macdone
terminal input a "Page number"
if x%a == x macdone
var |   b "{p"
var |   b %a
var |   b "}"
view new schematic-page-%a
editfacet %b new-window non-redundant
macend

macbegin pmveoth no-execute
var set b $facet:~.cell.cellname
if %bx == x macdone
terminal input a "Other view to edit" view
if x%a == x macdone
var |   b "{"
var |   b %a
var |   b "}"
editfacet %b new-window non-redundant
macend

macbegin pmvfra no-execute
view frame %1 %2
window all-displayed
macend

macbegin pmvsch no-execute
var set a $facet:~.cell.cellname
if %ax == x macdone
var |   a "{sch}"
technology convert schematic
var set b $facet:%a
if %bx == x macdone
editfacet %a new-window
macend

macbegin pmvnlay no-execute
terminal input a "Convert to new technology" technology
if x%a != x technology convert %a
macend

macbegin pmvskic no-execute
var set a $facet:~.cell.cellname
if %ax == x macdone
var |   a %1
copyfacet $facet:~ %1
var set b $facet:%a
if %bx == x macdone
editfacet %a new-window
macend

macbegin pmvvhdl no-execute
var set a $facet:~.cell.cellname
if %ax == x macdone
var |   a "{vhdl}"
tellaid vhdl-compiler make-vhdl
var set b $facet:%a
if %bx == x macdone
editfacet %a new-window
macend

menu popup pmview size 20
menu popup pmview header "&View"
; &-keys in use: "A C EFGHI KLMNO   ST VW Y "
bind set popup pmview message "&New View Type..."                   0 pmvnewv
bind set popup pmview message "D&elete View Type..."                1 pmvdelv
bind set popup pmview message "Chan&ge Facet's View..."             2 pmvchgv
bind set popup pmview                                               3 -
bind set popup pmview message "&Frame Options..."                   4 terminal input a x frameopt
bind set popup pmview message "I&con Options..."                    5 terminal input a x iconopt
bind set popup pmview                                               6 -
bind set popup pmview message "Edit La&yout View"                   7 pmvevie "{lay}"
bind set popup pmview message "Edit Schema&tic View"                8 pmvevie "{sch}"
bind set popup pmview message "Edit &Multi-Page Schematic View..."  9 pmvemsch
bind set popup pmview message "Edit V&HDL View"                    10 pmvevie "{vhdl}"
bind set popup pmview message "Edit Ic&on View"                    11 pmvevie "{ic}"
bind set popup pmview message "Edit Document&ation View"           12 pmvevie "{doc}"
bind set popup pmview message "Edit Other Vie&w..."                13 pmveoth
bind set popup pmview                                              14 -
bind set popup pmview message "Make &Schematic"                    15 pmvsch
bind set popup pmview message "Make &Layout"                       16 pmvnlay
bind set popup pmview message "Make S&keleton"                     17 pmvskic "{sk}"
bind set popup pmview message "Make &Icon"                         18 pmvskic "{ic}"
bind set popup pmview message "Make &VHDL"                         19 pmvvhdl

;******************************* WINDOWS MENU *******************************

macbegin pmwmenu no-execute
terminal input a "Menu" menu
if x%a != x tellaid user menu %a
macend

macbegin pmwedpa no-execute
terminal input a X layerpatterns
redraw
macend

menu popup pmwcol size 5
bind set popup pmwcol message "&Edit Colors..."           0 color mix
bind set popup pmwcol message "&Highlight Layer..."       1 terminal input a "x" highlayer
bind set popup pmwcol message "&Restore Default Colors"   2 color default
bind set popup pmwcol message "&Black Background Colors"  3 color black-background
bind set popup pmwcol message "&White Background Colors"  4 color white-background

macbegin pmw3set no-execute
bind set popup pmw3d message "&Rotate View Point<"        3 window 3-dimensional rotate
bind set popup pmw3d message "&Zoom View Point<"          4 window 3-dimensional zoom
bind set popup pmw3d message "&Pan View Point<"           5 window 3-dimensional pan
var set a ">&"
var |   a %1
var |   a " View Point<"
bind set popup pmw3d message %a %2 window 3-dimensional %3
window 3-dimensional %3
macend

menu popup pmw3d size 8
bind set popup pmw3d message "View in &3 Dimensions"      0 window 3-dimensional begin
bind set popup pmw3d message "View in &2 Dimensions"      1 window 3-dimensional end
bind set popup pmw3d                                      2 -
bind set popup pmw3d message "&Rotate View Point<"        3 pmw3set Rotate 3 rotate
bind set popup pmw3d message "&Zoom View Point<"          4 pmw3set Zoom 4 zoom
bind set popup pmw3d message "&Pan View Point<"           5 pmw3set Pan 5 pan
bind set popup pmw3d                                      6 -
bind set popup pmw3d message "3D &Options..."             7 terminal input a x depth3d

bind set key r pmw3set Rotate 3 rotate
bind set key z pmw3set Zoom 4 zoom
bind set key p pmw3set Pan 5 pan

menu popup pmwlang size 3
if $aid:user.USER_have_tcl  == 1 bind set popup pmwlang message "&TCL..."  0 interpret tcl
if $aid:user.USER_have_tcl  != 1 bind set popup pmwlang message "No &TCL"  0 echo "TCL not installed"
if $aid:user.USER_have_lisp == 1 bind set popup pmwlang message "&LISP..." 1 interpret lisp
if $aid:user.USER_have_lisp != 1 bind set popup pmwlang message "No &LISP" 1 echo "LISP not installed"
if $aid:user.USER_have_java == 1 bind set popup pmwlang message "&Java..." 2 interpret java
if $aid:user.USER_have_java != 1 bind set popup pmwlang message "No &Java" 2 echo "Java not installed"

macbegin pmwindz no-execute
find down-stack
find area-define
window highlight-displayed
find up-stack
macend

menu popup pmwcenter size 2
bind set popup pmwcenter message "&Selection"                0 window center-highlight
bind set popup pmwcenter message "&Cursor/5"                 1 window cursor-centered

menu popup pmwsplit size 3
bind set popup pmwsplit message "&Split"                     0 window split
bind set popup pmwsplit message "&Delete"                    1 window kill
bind set popup pmwsplit message "Make &1 Window"             2 window 1-window

menu popup pmwind size 31
menu popup pmwind header "&Windows"
; &-keys in use: "ABCDEFGHI  LMNOP RSTUVWXYZ  3"
bind set popup pmwind message "Fill &Window/9"               0 window all-displayed
bind set popup pmwind message "Redisplay Window"             1 redraw
bind set popup pmwind message "Zoom &Out/0"                  2 window out-zoom
bind set popup pmwind message "&Zoom In/7"                   3 window in-zoom
bind set popup pmwind message "Focus on &Highlighted/F"      4 window highlight-displayed
bind set popup pmwind message "&Match Other Window"          5 window match
bind set popup pmwind                                        6 -
bind set popup pmwind message "&Left/4"                      7 window right ^%B
bind set popup pmwind message "&Right/6"                     8 window left ^%B
bind set popup pmwind message "&Up/8"                        9 window down ^%B
bind set popup pmwind message "&Down/2"                     10 window up ^%B
bind set popup pmwind message "Cen&ter"                     11 pmwcenter
bind set popup pmwind message "Saved &Views..."             12 terminal input a X windowview
bind set popup pmwind                                       13 -
bind set popup pmwind message "Toggle &Grid/G"              14 grid
bind set popup pmwind message "Grid Option&s..."            15 terminal input a X grid
bind set popup pmwind message "&Alignment Options..."       16 terminal input a X alignment
bind set popup pmwind                                       17 -
bind set popup pmwind message "&New Window"                 18 window new
bind set popup pmwind message "D&elete Window/W"            19 window delete
bind set popup pmwind message "Window &Partitions"          20 pmwsplit
bind set popup pmwind                                       21 -
bind set popup pmwind message "Layer Visi&bility..."        22 terminal input a X visiblelayers
bind set popup pmwind message "&Color Options"              23 pmwcol
bind set popup pmwind message "Layer Pattern Options..."    24 pmwedpa
bind set popup pmwind message "Port Displa&y Options..."    25 terminal input a X labels
bind set popup pmwind message "Te&xt Options..."            26 terminal input a X deftext
bind set popup pmwind message "&3D Display"                 27 pmw3d
bind set popup pmwind message "Component Menu..."           28 pmwmenu
bind set popup pmwind message "Messages Window &Font..."    29 system setstatusfont
bind set popup pmwind message "Language &Interpreter"       30 pmwlang

;***************************** INFO MENU *******************************

macbegin pmidesc no-execute
echo $technology:~.techdescript
echo Lambda value is $technology:~.deflambda
echo $technology:~.layercount layers, $technology:~.arcprotocount arcs, $technology:~.nodeprotocount nodes:
show primitives
macend

macbegin pmiscc no-execute
terminal track-cursor-coordinates
bind set popup pminfou message ">Show &Cursor Coordinates<"   3 pmihcc
macend

macbegin pmihcc no-execute
terminal not track-cursor-coordinates
bind set popup pminfou message "Show &Cursor Coordinates<"    3 pmiscc
macend

macbegin pmilog no-execute
terminal input a "log/Log file" file
if x%a == x macdone
terminal session playback %a
macend

menu popup pminfoa size 2
bind set popup pminfoa message "Define..."                    0 terminal input a x attributes
bind set popup pminfoa message "Update Inheritance"           1 var reinherit

; DO NOT REARRANGE MENU ENTRIES WITHOUT FIXING pmiscc, pmihcc
var set a 5
if $aid:user.USER_machine == Macintosh var set a 4
menu popup pminfou size %a
bind set popup pminfou message "&Rename Object..."            0 terminal input a x rename
bind set popup pminfou message "&Quick Key Options..."        1 terminal input a x quickkey
bind set popup pminfou message "&Set Paths..."                2 terminal input a "x" path
bind set popup pminfou message "Show &Cursor Coordinates<"    3 pmiscc
if %a > 4 bind set popup pminfou message "Playback Log File..." 4 pmilog

; DO NOT REARRANGE MENU ENTRIES WITHOUT FIXING pmepol, pmepolx
menu popup pminfo size 24
menu popup pminfo header "&Info"
; &-keys in use: "ABC E GHI K MNOP RSTU WXY "
bind set popup pminfo message "Get &Info/I"                    0 terminal input b "getinfo" show
bind set popup pminfo message "Attri&butes"                    1 pminfoa
bind set popup pminfo                                          2 -
bind set popup pminfo message "List E&xported Ports"           3 show ports
bind set popup pminfo message "&Show Exported Ports"           4 port identify
bind set popup pminfo message "List Net&works"                 5 show networks
bind set popup pminfo message "List &Connections on Network"   6 tellaid network name-connections
bind set popup pminfo message "List &Ports on Network"         7 tellaid network list-hierarchical-ports
bind set popup pminfo message "List &Geometry on Network"      8 tellaid network show-geometry
bind set popup pminfo                                          9 -
bind set popup pminfo message "Describe Current Technolog&y"  10 pmidesc
bind set popup pminfo message "List &Tools"                   11 show aids
bind set popup pminfo                                         12 -
bind set popup pminfo message "&Help..."                      13 terminal input a EVE help
bind set popup pminfo message "S&ee Manual"                   14 help manual
bind set popup pminfo message "T&utorial"                     15 commandfile evetutor
bind set popup pminfo                                         16 -
bind set popup pminfo message "New &Node Options..."          17 terminal input a "def" defnode
bind set popup pminfo message "New &Arc Options..."           18 terminal input a "def" defarc
bind set popup pminfo                                         19 -
bind set popup pminfo message "&Option Saving..."             20 terminal input a x optionsave
bind set popup pminfo message "&Measure Distance"             21 window measure
bind set popup pminfo message "Use&r Interface"               22 pminfou
bind set popup pminfo message "Chec&k and Repair Library"     23 debug check-database

;******************************* TECHNOLOGY MENU *******************************

macbegin pmteff no-execute
getproto node schematic:Flip-Flop
if x$~ == x macdone
var set ~.SCHEM_flipflop_type %1
macend

macbegin pmteoff no-execute
getproto node schematic:Off-Page
if x$~ == x macdone
terminal input a "Port name" port
if x%a != x tellaid user port export %a use y
macend

macbegin pmtefreadarch no-execute
terminal input a "fpga/Architecture File" file
if x%a == x macdone
technology tell fpga read-architecture-file %a
macend

macbegin pmtefreadprims no-execute
terminal input a "fpga/Primitives File" file
if x%a == x macdone
technology tell fpga only-primitives-file %a
macend

macbegin pmtefseeact no-execute
technology tell fpga display-level active
window peek
technology tell fpga display-level %l
macend

macbegin pmtefwdispnone no-execute
technology tell fpga display-level empty
var set l empty
bind set menu message "Wires: None"       textsize 12p background red     2 0w pmtefwdisp
macend

macbegin pmtefwdispactive no-execute
technology tell fpga display-level active
var set l active
bind set menu message "Wires: Active"     textsize 12p background red     2 0w pmtefwdisp
macend

macbegin pmtefwdispfull no-execute
technology tell fpga display-level full
var set l full
bind set menu message "Wires: Full"       textsize 12p background red     2 0w pmtefwdisp
macend

menu popup pmtefwdisp size 3
menu popup pmtefwdisp header "Wire Display"
bind set popup pmtefwdisp message "None"            0 pmtefwdispnone
bind set popup pmtefwdisp message "Active"          1 pmtefwdispactive
bind set popup pmtefwdisp message "Full"            2 pmtefwdispfull

macbegin pmteftdispon no-execute
technology tell fpga display-level text on
bind set menu message "Text: On"          textsize 12p background red     1 0w pmteftdisp
macend

macbegin pmteftdispoff no-execute
technology tell fpga display-level text off
bind set menu message "Text: Off"         textsize 12p background red     1 0w pmteftdisp
macend

menu popup pmteftdisp size 2
menu popup pmteftdisp header "Text Display"
bind set popup pmteftdisp message "On"              0 pmteftdispon
bind set popup pmteftdisp message "Off"             1 pmteftdispoff

macbegin pmtefeditpips no-execute
pmonenode node
if %b == 0 macdone
var textedit ~.FPGA_activepips
technology tell fpga clear-node-cache
macend

macbegin pmetwo no-execute
var set b " "
var |   b %1
pmemake Two-Port SCHEM_twoport_type %b
if x$~ == x macdone
tellaid user terminal input a %2 %3
if x%a != x var | ~.SCHEM_twoport_type %a
macend

macbegin pmteset no-execute
terminal input a "Change current technology" technology
if x%a != x pmtesetup %a
macend

macbegin pmtelam no-execute
terminal input a "lambda" lambda
if x%a == x macdone
lambda change %a
redraw
macend

macbegin pmteplat no-execute
technology edit place-layer text
var set ~.ART_message[0] "text" display
var textedit ~.ART_message in-place
find clear
macend

macbegin pmteedir no-execute
var set i %g
var set g "tee"
window normal-cursor %g
var options ignore
technology use artwork
var options track
menu size 1 16
bind set menu message "TEXT"                         0 0w pmteplat
bind set menu message "ARC"                          1 0w technology edit place-layer circle-arc
bind set menu message "HALF"                         2 0w technology edit place-layer circle-half
bind set menu glyph artwork:Filled-Circle            3 0w technology edit place-layer circle-filled
bind set menu glyph artwork:Circle                   4 0w technology edit place-layer circle-outline
bind set menu glyph artwork:Opened-FarDotted-Polygon 5 0w technology edit place-layer lines-far-dotted
bind set menu glyph artwork:Opened-Dashed-Polygon    6 0w technology edit place-layer lines-dashed
bind set menu glyph artwork:Opened-Dotted-Polygon    7 0w technology edit place-layer lines-dotted
bind set menu glyph artwork:Opened-Polygon           8 0w technology edit place-layer lines-solid
bind set menu glyph artwork:Closed-Polygon           9 0w technology edit place-layer polygon-outline
bind set menu glyph artwork:Filled-Polygon          10 0w technology edit place-layer polygon-filled
bind set menu glyph artwork:Crossed-Box             11 0w technology edit place-layer rectangle-crossed
bind set menu glyph artwork:Box                     12 0w technology edit place-layer rectangle-outline
bind set menu glyph artwork:Filled-Box              13 0w technology edit place-layer rectangle-filled
bind set menu message "HIGH"                        14 0w technology edit place-layer highlight
bind set menu message "PORT"                        15 0w technology edit place-layer port
bind set button %S find interactive
bind set button %W menu dopopup technology edit change
bind set popup pmtech message "Con&vert Library to Technology" 5 pmteedic
bind set popup pmtech message "&Stop Editing Technology"       6 pmteedie
bind set popup pmtech message "Edit Primitive &Node"          10 pmteedin
bind set popup pmtech message "Edit Primitive &Arc"           11 pmteedia
bind set popup pmtech message "Edit &Layer"                   12 pmteedil
bind set popup pmtech message "Edit Ne&xt Primitive"          13 technology edit edit-subsequent
bind set popup pmtech message "Edit &Colors"                  17 technology edit edit-colors
bind set popup pmtech message "Edit Desi&gn Rules"            18 technology edit edit-design-rules
bind set popup pmtech message "Edit Varia&bles"               19 terminal input a X techvars
bind set popup pmtech message "Edit Librar&y Dependencies"    20 terminal input a X dependentlibs
bind set popup pmtech message "Edit Miscellaneous In&fo"      21 technology edit edit-misc-information
bind set popup pmtech message "Identify Pri&mitive Layers"    22 technology edit identify-layers
bind set popup pmtech message "Iden&tify Ports"               23 technology edit identify-ports
bind set popup pmtech message "Delete this &Primitive"        25 pmtedelp
bind set popup pmtenew message "New Primitive &Node"           0 pmtenewn
bind set popup pmtenew message "New Primitive &Arc"            1 pmtenewa
bind set popup pmtenew message "New &Layer"                    2 pmtenewl
bind set popup pmtereo message "Reorder Primitive &Nodes"      0 pmtere EDTEC_nodesequence Node
bind set popup pmtereo message "Reorder Primitive &Arcs"       1 pmtere EDTEC_arcsequence Arc
bind set popup pmtereo message "Reorder &Layers"               2 pmtere EDTEC_layersequence Layer
echo "Editing technology" $library:~.libname
echo "Use %E to change information"
macend

macbegin pmteeder no-execute
echo Must be editing a technology first
macend

macbegin pmteedie no-execute
var set g %i
window normal-cursor %g
menu size auto
bind set button %S find port extra-info interactive
bind set button %W create angle
bind set popup pmtech message "Con&vert and Edit Technology"   5 pmteedib
bind set popup pmtech message "Re&sume Editing Technology"     6 pmteedir
bind set popup pmtech message "Edit Primitive &Node"          10 pmteeder
bind set popup pmtech message "Edit Primitive &Arc"           11 pmteeder
bind set popup pmtech message "Edit &Layer"                   12 pmteeder
bind set popup pmtech message "Edit Ne&xt Primitive"          13 pmteeder
bind set popup pmtech message "Edit &Colors"                  17 pmteeder
bind set popup pmtech message "Edit Desi&gn Rules"            18 pmteeder
bind set popup pmtech message "Edit Varia&bles"               19 pmteeder
bind set popup pmtech message "Edit Librar&y Dependencies"    20 pmteeder
bind set popup pmtech message "Edit Miscellaneous In&fo"      21 pmteeder
bind set popup pmtech message "Identify Pri&mitive Layers"    22 pmteeder
bind set popup pmtech message "Iden&tify Ports"               23 pmteeder
bind set popup pmtech message "Delete this &Primitive"        25 pmteeder
bind set popup pmtenew message "New Primitive &Node"           0 pmteeder
bind set popup pmtenew message "New Primitive &Arc"            1 pmteeder
bind set popup pmtenew message "New &Layer"                    2 pmteeder
bind set popup pmtereo message "Reorder Primitive &Nodes"      0 pmteeder
bind set popup pmtereo message "Reorder Primitive &Arcs"       1 pmteeder
bind set popup pmtereo message "Reorder &Layers"               2 pmteeder
macend

macbegin pmteedib no-execute
var set b $library:~.libname
terminal input a "Edit technology" technology
if x%a == x macdone
technology edit tech-to-library %a
if $library:~.libname != %b pmteedir
macend

macbegin pmteedic no-execute
var set a $tech:~
technology edit library-to-tech
if $tech:~ != %a pmteedie
macend

macbegin pmteedin no-execute
terminal input a "Primitive node to edit" edtecnode
if x%a != x technology edit edit-node %a
macend

macbegin pmteedia no-execute
terminal input a "Primitive arc to edit" edtecarc
if x%a != x technology edit edit-arc %a
macend

macbegin pmteedil no-execute
terminal input a "Layer to edit" edteclayer
if x%a != x technology edit edit-layer %a
macend

macbegin pmtenewn no-execute
terminal input a "New primitive node name" string
if x%a != x technology edit edit-node %a
macend

macbegin pmtenewa no-execute
terminal input a "New primitive arc name" string
if x%a != x technology edit edit-arc %a
macend

macbegin pmtenewl no-execute
terminal input a "New primitive layer name" string
if x%a != x technology edit edit-layer %a
macend

macbegin pmtedelp no-execute
if $facet:~ != "factors" killfacet $facet:~
if $facet:~ == "factors" echo "No primitive to delete"
macend

macbegin pmtedoc no-execute
terminal input a "Document technology" technology
if x%a != x technology document %a
macend

macbegin pmteread no-execute
terminal input a "blib/Technology-Library File" file
if x%a == x macdone
echo "Reading technology library" %a "..."
var set b $library:~
var set c $tech:~
library read %a make-current
technology edit library-to-tech
if $tech:~ == %c macdone
library use %b
menu size auto
macend

macbegin pmtedel no-execute
terminal input a "Delete technology" technology
if x%a != x technology kill %a
macend

macbegin pmtere no-execute
var set a %2
var |   a " Sequence"
var textedit library:~.%1 header %a
macend

menu popup pmtenew size 3
bind set popup pmtenew message "New Primitive &Node..."      0 pmteeder
bind set popup pmtenew message "New Primitive &Arc..."       1 pmteeder
bind set popup pmtenew message "New &Layer..."               2 pmteeder

menu popup pmtereo size 3
bind set popup pmtereo message "Reorder Primitive &Nodes"    0 pmteeder
bind set popup pmtereo message "Reorder Primitive &Arcs"     1 pmteeder
bind set popup pmtereo message "Reorder &Layers"             2 pmteeder

; DO NOT REARRANGE MENU ENTRIES WITHOUT FIXING pmteedie, pmteedir
menu popup pmtech size 26
menu popup pmtech header "Tec&hnology"
bind set popup pmtech message "C&hange Current Technology..."    0 pmteset
bind set popup pmtech message "Technology &Options..."           1 terminal input a X techopt
bind set popup pmtech message "Change &Units..."                 2 pmtelam
bind set popup pmtech message "&Document Technology"             3 pmtedoc
bind set popup pmtech                                            4 -
bind set popup pmtech message "Con&vert and Edit Technology..."  5 pmteedib
bind set popup pmtech message "Re&sume Editing Technology"       6 pmteedir
bind set popup pmtech message "Read Technology L&ibrary"         7 pmteread
bind set popup pmtech message "D&elete Technology..."            8 pmtedel
bind set popup pmtech                                            9 -
bind set popup pmtech message "Edit Primitive &Node..."         10 pmteeder
bind set popup pmtech message "Edit Primitive &Arc..."          11 pmteeder
bind set popup pmtech message "Edit &Layer..."                  12 pmteeder
bind set popup pmtech message "Edit Ne&xt Primitive"            13 pmteeder
bind set popup pmtech message "Ne&w Primitive"                  14 pmtenew
bind set popup pmtech message "&Reorder Primitives"             15 pmtereo
bind set popup pmtech                                           16 -
bind set popup pmtech message "Edit &Colors..."                 17 pmteeder
bind set popup pmtech message "Edit Desi&gn Rules"              18 pmteeder
bind set popup pmtech message "Edit Varia&bles..."              19 pmteeder
bind set popup pmtech message "Edit Librar&y Dependencies..."   20 pmteeder
bind set popup pmtech message "Edit Miscellaneous In&fo"        21 pmteeder
bind set popup pmtech message "Identify Pri&mitive Layers"      22 pmteeder
bind set popup pmtech message "Iden&tify Ports"                 23 pmteeder
bind set popup pmtech                                           24 -
bind set popup pmtech message "Delete this &Primitive"          25 pmteeder

;******************************* TOOLS MENU *******************************

macbegin pmtdkeys no-execute
echo "To review DRC errors, type:"
echo " >  Show the next DRC error"
echo " <  Show the previous DRC error"
echo " &  Repeat the current DRC error"
bind set key > tellaid drc batch next-error
bind set key < tellaid drc batch previous-error
bind set key & tellaid drc batch current-error
bind set key D pmtdkeys
macend

macbegin pmtdhier no-execute
tellaid drc batch run
if %V > 0 pmtdkeys
macend

menu popup pmtdrc size 7
bind set popup pmtdrc message "&Hierarchical Check"     0 pmtdhier
bind set popup pmtdrc message "&Nonhierarchical Check"  1 tellaid drc check
bind set popup pmtdrc                                   2 -
bind set popup pmtdrc message "DRC &Options..."         3 terminal input a x drcopt
bind set popup pmtdrc message "&Clear Ignored Errors"   4 tellaid drc forget-ignored-errors
bind set popup pmtdrc                                   5 -
bind set popup pmtdrc message "Write D&racula Deck"     6 tellaid drc ecadcheck

macbegin pmtqvread no-execute
terminal input a "alsvec/Simulation Vector File" file
if x%a != x tellaid simulation als vector load %a
macend

macbegin pmtqvwrite no-execute
var set b "alsvec/Simulation Vector File|"
var |   b $library:~.libname
var |   b ".vec"
terminal input a %b ofile
if x%a != x tellaid simulation als vector save %a
macend

menu popup pmtqadd size 3
bind set popup pmtqadd message "&Typical" 0 tellaid simulation als annotate typical
bind set popup pmtqadd message "M&inimum" 1 tellaid simulation als annotate minimum
bind set popup pmtqadd message "M&aximum" 2 tellaid simulation als annotate maximum

menu popup pmtqsim size 12
bind set popup pmtqsim message "&Simulate..."                   0 tellaid simulation simulate als
bind set popup pmtqsim message "Simulation &Options..."         1 terminal input a x simopt
bind set popup pmtqsim                                          2 -
bind set popup pmtqsim message "&Annotate Delay Data"           3 pmtqadd
bind set popup pmtqsim message "&Restore Signal Display Order"  4 tellaid simulation als order restore fromlib
bind set popup pmtqsim                                          5 -
bind set popup pmtqsim message "&Down Hierarchy..."             6 tellaid simulation als level set
bind set popup pmtqsim message "&Up Hierarchy"                  7 tellaid simulation als level up
bind set popup pmtqsim                                          8 -
bind set popup pmtqsim message "Read Vectors &from Disk"        9 pmtqvread
bind set popup pmtqsim message "Save Vectors &to Disk"         10 pmtqvwrite
bind set popup pmtqsim message "&Clear All Vectors"            11 tellaid simulation als vector new

macbegin pmtsideck no-execute
var set a $aid:simulation.SIM_spice_state
var and a 060
if %a == 040 terminal input b "hspiceout/Spice Listing File" file
if %a != 040 terminal input b "spiceout/Spice Listing File" file
if x%b != x tellaid simulation spice parse-output %b
macend

macbegin pmtsvcode no-execute
getproto node generic:Invisible-Pin
if x$~ == x macdone
size 0 0
var set ~.%1^[0] %2 display 0 0 right
var textedit ~.%1 in-place
find clear
macend

menu popup pmtsim size 22
bind set popup pmtsim message "Write &SPICE Deck"               0 tellaid simulation simulate spice
bind set popup pmtsim message "SPICE &Options..."               1 terminal input a x spice
bind set popup pmtsim message "&Plot SPICE Listing"             2 pmtsideck
bind set popup pmtsim                                           3 -
bind set popup pmtsim message "Write &VERILOG Deck"             4 tellaid simulation simulate verilog
bind set popup pmtsim message "VERILO&G Options..."             5 terminal input a x verilog
bind set popup pmtsim message "Add VERILOG &Declaration"        6 pmtsvcode VERILOG_declaration Declaration
bind set popup pmtsim message "Add VERILOG &Code"               7 pmtsvcode VERILOG_code Code
bind set popup pmtsim                                           8 -
bind set popup pmtsim message "FastHenry Arc Info..."           9 terminal input a x fasthenryarc
bind set popup pmtsim message "Write FastHenry Deck"           10 tellaid simulation simulate fasthenry
bind set popup pmtsim message "FastHenry Options..."           11 terminal input a x fasthenry
bind set popup pmtsim                                          12 -
bind set popup pmtsim message "Write &ESIM Deck"               13 tellaid simulation simulate esim
bind set popup pmtsim message "Write &RSIM Deck"               14 tellaid simulation simulate rsim
bind set popup pmtsim message "Write R&NL Deck"                15 tellaid simulation simulate rnl
bind set popup pmtsim message "Write COS&MOS Deck"             16 tellaid simulation simulate cosmos
bind set popup pmtsim message "Write MOSS&IM Deck"             17 tellaid simulation simulate mossim
bind set popup pmtsim                                          18 -
bind set popup pmtsim message "Write &TEGAS Deck"              19 tellaid simulation simulate texsim
bind set popup pmtsim message "Write SI&LOS Deck"              20 tellaid simulation simulate silos
bind set popup pmtsim message "Write P&AL Deck"                21 tellaid simulation simulate abel-pal

macbegin pmtekeys no-execute
echo "To review ERC errors, type:"
echo " >  Show the next ERC error"
echo " <  Show the previous ERC error"
echo " &  Repeat the current ERC error"
bind set key > tellaid erc next-error
bind set key < tellaid erc previous-error
bind set key & tellaid erc current-error
bind set key E pmtekeys
macend

macbegin pmtesw no-execute
tellaid erc analyze
if %V > 0 pmtekeys
macend

menu popup pmterc size 2
bind set popup pmterc message "Analyze Substrate and Well"      0 pmtesw
bind set popup pmterc message "ERC Options..."                  1 terminal input a x ercopt

menu popup pmtnet size 10
bind set popup pmtnet message "Show &Network/K"                 0 tellaid network highlight
bind set popup pmtnet message "Network &Options..."             1 terminal input a x netopt
bind set popup pmtnet                                           2 -
bind set popup pmtnet message "Do &Consistency Check"           3 tellaid network compare
bind set popup pmtnet message "Set &First Equate"               4 tellaid network compare first-equate
bind set popup pmtnet message "Set &Second Equate"              5 tellaid network compare second-equate
bind set popup pmtnet message "C&lear Equates"                  6 tellaid network compare clear-equates
bind set popup pmtnet                                           7 -
bind set popup pmtnet message "&Rip Bus Signals"                8 tellaid network rip-bus
bind set popup pmtnet message "Redo Network N&umbering"         9 tellaid network total-re-number

menu popup pmtle size 6
bind set popup pmtle message "Analyze &Facet"                   0 tellaid logeffort analyze-facet
bind set popup pmtle message "Analyze &Path"                    1 tellaid logeffort analyze-path
bind set popup pmtle                                            2 -
bind set popup pmtle message "Set Arc &Capacitance..."          3 tellaid logeffort set-capacitance
bind set popup pmtle message "Set Node &Effort..."              4 tellaid logeffort set-node-effort
bind set popup pmtle message "Logical Effort &Options..."       5 tellaid logeffort set-options

macbegin pmtroutas no-execute
tellaid routing auto-stitch enable
bind set popup pmtrout message "Disable &Auto-Stitching"        0 pmtroute
bind set popup pmtrout message "Enable &Mimic-Stitching"        3 pmtroutms
macend

macbegin pmtroutms no-execute
tellaid routing mimic-stitch enable
bind set popup pmtrout message "Enable &Auto-Stitching"         0 pmtroutas
bind set popup pmtrout message "Disable &Mimic-Stitching"       3 pmtroute
macend

macbegin pmtroute no-execute
tellaid routing no-stitch
bind set popup pmtrout message "Enable &Auto-Stitching"         0 pmtroutas
bind set popup pmtrout message "Enable &Mimic-Stitching"        3 pmtroutms
macend

; DO NOT REARRANGE MENU ENTRIES WITHOUT FIXING pmtroutas, pmtroutms, pmtroute
menu popup pmtrout size 14
bind set popup pmtrout message "Enable &Auto-Stitching"         0 pmtroutas
bind set popup pmtrout message "Auto-Stitch &Highlighted Now"   1 tellaid routing auto-stitch highlighted-stitch-now
bind set popup pmtrout                                          2 -
bind set popup pmtrout message "Enable &Mimic-Stitching"        3 pmtroutms
bind set popup pmtrout message "Mimic-Stitch &Now"              4 tellaid routing mimic-stitch do-now
bind set popup pmtrout                                          5 -
bind set popup pmtrout message "Maze-Route &Selected"           6 tellaid routing maze-route route selected
bind set popup pmtrout message "Ma&ze-Route Facet"              7 tellaid routing maze-route route cell
bind set popup pmtrout                                          8 -
bind set popup pmtrout message "&River-Route"                   9 tellaid routing river-route
bind set popup pmtrout                                         10 -
bind set popup pmtrout message "Routing &Options..."           11 terminal input a x routeopt
bind set popup pmtrout message "&Unroute"                      12 tellaid routing unroute
bind set popup pmtrout message "Get Unrouted &Wire"            13 pmgetproto arc generic:unrouted

macbegin pmtplap no-execute
terminal input a "arrfile/Pad Array File" file
if x%a == x macdone
array file %a
macend

macbegin pmtplan no-execute
terminal input a "platab/nMOS PLA Personality File" file
if x%a == x macdone
tellaid pla nmos file %a
pmtesetup nmos
onaid pla
macend

macbegin pmtplac no-execute
echo "Reading CMOS PLA library..."
library read pla_mocmos.txt text make-current
var and library:pla_mocmos.userbits 073
pmtesetup mocmos
tellaid pla cmos generate-pla
macend

menu popup pmtpla size 3
bind set popup pmtpla message "&Pad Frame"                 0 pmtplap
bind set popup pmtpla message "&nMOS PLA"                  1 pmtplan
bind set popup pmtpla message "MOSIS &CMOS PLA"            2 pmtplac

macbegin pmtvcf no-execute
tellaid vhdl-compiler output-format %1
onaid vhdl-compiler
macend

macbegin pmtvhbl no-execute
terminal input a "Behavioral Library" library
if x%a != x tellaid vhdl-compiler library %a
macend

menu popup pmtvhdl size 8
bind set popup pmtvhdl message "Compile for Silicon &Compiler"  0 pmtvcf quisc
bind set popup pmtvhdl message "Compile for &Simulator"         1 pmtvcf als
bind set popup pmtvhdl message "Compile for R&NL"               2 pmtvcf netlisp
bind set popup pmtvhdl message "Compile for &RSIM"              3 pmtvcf rsim
bind set popup pmtvhdl message "Compile for SI&LOS"             4 pmtvcf silos
bind set popup pmtvhdl                                          5 -
bind set popup pmtvhdl message "VHDL &Options..."               6 terminal input a x vhdlopt
bind set popup pmtvhdl message "Select &Behavioral Library..."  7 pmtvhbl

macbegin pmtscmocs no-execute
echo "Reading MOSIS CMOS Submicron library... (please wait)"
library read sclib.txt text make-current
var and library:sclib.userbits 073
pmtesetup mocmossub
macend

macbegin pmtscnl no-execute
tellaid silicon-compiler delete
tellaid silicon-compiler compile
macend

macbegin pmtscpla no-execute
tellaid silicon-compiler pull
tellaid silicon-compiler place
macend

macbegin pmtscmake no-execute
offaid drc
tellaid silicon-compiler make
macend

menu popup pmtsc size 9
bind set popup pmtsc message "Read &MOSIS CMOS Submicron Library" 0 pmtscmocs
bind set popup pmtsc                                              1 -
bind set popup pmtsc message "Silicon Compiler &Options..."       2 terminal input a X silcomp 
bind set popup pmtsc message "&Get Network for Current Facet"     3 pmtscnl
bind set popup pmtsc message "Do &Placement"                      4 pmtscpla
bind set popup pmtsc message "Do &Routing"                        5 tellaid silicon-compiler route
bind set popup pmtsc message "Make &Electric Layout"              6 pmtscmake
bind set popup pmtsc                                              7 -
bind set popup pmtsc message "&Issue Special Instructions..."     8 onaid silicon-compiler

menu popup pmtcomp size 4
bind set popup pmtcomp message "Do &Compaction"                 0 onaid compaction
bind set popup pmtcomp message "Compact &Horizontally"          1 tellaid compaction check horizontal
bind set popup pmtcomp message "Compact &Vertically"            2 tellaid compaction check vertical
bind set popup pmtcomp message "Compaction &Options..."         3 terminal input a x compopt

menu popup pmtools size 12
menu popup pmtools header "&Tools"
bind set popup pmtools message "&DRC"                           0 pmtdrc
bind set popup pmtools message "&Simulation"                    1 pmtqsim
bind set popup pmtools message "Simulation &Interface"          2 pmtsim
bind set popup pmtools message "&Electrical Rules"              3 pmterc
bind set popup pmtools message "&Network"                       4 pmtnet
bind set popup pmtools message "&Logical Effort"                5 pmtle
bind set popup pmtools                                          6 -
bind set popup pmtools message "&Routing"                       7 pmtrout
bind set popup pmtools message "&Generation"                    8 pmtpla
bind set popup pmtools message "&VHDL Compiler"                 9 pmtvhdl
bind set popup pmtools message "Silicon Co&mpiler"             10 pmtsc
bind set popup pmtools message "&Compaction"                   11 pmtcomp

;******************************* ALL MENUS *******************************

menu setmenubar pmfile pmedit pmfacets pmarc pmport pmview pmwind pminfo pmtech pmtools
bind not verbose
terminal only-informative-messages
terminal not lock-keys-on-error
terminal not use-electric-commands
terminal display-dialogs
terminal not permanent-menu-highlighting
tellaid io verbose graphical
lambda internal-units half-millimicron
window status-bar current-node temporary
window status-bar delete angle
technology tell schematic disable-differential-ports
var set a $view:schematic-page-1
if x%a == x view new schematic-page-1 p1
bind set key a -
bind set key A -
bind set key b -
bind set key c -
bind set key d -
bind set key e -
bind set key E -
bind set key g -
bind set key G -
bind set key i -
bind set key I -
bind set key k -
bind set key K -
bind set key m -
bind set key n -
bind set key o -
bind set key S -
bind set key t -
bind set key T -
bind set key u -
bind set key v -
bind set key V -
bind set key w -
bind set key W -
bind set key x -
bind set key Z -
bind set key " " -
bind set key ^^ -
bind set key "^014" -
bind set key "^015" -
bind set key "?" -
bind set key ! -
bind set key = -
bind set key [ -
bind set key ] -
bind set key %% -
bind set key , -
bind set key . -
bind set key ~ -
bind set key | -
bind set key + -
bind set key / -
bind set key %K erase
menu left size 1 20
bind set menu 0 0w getproto
bind set menu 1 0w getproto
bind set menu 2 0w getproto
bind set menu 3 0w getproto
bind set menu 4 0w getproto
bind set menu 5 0w getproto
bind set menu 6 0w getproto
bind set menu 7 0w getproto
bind set menu 8 0w getproto
bind set menu 9 0w getproto
bind set menu 10 0w getproto
bind set menu 11 0w getproto
bind set menu 12 0w getproto
bind set menu 13 0w getproto
bind set menu 14 0w getproto
bind set menu 15 0w getproto
bind set menu 16 0w getproto
bind set menu 17 0w getproto
bind set menu 18 0w getproto
bind set menu 19 0w getproto
var set a "mocmossub"
if $library:~.firstnodeproto != ***NONODEPROTO*** var set a $~t
if %a == generic pmtesetup mocmossub
pmtesetup %a
onaid routing
var set g "standard"
var set d "more sensibly"
var set e "sensibly"
var set l ""
bind set button %S find port extra-info interactive
bind set button %T find port comp-interactive
bind set button %A find port extra-info more interactive
bind set button %L find port more comp-interactive
bind set button %P find port extra-info special interactive
bind set button %O find port special comp-interactive
bind set button %N find port extra-info special more interactive
bind set button %X find port special more comp-interactive
bind set button %I terminal input b "getinfo" showdetail
bind set button %C create join-angle
bind set button %R find area-define
bind set button %Z pmwindz
bind set button %W create angle
bind set button %M find port extra-info constrained interactive
