; 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 export
; 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 U 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 N_("First select one") %1
if %a > 1 echo N_("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 N_("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 N_("Command-Option-Button")
var set F N_("Button")
var set G N_("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 N_("Shift-Right Button")
var set F N_("Left Button")
var set G N_("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 N_("Shift-Right Button")
var set F N_("Left Button")
var set G N_("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 13
bind set menu                                                                   0 0w getproto node schematic:Wire_Pin
bind set menu message N_("Spice")                                               1 0w pmespi

bind set menu                                                                   2 0w getproto node schematic:Power 
bind set menu glyph schematic:Resistor                                          3 0w pmemitem Resistor SCHEM_resistance "100"
bind set menu glyph schematic:Capacitor                                         4 0w pmecap
bind set menu glyph schematic:Diode                                             5 0w pmedio
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.njfet"  6 0w pmetrn njfet
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.dmes"   7 0w pmetrn dmes
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.npn"    8 0w pmetrn npn
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.nmos"   9 0w pmetrnlw nmos
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.dmos"  10 0w pmetrnlw dmos
bind set menu glyph schematic:Two-Port message "SCHEM_twoport_type.h"          11 0w pmetwo h "100"
bind set menu glyph schematic:Two-Port message "SCHEM_twoport_type.u"          12 0w pmetwo u "10"
bind set menu                                                                   0 1w getproto node schematic:Switch 
bind set menu glyph schematic:Off-Page                                          1 1w pmteoff
bind set menu                                                                   2 1w getproto node schematic:Ground 
bind set menu glyph schematic:Inductor                                          3 1w pmemitem Inductor SCHEM_inductance "100"
bind set menu glyph schematic:Capacitor message "SCHEM_capacitance.e"           4 1w pmecap e
bind set menu glyph schematic:Diode message "SCHEM_diode.z"                     5 1w pmedio z
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.pjfet"  6 1w pmetrn pjfet
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.emes"   7 1w pmetrn emes
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.pnp"    8 1w pmetrn pnp
bind set menu glyph schematic:Transistor message "SCHEM_transistor_type.pmos"   9 1w pmetrnlw pmos
bind set menu glyph schematic:Two-Port message "SCHEM_twoport_type.l"          10 1w pmetwo l
bind set menu glyph schematic:Two-Port message "SCHEM_twoport_type.f"          11 1w pmetwo f "10"
bind set menu glyph schematic:Two-Port message "SCHEM_twoport_type.g"          12 1w pmetwo g "100"
find constraint-angle 45
macend

macbegin pmtefpga no-execute
menu left size 1 6
bind set menu message N_("Read Arch.")        textsize 12p background light-blue  5 0w pmtefreadarch
bind set menu message N_("Read Prims.")       textsize 12p background light-blue  4 0w pmtefreadprims
bind set menu message N_("See Active")        textsize 12p background red         3 0w pmtefseeact
bind set menu message N_("Wires: Active")     textsize 12p background red         2 0w pmtefwdisp
bind set menu message N_("Text: On")          textsize 12p background red         1 0w pmteftdisp
bind set menu message N_("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

macbegin pmtenewtech 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 "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

; always call this macro "pmtesetup" (see "us_ensurepropertechnology()")
macbegin pmtesetup no-execute
if %1 == generic macdone
if %1 == %U macdone
var set U %1
pmtenewtech %1
macend

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

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

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

macbegin pmficlo no-execute
terminal input a N_("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 N_(" 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/N_("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 N_("&CIF (Caltech Intermediate Format)")           0 pmfiextr "cif/CIF" cif
bind set popup pmfiext message N_("&GDS II (Stream)")                             1 pmfiextr "multi-gds/GDSII" gds
bind set popup pmfiext message N_("&EDIF (Electronic Design Interchange Format)") 2 pmfiextr "edif/EDIF" edif
bind set popup pmfiext message N_("&VHDL")                                        3 pmfiextr "vhdl/VHDL" vhdl
bind set popup pmfiext message N_("&LEF (Library Exchange Format)")               4 pmfiextr "lef/LEF" lef
bind set popup pmfiext message N_("&DEF (Design Exchange Format)")                5 pmfiextr "def/DEF" def
bind set popup pmfiext message N_("D&XF (AutoCAD)")                               6 pmfiextr "dxf/DXF" dxf
bind set popup pmfiext message N_("&SDF (Standard Delay Format)")                 7 pmfiextsr
bind set popup pmfiext message N_("S&UE (Schematic User Environment)")            8 pmfiextr "sue/SUE" sue
bind set popup pmfiext message N_("&Readable Dump")                               9 pmfiextr "tlib/Dump" text

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

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

menu popup pmfile size 15
menu popup pmfile header N_("&File")
; &-keys in use: "A C E   I  L NOPQRST      "
bind set popup pmfile message N_("&New Library...")             0 pmfinew
bind set popup pmfile message N_("&Open Library...")/O          1 pmfibin
bind set popup pmfile message N_("&Import")                     2 pmfiext
bind set popup pmfile message N_("IO Op&tions")                 3 pmfiio
bind set popup pmfile                                           4 -
bind set popup pmfile message N_("&Close Library")              5 pmficlo
bind set popup pmfile message N_("&Save Library")/S             6 pmfiwbin
bind set popup pmfile message N_("Save &As...")                 7 pmfisa
bind set popup pmfile message N_("&Export")                     8 pmfiwext
bind set popup pmfile message N_("Change Current &Library...")  9 terminal input a x chglibrary
bind set popup pmfile                                          10 -
bind set popup pmfile message N_("&Print")                     11 pmfiprint
bind set popup pmfile message N_("P&rint Options...")          12 terminal input a x plot
bind set popup pmfile                                          13 -
bind set popup pmfile message N_("&Quit")/Q                    14 quit

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

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

macbegin pmepur no-execute
terminal input a N_("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 x array
if x%a != x tellaid user array %a
macend

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

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

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

macbegin pmearot no-execute
terminal input b N_("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 N_("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 N_("&Erase Point")               18 node trace delete-point
bind set popup pmespf message N_("Exit &Outline Edit")/Y        0 pmepolx
bind set popup pmedit message N_("&Rotate about Point")        14 pmerot
bind set popup pmedit message N_("&Mirror about Point")        15 pmemir
bind set popup pminfo message N_("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 N_("OUTLINE EDIT MODE:")
echo N_("Use %F to select/move point")
echo N_("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 N_("&Erase")                     18 erase
bind set popup pmespf message N_("&Outline Edit")/Y             0 pmepol
bind set popup pmedit message N_("&Rotate")                    14 pmerot
bind set popup pmedit message N_("&Mirror")                    15 pmemir
bind set popup pminfo message N_("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 N_("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
var | ~.SCHEM_transistor_type "2/2"
macend

macbegin pmetrn no-execute
pmemake Transistor SCHEM_transistor_type %1
if x$~ == x macdone
var | ~.SCHEM_transistor_type "10"
macend

macbegin pmedio no-execute
var set b " "
var |   b %1
pmemake Diode SCHEM_diode %b
if x$~ == x macdone
var | ~.SCHEM_diode "10"
macend

macbegin pmecap no-execute
var set b " "
var |   b %1
pmemake Capacitor SCHEM_capacitance %b
if x$~ == x macdone
var | ~.SCHEM_capacitance "100M"
macend

macbegin pmesou no-execute
pmemake Source SCHEM_source %1
if x$~ == x macdone
var set b N_("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

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

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

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

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 N_("&Text (nonlayout)")     0 pmespet
bind set popup pmespe message N_("Text (&layout)...")     1 terminal input a x placetext
bind set popup pmespe message N_("&Facet Center")         2 getproto node generic:Facet-Center
bind set popup pmespe message N_("&DRC Exclusion")        3 getproto node generic:DRC-Node
bind set popup pmespe message N_("&Annular Ring...")      4 terminal input a x annulus

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

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

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

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

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

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

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

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

macbegin pmfkill no-execute
terminal input a N_("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 N_("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 N_("Select a facet instance to descend")
if $~.proto.primindex == 0 editfacet
macend

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

macbegin pmfrtxt no-execute
terminal input a text/N_("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/N_("Facet Information Dump") ofile
if x%a == x macdone
show facets file %a dates
macend

macbegin pmffuse no-execute
terminal input a N_("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 N_("Number of Levels Down to Expand")
if x%a == x macdone
node expand %a
macend

macbegin pmfuexpa no-execute
terminal input a N_("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 N_("One Level Down")              0 node expand 1
bind set popup pmfexp message N_("All the Way")                 1 node expand 999
bind set popup pmfexp message N_("Specified Amount...")         2 pmfexpa

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

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

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

menu popup pmfacets size 26
menu popup pmfacets header N_("Fa&cets")
; &-keys in use: "A CDEFG IJ LMNOP RSTUVWX  "
bind set popup pmfacets message N_("&Edit Facet...")/N               0 pmfedit
bind set popup pmfacets message N_("De&lete Facet...")               1 pmfkill
bind set popup pmfacets message N_("Cross-Library &Copy...")         2 terminal input a x copyfacet
bind set popup pmfacets message N_("Duplic&ate Current Facet...")    3 pmfdupf
bind set popup pmfacets message N_("Pro&ject Management")            4 pmfproj
bind set popup pmfacets                                              5 -
bind set popup pmfacets message N_("&Facet Options...")              6 terminal input a x facetinfo
bind set popup pmfacets message N_("Facet E&xplorer...")             7 window explore
bind set popup pmfacets message N_("Show Facets &Graphically")       8 pmflisg
bind set popup pmfacets message N_("Facet Infor&mation")             9 pmfinfo
bind set popup pmfacets                                             10 -
bind set popup pmfacets message N_("&Down Hierarchy")/D             11 pmfdwn
bind set popup pmfacets message N_("&Up Hierarchy")/U               12 outhier
bind set popup pmfacets                                             13 -
bind set popup pmfacets message N_("Expand Facet In&stances")       14 pmfexp
bind set popup pmfacets message N_("U&nexpand Facet Instances")     15 pmfuexp
bind set popup pmfacets message N_("Look &Inside Highlighted")/P    16 window peek
bind set popup pmfacets                                             17 -
bind set popup pmfacets message N_("&Package into Facet...")        18 pmfpack
bind set popup pmfacets message N_("Extrac&t Facet Instance")       19 yanknode
bind set popup pmfacets                                             20 -
bind set popup pmfacets message N_("New &Version of Current Facet") 21 pmfdupv
bind set popup pmfacets message N_("Delete Unused &Old Versions")   22 library purge
bind set popup pmfacets                                             23 -
bind set popup pmfacets message N_("&Read Text Facet...")           24 pmfrtxt
bind set popup pmfacets message N_("&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 N_("&Arc")
bind set popup pmarc message N_("&Rigid")                 0 arc rigid
bind set popup pmarc message N_("&Non-Rigid")             1 arc not rigid
bind set popup pmarc message N_("&Fixed-angle")           2 arc fixed-angle
bind set popup pmarc message N_("Not Fixed-&angle")       3 arc not fixed-angle
bind set popup pmarc                                      4 -
bind set popup pmarc message N_("Ne&gated")/T             5 arc toggle negated
bind set popup pmarc message N_("&Directional")           6 arc toggle directional
bind set popup pmarc message N_("Re&verse")               7 arc reverse
bind set popup pmarc                                      8 -
bind set popup pmarc message N_("Curve &through Cursor")  9 pmacur curve
bind set popup pmarc message N_("Curve a&bout Cursor")   10 pmacur center
bind set popup pmarc message N_("Remove &Curvature")     11 arc not curve

;******************************* EXPORT MENU *******************************

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

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

menu popup pmport size 15
menu popup pmport header N_("Ex&port")
; &-keys in use: "  CDE  H   LM     ST   XY "
bind set popup pmport message N_("&Create Export...")/E                0 pmpexp
bind set popup pmport                                                  1 -
bind set popup pmport message N_("Re-Export &Everything")              2 port re-export-all
bind set popup pmport message N_("Re-Export &Highlighted")             3 port highlighted-re-export
bind set popup pmport                                                  4 -
bind set popup pmport message N_("&Delete Export")                     5 port not export
bind set popup pmport message N_("De&lete All Exports on Highlighted") 6 port not export all
bind set popup pmport message N_("Delete E&xports in Area")            7 port not export geometry
bind set popup pmport message N_("&Move Export")                       8 port move
bind set popup pmport                                                  9 -
bind set popup pmport message N_("Lis&t Exports")                     10 show ports
bind set popup pmport message N_("&Show Exports")                     11 port identify
bind set popup pmport message N_("Export Displa&y Options...")        12 terminal input a X labels
bind set popup pmport                                                 13 -
bind set popup pmport message N_("&Add Exports from Library...")      14 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 N_("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 N_("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 N_("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 N_("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 pmvnlay no-execute
terminal input a N_("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 N_("&View")
; &-keys in use: "A C EFGHI KLMNO   ST VW Y "
bind set popup pmview message N_("&New View Type...")                   0 pmvnewv
bind set popup pmview message N_("D&elete View Type...")                1 pmvdelv
bind set popup pmview message N_("Chan&ge Facet's View...")             2 pmvchgv
bind set popup pmview                                                   3 -
bind set popup pmview message N_("&Frame Options...")                   4 terminal input a x frameopt
bind set popup pmview message N_("I&con Options...")                    5 terminal input a x iconopt
bind set popup pmview                                                   6 -
bind set popup pmview message N_("Edit La&yout View")                   7 pmvevie "{lay}"
bind set popup pmview message N_("Edit Schema&tic View")                8 pmvevie "{sch}"
bind set popup pmview message N_("Edit &Multi-Page Schematic View...")  9 pmvemsch
bind set popup pmview message N_("Edit V&HDL View")                    10 pmvevie "{vhdl}"
bind set popup pmview message N_("Edit Ic&on View")                    11 pmvevie "{ic}"
bind set popup pmview message N_("Edit Document&ation View")           12 pmvevie "{doc}"
bind set popup pmview message N_("Edit Other Vie&w...")                13 pmveoth
bind set popup pmview                                                  14 -
bind set popup pmview message N_("Make &Schematic")                    15 technology convert schematic
bind set popup pmview message N_("Make &Layout")                       16 pmvnlay
bind set popup pmview message N_("Make S&keleton")                     17 pmvskic "{sk}"
bind set popup pmview message N_("Make &Icon")                         18 pmvskic "{ic}"
bind set popup pmview message N_("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 N_("&Edit Colors...")           0 color mix
bind set popup pmwcol message N_("&Highlight Layer...")       1 terminal input a "x" highlayer
bind set popup pmwcol message N_("&Restore Default Colors")   2 color default
bind set popup pmwcol message N_("&Black Background Colors")  3 color black-background
bind set popup pmwcol message N_("&White Background Colors")  4 color white-background

macbegin pmw3set no-execute
bind set popup pmw3d message N_("&Rotate View Point<")        3 window 3-dimensional rotate
bind set popup pmw3d message N_("&Zoom View Point<")          4 window 3-dimensional zoom
bind set popup pmw3d message N_("&Pan View Point<")           5 window 3-dimensional pan
var set a ">&"
var |   a %1
var |   a N_(" 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 N_("View in &3 Dimensions")      0 window 3-dimensional begin
bind set popup pmw3d message N_("View in &2 Dimensions")      1 window 3-dimensional end
bind set popup pmw3d                                          2 -
bind set popup pmw3d message N_("&Rotate View Point<")        3 pmw3set Rotate 3 rotate
bind set popup pmw3d message N_("&Zoom View Point<")          4 pmw3set Zoom 4 zoom
bind set popup pmw3d message N_("&Pan View Point<")           5 pmw3set Pan 5 pan
bind set popup pmw3d                                          6 -
bind set popup pmw3d message N_("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 N_("&TCL...")  0 interpret tcl
if $aid:user.USER_have_tcl  != 1 bind set popup pmwlang message N_("No &TCL")  0 echo N_("TCL not installed")
if $aid:user.USER_have_lisp == 1 bind set popup pmwlang message N_("&LISP...") 1 interpret lisp
if $aid:user.USER_have_lisp != 1 bind set popup pmwlang message N_("No &LISP") 1 echo N_("LISP not installed")
if $aid:user.USER_have_java == 1 bind set popup pmwlang message N_("&Java...") 2 interpret java
if $aid:user.USER_have_java != 1 bind set popup pmwlang message N_("No &Java") 2 echo N_("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 N_("&Selection")                0 window center-highlight
bind set popup pmwcenter message N_("&Cursor")/5                 1 window cursor-centered

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

menu popup pmwadj size 3
bind set popup pmwadj message N_("Tile Horizontally")            0 window adjust horizontal-tile
bind set popup pmwadj message N_("Tile Vertically")              1 window adjust vertical-tile
bind set popup pmwadj message N_("Cascade")                      2 window adjust cascade

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

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

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

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

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

menu popup pminfoa size 2
bind set popup pminfoa message N_("Define...")                    0 terminal input a x attributes
bind set popup pminfoa message N_("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 N_("&Rename Object...")            0 terminal input a x rename
bind set popup pminfou message N_("&Quick Key Options...")        1 terminal input a x quickkey
bind set popup pminfou message N_("&Set Paths...")                2 terminal input a "x" path
bind set popup pminfou message N_("Show &Cursor Coordinates<")    3 pmiscc
if %a > 4 bind set popup pminfou message N_("Playback Log File...") 4 pmilog

; DO NOT REARRANGE MENU ENTRIES WITHOUT FIXING pmepol, pmepolx
var set a 19
if $aid:user.USER_machine != Macintosh var + a 2
menu popup pminfo size %a
menu popup pminfo header N_("&Info")
; &-keys in use: "ABC E GHI KLMNOP R  U W   "
bind set popup pminfo message N_("Get &Info")/I                    0 terminal input b "getinfo" show
bind set popup pminfo message N_("Attri&butes")                    1 pminfoa
bind set popup pminfo                                              2 -
bind set popup pminfo message N_("List Net&works")                 3 show networks
bind set popup pminfo message N_("List &Connections on Network")   4 tellaid network name-connections
bind set popup pminfo message N_("List Ex&ports on Network")       5 tellaid network list-hierarchical-ports
bind set popup pminfo message N_("List &Geometry on Network")      6 tellaid network show-geometry
bind set popup pminfo                                              7 -
bind set popup pminfo message N_("&Help...")                       8 terminal input a EVE help
bind set popup pminfo message N_("S&ee Manual")                    9 help manual
bind set popup pminfo message N_("T&utorial")                     10 commandfile evetutor
bind set popup pminfo                                             11 -
bind set popup pminfo message N_("New &Node Options...")          12 terminal input a "def" defnode
bind set popup pminfo message N_("New &Arc Options...")           13 terminal input a "def" defarc
bind set popup pminfo                                             14 -
bind set popup pminfo message N_("&Option Saving...")             15 terminal input a x optionsave
bind set popup pminfo message N_("&Measure Distance")             16 window measure
bind set popup pminfo message N_("Use&r Interface")               17 pminfou
bind set popup pminfo message N_("Chec&k and Repair Libraries")   18 debug check-database
if $aid:user.USER_machine != Macintosh bind set popup pminfo                                  19 -
if $aid:user.USER_machine != Macintosh bind set popup pminfo message N_("About E&lectric...") 20 terminal input a x about

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

macbegin pmtdesc 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 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 N_("Export name") port
if x%a != x tellaid user port export %a use y
macend

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

macbegin pmtefreadprims no-execute
terminal input a fpga/N_("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 N_("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 N_("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 N_("Wires: Full")       textsize 12p background red     2 0w pmtefwdisp
macend

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

macbegin pmteftdispon no-execute
technology tell fpga display-level text on
bind set menu message N_("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 N_("Text: Off")         textsize 12p background red     1 0w pmteftdisp
macend

menu popup pmteftdisp size 2
menu popup pmteftdisp header N_("Text Display")
bind set popup pmteftdisp message N_("On")              0 pmteftdispon
bind set popup pmteftdisp message N_("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
var | ~.SCHEM_twoport_type %2
macend

macbegin pmteset no-execute
terminal input a N_("Change current technology") technology
pmtenewtech %a
macend

macbegin pmteplat no-execute
technology edit place-layer text
var set ~.ART_message[0] N_("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 N_("TEXT")                     0 0w pmteplat
bind set menu message N_("ARC")                      1 0w technology edit place-layer circle-arc
bind set menu message N_("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 N_("HIGH")                    14 0w technology edit place-layer highlight
bind set menu message N_("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 N_("Con&vert Library to Technology...") 6 pmteedic
bind set popup pmtech message N_("&Stop Editing Technology")          7 pmteedie
bind set popup pmtech message N_("Edit Primitive &Node...")          11 pmteedin
bind set popup pmtech message N_("Edit Primitive &Arc...")           12 pmteedia
bind set popup pmtech message N_("Edit &Layer...")                   13 pmteedil
bind set popup pmtech message N_("Edit Ne&xt Primitive")             14 technology edit edit-subsequent
bind set popup pmtech message N_("Edit &Colors...")                  18 technology edit edit-colors
bind set popup pmtech message N_("Edit Desi&gn Rules")               19 technology edit edit-design-rules
bind set popup pmtech message N_("Edit Varia&bles...")               20 terminal input a X techvars
bind set popup pmtech message N_("Edit Librar&y Dependencies...")    21 terminal input a X dependentlibs
bind set popup pmtech message N_("Edit Miscellaneous In&fo")         22 technology edit edit-misc-information
bind set popup pmtech message N_("Identify Pri&mitive Layers")       23 technology edit identify-layers
bind set popup pmtech message N_("Iden&tify Ports")                  24 technology edit identify-ports
bind set popup pmtech message N_("Delete this &Primitive")           26 pmtedelp
bind set popup pmtenew message N_("New Primitive &Node")              0 pmtenewn
bind set popup pmtenew message N_("New Primitive &Arc")               1 pmtenewa
bind set popup pmtenew message N_("New &Layer")                       2 pmtenewl
bind set popup pmtereo message N_("Reorder Primitive &Nodes")         0 pmtere EDTEC_nodesequence Node
bind set popup pmtereo message N_("Reorder Primitive &Arcs")          1 pmtere EDTEC_arcsequence Arc
bind set popup pmtereo message N_("Reorder &Layers")                  2 pmtere EDTEC_layersequence Layer
echo N_("Editing technology") $library:~.libname
echo N_("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 N_("Con&vert and Edit Technology")   6 pmteedib
bind set popup pmtech message N_("Re&sume Editing Technology")     7 pmteedir
bind set popup pmtech message N_("Edit Primitive &Node...")       11 pmteeder
bind set popup pmtech message N_("Edit Primitive &Arc...")        12 pmteeder
bind set popup pmtech message N_("Edit &Layer...")                13 pmteeder
bind set popup pmtech message N_("Edit Ne&xt Primitive")          14 pmteeder
bind set popup pmtech message N_("Edit &Colors...")               18 pmteeder
bind set popup pmtech message N_("Edit Desi&gn Rules")            19 pmteeder
bind set popup pmtech message N_("Edit Varia&bles...")            20 pmteeder
bind set popup pmtech message N_("Edit Librar&y Dependencies...") 21 pmteeder
bind set popup pmtech message N_("Edit Miscellaneous In&fo")      22 pmteeder
bind set popup pmtech message N_("Identify Pri&mitive Layers")    23 pmteeder
bind set popup pmtech message N_("Iden&tify Ports")               24 pmteeder
bind set popup pmtech message N_("Delete this &Primitive")        26 pmteeder
bind set popup pmtenew message N_("New Primitive &Node")           0 pmteeder
bind set popup pmtenew message N_("New Primitive &Arc")            1 pmteeder
bind set popup pmtenew message N_("New &Layer")                    2 pmteeder
bind set popup pmtereo message N_("Reorder Primitive &Nodes")      0 pmteeder
bind set popup pmtereo message N_("Reorder Primitive &Arcs")       1 pmteeder
bind set popup pmtereo message N_("Reorder &Layers")               2 pmteeder
macend

macbegin pmteedib no-execute
var set b $library:~.libname
terminal input a N_("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:~
terminal input a x libtotech
;technology edit library-to-tech
if $tech:~ != %a pmteedie
macend

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

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

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

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

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

macbegin pmtenewl no-execute
terminal input a N_("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 N_("No primitive to delete")
macend

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

macbegin pmteread no-execute
terminal input a blib/N_("Technology-Library File") file
if x%a == x macdone
echo N_("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 N_("Delete technology") technology
if x%a != x technology kill %a
macend

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

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

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

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

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

macbegin pmtekeys no-execute
echo N_("To review errors, type:")
echo N_(" >  Show the next error")
echo N_(" <  Show the previous error")
echo N_(" &  Repeat the current error")
macend

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

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

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

macbegin pmtqvwrite no-execute
var set b alsvec/N_("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 N_("&Typical") 0 tellaid simulation als annotate typical
bind set popup pmtqadd message N_("M&inimum") 1 tellaid simulation als annotate minimum
bind set popup pmtqadd message N_("M&aximum") 2 tellaid simulation als annotate maximum

menu popup pmtqsim size 12
bind set popup pmtqsim message N_("&Simulate...")                   0 tellaid simulation simulate als
bind set popup pmtqsim message N_("Simulation &Options...")         1 terminal input a x simopt
bind set popup pmtqsim                                              2 -
bind set popup pmtqsim message N_("&Annotate Delay Data")           3 pmtqadd
bind set popup pmtqsim message N_("&Restore Signal Display Order")  4 tellaid simulation als order restore fromlib
bind set popup pmtqsim                                              5 -
bind set popup pmtqsim message N_("&Down Hierarchy...")             6 tellaid simulation als level set
bind set popup pmtqsim message N_("&Up Hierarchy")                  7 tellaid simulation als level up
bind set popup pmtqsim                                              8 -
bind set popup pmtqsim message N_("Read Vectors &from Disk")        9 pmtqvread
bind set popup pmtqsim message N_("Save Vectors &to Disk")         10 pmtqvwrite
bind set popup pmtqsim message N_("&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/N_("Spice Listing File") file
if %a != 040 terminal input b spiceout/N_("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 N_("Write &SPICE Deck")               0 tellaid simulation simulate spice
bind set popup pmtsim message N_("SPICE &Options...")               1 terminal input a x spice
bind set popup pmtsim message N_("&Plot SPICE Listing")             2 pmtsideck
bind set popup pmtsim                                               3 -
bind set popup pmtsim message N_("Write &VERILOG Deck")             4 tellaid simulation simulate verilog
bind set popup pmtsim message N_("VERILO&G Options...")             5 terminal input a x verilog
bind set popup pmtsim message N_("Add VERILOG &Declaration")        6 pmtsvcode VERILOG_declaration Declaration
bind set popup pmtsim message N_("Add VERILOG &Code")               7 pmtsvcode VERILOG_code Code
bind set popup pmtsim                                               8 -
bind set popup pmtsim message N_("FastHenry Arc Info...")           9 terminal input a x fasthenryarc
bind set popup pmtsim message N_("Write FastHenry Deck")           10 tellaid simulation simulate fasthenry
bind set popup pmtsim message N_("FastHenry Options...")           11 terminal input a x fasthenry
bind set popup pmtsim                                              12 -
bind set popup pmtsim message N_("Write &ESIM Deck")               13 tellaid simulation simulate esim
bind set popup pmtsim message N_("Write &RSIM Deck")               14 tellaid simulation simulate rsim
bind set popup pmtsim message N_("Write R&NL Deck")                15 tellaid simulation simulate rnl
bind set popup pmtsim message N_("Write COS&MOS Deck")             16 tellaid simulation simulate cosmos
bind set popup pmtsim message N_("Write MOSS&IM Deck")             17 tellaid simulation simulate mossim
bind set popup pmtsim                                              18 -
bind set popup pmtsim message N_("Write &TEGAS Deck")              19 tellaid simulation simulate texsim
bind set popup pmtsim message N_("Write SI&LOS Deck")              20 tellaid simulation simulate silos
bind set popup pmtsim message N_("Write P&AL Deck")                21 tellaid simulation simulate abel-pal

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

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

macbegin pmtenc no-execute
tellaid network compare
if %V > 0 pmtekeys
macend

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

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

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

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

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

; DO NOT REARRANGE MENU ENTRIES WITHOUT FIXING pmtroutas, pmtroutms, pmtroute
var set a 14
if $aid:user.USER_have_suntools == 1 var + a 2
menu popup pmtrout size %a
; &-keys in use: "A      H    MNOP RS U W  Z"
bind set popup pmtrout message N_("Enable &Auto-Stitching")         0 pmtroutas
bind set popup pmtrout message N_("Auto-Stitch &Highlighted Now")   1 tellaid routing auto-stitch highlighted-stitch-now
bind set popup pmtrout                                              2 -
bind set popup pmtrout message N_("Enable &Mimic-Stitching")        3 pmtroutms
bind set popup pmtrout message N_("Mimic-Stitch &Now")              4 tellaid routing mimic-stitch do-now
bind set popup pmtrout                                              5 -
bind set popup pmtrout message N_("Maze-Route &Selected")           6 tellaid routing maze-route route selected
bind set popup pmtrout message N_("Ma&ze-Route Facet")              7 tellaid routing maze-route route cell
bind set popup pmtrout                                              8 -
bind set popup pmtrout message N_("&River-Route")                   9 tellaid routing river-route
bind set popup pmtrout                                             10 -
bind set popup pmtrout message N_("Routing &Options...")           11 terminal input a x routeopt
bind set popup pmtrout message N_("&Unroute")                      12 tellaid routing unroute
bind set popup pmtrout message N_("Get Unrouted &Wire")            13 pmgetproto arc generic:unrouted
if $aid:user.USER_have_suntools == 1 bind set popup pmtrout                            14 -
if $aid:user.USER_have_suntools == 1 bind set popup pmtrout message N_("&Predictable Auto Router...") 15 tellaid routing par-route

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

macbegin pmtplan no-execute
terminal input a platab/N_("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 N_("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 N_("&Pad Frame")                 0 pmtplap
bind set popup pmtpla message N_("&nMOS PLA")                  1 pmtplan
bind set popup pmtpla message N_("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 N_("Behavioral Library") library
if x%a != x tellaid vhdl-compiler library %a
macend

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

macbegin pmtscmocs no-execute
echo N_("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 N_("Read &MOSIS CMOS Submicron Library") 0 pmtscmocs
bind set popup pmtsc                                                  1 -
bind set popup pmtsc message N_("Silicon Compiler &Options...")       2 terminal input a X silcomp 
bind set popup pmtsc message N_("&Get Network for Current Facet")     3 pmtscnl
bind set popup pmtsc message N_("Do &Placement")                      4 pmtscpla
bind set popup pmtsc message N_("Do &Routing")                        5 tellaid silicon-compiler route
bind set popup pmtsc message N_("Make &Electric Layout")              6 pmtscmake
bind set popup pmtsc                                                  7 -
bind set popup pmtsc message N_("&Issue Special Instructions...")     8 onaid silicon-compiler

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

menu popup pmtools size 14
menu popup pmtools header N_("&Tools")
; &-keys in use: "  CDE G I  LMN   RST V    "
bind set popup pmtools message N_("&DRC")                           0 pmtdrc
bind set popup pmtools message N_("&Simulation")                    1 pmtqsim
bind set popup pmtools message N_("Simulation &Interface")          2 pmtsim
bind set popup pmtools message N_("&Electrical Rules")              3 pmterc
bind set popup pmtools message N_("&Network")                       4 pmtnet
bind set popup pmtools message N_("&Logical Effort")                5 pmtle
bind set popup pmtools                                              6 -
bind set popup pmtools message N_("&Routing")                       7 pmtrout
bind set popup pmtools message N_("&Generation")                    8 pmtpla
bind set popup pmtools message N_("&VHDL Compiler")                 9 pmtvhdl
bind set popup pmtools message N_("Silicon Co&mpiler")             10 pmtsc
bind set popup pmtools message N_("&Compaction")                   11 pmtcomp
bind set popup pmtools                                             12 -
bind set popup pmtools message N_("List &Tools")                   13 show aids

;******************************* 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
bind set key > show error next
bind set key < show error last
bind set key & show error current
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 options ignore
defnode schematic:Transistor placement 90
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
