xschemrc 19 KB

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