generated from efabless/caravel_user_project_analog
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xschemrc
350 lines (297 loc) · 14.6 KB
/
xschemrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
#### xschemrc system configuration file
#### values may be overridden by user's ~/.xschem/xschemrc configuration file
#### or by project-local ./xschemrc
###########################################################################
#### XSCHEM INSTALLATION DIRECTORY: XSCHEM_SHAREDIR
###########################################################################
#### Normally there is no reason to set this variable if using standard
#### installation. Location of files is set at compile time but may be overridden
#### with following line:
# set XSCHEM_SHAREDIR $env(HOME)/share/xschem
###########################################################################
#### XSCHEM SYSTEM-WIDE DESIGN LIBRARY PATHS: XSCHEM_LIBRARY_PATH
###########################################################################
#### If unset xschem starts with XSCHEM_LIBRARY_PATH set to the default, typically:
# /home/schippes/.xschem/xschem_library
# /home/schippes/share/xschem/xschem_library/devices
# /home/schippes/share/doc/xschem/examples
# /home/schippes/share/doc/xschem/ngspice
# /home/schippes/share/doc/xschem/logic
# /home/schippes/share/doc/xschem/xschem_simulator
# /home/schippes/share/doc/xschem/binto7seg
# /home/schippes/share/doc/xschem/pcb
# /home/schippes/share/doc/xschem/rom8k
#### Flush any previous definition
set XSCHEM_LIBRARY_PATH {}
#### include devices/*.sym
append XSCHEM_LIBRARY_PATH ${XSCHEM_SHAREDIR}/xschem_library
#### include skywater libraries. Here i use [pwd]. This works if i start xschem from here.
append XSCHEM_LIBRARY_PATH :$env(PWD)
# append XSCHEM_LIBRARY_PATH :/mnt/sda7/home/schippes/pdks/sky130A/libs.tech/xschem
#### add ~/.xschem/xschem_library (USER_CONF_DIR is normally ~/.xschem)
append XSCHEM_LIBRARY_PATH :$USER_CONF_DIR/xschem_library
###########################################################################
#### SET CUSTOM COLORS FOR XSCHEM LIBRARIES MATCHING CERTAIN PATTERNS
###########################################################################
#### each line contains a dircolor(pattern) followed by a color
#### color can be an ordinary name (grey, brown, blue) or a hex code {#77aaff}
#### hex code must be enclosed in braces
array unset dircolor
set dircolor(sky130_fd_pr$) blue
set dircolor(sky130_tests$) blue
set dircolor(xschem_sky130$) blue
set dircolor(xschem_library$) red
set dircolor(devices$) red
###########################################################################
#### WINDOW TO OPEN ON STARTUP: XSCHEM_START_WINDOW
###########################################################################
#### Start without a design if no filename given on command line:
#### To avoid absolute paths, use a path that is relative to one of the
#### XSCHEM_LIBRARY_PATH directories. Default: empty
set XSCHEM_START_WINDOW {sky130_tests/top.sch}
###########################################################################
#### DIRECTORY WHERE SIMULATIONS, NETLIST AND SIMULATOR OUTPUTS ARE PLACED
###########################################################################
#### If unset $USER_CONF_DIR/simulations is assumed (normally ~/.xschem/simulations)
# set netlist_dir $env(HOME)/.xschem/simulations
###########################################################################
#### NETLIST AND HIERARCHICAL PRINT EXCLUDE PATTERNS
###########################################################################
#### xschem_libs is a list of patterns of cells to exclude from netlisting.
#### Matching is done as regular expression on full cell path
#### Example:
#### set xschem_libs { {/cmoslib/} {/analoglib/.*pass} buffer }
#### in this case all schematic cells of directory cmoslib and cells containing
#### /analoglib/...pass and buffer will be excluded from netlisting
#### default value: empty
# set xschem_libs {}
#### noprint_libs is a list with same rules as for xschem_libs. This
#### variable controls hierarchical print
#### default value: empty
# set noprint_libs {}
###########################################################################
#### CHANGE DEFAULT [] WITH SOME OTHER CHARACTERS FOR BUSSED SIGNALS
#### IN SPICE NETLISTS (EXAMPLE: DATA[7] --> DATA<7>)
###########################################################################
#### default: empty (use xschem default, [ ])
# set bus_replacement_char {<>}
#### for XSPICE: replace square brackets as the are used for XSPICE vector nodes.
# set bus_replacement_char {__}
###########################################################################
#### SOME DEFAULT BEHAVIOR
###########################################################################
#### Allowed values: spice, verilog, vhdl, tedax, default: spice
# set netlist_type spice
#### Some netlisting options (these are the defaults)
# set hspice_netlist 1
# set verilog_2001 1
#### to use a fixed line with set change_lw to 0 and set some value to line_width
#### these are the defaults
# set line_width 0
# set change_lw 1
#### allow color postscript and svg exports. Default: 1, enable color
# set color_ps 1
#### initial size of xschem window you can specify also position with (wxh+x+y)
#### this is the default:
# set initial_geometry {900x600}
#### if set to 0, when zooming out allow the viewport do drift toward the mouse position,
#### allowing to move away by zooming / unzooming with mouse wheel
#### default setting: 0
# set unzoom_nodrift 0
#### if set to 1 allow to place multiple components with same name.
#### Warning: this is normally not allowed in any simulation netlist.
#### default: 0, do not allow place multiple elements with same name (refdes)
# set disable_unique_names 0
#### if set to 1 continue drawing lines / wires after click
#### default: 0
# set persistent_command 1
#### if set to 1 a wire is inserted when separating components that are
#### connected by pins. Default: not enabled (0)
# set connect_by_kissing 1
#### if set to 1 automatically join/trim wires while editing
#### this may slow down on rally big designs. Can be disabled via menu
#### default: 0
# set autotrim_wires 0
#### set widget scaling (mainly for font display), this is useful on 4K displays
#### default: unset (tk uses its default) > 1.0 ==> bigger
# set tk_scaling 1.7
#### disable some symbol layers. Default: none, all layers are visible.
# set enable_layer(5) 0 ;# example to disable pin red boxes
#### enable to scale grid point size as done with lines at close zoom, default: 0
# set big_grid_points 0
###########################################################################
#### EXPORT FORMAT TRANSLATORS, PNG AND PDF
###########################################################################
#### command to translate xpm to png; (assumes command takes source
#### and dest file as arguments, example: gm convert plot.xpm plot.png)
#### default: {gm convert}
# set to_png {gm convert}
#### command to translate ps to pdf; (assumes command takes source
#### and dest file as arguments, example: ps2pdf plot.ps plot.pdf)
#### default: ps2pdf
# set to_pdf ps2pdf
set to_pdf {ps2pdf -dAutoRotatePages=/None}
###########################################################################
#### UNDO: SAVE ON DISK OR KEEP IN MEMORY
###########################################################################
#### Alloved: 'disk'or 'memory'.
#### Saving undo on disk is safer but slower on extremely big schematics.
#### In most cases you won't notice any delay. Undo on disk allows previous
#### state recovery in case of crashes. In-memory undo is extremely fast
#### but should a crash occur everything is lost.
#### It is highly recommended to keep undo on disk.
#### Default: disk
# set undo_type disk
###########################################################################
#### CUSTOM GRID / SNAP VALUE SETTINGS
###########################################################################
#### Warning: changing these values will likely break compatibility
#### with existing symbol libraries. Defaults: grid 20, snap 10.
# set grid 20
# set snap 10
###########################################################################
#### CUSTOM COLORS MAY BE DEFINED HERE
###########################################################################
# set cadlayers 22
# set light_colors {
# "#ffffff" "#0044ee" "#aaaaaa" "#222222" "#229900"
# "#bb2200" "#00ccee" "#ff0000" "#888800" "#00aaaa"
# "#880088" "#00ff00" "#0000cc" "#666600" "#557755"
# "#aa2222" "#7ccc40" "#00ffcc" "#ce0097" "#d2d46b"
# "#ef6158" "#fdb200" }
# set dark_colors {
# "#000000" "#00ccee" "#3f3f3f" "#cccccc" "#88dd00"
# "#bb2200" "#00ccee" "#ff0000" "#ffff00" "#ffffff"
# "#ff00ff" "#00ff00" "#0000cc" "#aaaa00" "#aaccaa"
# "#ff7777" "#bfff81" "#00ffcc" "#ce0097" "#d2d46b"
# "#ef6158" "#fdb200" }
###########################################################################
#### CAIRO STUFF
###########################################################################
#### Scale all fonts by this number
# set cairo_font_scale 1.0
#### default for following two is 0.85 (xscale) and 0.88 (yscale) to
#### match cairo font spacing
# set nocairo_font_xscale 1.0
#### set nocairo_font_yscale 1.0
#### Scale line spacing by this number
# set cairo_font_line_spacing 1.0
#### Specify a font
# set cairo_font_name {Sans-Serif}
# set svg_font_name {Sans-Serif}
#### Lift up text by some zoom-corrected pixels for
#### better compatibility wrt no cairo version.
#### Useful values in the range [-1, 3]
# set cairo_vert_correct 0
# set nocairo_vert_correct 0
###########################################################################
#### KEYBINDINGS
###########################################################################
#### General format for specifying a replacement for a keybind
#### Replace Ctrl-d with Escape (so you wont kill the program)
# set replace_key(Control-d) Escape
#### swap w and W keybinds; Always specify Shift for capital letters
# set replace_key(Shift-W) w
# set replace_key(w) Shift-W
###########################################################################
#### TERMINAL
###########################################################################
#### default for linux: xterm
# set terminal {xterm -geometry 100x35 -fn 9x15 -bg black -fg white -cr white -ms white }
#### lxterminal is not OK since it will not inherit env vars:
#### In order to reduce memory usage and increase the performance, all instances
#### of the lxterminal are sharing a single process. LXTerminal is part of LXDE
###########################################################################
#### EDITOR
###########################################################################
#### editor must not detach from launching shell (-f mandatory for gvim)
#### default for linux: gvim -f
# set editor {gvim -f -geometry 90x28}
# set editor { xterm -geometry 100x40 -e nano }
# set editor { xterm -geometry 100x40 -e pico }
#### For Windows
# set editor {notepad.exe}
###########################################################################
#### SHOW ERC INFO WINDOW (erc errors, warnings etc)
###########################################################################
#### default: 0 (can be enabled by menu)
# set show_infowindow 0
###########################################################################
#### CONFIGURE COMPUTER FARM JOB REDIRECTORS FOR SIMULATIONS
###########################################################################
#### RTDA NC
# set computerfarm {nc run -Il}
#### LSF BSUB
# set computerfarm {bsub -Is}
###########################################################################
#### TCP CONNECTION WITH GAW
###########################################################################
#### set gaw address for socket connection: {host port}
#### default: set to localhost, port 2020
# set gaw_tcp_address {localhost 2020}
###########################################################################
#### XSCHEM LISTEN TO TCP PORT
###########################################################################
#### set xschem listening port; default: not enabled
# set xschem_listen_port 2021
###########################################################################
#### BESPICE WAVE SOCKET CONNECTION
###########################################################################
#### set bespice wave listening port; default: not enabled
set bespice_listen_port 2022
###########################################################################
#### TCL FILES TO LOAD AT STARTUP
###########################################################################
#### list of tcl files to preload.
# lappend tcl_files ${XSCHEM_SHAREDIR}/change_index.tcl
lappend tcl_files ${XSCHEM_SHAREDIR}/ngspice_backannotate.tcl
###########################################################################
#### XSCHEM TOOLBAR
###########################################################################
#### default: not enabled.
set toolbar_visible 1
# set toolbar_horiz 1
###########################################################################
#### TABBED WINDOWS
###########################################################################
# default: not enabled. Interface can be changed runtime if only one window
# or tab is open.
set tabbed_interface 1
###########################################################################
#### SKYWATER PDK SPECIFIC VARIABLES
###########################################################################
## check if env var PDK_ROOT exists, and use it for building open_pdks paths
if { [info exists env(PDK_ROOT)] && $env(PDK_ROOT) ne {} } {
## found variable, set tcl PDK_ROOT var
if {![file isdir $env(PDK_ROOT)]} {
puts stderr "Warning: PDK_ROOT environment variable is set but path not found on the system."
}
set PDK_ROOT $env(PDK_ROOT)
} else {
## not existing or empty.
puts stderr "Warning: PDK_ROOT env. var. not found or empty, trying to find an open_pdks install"
if {[file isdir /usr/share/pdk]} {set PDK_ROOT /usr/share/pdk
} elseif {[file isdir /usr/local/share/pdk]} {set PDK_ROOT /usr/local/share/pdk
} elseif {[file isdir $env(HOME)/share/pdk]} {set PDK_ROOT $env(HOME)/share/pdk
} else {
puts stderr {No open_pdks installation found, set PDK_ROOT env. var. and restart xschem}
}
}
if {[info exists PDK_ROOT]} {
## get process variant
if {[info exists env(PDK)]} {
set PDK $env(PDK)
} else {
set PDK sky130A
}
set SKYWATER_MODELS ${PDK_ROOT}/${PDK}/libs.tech/ngspice
set SKYWATER_STDCELLS ${PDK_ROOT}/${PDK}/libs.ref/sky130_fd_sc_hd/spice
puts stderr "open_pdks installation: using $PDK_ROOT"
puts stderr "SKYWATER_MODELS: $SKYWATER_MODELS"
puts stderr "SKYWATER_STDCELLS: $SKYWATER_STDCELLS"
}
# open_pdks specific:
# Set variables after ${PDK_ROOT} is known
# This overrides some of the variables set above.
set XSCHEM_START_WINDOW ${PDK_ROOT}/${PDK}/libs.tech/xschem/sky130_tests/top.sch
append XSCHEM_LIBRARY_PATH :${PDK_ROOT}/${PDK}/libs.tech/xschem