FeliciaG | 594100d | 2023-05-04 15:23:24 -0700 | [diff] [blame^] | 1 | ;;----------------------------------------------------------------------------- |
| 2 | ;; Bindkeys for 'Layout' |
| 3 | ;; Inherited by: |
| 4 | ;; * Dracula Interactive |
| 5 | ;; * High Capacity Power IR/EM |
| 6 | ;; * NC-Verilog-MaskLayout |
| 7 | ;; * Other-Layout |
| 8 | ;; * Other-MaskLayout |
| 9 | ;; * Other-Symbolic |
| 10 | ;; * Pcell |
| 11 | ;; * Power IR/EM |
| 12 | ;; * Spectre-Layout |
| 13 | ;; * Spectre-MaskLayout |
| 14 | ;; * Spectre-Symbolic |
| 15 | ;; * UltraSim-Layout |
| 16 | ;; * UltraSim-MaskLayout |
| 17 | ;; * UltraSim-Symbolic |
| 18 | ;; * VLS-GXL |
| 19 | ;; * Virtuoso CE |
| 20 | ;; * Virtuoso XL |
| 21 | ;; * adegxl-maskLayout |
| 22 | ;; * adexl-maskLayout |
| 23 | ;; * parasitics-MaskLayout |
| 24 | ;;----------------------------------------------------------------------------- |
| 25 | |
| 26 | procedure(enable_sch_layers() |
| 27 | leSetLayerVisible( list("wire" "label") t ) |
| 28 | leSetLayerVisible( list("wire" "drawing") t ) |
| 29 | leSetLayerVisible( list("pin" "label") t ) |
| 30 | leSetLayerVisible( list("pin" "drawing") t ) |
| 31 | leSetLayerVisible( list("device" "drawing") t ) |
| 32 | leSetLayerVisible( list("device" "drawing1") t ) |
| 33 | leSetLayerVisible( list("device" "label") t ) |
| 34 | leSetLayerVisible( list("instance" "label") t ) |
| 35 | leSetLayerVisible( list("border" "drawing") t ) |
| 36 | |
| 37 | leSetLayerVisible( list("instance" "drawing") t ) |
| 38 | leSetLayerVisible( list("text" "drawing") t ) |
| 39 | leSetLayerVisible( list("device" "annotate") t ) |
| 40 | ) |
| 41 | |
| 42 | procedure(show_od_m1() |
| 43 | leSetEntryLayer(list("poly" "drawing")) |
| 44 | leSetAllLayerVisible(nil) |
| 45 | leSetLayerVisible(list("nwell" "drawing") t) |
| 46 | leSetLayerVisible(list("nsdm" "drawing") t) |
| 47 | leSetLayerVisible(list("psdm" "drawing") t) |
| 48 | leSetLayerVisible(list("npc" "drawing") t) |
| 49 | leSetLayerVisible(list("diff" "drawing") t) |
| 50 | leSetLayerVisible(list("tap" "drawing") t) |
| 51 | leSetLayerVisible(list("poly" "drawing") t) |
| 52 | leSetLayerVisible(list("lvtn" "drawing") t) |
| 53 | leSetLayerVisible(list("hvtp" "drawing") t) |
| 54 | leSetLayerVisible(list("li1" "drawing") t) |
| 55 | leSetLayerVisible(list("licon1" "drawing") t) |
| 56 | leSetLayerVisible(list("mcon" "drawing") t) |
| 57 | leSetLayerVisible(list("met1" "drawing") t) |
| 58 | leSetLayerVisible(list("met1" "pin") t) |
| 59 | |
| 60 | enable_sch_layers() |
| 61 | hiRedraw() |
| 62 | ) |
| 63 | |
| 64 | procedure(toggle_od() |
| 65 | leSetLayerVisible(list("diff" "drawing") not(leIsLayerVisible(list("diff" "drawing")))) |
| 66 | hiRedraw() |
| 67 | ) |
| 68 | |
| 69 | procedure( show_adjacent_metals( bot_layer ) |
| 70 | let( (bot_name top_name via_name bot_dum top_dum) |
| 71 | sprintf(bot_name "met%d" bot_layer) |
| 72 | if( bot_layer < 2 then |
| 73 | sprintf(via_name "via") |
| 74 | else |
| 75 | sprintf(via_name "via%d" bot_layer) |
| 76 | ) |
| 77 | sprintf(top_name "met%d" bot_layer + 1) |
| 78 | |
| 79 | leSetEntryLayer(list(bot_name "drawing")) |
| 80 | leSetAllLayerVisible(nil) |
| 81 | leSetLayerVisible(list(bot_name "drawing") t) |
| 82 | leSetLayerVisible(list(bot_name "pin") t) |
| 83 | leSetLayerVisible(list(top_name "drawing") t) |
| 84 | leSetLayerVisible(list(top_name "pin") t) |
| 85 | leSetLayerVisible(list(via_name "drawing") t) |
| 86 | enable_sch_layers() |
| 87 | hiRedraw() |
| 88 | ) |
| 89 | ) |
| 90 | |
| 91 | |
| 92 | procedure( toggle_metal( layer_id ) |
| 93 | let( (metal_name draw_layer dum_layer pin_layer exc_layer) |
| 94 | sprintf(metal_name "met%d" layer_id) |
| 95 | draw_layer = list(metal_name "drawing") |
| 96 | pin_layer = list(metal_name "pin") |
| 97 | leSetLayerVisible(draw_layer not(leIsLayerVisible(draw_layer))) |
| 98 | leSetLayerVisible(pin_layer not(leIsLayerVisible(pin_layer))) |
| 99 | hiRedraw() |
| 100 | ) |
| 101 | ) |
| 102 | |
| 103 | |
| 104 | hiSetBindKeys( "Layout" list( |
| 105 | list("Ctrl<Key>q" "leSetAllLayerVisible(t) hiRedraw()") |
| 106 | list("<Key>`" "show_od_m1()") |
| 107 | list("<Key>1" "show_adjacent_metals(1)") |
| 108 | list("<Key>2" "show_adjacent_metals(2)") |
| 109 | list("<Key>3" "show_adjacent_metals(3)") |
| 110 | list("<Key>4" "show_adjacent_metals(4)") |
| 111 | list("<Key>5" "show_adjacent_metals(5)") |
| 112 | list("<Key>6" "show_adjacent_metals(6)") |
| 113 | list("<Key>7" "show_adjacent_metals(7)") |
| 114 | list("<Key>8" "show_adjacent_metals(8)") |
| 115 | list("<Key>9" "show_adjacent_metals(9)") |
| 116 | list("Ctrl<Key>`" "toggle_od()") |
| 117 | list("Ctrl<Key>1" "toggle_metal(1)") |
| 118 | list("Ctrl<Key>2" "toggle_metal(2)") |
| 119 | list("Ctrl<Key>3" "toggle_metal(3)") |
| 120 | list("Ctrl<Key>4" "toggle_metal(4)") |
| 121 | list("Ctrl<Key>5" "toggle_metal(5)") |
| 122 | list("Ctrl<Key>6" "toggle_metal(6)") |
| 123 | list("Ctrl<Key>7" "toggle_metal(7)") |
| 124 | list("Ctrl<Key>8" "toggle_metal(8)") |
| 125 | list("Ctrl<Key>9" "toggle_metal(9)") |
| 126 | list("Ctrl<Key>10" "toggle_metal(10)") |
| 127 | )) |