1This is lepton-manual.info, produced by makeinfo version 6.8 from 2lepton-manual.texi. 3 4This manual documents Lepton EDA version 1.9.17. 5 6 Copyright © 2020-2021 Lepton Contributors. 7 8 Permission is granted to copy, distribute and/or modify this document 9under the terms of the GNU Free Documentation License, Version 1.3 or 10any later version published by the Free Software Foundation; with no 11Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A 12copy of the license is included in the section entitled “GNU Free 13Documentation License.” 14INFO-DIR-SECTION Engineering 15START-INFO-DIR-ENTRY 16* Lepton EDA: (lepton-manual). Lepton EDA Reference Manual 17END-INFO-DIR-ENTRY 18 19 20File: lepton-manual.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir) 21 22Lepton EDA Reference Manual 23*************************** 24 25* Menu: 26 27* Overview:: Overview of program components. 28* Installation:: Installation of the tool suite. 29* Configuration:: Configuration system. 30* Logging:: Search for important information. 31* Symbols:: 32* lepton-schematic:: Lepton EDA schematic capture program. 33* lepton-netlist:: Lepton EDA netlister. 34* lepton-cli:: Lepton EDA command line interface. 35* lepton-attrib:: Lepton EDA spreadsheet attribute editor. 36* lepton-update:: 37* Communication:: Places for discussions and chatting. 38* Development:: Useful information for developers. 39* gEDA file format:: File format currently in use. 40* Master attribute list:: 41* net= attribute mini-HOWTO:: 42* Lepton EDA fonts:: 43* Topic Index:: 44 45 — The Detailed Node Listing — 46 47Overview 48 49* List of programs:: The list of programs in the suite. 50* Compatibility with geda-gaf:: 51* Related tools:: Tools related to Lepton EDA 52 53Related tools 54 55* Covered:: 56 57Installation 58 59* Supported operating systems:: 60* Dependencies:: 61* Troubleshooting dependencies:: 62* Installation from source:: 63* Installation from git:: 64* Out-of-source build:: 65* Configure options:: 66* Hardcode library names for Guile:: 67 68Configuration system 69 70* Introduction:: Introductory information. 71* Legacy configuration:: Legacy configuration files still in use. 72* New configuration system:: Overview of the new configuration system. 73* Configuration of Lepton tools:: Configuration settings for particular Lepton tools. 74* Deprecated settings:: Configuration settings having replacements. 75* Obsolete settings:: Configuration settings no longer used. 76* Resources:: Other useful resources. 77 78Legacy configuration files still in use 79 80* gafrc:: 81* gschemrc:: 82 83Configuration settings for tools in the Lepton EDA suite 84 85* lepton-schematic configuration:: 86* lepton-netlist configuration:: 87* lepton-cli configuration:: 88 89‘Configuration of lepton-schematic’ 90 91* schematic.gui group:: 92* schematic.tabs group:: 93* schematic.status-bar group:: 94* schematic.undo group:: 95* schematic.log-window group:: 96* schematic.macro-widget group:: 97* schematic group:: 98* schematic.library group:: 99* schematic.printing group:: 100* schematic.backup group:: 101* schematic.attrib group:: 102 103‘Configuration of lepton-netlist’ 104 105* netlist group:: 106* netlist.hierarchy group:: 107 108‘Configuration of lepton-cli’ 109 110* export group:: 111 112Resources 113 114* Documentation:: 115* Web pages:: 116* Utilities:: 117* Other resources:: 118 119Symbols 120 121* Symbol Creation:: 122* Editing symbols:: 123* Editing symversion attribute:: 124* No-connect symbols:: 125* Title block symbol:: 126* Missing symbols:: 127 128Schematic capture 129 130* Introduction to lepton-schematic:: 131* Running lepton-schematic:: 132* lepton-schematic window:: 133* Dialog boxes and widgets:: 134* Creating and opening schematics:: 135* Editing schematics:: 136* Working with windows:: 137* Quitting the program:: 138* Saving schematic pages:: 139* Printing and exporting:: 140* Selecting objects:: 141* Searching for text:: 142* Check symbols:: 143* lepton-schematic command line options:: 144* Component libraries:: 145* Interactive work with Scheme code:: 146 147Main lepton-schematic window 148 149* Menubar:: 150* Menu File:: 151* Menu Edit:: 152* Menu View:: 153* Menu Page:: 154* Menu Add:: 155* Menu Hierarchy:: 156* Menu Attributes:: 157* Menu Options:: 158* Menu Netlist:: 159* Menu Help:: 160* Non-menu actions:: 161 162Dialog boxes and widgets 163 164* Add Component widget:: 165* Save As dialog box:: 166* Log window:: 167* Macro widget:: 168 169Selecting objects 170 171* Simple object selection:: 172* Box selection:: 173* Selecting and deselecting all objects:: 174 175Component libraries 176 177* Component library setup:: 178 179Component library setup 180 181* component-library:: 182* component-library-search:: 183* component-library-command:: 184* component-library-funcs:: 185* reset-component-library:: 186 187Netlister 188 189* Allegro backend:: 190* BOM backend:: 191* Cascade backend:: 192* PADS backend:: 193* Switcap backend:: 194 195lepton-cli - Lepton command-line utility 196 197* lepton-cli export:: Export images from schematic and symbol files. 198* lepton-cli config:: Configure all Lepton tools. 199* lepton-cli shell:: Scheme REPL for interactively processing schematics. 200 201Introduction to lepton-attrib 202 203* Usage of lepton-attrib:: 204* lepton-attrib menus:: 205* Installation of lepton-attrib:: 206* Credits and history of lepton-attrib:: 207 208Development 209 210* Debugging:: Debugging the tools 211 212Debugging the tools 213 214* Debug Scheme code:: 215* Debuggers:: 216* Debug Glib and GTK:: 217 218gEDA/gaf File Format Document 219 220* File format overview:: 221* Coordinate space:: 222* Filenames:: 223* Object types:: 224* Colors:: 225* Attributes:: 226* Embedded Components:: 227* Path data:: 228* gEDA File Format Document Revision History:: 229 230Object types 231 232* version:: 233* line:: 234* picture:: 235* box:: 236* circle:: 237* arc:: 238* text and attributes:: 239* net:: 240* bus:: 241* pin:: 242* component:: 243* path:: 244* font:: 245 246Master attribute list 247 248* What are Attributes?:: What are attributes in a nutshell? 249* Symbol only Attributes:: Attributes meaningful only for symbols. 250* Schematic only Attributes:: Attributes meaningful only for schematics. 251* Symbol and Schematic Attributes:: Attributes used ubiquitously. 252* Obsolete Attributes:: Attributes no longer processed by the tools. 253* Attribute compatibility:: Notable changes in Lepton compared to geda-gaf 254 255Symbol only Attributes 256 257* device attribute:: 258* graphical attribute:: 259* description attribute:: 260* author attribute:: 261* comment attribute:: 262* pinseq attribute:: 263* pinnumber attribute:: 264* pintype attribute:: 265* pinlabel attribute:: 266* numslots attribute:: 267* slotdef attribute:: 268* footprint attribute:: 269* documentation attribute:: 270 271Schematic only Attributes 272 273* netname attribute:: 274* source attribute:: 275 276Symbol and Schematic Attributes 277 278* refdes attribute:: 279* slot attribute:: 280* net attribute:: 281* value attribute:: 282* symversion attribute:: 283* dist-license attribute:: 284* use-license attribute:: 285 286refdes attribute 287 288* refdes naming restrictions:: 289* refdes naming conventions:: 290 291Obsolete Attributes 292 293* uref attribute:: 294* name attribute:: 295* label attribute:: 296* pin# attribute:: 297* slot# attribute:: 298* type attribute:: 299* email attribute:: 300 301 302 303File: lepton-manual.info, Node: Overview, Next: Installation, Prev: Top, Up: Top 304 3051 Overview 306********** 307 308Lepton EDA suite is a set of tools that provide schematic capture, 309netlisting and export of schematics into several formats, which, in 310turn, allows simulation via third party tools and producing PCBs. 311 312 The project is over twenty years old, and has matured to the point 313where our design tools are suitable for use by students, professionals, 314educators, hobbyists, consultants, and anybody who needs a set of 315quality EDA tools. 316 317* Menu: 318 319* List of programs:: The list of programs in the suite. 320* Compatibility with geda-gaf:: 321* Related tools:: Tools related to Lepton EDA 322 323 324File: lepton-manual.info, Node: List of programs, Next: Compatibility with geda-gaf, Prev: Overview, Up: Overview 325 3261.1 The list of programs in the suite 327===================================== 328 329Lepton EDA suite includes tools as follows: 330 331 • lepton-schematic—the main GUI tool for schematic capture. 332 • lepton-attrib 333 • lepton-netlist—a tool for making netlists from command line 334 • lepton-cli—a CLI tool providing support of configuration, export, 335 and shell. 336 • lepton-archive—project archivation utility 337 • lepton-tragesym—symbol generator 338 • lepton-embed 339 • lepton-pcb_backannotate 340 • lepton-refdes_renum 341 • lepton-renum 342 • lepton-sch2pcb 343 • lepton-schdiff 344 • lepton-symcheck 345 • lepton-symfix 346 • lepton-upcfg 347 • lepton-update 348 349 The following contributed tools are not covered in this manual. 350Mostly, those are for working with proprietary, often obsolete, 351programs, so they are of limited use for most users. Please see 352corresponding man pages for more information. 353 354 • convert_sym—convert a Viewlogic symbol/schematic to *note gEDA file 355 format::. 356 • gmk_sym—create rectangular symbols in *note gEDA file format:: from 357 a text file. 358 • olib—OrCAD(tm) library part to gEDA .sym converter. 359 • sarlacc_schem—convert OrCAD SDT IV files to *note gEDA file 360 format::. 361 • smash_megafile—break a Viewlogic megafile into a million little 362 pieces. 363 • gnet_hier_verilog.sh—generate a non-flattened hierarchical Verilog 364 netlist. 365 • pads_backannotate—process PADS PowerPCB .eco files to backannotate 366 changes to schematics in *note gEDA file format::. 367 • sw2asc—converts a SWITCAP2 output file into ASCII data files that 368 other tools can read. *Note Switcap backend:: for more 369 information. 370 • sch2eaglepos.sh—read a schematic in *note gEDA file format:: and 371 attempt to extract the relative positions of the components in 372 order to generate corresponding MOVE instructions for Eagle. 373 • sarlacc_sym—convert OrCAD text libraries to components in *note 374 gEDA file format::. 375 376 377File: lepton-manual.info, Node: Compatibility with geda-gaf, Next: Related tools, Prev: List of programs, Up: Overview 378 3791.2 Compatibility with geda-gaf 380=============================== 381 382Lepton EDA is backward compatible with its predecessor _geda-gaf_ and 383supports the same *note gEDA file format:: for symbols and schematics. 384We are planning to support it in future since there are lots of symbols 385and schematics created using it. We cannot promise you to support any 386change in _geda-gaf_ in future. It’s up to you, our users, to point out 387what feature you would like to have in Lepton. 388 389 390File: lepton-manual.info, Node: Related tools, Prev: Compatibility with geda-gaf, Up: Overview 391 3921.3 Related tools 393================= 394 395* Menu: 396 397* Covered:: 398 399 400File: lepton-manual.info, Node: Covered, Prev: Related tools, Up: Related tools 401 4021.3.1 Covered 403------------- 404 405Covered (http://covered.sourceforge.net/index.html) is Verilog Code 406Coverage Analyzer by Trevor Williams. 407 408 The project is inactive since 2011 409(http://covered.sourceforge.net/news.html). 410 411 412File: lepton-manual.info, Node: Installation, Next: Configuration, Prev: Overview, Up: Top 413 4142 Installation 415************** 416 417Installation of Lepton is pretty simple on many operating systems and 418distributions supporting pre-built binary packages. Just use your 419favorite package manager to install the package. For example, on Debian 420or Ubuntu, you could use ‘synaptic’, ‘apt-get’, or ‘aptitude’ for 421installation. It doesn’t matter which interface you use, GUI or CLI. 422For instance: 423 sudo aptitude install lepton-eda 424 425 However, in some cases or on some systems you may want to install 426Lepton from source code. The order is as follows. 427 • Download the source code: 428 • Compile it and install: 429 cd the-directory-with-lepton-eda 430 autoreconf -ivf && ./configure && make && sudo make install 431 Call for ‘autoreconf’ is not needed if you download sources as a 432 tarball of some version. 433 • In some cases, when, for example, a new library is installed, you 434 may need to launch ‘ldconfig’ as well: 435 sudo ldconfig 436 437* Menu: 438 439* Supported operating systems:: 440* Dependencies:: 441* Troubleshooting dependencies:: 442* Installation from source:: 443* Installation from git:: 444* Out-of-source build:: 445* Configure options:: 446* Hardcode library names for Guile:: 447 448 449File: lepton-manual.info, Node: Supported operating systems, Next: Dependencies, Prev: Installation, Up: Installation 450 4512.1 Supported operating systems 452=============================== 453 454Lepton can be built and run on many _Linux_ and _*nix_ systems as well 455as on _MS Win_ under _Cygwin_ and on _Mac_. As of now, there are some 456troubles (https://github.com/lepton-eda/lepton-eda/wiki/OSX) with 457building it on the latter though you can install a virtual machine with 458some Linux OS, e.g., _Ubuntu_, and install it there. 459 460 The Lepton EDA Portability 461(https://github.com/lepton-eda/lepton-eda/wiki/Portability) wiki page 462contains an incomplete list of systems on which you can install Lepton 463either from scratch, or using the system’s package manager, as well as 464some recipes on how to do it. 465 466 Here is probably an incomplete list of links to packages existing for 467various operating systems: 468 469_Debian and derivatives (Ubuntu, Kubuntu, Devuan, ...)_ 470 lepton-eda package 471 (https://packages.debian.org/source/buster/lepton-eda) maintained 472 by Bdale Garbee 473 474_FreeBSD and derivatives (DragonFly BSD and Ghost Bsd)_ 475 lepton-eda port (https://www.freshports.org/cad/lepton-eda) by dmn 476 477_OpenBSD_ 478 lepton-eda port 479 (https://github.com/graahnul-grom/openbsd-lepton-eda) by dmn 480 481_Slackware_ 482 lepton-eda build 483 (https://slackbuilds.org/repository/14.2/development/lepton-eda/) 484 by dmn 485 486_Gentoo_ 487 lepton-eda ebuild 488 (https://github.com/domichel/GenCool/tree/master/sci-electronics/lepton-eda) 489 by Dominique Michel 490 491_Fedora_ 492 lepton-eda spec 493 (https://github.com/graahnul-grom/fedora-lepton-eda) by dmn 494 495_Arch_ 496 lepton-eda (https://aur.archlinux.org/packages/lepton-eda-git) and 497 lepton-eda with gtk3 support 498 (https://aur.archlinux.org/packages/lepton-eda-gtk3-git) by Ian 499 Glen 500 501_Cygwin_ 502 Please see this article 503 (https://github.com/lepton-eda/lepton-eda/wiki/Cygwin) initially 504 contributed by Mario Giovinazzo on how to install Lepton on 505 _Cygwin_. 506 507 508File: lepton-manual.info, Node: Dependencies, Next: Troubleshooting dependencies, Prev: Supported operating systems, Up: Installation 509 5102.2 Dependencies 511================ 512 513In order to compile Lepton from the distributed source archives, you 514*must* have the following tools and libraries installed: 515 • A C/C++ compiler and standard library (‘gcc’/‘glibc’ are 516 recommended, though you may use ‘clang’ instead). 517 • The pkg-config tool (http://pkgconfig.freedesktop.org) for managing 518 shared libraries. 519 • Guile (http://www.gnu.org/software/guile) ("GNU’s Ubiquitous 520 Intelligent Language for Extensions"), version 2.2.0 or later. 521 • GTK+ (http://www.gtk.org) (the Gimp Toolkit), version 2.24.0 or 522 later. 523 • GNU gettext (http://www.gnu.org/software/gettext), version 0.18 or 524 newer. 525 • The lex tool (http://flex.sourceforge.net) for generating lexical 526 scanners. The ‘flex’ implementation is recommended. 527 • The ‘awk’ tool for data processing. GNU Awk 528 (http://www.gnu.org/software/gawk) (‘gawk’) is recommended. 529 530 The following tools and libraries are _highly recommended_: 531 • GNU troff (http://www.gnu.org/software/groff) (‘groff’). 532 • The freedesktop.org MIME info database 533 (http://freedesktop.org/Software/shared-mime-info). 534 • The freedesktop.org utilities 535 (http://www.freedesktop.org/software/desktop-file-utils) for 536 manipulating ‘.desktop’ files. 537 538 The following tools and libraries are optional: 539 540 • libstroke (http://www.etla.net/libstroke) a stroke and gesture 541 recognition library. If this is available, ‘lepton-schematic’ will 542 support mouse gesture recognition. 543 544 545File: lepton-manual.info, Node: Troubleshooting dependencies, Next: Installation from source, Prev: Dependencies, Up: Installation 546 5472.3 Troubleshooting dependencies 548================================ 549 550Sometimes, ‘./configure’ says it cannot find a library while the library 551is installed. Really, it may just not find its headers which live in a 552separate package. Many modern operating system distributions split a 553library into two packages: 554 555 1. A package with binary files, say a ‘libfoo’ package, which contains 556 the files necessary to _run_ programs which use ‘libfoo’. 557 2. A “development package”, ‘libfoo-dev’ or ‘libfoo-devel’, which 558 contains the files necessary to _compile_ programs which use 559 ‘libfoo’. 560 561 If you’re having problems, make sure that you have all of the 562necessary development packages installed. 563 564 565File: lepton-manual.info, Node: Installation from source, Next: Installation from git, Prev: Troubleshooting dependencies, Up: Installation 566 5672.4 Installation from a source archive 568====================================== 569 570First extract the archive to a sensible place: 571 tar -xzvf lepton-eda-1.9.17.tar.gz && 572 cd lepton-eda-1.9.17 573 574 Run the configuration script. You’ll probably want to specify a 575custom directory to install Lepton EDA to, for example: 576 ./configure --prefix=$HOME/lepton 577 578 You can then compile Lepton: 579 make 580 581 And install it (if you used a ‘--prefix’ outside your ‘$HOME’ 582directory, you may need to run this as _root_): 583 584 make install 585 586 587File: lepton-manual.info, Node: Installation from git, Next: Out-of-source build, Prev: Installation from source, Up: Installation 588 5892.5 Installation from the git repository 590======================================== 591 592Lepton uses the ‘git’ version control system. If you wish to try out 593the very latest version of Lepton, you will need to install some extra 594tools _in addition to_ the ones listed above: 595 596 • The git version control tool (http://git-scm.com), version 1.6 or 597 newer. 598 • GNU Automake (http://www.gnu.org/software/automake), version 1.11.0 599 or newer. 600 • GNU Autoconf (http://www.gnu.org/software/autoconf), version 2.60 601 or newer. 602 • GNU Libtool (http://www.gnu.org/software/libtool). 603 • GNU Texinfo documentation system 604 (http://www.gnu.org/software/texinfo). 605 606 Note that on some distributions the TeX support for Texinfo is 607 packaged separately. 608 609 Once you have these installed, you need to clone the Lepton git 610repository: 611 612 git clone https://github.com/lepton-eda/lepton-eda.git 613 614 To generate the configure script, run: 615 616 autoreconf -ivf 617 618 You can then proceed to configure and build Lepton as described 619above. 620 621 622File: lepton-manual.info, Node: Out-of-source build, Next: Configure options, Prev: Installation from git, Up: Installation 623 6242.6 Out-of-source build 625======================= 626 627_Out-of-source_ or _VPATH_ build lets you keep your Lepton source 628directory clean and get any built files in a separate directory. 629Otherwise it’s no different from other kinds of compilation. To build 630in a separate directory, just make it, go to it, and run the build 631commands described in the previous sections. For example, supposed the 632current working directory is the root directory of your Lepton 633repository, you can do: 634 635 mkdir ./build/ 636 cd ./build/ 637 autoreconf -ivf .. && ../configure && make && sudo make install 638 639 Please note ‘..’ in the above commands, it ensures _autotools_ tools 640will work in the parent directory of ‘build/’, that is, in the source 641directory, and run ‘configure’ from that directory as well. 642 643 644File: lepton-manual.info, Node: Configure options, Next: Hardcode library names for Guile, Prev: Out-of-source build, Up: Installation 645 6462.7 Configure options 647===================== 648 649The following command in the build directory 650 651 ./configure --help 652 653 will let you see all options available. Here we’ll notice only those 654of them that may be of special interest for the user. 655 656‘--with-gtk3’ 657 turns on support for GTK3 library. *Note Installation of 658 lepton-attrib:: for more information on what additional libraries 659 are needed to install ‘lepton-attrib’. 660 661‘--disable-attrib’ 662 turns off building and installing ‘lepton-attrib’. 663 664‘--enable-contrib’ 665 Build and installation of several contributed tools are disabled by 666 default. *Note Overview:: for info on what tools can be 667 additionally installed. 668 669 670File: lepton-manual.info, Node: Hardcode library names for Guile, Prev: Configure options, Up: Installation 671 6722.8 Hardcode library names for Guile 673==================================== 674 675On some systems you would want to hardcode file names of libraries 676required by Lepton when compiling the code. It is true, for example, on 677Debian and its derivatives. The issue you may encounter on Debian and 678several other systems is partitioning of header files and binaries of a 679library and putting them into different files and, to make them harder 680for using in Guile, extending file name extensions of library binaries 681and their symlinks by adding some info at the end. So, for instance, a 682binary library name may look like ‘libglib-2.0.so.0.7000.1’ and its 683symlink name like ‘libglib-2.0.so.0’. Guile, on the other hand, cannot 684find such libraries because it uses _canonical_ file extensions for 685looking up for them, which is ‘.so’ on Linux, and thus would look for 686‘libglib-2.0.so’ in this example. It could never use all the convoluted 687and complex algorithms ‘libtool’ and other C compiler tools use, 688otherwise it would itself turn into _autotools_ along with ‘gcc’ or 689‘cmake’. Symlinks with canonical names are available on Debian in 690_development_ packages. It’s OK to install them when the user wants to 691build Lepton from sources as they are also required for compiling C 692code. However, a mere mortal who installs Debian package of Lepton 693usually doesn’t want to have them installed so the package should be 694prepared for it. Or, she would like to clean up her system and remove 695the development packages. In both cases, hardcoding existing library 696file names in Scheme code is sufficient for Lepton tools to work 697correctly, and Lepton supports it by using the environment variable 698USE_LDCONFIG. It should be set to the absolute filename of ‘ldconfig’, 699the utility that may fetch and report names of all libraries installed 700on the system. When building Lepton, it may be used on the ‘configure’ 701stage as follows: 702 703 ./configure USE_LDCONFIG=/sbin/ldconfig 704 705 706File: lepton-manual.info, Node: Configuration, Next: Logging, Prev: Installation, Up: Top 707 7083 Configuration system 709********************** 710 711This chapter describes configuration system of the Lepton EDA suite. 712 713* Menu: 714 715* Introduction:: Introductory information. 716* Legacy configuration:: Legacy configuration files still in use. 717* New configuration system:: Overview of the new configuration system. 718* Configuration of Lepton tools:: Configuration settings for particular Lepton tools. 719* Deprecated settings:: Configuration settings having replacements. 720* Obsolete settings:: Configuration settings no longer used. 721* Resources:: Other useful resources. 722 723 724File: lepton-manual.info, Node: Introduction, Next: Legacy configuration, Prev: Configuration, Up: Configuration 725 7263.1 Introduction 727================ 728 729Currently, there are two types of configuration files: 730 1. Traditionally, Lepton EDA and gEDA settings were stored as Scheme 731 source code files, and some of them are still in use: ‘gafrc’ and 732 ‘gschemrc’ (*note Legacy configuration settings: Legacy 733 configuration.). The work is underway to convert them to the new 734 configuration system. 735 2. New settings are stored in ‘*.conf’ ini-like text files and can be 736 accessed using the ‘lepton-cli config’ command. 737 738 _Important_: 739 740 Starting with Lepton EDA release 1.9.10 741(https://github.com/lepton-eda/lepton-eda/releases/tag/1.9.10-20200319): 742 • Most of the ‘gafrc’ and ‘gschemrc’ options are *note deprecated: 743 Deprecated settings. and replaced with new configuration 744 parameters. For remaining options, *note Legacy configuration 745 settings: Legacy configuration. 746 • All the ‘gnetlistrc’ options 747 (https://github.com/graahnul-grom/lepton-eda/wiki/Deprecated-Settings#user-content-deprecated-gnetlistrc) 748 are deprecated. Please stop using this obsolete configuration 749 file. 750 • Legacy names for ‘*.conf’ configuration files are no longer used: 751 instead of ‘geda.conf’, ‘geda-user.conf’, and ‘geda-system.conf’, 752 configuration files are named ‘lepton.conf’, ‘lepton-user.conf’ and 753 ‘lepton-system.conf’, respectively. The lepton-upcfg(1) 754 (../man/lepton-upcfg.html) utility can upgrade your settings stored 755 in ‘geda*.conf’ files. 756 • The directory for user configuration files is 757 ‘$XDG_CONFIG_HOME/lepton-eda/’ (usually, ‘~/.config/lepton-eda/’). 758 • The directory ‘~/.gEDA/’ is no longer used. 759 760 Note: Later in this document, recently added options and groups of 761 options may be marked with “Since _release_.”, designating their 762 introduction in the specified Lepton EDA ‘release’, for example: 763 “Since _1.9.10_.” means the changes are available since Lepton EDA 764 1.9.10. 765 766 767File: lepton-manual.info, Node: Legacy configuration, Next: New configuration system, Prev: Introduction, Up: Configuration 768 7693.2 Legacy configuration files still in use 770=========================================== 771 772* Menu: 773 774* gafrc:: 775* gschemrc:: 776 777 778File: lepton-manual.info, Node: gafrc, Next: gschemrc, Prev: Legacy configuration, Up: Legacy configuration 779 7803.2.1 ‘gafrc’ 781------------- 782 783‘gafrc’ is a configuration file used by various tools in the Lepton EDA 784suite. 785 786 Files named ‘gafrc’ are read from ‘~/.config/lepton-eda/’ (user 787configuration) and from a directory where you run the lepton-eda tools 788(configuration for current directory). Expressions in ‘gafrc’ files 789control the following settings: 790 791 • Component and source libraries. “Component libraries” is a list of 792 directories where Lepton will search for symbol files (‘*.sym’). 793 “Source libraries” is a list of directories where Lepton will 794 search for “source files” (defined by the SOURCE= attribute) used 795 in hierarchical schematics. 796 797 − ‘(reset-component-library)’ 798 799 Clear the list of component libraries. 800 801 − ‘(reset-source-library)’ 802 803 Clear the list of source libraries. 804 805 − ‘(component-library PATH NAME)’ 806 807 Add the directory PATH to the list of component libraries 808 giving it a display name NAME which will be shown in the "Add 809 Component" dialog in ‘lepton-schematic’, for example: 810 811 (component-library "/home/dmn/sym" "MySymbols") 812 813 − ‘(component-library-search PATH PREFIX)’ 814 815 Add the directory PATH recursively with all its 816 sub-directories to the list of component libraries. 817 Directories added with this command will be shown in 818 ‘lepton-schematic’ in the "Add Component" dialog prefixed with 819 the string PREFIX, for example: 820 821 (component-library-search "/home/dmn/my-libs" "MyLibs::") 822 823 − ‘(source-library PATH)’ 824 825 Add the directory PATH to the list of source libraries. 826 827 • Color scheme used for exporting/printing by ‘lepton-cli export’ and 828 ‘lepton-schematic’’s ‘File’->‘Write Image...’ (if "Image type" is 829 set to ‘PDF’) and ‘File’->‘Print...’ main menu commands. 830 831 − ‘(primitive-load FILE)’ 832 833 Load a color scheme from file FILE, for example: 834 835 (primitive-load "/usr/share/lepton-eda/print-colormap-darkbg") 836 837 838File: lepton-manual.info, Node: gschemrc, Prev: gafrc, Up: Legacy configuration 839 8403.2.2 ‘gschemrc’ 841---------------- 842 843Configuration file for ‘lepton-schematic’ schematic editor. 844 845 Files named ‘gschemrc’ are read from ‘~/.config/lepton-eda/’ (user 846configuration) and from a directory where you run ‘lepton-schematic’ 847(configuration for current directory). Expressions in this file control 848the following settings: 849 850 • Color scheme used to draw schematics. 851 852 (primitive-load FILE) 853 854 Load a color scheme from file FILE, for example: 855 856 (primitive-load "/usr/share/lepton-eda/gschem-colormap-bw") 857 858 • Custom keyboard shortcuts. 859 860 (global-set-key KEY ACTION) 861 862 Assign key combination KEY to action ACTION, for example: 863 (global-set-key "<Control><Shift>N" '&file-new-window) 864 (global-set-key "A A" '&add-attribute ) 865 866 Other actions and shortcut definitions can be found in the menu.scm 867 (https://github.com/lepton-eda/lepton-eda/blob/1.9.11-20200604/schematic/scheme/conf/schematic/menu.scm) 868 and keys.scm 869 (https://github.com/lepton-eda/lepton-eda/blob/1.9.11-20200604/schematic/scheme/conf/schematic/keys.scm) 870 files. 871 872 873File: lepton-manual.info, Node: New configuration system, Next: Configuration of Lepton tools, Prev: Legacy configuration, Up: Configuration 874 8753.3 Overview of the new configuration system 876============================================ 877 878 Important: In definitions of location and naming of configuration 879 files as well as their format we were guided by the two following 880 standards: 881 882 • XDG Base Directory Specification, and 883 884 • Desktop Entry Specification. 885 886 Configuration parameters are always evaluated within a “configuration 887context” which defines what configuration files are processed and the 888processing order. Each context is associated with a configuration file 889(although the file does not necessarily need to exist). 890 891 There are five configuration contexts: 892 893‘DEFAULT’ 894 895 • contains default values for configuration settings (read-only) 896 897 • configuration file: none 898 899 • parent context: none 900 901‘SYSTEM’ 902 903 • contains system-wide settings 904 • configuration file: ‘lepton-system.conf’ 905 (https://github.com/lepton-eda/lepton-eda/blob/master/liblepton/lib/lepton-system.conf) 906 (Since _1.9.10_. Formerly it was named ‘geda-system.conf’ 907 (https://github.com/lepton-eda/lepton-eda/blob/master/liblepton/lib/geda-system.conf).) 908 • configuration file location: ‘$PREFIX/share/lepton-eda/’ 909 (‘$PREFIX’ is the installation prefix, e.g. ‘/usr’ or 910 ‘/usr/local’) 911 • parent context: ‘DEFAULT’ 912 • ‘lepton-cli config’ option to access this context: ‘--system’ 913 (‘-s’) 914 915‘USER’ 916 • contains per-user settings 917 • configuration file: ‘lepton-user.conf’ (Since _1.9.10_. 918 Formerly it was named ‘geda-user.conf’.) 919 • configuration file location: ‘$XDG_CONFIG_HOME/lepton-eda/’ 920 (usually, ‘~/.config/lepton-eda/’) 921 • parent context: ‘SYSTEM’ 922 • ‘lepton-cli config’ option to access this context: ‘--user’ 923 (‘-u’) 924 925‘PATH’ 926 • contains per-project (per-directory) settings 927 • configuration file: ‘lepton.conf’ (Since _1.9.10_. Formerly 928 it was named ‘geda.conf’.) 929 • configuration file location: current directory (or directory 930 specified by ‘--project’) 931 • parent context: ‘USER’ 932 • ‘lepton-cli config’ option to access this context: 933 ‘--project[=PATH]’ (‘-p’) 934 935‘CACHE’ 936 • contains program-specific settings (dialog geometry, command 937 history, etc.); normally, you do not use it directly 938 • configuration file: ‘gui.conf’ 939 • configuration file location: ‘$XDG_CACHE_HOME/lepton-eda/’ 940 (usually, ‘~/.cache/lepton-eda/’) 941 • parent context: none 942 • ‘lepton-cli config’ option to access this context: ‘--cache’ 943 (‘-c’) 944 945 “Context inheritance” means that if particular configuration 946parameter is not found in some context, the value from its parent 947context is used instead. And if parameter is set in the child context 948it will override one set in the parent context(s). 949 950 Configuration file contains ‘groups’ and ‘key=value’ pairs, for 951example: 952 953 [group] 954 key=value 955 956 Any VALUE can be of one of the following types: 957‘string’ 958‘boolean’ 959‘integer’ 960‘double’ 961‘list’ 962 963 Values in lists are separated with semicolons (‘;’). 964 965 Important: List values *must* have exactly the number of elements 966 specified below in the manual for corresponding configuration keys. 967 Wrong number of elements will be considered an error. 968 969 Important: Always use *point* (‘.’) as separator for floating point 970 numbers if you edit a configuration file manually. 971 972 Lines beginning with a ‘#’ and blank lines are considered comments: 973 # This is a comment 974 975 ‘lepton-cli’ utility with the ‘config’ command is used to read and 976write configuration settings: 977 978 lepton-cli config [OPTION] [GROUP KEY [VALUE]] 979 980 OPTION can be either ‘--system’, ‘--user’, ‘--project[=PATH]’, or 981‘--cache’ to access the ‘SYSTEM’, ‘USER’, ‘PATH’, or ‘CACHE’ context, 982respectively. 983 984 For example, to get value of the ‘font’ key from the ‘schematic.gui’ 985group in the ‘USER’ configuration context, issue the following command, 986which will print the result to standard output: 987 988 lepton-cli config --user "schematic.gui" "font" 989 ⊣ OpenGost Type B TT Regular 990 991 To set that value to ‘Monospace Regular’ for configuration in the 992current directory, type: 993 994 lepton-cli config --project "schematic.gui" "font" "Monospace Regular" 995 996 997File: lepton-manual.info, Node: Configuration of Lepton tools, Next: Deprecated settings, Prev: New configuration system, Up: Configuration 998 9993.4 Configuration settings for tools in the Lepton EDA suite 1000============================================================ 1001 1002* Menu: 1003 1004* lepton-schematic configuration:: 1005* lepton-netlist configuration:: 1006* lepton-cli configuration:: 1007 1008 1009File: lepton-manual.info, Node: lepton-schematic configuration, Next: lepton-netlist configuration, Prev: Configuration of Lepton tools, Up: Configuration of Lepton tools 1010 10113.4.1 ‘Configuration of lepton-schematic’ 1012----------------------------------------- 1013 1014* Menu: 1015 1016* schematic.gui group:: 1017* schematic.tabs group:: 1018* schematic.status-bar group:: 1019* schematic.undo group:: 1020* schematic.log-window group:: 1021* schematic.macro-widget group:: 1022* schematic group:: 1023* schematic.library group:: 1024* schematic.printing group:: 1025* schematic.backup group:: 1026* schematic.attrib group:: 1027 1028 1029File: lepton-manual.info, Node: schematic.gui group, Next: schematic.tabs group, Prev: lepton-schematic configuration, Up: lepton-schematic configuration 1030 10313.4.1.1 ‘schematic.gui’ group 1032............................. 1033 1034Name Type Default Description 1035 value 1036----------------------------------------------------------------------------- 1037‘use-docks’ ‘boolean’ ‘false’ How to display widgets: as dialogs 1038 (‘false’) or inside the dock widgets 1039 (‘true’). 1040 1041‘use-tabs’ ‘boolean’ ‘true’ Whether to use tabbed GUI: display 1042 each schematic in its own tab within 1043 GtkNotebook widget. 1044 1045‘font’ ‘string’ ‘""’ The name of the font to be used to 1046 (empty draw text in schematics. For example: 1047 string) ‘font=OpenGost Type B TT Regular’ 1048 1049‘text-sizes’‘list of ‘empty If set, these values will appear in 1050 ‘string’s’ list’ the ’size’ combo box of the ’Add text’ 1051 and ’Edit text’ dialogs instead of the 1052 default ones (set in 1053 ‘gschem_toplevel.c’: 8, 9, 10, 11, 12, 1054 14, 16, 18, 20, 22, 24, 26). For 1055 example: ‘text-sizes=2;3;4;5;6;8’ 1056 1057‘max-recent-files’‘integer’‘10’ Maximum number of recent files to show 1058 in ‘File->Open Recent‘ menu. 1059 1060‘title-show-path’‘boolean’‘false’ Whether to show full file path in the 1061 main window’s title. 1062 1063‘restore-window-geometry’‘boolean’‘true’Whether to restore main window’s size 1064 and position on startup. 1065 1066‘draw-grips’‘boolean’ ‘true’ Controls if the editing grips are 1067 drawn when selecting objects. Since 1068 _1.9.10_. 1069 1070‘toolbars’ ‘boolean’ ‘true’ Controls if the toolbars are visible 1071 or not. Since _1.9.10_. 1072 1073‘scrollbars’‘boolean’ ‘true’ Controls if the scrollbars are visible 1074 or not. Since _1.9.10_. 1075 1076‘handleboxes’‘boolean’ ‘true’ Controls if the handleboxes for the 1077 menu and toolbars are visible or not. 1078 Since _1.9.10_. 1079 1080‘zoom-with-pan’‘boolean’‘true’ Sets the zoom functions to pan the 1081 display and then zoom. Since 1082 _1.9.10_. 1083 1084‘fast-mousepan’‘boolean’‘false’ Controls if text is drawn properly or 1085 if a simplified version (a text string 1086 bounding box) is drawn during mouse 1087 pan. Drawing a simple box speeds up 1088 mousepan a lot for big schematics. 1089 Since _1.9.10_. 1090 1091‘continue-component-place’‘boolean’‘true’Controls the behavior of the "Select 1092 Component..." dialog. Allows to 1093 place multiple instances of a 1094 component without having to press the 1095 "Apply" button each time. Since 1096 _1.9.10_. 1097 1098‘file-preview’‘boolean’ ‘true’ Controls if the preview area in the 1099 File Open/Save As dialog boxes is 1100 enabled. Since _1.9.10_. 1101 1102‘enforce-hierarchy’‘boolean’‘true’ Controls if the movement between 1103 hierarchy levels of the same 1104 underlying schematics is allowed or 1105 not. If this is enabled, then the 1106 user cannot (without using the page 1107 manager) move between hierarchy 1108 levels. Otherwise, the user sees all 1109 the hierarchy levels as being flat. 1110 Since _1.9.10_. 1111 1112‘third-button-cancel’‘boolean’‘true’Controls if the third mouse button 1113 cancels draw actions such as placing 1114 of a component or drawing of a 1115 primitive. Since _1.9.10_. 1116 1117‘warp-cursor’‘boolean’ ‘false’ Controls if the cursor is warped 1118 (moved) when you zoom in and out. 1119 Since _1.9.10_. 1120 1121‘force-boundingbox’‘boolean’‘false’ Controls if the entire bounding box of 1122 a symbol is used when figuring out 1123 which end of the pin is considered the 1124 active port. This option is for 1125 backward compatibility with old 1126 schematic file format. Since 1127 _1.9.10_. 1128 1129‘net-direction-mode’‘boolean’‘true’ Guess the best continuation direction 1130 of an L-shape net when adding a net. 1131 Since _1.9.10_. 1132 1133‘embed-components’‘boolean’‘false’ Determines if the newly placed 1134 components are embedded in the 1135 schematic. Since _1.9.10_. 1136 1137‘netconn-rubberband’‘boolean’‘true’ Maintain net connections when you move 1138 a connected component or net. Since 1139 _1.9.10_. 1140 1141‘magnetic-net-mode’‘boolean’‘true’ Whether to mark a possible connection 1142 that is close to the current cursor 1143 position when drawing a net. Since 1144 _1.9.10_. 1145 1146‘zoom-gain’ ‘int’ ‘20’ The percentage size increase/decrease 1147 when zooming in/out with the mouse 1148 wheel. Negative values reverses the 1149 direction. Since _1.9.10_. 1150 1151‘mousepan-gain’‘int’ ‘1’ Controls how much the display pans 1152 when using mouse. A larger value 1153 provides greater pan distance when 1154 moving the mouse. Since _1.9.10_. 1155 1156‘keyboardpan-gain’‘int’ ‘20’ Controls how much the display pans 1157 when using the keyboard keys. A 1158 larger value provides greater pan 1159 distance. Since _1.9.10_. 1160 1161‘select-slack-pixels’‘int’‘10’ Controls how many pixels around an 1162 object can still be clicked as part of 1163 that object. A larger value gives 1164 greater ease in selecting small, or 1165 narrow objects. Since _1.9.10_. 1166 1167‘text-size’ ‘int’ ‘10’ Sets the default text size. Since 1168 _1.9.10_. 1169 1170‘snap-size’ ‘int’ ‘10’ Sets the default grid spacing. Since 1171 _1.9.10_. 1172 1173‘scrollpan-steps’‘int’ ‘8’ Controls the number of scroll pan 1174 events required to traverse the viewed 1175 schematic area. Larger numbers mean 1176 more scroll steps are required to pan 1177 across the viewed area and giving 1178 finer control over positioning. Since 1179 _1.9.10_. 1180 1181‘dots-grid-dot-size’‘int’‘1’ Controls the size of the grid dots (in 1182 pixels) in the dots grid display. 1183 Since _1.9.10_. 1184 1185‘dots-grid-fixed-threshold’‘int’‘10’Specifies the minimum number of pixels 1186 for the grid to be displayed. 1187 Controls the density of the displayed 1188 grid (smaller numbers will cause the 1189 grid to be drawn denser). This option 1190 is only effective when the 1191 dots-grid-mode is set to "fixed". 1192 Since _1.9.10_. 1193 1194‘mesh-grid-display-threshold’‘int’‘3’Specifies the minimum line pitch for 1195 the grid to be displayed. Controls 1196 the maximum density of the displayed 1197 grid before the minor, then the major 1198 grid lines are switched off. Since 1199 _1.9.10_. 1200 1201‘action-feedback-mode’‘string’‘outline’Possible values: ‘outline’, 1202 ‘boundingbox’. Sets the default 1203 action feedback mode for copy, move, 1204 and component place operations. When 1205 set to ‘boundingbox’, just a box 1206 surrounding objects is drawn, which is 1207 much faster. It may help with slow 1208 hardware. Since _1.9.10_. 1209 1210‘text-caps-style’‘string’‘both’ Possible values: ‘both’, ‘lower’, 1211 ‘upper’. Sets the default caps style 1212 used for the input of text. Since 1213 _1.9.10_. 1214 1215‘middle-button’‘string’ ‘mousepan’ Possible values: ‘mousepan’, ‘popup’, 1216 ‘action’, ‘stroke’, ‘repeat’. 1217 Controls what the middle mouse button 1218 does: 1219 − ‘mousepan’: mouse panning 1220 − ‘popup’: display the popup menu 1221 − ‘action’: perform an action on a 1222 single object 1223 − ‘stroke’: draw strokes 1224 − ‘repeat’: repeat the last command 1225 Since _1.9.10_. 1226 1227‘third-button’‘string’ ‘popup’ Possible values: ‘popup’, ‘mousepan’. 1228 Controls what the third mouse button 1229 does: 1230 • ‘popup’: display the popup menu 1231 • ‘mousepan’: mouse panning 1232 Since _1.9.10_. 1233 1234‘scroll-wheel’‘string’ ‘classic’ Possible values: ‘classic’, ‘gtk’. 1235 Controls the binding of the mouse 1236 scroll wheel: 1237 • ‘classic’: zoom in/out, with 1238 <CTRL> – horizontal scroll, with 1239 <SHIFT> – vertical scroll 1240 • ‘gtk’: vertical scroll, with 1241 <SHIFT> – horizontal scroll, with 1242 <CTRL> – zoom in/out 1243 Since _1.9.10_. 1244 1245‘grid-mode’ ‘string’ ‘mesh’ Possible values: ‘mesh’, ‘dots’, 1246 ‘none’. Sets the type of the grid. 1247 Since _1.9.10_. 1248 1249‘dots-grid-mode’‘string’‘variable’ Possible values: ‘variable’, ‘fixed’. 1250 Controls the mode of the dotted grid. 1251 In the ‘variable’ mode, the grid 1252 spacing changes depending on the zoom 1253 factor. In the ‘fixed’ mode, the grid 1254 always represents the same number of 1255 units as the snap-spacing. You can 1256 control the density of the grid using 1257 the ‘dots-grid-fixed-threshold’ 1258 option. Since _1.9.10_. 1259 1260‘net-selection-mode’‘string’‘enabled_net’Possible values: ‘enabled_net’, 1261 ‘enabled_all’, ‘disabled’. Controls 1262 how many net segments are selected 1263 when you click at a net: 1264 1265 • ‘enabled_all’: 1266 − first click selects the net 1267 itself 1268 − second click selects all 1269 nets directly connected to 1270 the selected one 1271 − third click in addition 1272 selects all nets with equal 1273 ‘netname’ attributes 1274 1275 • ‘enabled_net’: 1276 − first click selects the net 1277 itself 1278 − second click selects all 1279 nets directly connected to 1280 the selected one 1281 1282 • ‘disabled’: 1283 − mouse clicks just selects 1284 the clicked net 1285 Since _1.9.10_. 1286 1287‘default-titleblock’‘string’‘title-B.sym’Symbol (usually, a title block) to be 1288 automatically added when a new page is 1289 created. If you do not want to use a 1290 title block, set this option to an 1291 empty string. Since _1.9.10_. 1292 1293‘use-toplevel-windows’‘boolean’‘false’When docking windows GUI is off, allow 1294 the following widgets to act as 1295 top-level windows (do not stay on top 1296 of the main window): 1297 − Object properties 1298 − Text properties 1299 − Options 1300 − Log 1301 − Find text results 1302 − Page manager 1303 − Font selector 1304 − Color scheme editor 1305 Since _1.9.11_. 1306 1307‘small-placeholders’‘boolean’‘true’ Draw either new (smaller) placeholders 1308 for missing schematic symbols 1309 (‘true’), or classic ones (giant red 1310 triangles with an exclamation mark and 1311 two lines of text) if this option is 1312 set to ‘false’. Since _1.9.11_. 1313 1314 1315 1316File: lepton-manual.info, Node: schematic.tabs group, Next: schematic.status-bar group, Prev: schematic.gui group, Up: lepton-schematic configuration 1317 13183.4.1.2 ‘schematic.tabs’ group 1319.............................. 1320 1321Name Type Default Description 1322 value 1323----------------------------------------------------------------------------- 1324‘show-close-button’‘boolean’‘true’ Whether to show "close" button on each 1325 tab. 1326 1327‘show-up-button’‘boolean’‘true’ Whether to show "hierarchy up" button 1328 on each tab. 1329 1330‘show-tooltips’‘boolean’‘true’ Whether to show tabs tooltips in 1331 tabbed GUI. Since _1.9.10_. 1332 1333 1334 1335File: lepton-manual.info, Node: schematic.status-bar group, Next: schematic.undo group, Prev: schematic.tabs group, Up: lepton-schematic configuration 1336 13373.4.1.3 ‘schematic.status-bar’ group 1338.................................... 1339 1340Name Type Default Description 1341 value 1342----------------------------------------------------------------------------- 1343‘show-mouse-buttons’‘boolean’‘false’Whether to show mouse buttons 1344 assignment indicators. 1345 1346‘show-rubber-band’‘boolean’‘true’ Whether to show net rubber band mode 1347 indicator. 1348 1349‘show-magnetic-net’‘boolean’‘true’ Whether to show magnetic net mode 1350 indicator. 1351 1352‘status-bold-font’‘boolean’‘false’ Whether to display the status line 1353 with bolder font weight. 1354 1355‘status-active-color’‘string’‘"green"’Color to use for the status line text 1356 when some mode is activated. The 1357 string can be either one of a set of 1358 standard names (taken from the X11 1359 ‘rgb.txt’ file), or a hex value in the 1360 form ‘#rrggbb’. 1361 1362 1363 1364File: lepton-manual.info, Node: schematic.undo group, Next: schematic.log-window group, Prev: schematic.status-bar group, Up: lepton-schematic configuration 1365 13663.4.1.4 ‘schematic.undo’ group 1367.............................. 1368 1369Name Type Default Description 1370 value 1371----------------------------------------------------------------------------- 1372‘modify-viewport’‘boolean’‘false’ Allow undo/redo operations to change 1373 pan and zoom. 1374 1375‘undo-control’‘boolean’ ‘true’ Controls if the undo is enabled or 1376 not. Since _1.9.10_. 1377 1378‘undo-type’ ‘string’ ‘disk’ Possible values: ‘disk’, ‘memory’. 1379 Controls what kind of medium is used 1380 for storing undo data. The ‘disk’ 1381 mechanism is nice because you get 1382 undo-level number of backups of the 1383 schematic written to disk as backups 1384 so you should never lose a schematic 1385 due to a crash. Since _1.9.10_. 1386 1387‘undo-levels’‘int’ ‘20’ Determines the number of levels of 1388 undo. Since _1.9.10_. 1389 1390‘undo-panzoom’‘boolean’ ‘false’ Controls if pan or zoom commands are 1391 saved in the undo list. If this is 1392 enabled, then a pan or zoom will be 1393 considered a command and can be 1394 undone. Since _1.9.10_. 1395 1396 1397 1398File: lepton-manual.info, Node: schematic.log-window group, Next: schematic.macro-widget group, Prev: schematic.undo group, Up: lepton-schematic configuration 1399 14003.4.1.5 ‘schematic.log-window’ group 1401.................................... 1402 1403Name Type Default Description 1404 value 1405----------------------------------------------------------------------------- 1406‘font’ ‘string’ ‘"Monospace Custom font for the log window (e.g. 1407 11"’ ‘"Monospace 10"’). 1408 1409 1410 1411File: lepton-manual.info, Node: schematic.macro-widget group, Next: schematic group, Prev: schematic.log-window group, Up: lepton-schematic configuration 1412 14133.4.1.6 ‘schematic.macro-widget’ group 1414...................................... 1415 1416Name Type Default Description 1417 value 1418----------------------------------------------------------------------------- 1419‘history-length’‘integer’‘10’ Maximum number of items to keep in the 1420 macro-widget command history. 1421 1422‘font’ ‘string’ ‘"Monospace Font to be used to draw text in the 1423 11"’ macro-widget command entry. For 1424 example: 1425 font=Monospace 12 1426 1427 1428 1429File: lepton-manual.info, Node: schematic group, Next: schematic.library group, Prev: schematic.macro-widget group, Up: lepton-schematic configuration 1430 14313.4.1.7 ‘schematic’ group 1432......................... 1433 1434Since _1.9.10_. Before 1.9.10 it was ‘gschem’ group. 1435 1436Name Type Default Description 1437 value 1438----------------------------------------------------------------------------- 1439‘default-filename’‘string’‘"untitled"’Default file name for any new 1440 schematic files. It is used to create 1441 filenames of the form ‘untitled_N.sch’ 1442 where ‘N’ is a number. 1443 1444‘bus-ripper-size’‘int’ ‘200’ Sets the size of the auto bus rippers. 1445 Since _1.9.10_. 1446 1447‘bus-ripper-type’‘string’‘component’Possible values: ‘component’, ‘net’. 1448 Sets the bus ripper type, either a 1449 symbol (‘component’) or plain net. 1450 Since _1.9.10_. 1451 1452‘bus-ripper-symname’‘string’‘busripper-1.sym’The default bus ripper symbol, used 1453 when the ‘schematic::bus-ripper-type’ 1454 configuration key is set to 1455 ‘"component"’. The symbol must exist 1456 in a component library. Since 1457 _1.9.10_. 1458 1459‘bus-ripper-rotation’‘string’‘non-symmetric’Possible values: ‘non-symmetric’, 1460 ‘symmetric’. This deals with how the 1461 bus ripper symbol is rotated when it 1462 is auto added to a schematic. Since 1463 _1.9.10_. 1464 1465‘net-consolidate’‘boolean’‘true’ Controls if the net consolidation code 1466 is used when schematics are read in, 1467 written to disk, and when nets are 1468 being drawn (does not consolidate when 1469 things are being copied or moved yet). 1470 Net consolidation is the connection of 1471 nets which can be combined into one. 1472 Since _1.9.10_. 1473 1474‘logging’ ‘boolean’ ‘true’ Determines if the logging mechanism is 1475 enabled. Since _1.9.10_. 1476 1477‘log-window’‘string’ ‘later’ Possible values: ‘later’, ‘startup’ 1478 Controls if the log window is shown 1479 when lepton-schematic is started up 1480 (‘startup’), or not (‘later’). Since 1481 _1.9.10_. 1482 1483‘auto-save-interval’‘int’‘120’ Controls how often a backup copy is 1484 made, in seconds. The backup copy is 1485 made when you make some change to the 1486 schematic, and there were more than 1487 "interval" seconds from the last 1488 autosave. Autosaving will not be 1489 allowed if setting it to zero. Since 1490 _1.9.10_. 1491 1492 1493 1494File: lepton-manual.info, Node: schematic.library group, Next: schematic.printing group, Prev: schematic group, Up: lepton-schematic configuration 1495 14963.4.1.8 ‘schematic.library’ group 1497................................. 1498 1499Since _1.9.10_. Before 1.9.10 it was ‘gschem.library’ group. 1500 1501Name Type Default Description 1502 value 1503----------------------------------------------------------------------------- 1504‘component-attributes’‘string‘*’ List of attribute names 1505 list’ (semicolon-separated) that are 1506 displayed in the component select 1507 dialog. An empty list will disable 1508 the attribute view. If the first list 1509 element is an asterisk (‘*’), all 1510 attributes will be displayed in the 1511 alphabetical order. 1512 1513‘sort’ ‘boolean’ ‘false’ If ‘true’, the component libraries are 1514 sorted alphabetically. Otherwise they 1515 are sorted in the order opposite to 1516 what they were added in. 1517 1518 1519 1520File: lepton-manual.info, Node: schematic.printing group, Next: schematic.backup group, Prev: schematic.library group, Up: lepton-schematic configuration 1521 15223.4.1.9 ‘schematic.printing’ group 1523.................................. 1524 1525Since _1.9.10_. Before 1.9.10 it was ‘gschem.printing’ group. 1526 1527Name Type Default Description 1528 value 1529----------------------------------------------------------------------------- 1530‘layout’ ‘string’ ‘auto’ Possible values: ‘auto’, ‘portrait’, 1531 ‘landscape’. When using a paper size, 1532 set the orientation of the output. If 1533 ‘auto’ layout is used, the orientation 1534 that best fits the drawing will be 1535 used. 1536 1537‘monochrome’‘boolean’ ‘false’ Toggle monochrome (‘true’) or color 1538 (‘false’) output. 1539 1540‘paper’ ‘string’ ‘"iso_a4"’ Size the output for a particular paper 1541 size. The default value depends on 1542 the current locale. Described in the 1543 PWG 5101.1 standard (Printer Working 1544 Group "Media Standardized Names" 1545 (http://www.pwg.org/standards.html#s5101)). 1546 Examples: ‘iso_a4’, ‘iso_a5’, 1547 ‘na_letter’. 1548 1549 1550 1551File: lepton-manual.info, Node: schematic.backup group, Next: schematic.attrib group, Prev: schematic.printing group, Up: lepton-schematic configuration 1552 15533.4.1.10 ‘schematic.backup’ group 1554................................. 1555 1556Since _1.9.10_. 1557 1558Name Type Default Description 1559 value 1560----------------------------------------------------------------------------- 1561‘create-files’‘boolean’ ‘true’ Enable the creation of backup files 1562 (‘NAME.sch~’) when saving a schematic. 1563 Since _1.9.10_. 1564 1565 1566 1567File: lepton-manual.info, Node: schematic.attrib group, Prev: schematic.backup group, Up: lepton-schematic configuration 1568 15693.4.1.11 ‘schematic.attrib’ group 1570................................. 1571 1572Since _1.9.10_. 1573 1574 The parameters in this group replace the deprecated options used to 1575be set in ‘gafrc’ files. 1576 1577Name Type Default Description 1578 value 1579----------------------------------------------------------------------------- 1580‘promote’ ‘boolean’ ‘true’ Former ‘gafrc’ option: 1581 ‘attribute-promotion’. Set if 1582 attribute promotion occurs when you 1583 instantiate a component. Attribute 1584 promotion means that any floating 1585 (unattached) attribute which is inside 1586 a symbol gets attached to the newly 1587 inserted component when it is 1588 instantiated. Since _1.9.10_. 1589 1590‘always-promote’‘string ‘footprint;device;value;model-name’Former ‘gafrc’ option: 1591 list’ ‘always-promote-attributes’. The list 1592 of attributes that are always promoted 1593 regardless of their visibility. Since 1594 _1.9.10_. 1595 1596‘promote-invisible’‘boolean’‘false’ Former ‘gafrc’ option: 1597 ‘promote-invisible’. Set if invisible 1598 floating attributes are promoted when 1599 a component is instantiated. Since 1600 _1.9.10_. 1601 1602‘keep-invisible’‘boolean’‘true’ Former ‘gafrc’ option: 1603 ‘keep-invisible’. Do not change this 1604 option. Here’s the original 1605 description from the ‘system-gafrc’ 1606 file: 1607 If both ‘attribute-promotion’ and 1608 ‘promote-invisible’ are enabled, 1609 then this controls if invisible 1610 floating attributes are kept 1611 around in memory and NOT deleted. 1612 Having this enabled will keeps 1613 component slotting working. If 1614 ‘attribute-promotion’ and 1615 ‘promote-invisible’ are enabled 1616 and this keyword is disabled, 1617 then component slotting will NOT 1618 work (and maybe other functions 1619 which depend on hidden 1620 attributes, since those 1621 attributes are deleted from 1622 memory). Since _1.9.10_. 1623 1624‘symbol-attribs’‘string ‘netname;footprint;value;refdes;Formerly the attribute names were 1625 list’ source;model-name;model;net;given by using the ‘gafrc’ keyword 1626 device;numslots;slot;slotdef;‘attribute-name’ several time in the 1627 graphical;description;documentation;symversion;file. Do not use this keyword any 1628 comment;author;dist-license;use-license;file’more. 1629 1630 The list specifies attributes 1631 presented in the ‘Add attribute’ and 1632 ‘Edit attribute’ dialogs. The user 1633 can add any attributes which should be 1634 listed there. The default names are 1635 specific for symbols and nets. Use 1636 ‘pin-attribs’ for pins. While for now 1637 both lists are displayed together, 1638 this may change in future. The 1639 attribute names are case sensitive. 1640 The order of the names in the list 1641 determines the order they are 1642 displayed. 1643 1644 Note: The attribute names from 1645 parent configuration contexts are 1646 not inherited and will be 1647 overridden by the child context 1648 value. If the user will specify, 1649 e.g., ‘foo;bar’ here, only these 1650 two names are displayed. 1651 1652 Since _1.9.12_. 1653 1654‘pin-attribs’‘string ‘pinnumber;pinseq;pintype;pinlabel’The same as ‘symbol-attribs’ but for 1655 list’ pin attribute names. The attribute 1656 names are displayed in the ‘Add 1657 attribute’ and ‘Edit attribute’ 1658 dialogs along with names specified in 1659 that key. All notes about the 1660 ‘symbol-attribs’ keyword are 1661 applicable here, too. 1662 1663 Since _1.9.12_. 1664 1665 1666 1667File: lepton-manual.info, Node: lepton-netlist configuration, Next: lepton-cli configuration, Prev: lepton-schematic configuration, Up: Configuration of Lepton tools 1668 16693.4.2 ‘Configuration of lepton-netlist’ 1670--------------------------------------- 1671 1672* Menu: 1673 1674* netlist group:: 1675* netlist.hierarchy group:: 1676 1677 1678File: lepton-manual.info, Node: netlist group, Next: netlist.hierarchy group, Prev: lepton-netlist configuration, Up: lepton-netlist configuration 1679 16803.4.2.1 ‘netlist’ group 1681....................... 1682 1683Since _1.9.10_. Before 1.9.10 it was ‘gnetlist’ group. 1684 1685Name Type Default Description 1686 value 1687----------------------------------------------------------------------------- 1688‘default-net-name’‘string’‘"unnamed_net"’Default name used for nets for which 1689 the user has set no explicit name via 1690 the NETNAME= or NET= attributes. 1691 1692‘default-bus-name’‘string’‘"unnamed_bus"’Default name used for buses for which 1693 the user has set no explicit name. 1694 Buses are still not used in 1695 ‘lepton-netlist’. 1696 1697‘net-naming-priority’‘string’‘net-attribute’Possible values: ‘net-attribute’, 1698 ‘netname-attribute’. Specify which 1699 attribute, NET or NETNAME, has 1700 priority if a net is found with two 1701 names. Any netname conflict will be 1702 resolved using the chosen attribute. 1703 1704 1705 1706File: lepton-manual.info, Node: netlist.hierarchy group, Prev: netlist group, Up: lepton-netlist configuration 1707 17083.4.2.2 ‘netlist.hierarchy’ group 1709................................. 1710 1711Before 1.9.10 it was ‘gnetlist.hierarchy’ group. 1712 1713Name Type Default Description 1714 value 1715----------------------------------------------------------------------------- 1716‘traverse-hierarchy’‘boolean’‘true’ Turn on/off hierarchy processing. 1717 1718‘mangle-refdes-attribute’‘boolean’‘true’Whether to mangle sub-schematic’s 1719 REFDES attributes. 1720 1721‘refdes-attribute-order’‘boolean’‘false’While mangling REFDES attributes, 1722 whether to append (‘false’) or prepend 1723 (‘true’) sub-schematic’s ones. 1724 1725‘refdes-attribute-separator’‘string’‘"/"’Separator string used to form mangled 1726 REFDES attribute names. 1727 1728‘mangle-netname-attribute’‘boolean’‘true’Whether to mangle sub-schematic’s 1729 NETNAME attributes. 1730 1731‘netname-attribute-order’‘boolean’‘false’While mangling NETNAME attributes, 1732 whether to append (‘false’) or prepend 1733 (‘true’) sub-schematic’s ones. 1734 1735‘netname-attribute-separator’‘string’‘"/"’Separator string used to form mangled 1736 NETNAME attribute names. 1737 1738‘mangle-net-attribute’‘boolean’‘true’Whether to mangle sub-schematic’s NET 1739 attributes. 1740 1741‘net-attribute-order’‘boolean’‘false’While mangling ‘net’ attributes, 1742 whether to append (‘false’) or prepend 1743 (‘true’) sub-schematic’s ones. 1744 1745‘net-attribute-separator’‘string’‘"/"’Separator string used to form mangled 1746 NET attribute names. 1747 1748 1749 1750File: lepton-manual.info, Node: lepton-cli configuration, Prev: lepton-netlist configuration, Up: Configuration of Lepton tools 1751 17523.4.3 ‘Configuration of lepton-cli’ 1753----------------------------------- 1754 1755The following settings control the behaviour of ‘lepton-cli’ utility 1756when it’s invoked with the ‘export’ command. 1757 1758* Menu: 1759 1760* export group:: 1761 1762 1763File: lepton-manual.info, Node: export group, Prev: lepton-cli configuration, Up: lepton-cli configuration 1764 17653.4.3.1 ‘export’ group 1766...................... 1767 1768Name Type Default Description 1769 value 1770----------------------------------------------------------------------------- 1771‘align’ list of ‘auto’ Set how the drawing is aligned within 1772 two the page. ‘HALIGN’ controls the 1773 doubles horizontal alignment, and ‘VALIGN’ the 1774 in the vertical. Each alignment value should 1775 form be in the range 0.0 to 1.0. The 1776 ‘HALIGN;VALIGN’ ‘auto’ alignment is equivalent to a 1777 or string value of ‘0.5;0.5’, i.e. centered. 1778 ‘auto’ 1779‘dpi’ ‘integer’ ‘96’ Set the number of pixels per inch used 1780 when generating ‘PNG’ output. 1781 1782‘font’ ‘string’ ‘"Sans"’ Set the font to be used for drawing 1783 text. 1784 1785‘layout’ ‘string’ ‘auto’ Possible values: ‘auto’, ‘portrait’, 1786 ‘landscape’. When using a paper size, 1787 set the orientation of the output. If 1788 ‘auto’ layout is used, the orientation 1789 that best fits the drawing will be 1790 used. 1791 1792‘margins’ list of ‘18;18;18;18’Set the widths of the margins to be 1793 four used (the minimal distances from the 1794 integers sheet edges; actual margins may be 1795 in the larger if the sizes of the chosen 1796 form paper do not meet the sizes of the 1797 ‘TOP;LEFT;BOTTOM;RIGHT’ printed schematic). 1798 1799‘monochrome’‘boolean’ ‘false’ Toggle monochrome (‘true’) or color 1800 (‘false’) output. 1801 1802‘paper’ ‘string’ ‘"iso_a4"’ Size the output for a particular paper 1803 size. The default value depends on 1804 the current locale. Described in the 1805 PWG 5101.1 standard (Printer Working 1806 Group "Media Standardized Names" 1807 (http://www.pwg.org/standards.html#s5101)). 1808 Examples: ‘iso_a4’, ‘iso_a5’, 1809 ‘na_letter’. 1810 1811‘size’ list of ‘auto’ Size the output with specific 1812 two dimensions. If the size is ‘auto’, 1813 doubles select the size that best fits the 1814 in the drawing. This overrides the ‘paper’ 1815 form key (see the previous entry). 1816 ‘WIDTH;HEIGHT’ 1817 or string 1818 ‘auto’ 1819 1820 1821File: lepton-manual.info, Node: Deprecated settings, Next: Obsolete settings, Prev: Configuration of Lepton tools, Up: Configuration 1822 18233.5 Deprecated settings 1824======================= 1825 1826When running tools from the Lepton EDA suite, you sometimes may see a 1827warning like this: 1828 1829 WARNING: The RC file function 'hierarchy-uref-separator' is deprecated. 1830 RC configuration functions will be removed in an upcoming Lepton EDA 1831 release. Please use .conf configuration files instead: 1832 https://github.com/lepton-eda/lepton-eda/wiki/Configuration-Settings 1833 1834 Put the following lines into the lepton.conf file (in current directory) 1835 or lepton-user.conf (in user's configuration directory, typically 1836 $HOME/.config/lepton-eda/), replacing MYVALUE with the desired 1837 option's value: 1838 1839 [netlist.hierarchy] 1840 refdes-attribute-separator=MYVALUE 1841 1842 It means that the option you are trying to set in the _old-style_ 1843configuration file (e.g. ‘gafrc’, ‘gschemrc’) has been replaced with a 1844new one that should be defined in one of the ‘*.conf’ configuration 1845files, as described in the *note Overview section: New configuration 1846system. Old settings are still valid, but they will be removed in 1847future releases, hence the warning. 1848 1849 Note: If some option is present in both (new and old) configuration 1850 files, then the value from the old configuration file will take 1851 precedence. 1852 1853 Deprecated settings are listed in the tables below (the new settings 1854in the right column are shown in the form ‘[group_name]::key_name’). 1855Also, they can be found in the geda-deprecated-config.scm 1856(https://github.com/lepton-eda/lepton-eda/blob/master/liblepton/scheme/geda-deprecated-config.scm) 1857file (look for ‘define-rc-deprecated-config’ entries there). 1858 18593.5.1 Deprecated gafrc settings 1860------------------------------- 1861 1862The following ‘gafrc’ options are deprecated starting with Lepton EDA 1863release 1.9.10: 1864 1865Old ‘gafrc’ file options New options 1866 1867-------------------------------------------------------------------------- 1868attribute-promotion [schematic.attrib]::*note promote:: 1869always-promote-attributes [schematic.attrib]::*note always-promote:: 1870promote-invisible [schematic.attrib]::*note promote-invisible:: 1871keep-invisible [schematic.attrib]::*note keep-invisible:: 1872bus-ripper-symname [schematic]::*note bus-ripper-symname:: 1873make-backup-files [schematic.backup]::*note create-files:: 1874 1875 18763.5.2 Deprecated gnetlistrc settings 1877------------------------------------ 1878 1879The following ‘gnetlistrc’ options are deprecated: 1880 1881Old ‘gnetlistrc’ file options New options 1882 1883-------------------------------------------------------------------------- 1884hierarchy-netattrib-mangle [netlist.hierarchy]::*note mangle-net-attribute:: 1885hierarchy-netattrib-order [netlist.hierarchy]::*note net-attribute-order:: 1886hierarchy-netattrib-separator [netlist.hierarchy]::*note net-attribute-separator:: 1887hierarchy-netname-mangle [netlist.hierarchy]::*note mangle-netname-attribute:: 1888hierarchy-netname-order [netlist.hierarchy]::*note netname-attribute-order:: 1889hierarchy-netname-separator [netlist.hierarchy]::*note netname-attribute-separator:: 1890hierarchy-traversal [netlist.hierarchy]::*note traverse-hierarchy:: 1891hierarchy-uref-mangle [netlist.hierarchy]::*note mangle-refdes-attribute:: 1892hierarchy-uref-order [netlist.hierarchy]::*note refdes-attribute-order:: 1893hierarchy-uref-separator [netlist.hierarchy]::*note refdes-attribute-separator:: 1894net-naming-priority [netlist]::*note net-naming-priority:: 1895unnamed-busname [netlist]::*note default-bus-name:: 1896unnamed-netname [netlist]::*note default-net-name:: 1897 1898 18993.5.3 Deprecated gschemrc settings 1900---------------------------------- 1901 1902The following ‘gschemrc’ options are deprecated: 1903 1904Old ‘gschemrc’ file options New options 1905 1906-------------------------------------------------------------------------- 1907component-dialog-attributes [schematic.library]::*note component-attributes:: 1908print-color [schematic.printing]::*note monochrome:: 1909print-orientation [schematic.printing]::*note layout:: 1910print-paper [schematic.printing]::*note paper:: 1911sort-component-library [schematic.library]::*note sort:: 1912untitled-name [schematic]::*note default-filename:: 1913 1914 1915 The following ‘gschemrc’ options are deprecated starting with Lepton 1916EDA release 1.9.10: 1917 1918Old ‘gschemrc’ file options New options 1919 1920-------------------------------------------------------------------------- 1921action-feedback-mode [schematic.gui]::*note action-feedback-mode:: 1922auto-save-interval [schematic]::*note auto-save-interval:: 1923bus-ripper-rotation [schematic]::*note bus-ripper-rotation:: 1924bus-ripper-size [schematic]::*note bus-ripper-size:: 1925bus-ripper-type [schematic]::*note bus-ripper-type:: 1926continue-component-place [schematic.gui]::*note continue-component-place:: 1927default-titleblock [schematic.gui]::*note default-titleblock:: 1928dots-grid-dot-size [schematic.gui]::*note dots-grid-dot-size:: 1929dots-grid-fixed-threshold [schematic.gui]::*note dots-grid-fixed-threshold:: 1930dots-grid-mode [schematic.gui]::*note dots-grid-mode:: 1931draw-grips [schematic.gui]::*note draw-grips:: 1932embed-components [schematic.gui]::*note embed-components:: 1933enforce-hierarchy [schematic.gui]::*note enforce-hierarchy:: 1934fast-mousepan [schematic.gui]::*note fast-mousepan:: 1935file-preview [schematic.gui]::*note file-preview:: 1936force-boundingbox [schematic.gui]::*note force-boundingbox:: 1937grid-mode [schematic.gui]::*note grid-mode:: 1938handleboxes [schematic.gui]::*note handleboxes:: 1939keyboardpan-gain [schematic.gui]::*note keyboardpan-gain:: 1940log-window [schematic]::*note log-window:: 1941logging [schematic]::*note logging:: 1942magnetic-net-mode [schematic.gui]::*note magnetic-net-mode:: 1943mesh-grid-display-threshold [schematic.gui]::*note mesh-grid-display-threshold:: 1944middle-button [schematic.gui]::*note middle-button:: 1945mousepan-gain [schematic.gui]::*note mousepan-gain:: 1946net-consolidate [schematic]::*note net-consolidate:: 1947net-direction-mode [schematic.gui]::*note net-direction-mode:: 1948net-selection-mode [schematic.gui]::*note net-selection-mode:: 1949netconn-rubberband [schematic.gui]::*note netconn-rubberband:: 1950scroll-wheel [schematic.gui]::*note scroll-wheel:: 1951scrollbars [schematic.gui]::*note scrollbars:: 1952scrollpan-steps [schematic.gui]::*note scrollpan-steps:: 1953select-slack-pixels [schematic.gui]::*note select-slack-pixels:: 1954snap-size [schematic.gui]::*note snap-size:: 1955text-caps-style [schematic.gui]::*note text-caps-style:: 1956text-size [schematic.gui]::*note text-size:: 1957third-button [schematic.gui]::*note third-button:: 1958third-button-cancel [schematic.gui]::*note third-button-cancel:: 1959toolbars [schematic.gui]::*note toolbars:: 1960undo-control [schematic.undo]::*note undo-control:: 1961undo-levels [schematic.undo]::*note undo-levels:: 1962undo-panzoom [schematic.undo]::*note undo-panzoom:: 1963undo-type [schematic.undo]::*note undo-type:: 1964warp-cursor [schematic.gui]::*note warp-cursor:: 1965zoom-gain [schematic.gui]::*note zoom-gain:: 1966zoom-with-pan [schematic.gui]::*note zoom-with-pan:: 1967 1968 1969 1970File: lepton-manual.info, Node: Obsolete settings, Next: Resources, Prev: Deprecated settings, Up: Configuration 1971 19723.6 Obsolete settings 1973===================== 1974 1975The following _old-style_ configuration settings are no longer used. An 1976attempt to use them will produce a warning like this: 1977 1978 WARNING: The RC file function 'window-size' is deprecated 1979 and does nothing. 1980 RC configuration functions will be removed in an upcoming Lepton EDA 1981 release. Please use .conf configuration files instead: 1982 https://github.com/lepton-eda/lepton-eda/wiki/Configuration-Settings 1983 19843.6.1 Obsolete ‘gafrc’ file options 1985----------------------------------- 1986 1987‘bitmap-directory’ 1988‘postscript-prolog’ 1989‘world-size’ 1990 19913.6.2 Obsolete ‘gnetlistrc’ file options 1992---------------------------------------- 1993 1994‘gnetlist-version’ 1995 19963.6.3 Obsolete ‘gschemrc’ file options 1997-------------------------------------- 1998 1999‘add-attribute-offset’ 2000‘bus-style’ 2001‘image-color’ 2002‘image-size’ 2003‘line-style’ 2004‘log-window-type’ 2005‘logging-destination’ 2006‘net-endpoint-mode’ 2007‘net-midpoint-mode’ 2008‘net-style’ 2009‘object-clipping’ 2010‘output-capstyle’ 2011‘output-color’ 2012‘output-orientation’ 2013‘output-type’ 2014‘paper-size’ 2015‘paper-sizes’ 2016‘pin-style’ 2017‘print-command’ 2018‘raise-dialog-boxes-on-expose’ 2019‘scrollbar-update’ 2020‘setpagedevice-orientation’ 2021‘setpagedevice-pagesize’ 2022‘text-display-zoomfactor’ 2023‘text-feedback’ 2024‘text-origin-marker’ 2025‘window-size’ 2026 2027 2028File: lepton-manual.info, Node: Resources, Prev: Obsolete settings, Up: Configuration 2029 20303.7 Resources 2031============= 2032 2033* Menu: 2034 2035* Documentation:: 2036* Web pages:: 2037* Utilities:: 2038* Other resources:: 2039 2040 2041File: lepton-manual.info, Node: Documentation, Next: Web pages, Prev: Resources, Up: Resources 2042 20433.7.1 Documentation 2044------------------- 2045 2046 • lepton-cli man page (../man/lepton-cli.html) 2047 2048 • lepton-upcfg man page (../man/lepton-upcfg.html) 2049 2050 • Configuration system specification 2051 (https://github.com/lepton-eda/lepton-eda/blob/master/docs/specifications/config-api.txt) 2052 2053 • Lepton EDA Scheme reference manual 2054 (../lepton-scheme.html/index.html), especially configuration 2055 functions (../lepton-scheme.html/Configuration-functions.html) 2056 2057 2058File: lepton-manual.info, Node: Web pages, Next: Utilities, Prev: Documentation, Up: Resources 2059 20603.7.2 Web pages 2061--------------- 2062 2063 • Lepton EDA home page (https://github.com/lepton-eda/lepton-eda) 2064 2065 • gEDA wiki (http://wiki.geda-project.org) 2066 2067 • dmn’s documentation page (https://graahnul-grom.github.io/), links 2068 and resources for Lepton EDA users and developers 2069 2070 • *note Communication channels: Communication. 2071 2072 2073File: lepton-manual.info, Node: Utilities, Next: Other resources, Prev: Web pages, Up: Resources 2074 20753.7.3 Utilities 2076--------------- 2077 2078* GUI configuration utility: lepton-conf 2079(https://github.com/graahnul-grom/lepton-conf) (home page 2080(https://graahnul-grom.github.io/lepton-conf)). ‘lepton-conf’ has the 2081ability to work with either legacy (‘geda*.conf’) or new 2082(‘lepton*.conf’) configuration files, which could be helpful in settings 2083upgrade process. 2084 2085 2086File: lepton-manual.info, Node: Other resources, Prev: Utilities, Up: Resources 2087 20883.7.4 Other resources (outdated, but may be useful) 2089--------------------------------------------------- 2090 2091 • gaf wiki page (http://wiki.geda-project.org/geda:gaf_utility) 2092 (‘gaf’ is ‘lepton-cli’’s old name) 2093 • gschem user guide (http://wiki.geda-project.org/geda:gschem_ug), 2094 and in particular configuring gschem 2095 (http://wiki.geda-project.org/geda:gschem_ug:config) 2096 2097 2098File: lepton-manual.info, Node: Logging, Next: Symbols, Prev: Configuration, Up: Top 2099 21003.8 Logging 2101=========== 2102 2103Most of Lepton GUI applications and TUI utilities use the same logging 2104mechanism. All important info gets into log files. The log files of 2105the tools are usually located in the cache directory of the suite which 2106is usually ‘~/.cache/lepton-eda/logs’. We store several last logs for 2107each utility and rotate them, that is, remove old ones after adding new. 2108 2109 The log files are named as follows: ‘toolname-date-number.log’. For 2110example, ‘lepton-archive-20201113-4.log’. 2111 2112 If you suspect some utility did something wrong, or it failed and 2113crashed, consult the logs in the first place. The same matters for GUI 2114utilites as well. Open the mostly recent file and look in there. For 2115user convenience, the log files have the date in their names and, 2116besides, the files of the same date are subsequently numbered. Among 2117several files with same date, the file having the greater number as the 2118suffix of its basename is the last stored log. 2119 2120 In ‘lepton-schematic’, you can watch the log messages without the 2121need to open any files, of course if you do not seek to learn the reason 2122why the program crashed just now. *Note Log window::. 2123 2124 2125File: lepton-manual.info, Node: Symbols, Next: lepton-schematic, Prev: Logging, Up: Top 2126 21274 Symbols 2128********* 2129 2130* Menu: 2131 2132* Symbol Creation:: 2133* Editing symbols:: 2134* Editing symversion attribute:: 2135* No-connect symbols:: 2136* Title block symbol:: 2137* Missing symbols:: 2138 2139 2140File: lepton-manual.info, Node: Symbol Creation, Next: Editing symbols, Up: Symbols 2141 21424.1 Symbol Creation 2143=================== 2144 2145This section has been written by _Ales Hvezda_ for the gEDA project and 2146later adapted for Lepton. 2147 2148* Menu: 2149 2150* Symbol example:: 2151 21524.1.1 Overview 2153-------------- 2154 2155This document describes the creation of component symbols, including 2156style conventions, and hints/tips and things to look out for when 2157drawing symbols for the gEDA/gaf system. 2158 21594.1.2 Component Symbol Creation 2160------------------------------- 2161 2162Component symbols (from here on known as _symbols_) are drawn using 2163‘lepton-schematic’. You can start with a blank page or a known-to-be 2164good symbol that is similar to the one you want to create. 2165 21664.1.2.1 Preparing 2167................. 2168 2169Before you open ‘lepton-schematic’ to create your symbol, there are a 2170few questions you should ask yourself, that will effect how you create 2171your symbol: 2172 2173 1. Is this symbol purely for aesthetic purposes (a graphic)? If so, 2174 several steps are simplified. 2175 2176 2. Do I want to simulate the component in question, with e.g. SPICE? 2177 2178 3. Do I want to use this symbol in a schematic that includes power 2179 distribution? This will become important when deciding what pins 2180 to draw. 2181 2182 4. Does this symbol represent a component that comes several in a 2183 package? This is called _slotting_ in gEDA’s language, and has 2184 special rules. 2185 2186 Once you’ve answered those questions, the following guide will be 2187more useful to you. 2188 2189 To start building your symbol: 2190 2191 1. Open ‘lepton-schematic’. 2192 2193 2. The default empty page has boxes on it. Use the selection tool 2194 (the one that looks like a black mouse cursor) to select everything 2195 on the page. Hit the ‘Delete’ key to delete it. 2196 2197 3. Zoom in at least one step (View → Zoom, or hit the ‘Z’ key). 2198 2199 4. Make sure the snap-to-grid functionality is ON (Options → Toggle 2200 Snap On/Off, or ‘O S’). 2201 2202 5. Make sure grid snap size is set to 100 (Options → Snap Grid 2203 Spacing..., or ‘O Shift-S’). 2204 22054.1.2.2 Drawing your Symbol 2206........................... 2207 2208Use the ‘line’, ‘box’, ‘circle’, and ‘arc’ tools (in the ‘Add’ menu) to 2209create a simplified visual representation of your device. Make sure 2210that the only color you use is ‘graphic’ (green). Do not place any pins 2211on the device until the next step. 2212 2213 To check what color you are using to draw, go to Edit → Color... (or 2214hit ‘E O’). 2215 22164.1.2.3 Placing Pins on your Symbol 2217................................... 2218 2219If you have decided your symbol is graphical in nature (e.g., does not 2220connect to anything, is just artwork), you can skip this step. 2221 2222 Add your first pin. 2223 1. Select Add → Pin, or hit ‘A P’. Once that is done, click from the 2224 end of your pin, to one of the edges of your symbol. A ’0’ and the 2225 word ’unknown’ should pop up near your new pin. Please note that 2226 the direction you draw your pins is important. If you draw them 2227 starting from the edge of your symbol to outside of your symbol, 2228 you will end up with text outside of the symbol! 2229 2230 2. Click on the selection tool, and use it to select the pin you just 2231 drew. The pin and text with it should change colors, and boxes 2232 should be drawn around the ends of the pin. 2233 2234 3. Select Edit → Edit..., or hit ‘E E’ (or right click, and hit 2235 ‘Edit...’). This will bring up the edit dialog for this pin. 2236 2237 In the Edit dialog for a pin, you should see four attributes 2238(NAME=VALUE pairs) already associated with your new pin. These 2239attributes can be edited by clicking on the attribute in the list at the 2240top of the edit window, then clicking on the field you want to edit. 2241Note that when selected, the ‘Add Attribute’ section of this dialog does 2242not reflect what has been selected, as it is only meant for addition, 2243not for editing. 2244 2245 Let’s look at each attribute already associated with your pin, and 2246edit some of the values. I recommend expanding the size of the edit 2247window until all attributes are visible. 2248 • All pins should have a PINSEQ attribute. This number dictates the 2249 order pins are looked at on this symbol in SPICE, ‘lepton-netlist’, 2250 and other tools. For our first pin, start this sequence number at 2251 ‘1’, incrementing it on each new pin, as we add them. 2252 2253 • All pins should have a PINNUMBER attribute. This is the number of 2254 the pin, on the package of the item you are drawing a symbol for. 2255 PINNUMBER values can be alphanumeric (i.e. like ‘E’ or ‘C’). 2256 2257 • All pins should have a PINLABEL attribute. This attribute is the 2258 name or label of the pin (not the pin number). 2259 2260 • All pins should have a PINTYPE attribute. This attribute describes 2261 the kind of a pin. 2262 2263 • PINSEQ and PINNUMBER attributes of several pins can be 2264 automatically numbered by Attributes → Autonumber Text.... 2265 2266 Possible PINTYPE values are: IN, OUT, IO, OC, OE, PAS, TP, TRI, CLK, 2267PWR. *Note pintype attribute:: for more info. 2268 2269 2270File: lepton-manual.info, Node: Adding attributes to your symbol 2271 22724.1.2.4 Adding attributes to your symbol 2273........................................ 2274 2275Every symbol needs some attributes (NAME=VALUE pairs) in order to be 2276useful in ‘lepton-schematic’, and in other tools. 2277 2278 First we’re going to add all of the attributes we want, then make the 2279ones that need to be invisible invisible. 2280 1. A DEVICE=DEVICENAME attribute should be placed somewhere in the 2281 symbol. The DEVICENAME should consist of nothing but capital 2282 letters, dashes, numbers, and underscores. If the object is a 2283 graphic then DEVICE= should be set to NONE (DEVICE=NONE). 2284 2285 2. A GRAPHICAL=1 attribute should exist somewhere in a symbol which is 2286 purely graphical (such as a title block or ‘decon’ symbol). 2287 Symbols which have this attribute have no electrical or circuit 2288 significance. Don’t forget to set DEVICE=NONE per the previous 2289 step. 2290 2291 3. A DESCRIPTION=TEXT attribute should exist somewhere in the symbol. 2292 The TEXT value should provide a one line description of the symbol. 2293 2294 4. A FOOTPRINT=PACKAGENAME attribute should exist somewhere in the 2295 symbol which might be used with a pcb netlister. PACKAGENAME is a 2296 pcb footprint or package type like ‘DIP14’ or ‘DIP40’. Please see 2297 the footprint naming conventions 2298 (geda-pcb_footprint_naming_conventions.html) page for further 2299 detail. If you are using gEDA / PCB, also see the PCB 2300 documentation (http://pcb.geda-project.org/manual.html) and 2301 gnetlist/docs/README.pcb for more info on this attribute and how it 2302 is used. 2303 2304 5. A REFDES= attribute should be placed inside all non-graphical 2305 symbols. This attribute should default to U? for integrated 2306 circuits, and T? for transistors. Make only the value visible and 2307 it will be promoted (attached to the outside of the symbol (so it 2308 can be edited)) when the symbol is placed in a schematic. 2309 2310 6. A NUMSLOTS= attribute should be placed inside of all symbols, to 2311 prevent a warning when you will check your symbol by gsymcheck. 2312 NUMSLOTS=1 works fine. 2313 2314 Now that those have been added, make the NUMSLOTS, FOOTPRINT, 2315DESCRIPTION, GRAPHICAL and DEVICE attributes invisible. Leave only the 2316value of the REFDES attribute visible, and place it somewhere at the top 2317of your symbol. 2318 23194.1.2.5 Finishing 2320................. 2321 2322 1. Add a label to your symbol by selecting Add → Text... or pressing 2323 ‘A T’. Type out your label, and move it to the top of your symbol. 2324 2325 2. Translate the symbol to the origin using Edit → Symbol Translate... 2326 or press ‘E T’. 2327 2328 3. Enter ‘0’ into the entry field and press ‘OK’. 2329 2330 4. Save the symbol using File → Save or File → Save As... 2331 2332 5. Place the symbol in one of the directories specified as a symbol 2333 library in a suite configuration file (one of the *note gafrc:: 2334 files). For an explanation of how to set up symbol libraries, see 2335 the *note Legacy configuration::. Once this is done, the symbol 2336 should be visible immediately and can be selected and placed with 2337 the Add → Select Component... menu item. On Debian, placing files 2338 in ‘/usr/share/gEDA/sym/local/’ works, but requires permissions 2339 setup. 2340 2341 Note: Translating the symbol to the origin is a required step. To 2342 translate a symbol elsewhere, enter a offset (in mils) which is a 2343 even multiple of 100. Make sure all pins are snapped to a 100 mil 2344 grid point. 2345 23464.1.3 Common Symbol Naming Conventions 2347-------------------------------------- 2348 2349 1. Symbols are named: ‘symbolname-#.sym’ 2350 2351 2. Symbols end with a ‘.sym’ extension. 2352 2353 3. Symbols have a ‘-#’ where ‘#’ is a number. Typically ‘#’ is ‘1’ 2354 but if there are multiple symbols for a device then this number 2355 simply increments. 2356 2357 4. Symbol names are typically lowercase but letters which are part of 2358 a part number are uppercase. 2359 2360 5. The above case rule can be broken if the filename looks incorrect 2361 or wrong. 2362 23634.1.4 Symbol Requirements 2364------------------------- 2365 2366This section describes the various requirements which must be met in 2367order to create a valid symbol which will display and netlist in the 2368gEDA/gaf system. 2369 23704.1.4.1 Pins 2371............ 2372 2373 1. All pins should have a PINSEQ attribute. This number dictates the 2374 order pins are looked at on this symbol in spice, ‘lepton-netlist’, 2375 and other tools. This is just a sequence number, and should 2376 increment sequentially starting at 1. 2377 2378 2. All pins should have a PINNUMBER attribute attached to them. This 2379 is the number of the pin, on the package of the item you are 2380 drawing a symbol for. The pin number can be alphanumeric (i.e. 2381 like ‘E’ or ‘C’). 2382 2383 3. All pins should have a PINLABEL attribute attached to them. This 2384 attribute is the name or label of the pin (not the pin number). 2385 This attribute is also used when a symbol is used in a hierarchical 2386 schematic. 2387 2388 4. All pins should have PINTYPE attribute attached to them. This 2389 attribute describes the kind of a pin. Possible values are: IN, 2390 OUT, IO, OC, OE, PAS, TP, TRI, CLK, PWR. *Note pintype attribute:: 2391 for more info. 2392 2393 2394File: lepton-manual.info, Node: Add attributes 2395 23964.1.4.2 Add attributes 2397...................... 2398 2399For more information on the attributes presented here, please see the 2400*note Master attribute list::. 2401 1. A DEVICE=DEVICENAME attribute should be placed somewhere in the 2402 symbol and made invisible. Typically the DEVICENAME is in all caps 2403 (capital letters). This attribute should not be used as a label. 2404 Use a separate text object for the label. If the object is a 2405 graphic then DEVICE= should be set to none (DEVICE=NONE). 2406 2407 2. A GRAPHICAL=1 attribute should exist somewhere in a symbol which is 2408 purely graphical (such as a title block or ‘decon’ symbol). 2409 Symbols which have this attribute have no electrical or circuit 2410 significance. Don’t forget to set DEVICE=NONE per the previous 2411 requirement. 2412 2413 3. A DESCRIPTION=TEXT attribute should exist somewhere in the symbol. 2414 The TEXT value should provide a one line description of the symbol. 2415 2416 4. A FOOTPRINT=PACKAGENAME attribute should exist somewhere in the 2417 symbol which might be used with a pcb netlister. PACKAGENAME is a 2418 pcb footprint or package type like DIP14 or DIP40. Please see the 2419 footprint naming conventions 2420 (geda-pcb_footprint_naming_conventions.html) page for further 2421 detail. If you are using gEDA / PCB, also see the PCB 2422 documentation (http://pcb.geda-project.org/manual.html) and 2423 gnetlist/docs/README.pcb for more info on this attribute and how it 2424 is used. 2425 2426 5. A REFDES=U? attribute should be placed inside all non-graphical 2427 symbols. Make only the value visible and it will be promoted 2428 (attached to the outside of the symbol, so it can be edited) when 2429 the symbol is placed in a schematic. 2430 2431 6. The LABEL= and NAME= attributes should not exist anywhere in the 2432 symbol. They are obsolete. 2433 2434 7. The NETNAME= attribute should not be attached anywhere in the 2435 symbol. It is only used in schematics. 2436 24374.1.4.3 Slotting 2438................ 2439 2440 1. If a component has multiple slots in a package (such as a 7400 2441 (NAND) which has 4 NANDs per package) then you need a NUMSLOTS=# 2442 attribute. The # is the number of slots the device has. NUMSLOTS= 2443 should be exist somewhere in the symbol and made invisible. 2444 Additional slot related required attributes are described below. 2445 2446 2. If a component has multiple slots in a physical package then you 2447 also need to include a SLOTDEF=#:#,#,#... for every slot. The 2448 first # corresponds to the slot number. If a device has 4 slots 2449 then there should be SLOTDEF=1:..., SLOTDEF=2:..., SLOTDEF=3:..., 2450 and SLOTDEF=4:..., attributes existing somewhere in the symbol and 2451 made invisible. The subsequent # have a one-to-one correspondence 2452 to PINSEQ=# attributes and specify what corresponding PINNUMBER=# 2453 should be when that slot is set. See the *note attached 2454 7400-1.sym: Symbol example. as an example of how this should all 2455 work. 2456 2457 3. It is recommended that all symbols which have slots have a SLOT=1 2458 attribute inside the symbol. 2459 24604.1.5 Checking a Symbol 2461----------------------- 2462 2463Running gsymcheck will check that all of these requirements are met. 2464gsymcheck will output fatal errors which are quite serious and must be 2465corrected. gsymcheck will also output warnings on things which should 2466be fixed but are not fatal. 2467 24684.1.6 Style 2469----------- 2470 2471This section describes the style which is used in the standard gEDA/gaf 2472symbol library. 2473 24744.1.6.1 Text 2475............ 2476 2477 • All text labels should all be 10 pt in size. 2478 2479 • Text (labels not attributes) should be color number 9 (text | 2480 green). 2481 2482 • Use the special overbar encoding (e.g. PINLABEL=\_RESET\_) to 2483 express inverse logic levels. 2484 24854.1.6.2 Attributes 2486.................. 2487 2488 • PINNUMBER attributes should be displayed as pin numbers for pins 2489 (not PINSEQ) and should be 8 pt in size. 2490 2491 • Attached attributes should be color number 5 (attributes | yellow). 2492 The color is set automatically to yellow if the text item is 2493 attached. 2494 2495 • The only exception to this is PINLABEL= attributes, those should be 2496 color number 9 (text | green). If every text item within a symbol 2497 is yellow, the symbol looks too yellow. 2498 2499 • Attributes can be attached to some part of the symbol. Toplevel 2500 attributes (like the DEVICE= or NET= attributes) used to be 2501 required to be attached to something to be attributes, but now they 2502 just have to exist in the symbol file as NAME=VALUE. 2503 2504 • Expanding a bit on the last sentence, as long as the text item has 2505 the format NAME=VALUE, it is considered an attribute. Attributes 2506 inside a symbol do not have to be attached to anything. In order 2507 to see hidden attributes in ‘lepton-schematic’ select Edit → 2508 Show/Hide Inv Text. 2509 2510 • There is a symbol content versioning system in libgeda which is 2511 based on the SYMVERSION= attribute. Please see the *note 2512 symversion attribute:: for more information on using this 2513 versioning scheme. 2514 25154.1.6.3 Graphics 2516................ 2517 2518 • Lines, boxes, arcs, and any other graphics should be color number 3 2519 (graphic | green). 2520 2521 • Polarity bubbles should be color number 6 (logic bubble | cyan). 2522 2523 • If you are unsure on how to make a new symbol look or how big to 2524 make a new symbol, look at the existing symbols to get a feel for 2525 the appropriate appearance and size. 2526 25274.1.6.4 Pins 2528............ 2529 2530 • Pins should all be 300 mils (3 grid spaces) long. 2531 2532 • For pins which are next to a logic bubble, make the pins 200 mils 2533 (2 grid spaces) long and then make the logic bubble 100 mils in 2534 diameter. In order to draw a 100 mil diameter circle, you will 2535 need to change the snap spacing to 50. 2536 2537 • A pin has two ends: one end has a red endpoint and one end that 2538 does not. The red endpoint is where nets can be connected. You 2539 can either rotate the pin so that this active end is in the right 2540 place or manually edit the symbol file changing the “whichend” 2541 parameter on the pin object. *Note pin:: for more info. 2542 2543 • Be that all endpoints of pins which are meant to be connected to 2544 are on the 100 mil grid. The endpoint which is not active can be 2545 off the grid if necessary. 2546 2547 • Pins should be color number 1 (pins | white). 2548 2549 • Leave 400 mils (4 grid spaces) between (vertically) pins, unless 2550 you are drawing a special symbol, then just try to make it look 2551 good. 2552 2553 • Pin number attributes should be 50 mils above (or below; which ever 2554 makes the most sense) the pin which they are attached to. 2555 2556 • Input pins belong on the left and output pins belong on the right 2557 of the symbol. 2558 2559 • Please do not mix inputs and outputs on the same side of the 2560 symbol, unless absolutely necessary. 2561 2562 • You can have pins on the top or bottom of a symbol. 2563 2564 • The order for rows of pins (buses) should be LSB (least significant 2565 bit) to MSB (most significant bit). When drawing pins which are 2566 part of a bus, make sure the LSB of the bus is at the top (or for 2567 pins on top/bottom of a symbol, left of the rest of the other 2568 pins). Look at ‘74/74181-1.sym’ for a correct example of this 2569 order (‘A0’ on top through ‘A3’ and ‘B0’ on top through ‘B3’). 2570 Violating this rule will make connecting buses much more difficult. 2571 2572 • When placing pins on logic gates, be sure to place the smallest pin 2573 numbers toward the top (or left) and then increment going down (or 2574 across). 2575 25764.1.6.5 Electrical 2577.................. 2578 2579 • Do not draw power and ground pins. That information will be 2580 conveyed using attributes (see the *note net= attribute 2581 mini-HOWTO::). 2582 2583 • The above rule can be broken if necessary, but keep in mind most of 2584 the standard library does not have power pins showing. 2585 2586 • Keep in mind, symbols are supposed to be symbolic, they do not 2587 represent the physical package that the device comes in. 2588 2589 • There is some disagreement on above, so this is okay too: arrange 2590 the pins on a symbol logically so that they promote an uncluttered 2591 schematic. Note that this is frequently not the same pin 2592 arrangement as the physical device. 2593 25944.1.7 Hints and Tips 2595-------------------- 2596 2597This section describes some hints and tips which will make your symbol 2598creation experience easier. 2599 • Pins _MUST_ be snapped on the 100-spaced grid. 2600 2601 • Avoid drawing things off of the grid. If you do, you cannot move 2602 the object(s) using the move command (if the grid is on) since the 2603 object will be snapped to the grid. [This was an old bug, which I 2604 think has been fixed, but avoid doing this anyway]. Use the symbol 2605 translate command instead (or move the object with grid snap off). 2606 2607 • It is okay to set the grid finer than 100 (say 10 or 25) when 2608 creating symbols, just remember to set this back to 100 once you 2609 are ready to translate the symbol to the origin. 2610 2611 • If you want to translate a symbol from the origin to elsewhere, 2612 then use the Edit → Symbol Translate... command and enter a non 2613 zero number. Make sure this number is a multiple of 100 (i.e. 2614 1000, or 1100). 2615 2616 • Remember that pins are special objects; if you want to add a pin, 2617 make sure it is a pin and not a line or net. Use the Add → Pin 2618 command to place a pin. 2619 2620 • Don’t include nets or buses inside symbols. That is not supported 2621 and doesn’t make much sense anyway. 2622 2623 • PINNUMBER should be the visible attribute for pins, along with 2624 PINLABEL if any. 2625 2626 2627File: lepton-manual.info, Node: Symbol example, Up: Symbol Creation 2628 26294.1.8 Symbol example 2630-------------------- 2631 2632This section provides a simple example which tries to follow all of the 2633above rules. This symbol is of a 7400 (NAND gate). 2634v 20031231 1 2635L 300 200 300 800 3 0 0 0 -1 -1 2636T 300 0 9 8 1 0 0 0 1 26377400 2638L 300 800 700 800 3 0 0 0 -1 -1 2639T 500 900 5 10 0 0 0 0 1 2640device=7400 2641T 500 1100 5 10 0 0 0 0 1 2642slot=1 2643T 500 1300 5 10 0 0 0 0 1 2644numslots=4 2645T 500 1500 5 10 0 0 0 0 1 2646slotdef=1:1,2,3 2647T 500 1700 5 10 0 0 0 0 1 2648slotdef=2:4,5,6 2649T 500 1900 5 10 0 0 0 0 1 2650slotdef=3:9,10,8 2651T 500 2100 5 10 0 0 0 0 1 2652slotdef=4:12,13,11 2653L 300 200 700 200 3 0 0 0 -1 -1 2654A 700 500 300 270 180 3 0 0 0 -1 -1 2655V 1050 500 50 6 0 0 0 -1 -1 0 -1 -1 -1 -1 -1 2656P 1100 500 1300 500 1 0 1 2657{ 2658T 1100 550 5 8 1 1 0 0 1 2659pinnumber=3 2660T 1100 450 5 8 0 1 0 2 1 2661pinseq=3 2662T 950 500 9 8 0 1 0 6 1 2663pinlabel=Y 2664T 950 500 5 8 0 1 0 8 1 2665pintype=out 2666} 2667P 300 300 0 300 1 0 1 2668{ 2669T 200 350 5 8 1 1 0 6 1 2670pinnumber=2 2671T 200 250 5 8 0 1 0 8 1 2672pinseq=2 2673T 350 300 9 8 0 1 0 0 1 2674pinlabel=B 2675T 350 300 5 8 0 1 0 2 1 2676pintype=in 2677} 2678P 300 700 0 700 1 0 1 2679{ 2680T 200 750 5 8 1 1 0 6 1 2681pinnumber=1 2682T 200 650 5 8 0 1 0 8 1 2683pinseq=1 2684T 350 700 9 8 0 1 0 0 1 2685pinlabel=A 2686T 350 700 5 8 0 1 0 2 1 2687pintype=in 2688} 2689T 300 900 8 10 1 1 0 0 1 2690refdes=U? 2691T 500 2250 5 10 0 0 0 0 1 2692footprint=DIP14 2693T 500 2450 5 10 0 0 0 0 1 2694description=4 NAND gates with 2 inputs 2695T 500 2850 5 10 0 0 0 0 1 2696net=Vcc:14 2697T 500 3050 5 10 0 0 0 0 1 2698net=GND:7 2699T 500 2650 5 10 0 0 0 0 1 2700documentation=http://www-s.ti.com/sc/ds/sn74hc00.pdf 2701 2702 This example produces the following (using ‘lepton-schematic’): 2703 2704[image src="7400-1.png"] 2705 2706 2707 This is the same symbol with all the hidden text visible (via Edit → 2708Show/Hide Inv Text): 2709 2710[image src="7400-1-hidden.png"] 2711 2712 2713 2714File: lepton-manual.info, Node: Editing symbols, Next: Editing symversion attribute, Prev: Symbol Creation, Up: Symbols 2715 27164.2 Editing symbols 2717=================== 2718 2719When you edit a symbol, it is worth to follow the following rules: 2720 • Connectable ends of its pins have to be snapped to points, 2721 coordinates of which are multiples of 100. Otherwise, Lepton tools 2722 won’t be able to correctly connect them to any connectable object. 2723 • You have to adjust the ‘symversion’ attribute in order the tools 2724 would be aware that the symbol in the library is newer than its 2725 instances in your schematic and could warn you if something may 2726 break. *Note Editing symversion attribute:: on what provisions 2727 should be made when you are editing a symbol. 2728 2729 2730File: lepton-manual.info, Node: Editing symversion attribute, Next: No-connect symbols, Prev: Editing symbols, Up: Symbols 2731 27324.3 Editing symbol version attribute 2733==================================== 2734 2735Symbol version is defined using the ‘symversion’ attribute. The 2736attribute value should contain two components in order tools to process 2737it correctly: major and minor. So it looks like ‘major.minor’, for 2738example, ‘1.2’. It is important to follow to several simple rules when 2739you are about to edit a symbol and its version. Otherwise, the tools 2740won’t be able to warn you on significant changes. You should remember 2741that _major_ changes are those that may break existing schematics and/or 2742netlists: 2743 2744 • Addition or removal of pins. 2745 • Changing position of connectable ends of pins. 2746 • Changes in position of graphics or attributes that lead to moving 2747 pins to other position after translation. 2748 • Change of pin attributes that may affect netlist creation. 2749 2750 If you did any of the above changes, please increment the major 2751version number, especially, if your symbol is shared with other users. 2752 2753 The minor symbol changes are any other that do not break anything. 2754Those are any changes in graphical stuff such as attribute placement, 2755new lines in the body rectangle, colors etc. which do not affect the 2756points mentioned above. Changing of any internal symbol attribute won’t 2757break your existing schematic, so it is considered minor as well. On 2758such changes, please increment the minor symbol version. 2759 2760 If the symbol you edit does not have the ‘symversion’ attribute, 2761please add it. Otherwise, Lepton tools won’t be able to warn you about 2762any changes, even breaking. 2763 2764 2765File: lepton-manual.info, Node: No-connect symbols, Next: Title block symbol, Prev: Editing symversion attribute, Up: Symbols 2766 27674.4 No Connection Short Form Data Sheet 2768======================================= 2769 2770*General description* 2771 2772 The component is a mono‐pole with unique properties. 2773 2774 *Applications* 2775 2776 • Digital circuits 2777 2778 • Analog circuits 2779 2780 • Mixed signal circuits 2781 2782 • Consumer products 2783 2784 • Industry products 2785 2786 *Features* 2787 2788 • ESD tolerant 2789 2790 • Latchup free 2791 2792 • Operates with zero power supplies 2793 2794 • Simple connection 2795 2796 *Electrical Characteristics* 2797 2798Parameter Symbol Conditions Min Typ Max Units 2799 2800----------------------------------------------------------------------------- 2801Supply Vcc Any 0 ∞ V 2802Voltage 2803Supply Icc Any 0 0 0 mA 2804Current 2805 2806 *Pin Descriptions* 2807 2808Pin Name Function 2809 2810---------------------------------------------------------------------------- 28111 NC None whatsoever 2812 2813 *Detailed Description* 2814 2815 The component really does nothing, except making it perfectly clear 2816that when it is connected to pins on other components, they should not, 2817or at least need not, be connected to anything else. 2818 2819 *Ordering Information* 2820 2821Part Temp. Range Terminal Package 2822 2823---------------------------------------------------------------------------- 2824nc‐left −273.16°C to Left None 2825 +∞°C 2826nc‐right −273.16°C to Right None 2827 +∞°C 2828nc‐top −273.16°C to Top None 2829 +∞°C 2830nc‐bottom −273.16°C to Bottom None 2831 +∞°C 2832 2833 *References* 2834 2835 • <http://www.gedasymbols.org/> 2836 2837 • Lepton symbols 2838 (https://github.com/lepton-eda/lepton-eda/tree/master/symbols) 2839 2840 2841File: lepton-manual.info, Node: Title block symbol, Prev: Symbols, Up: Symbols 2842 28434.5 Title block symbol 2844====================== 2845 2846The drawing area of ‘lepton-schematic’ is large enough and the users 2847should have representation of logical extents of the schematics they are 2848working on. Title block symbol just aims to graphically define the 2849bounds of a created schematic page. 2850 2851 Title boxes are usually locked in order to prevent the user from 2852selecting it accidentally and deleting along with other objects. 2853Moreover, an unlocked title block would be confusingly selected instead 2854of other objects within it every now and then. A title block symbol is 2855inserted any time the user creates a new schematic. Since it is not 2856needed in symbols, you may want to delete it just after new page 2857creation. How to achieve that if you cannot select it? Just use _box 2858selection_ (*note Box selection::), left-click and drag the selection 2859box to enclose the title block. Then use the usual deletion procedure: 2860hit ‘Delete’ or ‘D’. 2861 2862 What to do if you want to change it after adding some contents to 2863your schematic page? Well, there are some tricks. First, you can just 2864select all page contents excluding locked objects and move it to another 2865place, then delete the title block as above. Another way, if the *note 2866gEDA file format:: is used, is just deleting title block definition in 2867the schematic file itself. It is usually second and third lines of the 2868file (the first one is the version specification). 2869 2870 For historical reasons, the default title block symbol is 2871‘title-B.sym’. In order to set up another symbol as default title 2872block, change the *note default-titleblock:: configuration key. Choose 2873the symbol you think will be used most often, and fix your *note user 2874configuration: user-configuration. You may want to do so for some 2875project if only it needs other title blocks. Amend your *note project 2876configuration: project-configuration. in such a case. 2877 2878 Note: If you misspelled title block symbol name in your 2879 configuration setting, or if the libraries linked in your project 2880 miss the symbol with the name, or there is no symbol with specified 2881 system default name when you did not changed the name in your local 2882 project configuration, new untitled pages will be created empty, 2883 without any title block. See the log if in doubt (*note 2884 Logging::). *Note Missing symbols:: for how to check that symbol 2885 has not been found. 2886 2887 There are several predefined title block symbols in 2888‘lepton-schematic’. Open the Add Component dialog box (*note Add 2889Component widget::) and enter ‘title’ in the filter entry to find them. 2890 2891 2892File: lepton-manual.info, Node: Missing symbols, Prev: Title block symbol, Up: Symbols 2893 28944.6 Missing symbols 2895=================== 2896 2897Sometimes you may see on your screen such strange symbols instead of 2898components you would expect in your schematic: 2899 2900 That means here should be a symbol that has not been found in any of 2901the libraries added in your project. The symbols above are placeholder 2902symbols, that is, some symbols intended just for such cases. 2903 2904 If title block symbol is missing in your libraries, the visible 2905effect will be a bit other. You’ll see just an empty page. The actions 2906described below will however help you in such a case as well. 2907 2908 Some symbols may be missing for several reasons: 2909 2910 • You distributed your design without some necessary symbol. For 2911 example, you sent your schematic by email without symbols and the 2912 receiver does not have those symbols. 2913 • You did not add a necessary library in your project. For example, 2914 you created a project, then disabled system libraries using 2915 ‘reset-component-library’, though did not add some required symbol 2916 into the local library of your project. 2917 • You misspelled the title block name in your configuration file. 2918 *Note Title block symbol::. 2919 • The name of the title block symbol in your local configuration is 2920 spelled right, but it is missing in the libraries of your project 2921 after disabling some of them as above. 2922 • You edited your symbol file contents manually in your text editor 2923 or by a script and misspelled the names of some symbols. 2924 2925 In order to figure out what’s wrong you may do as follows: 2926 2927 • Open ‘lepton-schematic’, hit ‘I’ to see the enabled libraries and 2928 look at what libraries are really present. 2929 • If you are working with one of the utilites that supports 2930 interactive mode (e.g. ‘lepton-netlist’), enter the mode and type 2931 the following in the REPL: 2932 (use-modules (lepton library component)) 2933 (component-libraries) 2934 2935 • In ‘lepton-schematic’, you can do the same, thought the results 2936 will be displayed in the Log window. *Note Log window:: for more. 2937 2938 The two last options will show you what libraries are enabled and 2939what are their names and full paths to them. 2940 2941 Check in the log window (*note Log window::) or in the log file 2942(*note Logging::) what RC files have been loaded. Check also what 2943configuration files have been loaded. If you don’t know what 2944configuration files have been used, you can enter the REPL in 2945‘lepton-schematic’ or in one of the utilities supporting interactive 2946mode (like ‘lepton-netlist’) and look for system and user configuration 2947directorires. *Note lepton-cli shell:: for recipes on how to do that. 2948The local project configuration directory is most often the directory 2949where its schematics reside, though the directory with schematics may be 2950one in the subdirectory tree of your project. If in doubt, try in the 2951directory with schematics: 2952 (config-filename (path-config-context (getcwd))) 2953 or use the full path in the form ‘"/path/to/my/project"’ instead of 2954‘(getcwd)’ in this command. 2955 2956 After having discovered what and where (in which config file) is 2957enabled, search for a library with the symbol required and add it (*Note 2958Component library setup::) or add required symbol(s) to the local 2959library directory of your project. 2960 2961 If you misspelled the name of a symbol, just fix it. 2962 2963 2964File: lepton-manual.info, Node: lepton-schematic, Next: lepton-netlist, Prev: Symbols, Up: Top 2965 29665 Schematic capture 2967******************* 2968 2969* Menu: 2970 2971* Introduction to lepton-schematic:: 2972* Running lepton-schematic:: 2973* lepton-schematic window:: 2974* Dialog boxes and widgets:: 2975* Creating and opening schematics:: 2976* Editing schematics:: 2977* Working with windows:: 2978* Quitting the program:: 2979* Saving schematic pages:: 2980* Printing and exporting:: 2981* Selecting objects:: 2982* Searching for text:: 2983* Check symbols:: 2984* lepton-schematic command line options:: 2985* Component libraries:: 2986* Interactive work with Scheme code:: 2987 2988 2989File: lepton-manual.info, Node: Introduction to lepton-schematic, Next: Running lepton-schematic, Prev: lepton-schematic, Up: lepton-schematic 2990 29915.1 Introduction to lepton-schematic 2992==================================== 2993 2994‘lepton-schematic’ is a “schematic capture” application in the Lepton 2995toolset. It is mostly used for interactive creation of electronic 2996“schematics” and “symbols”, though you can do some other graphical work 2997in it, for example, draw block diagrams. Schematics represent 2998electronic circuits, and symbols stand for their logical blocks such as 2999components or subcircuits. The connections between the blocks are 3000represented by “nets” (wires). Component symbols can be obtained either 3001from a standard Lepton *note component library: Component libraries, 3002from some net resources, or created by the user. 3003 3004 After creation, schematics may be printed, converted to several image 3005formats, including PDF, or exported to several netlist formats for 3006processing by other tools. 3007 3008 3009File: lepton-manual.info, Node: Running lepton-schematic, Next: lepton-schematic window, Prev: Introduction to lepton-schematic, Up: lepton-schematic 3010 30115.2 Running lepton-schematic 3012============================ 3013 3014‘lepton-schematic’ is a GUI tool, so there are different ways of running 3015it. You can launch it from your window manager menu, by clicking onto 3016an appropriate schematic or symbol icon (‘.sch’ or ‘.sym’), or from your 3017terminal. To launch it from menu, look up for Development, Electronics, 3018or Engineering submenus. The last way is most powerful and versatile. 3019You can run the command without any arguments just to open a new, 3020untitled schematic: 3021 3022 lepton-schematic 3023 3024 or you can specify the names of schematic and symbol files: 3025 3026 lepton-schematic schematic.sch /path/to/symbol.sym 3027 3028 ‘lepton-schematic’ accepts several *note command line options: 3029lepton-schematic command line options. Please look the 3030‘lepton-schematic(1)’ manual page for more information. Alternatively, 3031run: 3032 3033 lepton-schematic --help 3034 3035 to get the brief description of all the options supported. 3036 3037 3038File: lepton-manual.info, Node: lepton-schematic window, Next: Dialog boxes and widgets, Prev: Running lepton-schematic, Up: lepton-schematic 3039 30405.3 Main lepton-schematic window 3041================================ 3042 3043The window of ‘lepton-schematic’ consists of the following widgets: 3044 3045 • Menubar 3046 • Toolbar 3047 • Tabs notebook 3048 • Drawing area (Page view) 3049 • Right dock 3050 • Bottom dock 3051 • Context menus 3052 3053* Menu: 3054 3055* Menubar:: 3056* Menu File:: 3057* Menu Edit:: 3058* Menu View:: 3059* Menu Page:: 3060* Menu Add:: 3061* Menu Hierarchy:: 3062* Menu Attributes:: 3063* Menu Options:: 3064* Menu Netlist:: 3065* Menu Help:: 3066* Non-menu actions:: 3067 3068 3069File: lepton-manual.info, Node: Menubar, Next: Menu File, Prev: lepton-schematic window, Up: lepton-schematic window 3070 30715.3.1 Menubar 3072------------- 3073 3074The Menubar widget contains several menus grouped by actions. 3075 3076 3077File: lepton-manual.info, Node: Menu File, Next: Menu Edit, Prev: Menubar, Up: lepton-schematic window 3078 30795.3.2 Menu File 3080--------------- 3081 3082_New_ 3083 3084 File → New (‘Ctrl-N’ or ‘F N’) allows you to create a new untitled 3085 schematic page. The same as Page → New. *Note Creating and 3086 opening schematics::. 3087 3088_Open..._ 3089 3090 File → Open... (‘Ctrl-O’ or ‘F O’) opens a dialog box for choosing 3091 and opening an existing schematic or symbol file. *Note Creating 3092 and opening schematics::. 3093 3094_Open Recent_ 3095 3096 File → Open Recent (‘F O’) lets you open one of the recently opened 3097 files without the need of searching it in the file system. 3098 3099_Save_ 3100 3101 File → Save (‘F S’) is used to save changes in your schematic page 3102 on disk. *Note Saving schematic pages::. 3103 3104_Save As..._ 3105 3106 File → Save As... (‘F A’) allows you to save the page you edit 3107 under another name. 3108 3109_Save all_ 3110 3111 File → Save all (‘F L’) saves all unsaved pages. Anything 3112 specified above about the Save diallog matters here as well. You 3113 should only note that the Save As dialog is opened for each of 3114 untitled pages. 3115 3116_Print..._ 3117 3118 File → Print... (‘F P’ or ‘Ctrl-P’) opens a standard GTK printing 3119 dialog in which you can preview and print schematics. *Note 3120 Printing and exporting::. 3121 3122_Write Image..._ 3123 3124 File → Write Image... (‘F I’) can be used to export schematic and 3125 symbol pages as images. *Note Printing and exporting::. 3126 3127_Invoke macro..._ 3128 3129 File → Invoke macro... (‘:’, colon, or ‘E Shift-:’) allows you to 3130 execute some small excerpts of Scheme code interactively in GUI. 3131 *Note Interactive work with Scheme code::. 3132 3133_Execute Script..._ 3134 3135 File → Execute Script... (‘F T’) allows you to execute a Scheme 3136 script file stored in your file system. *Note Interactive work 3137 with Scheme code::. 3138 3139_REPL..._ 3140 3141 File → REPL... (‘F Shift-R’) lets you hack your Scheme extensions 3142 interactively, using the REPL in the background terminal where you 3143 started ‘lepton-schematic’. *Note Interactive work with Scheme 3144 code::. 3145 3146_New Window_ 3147 3148 File → New Window (‘F W’) allows you to open a new _window_ of 3149 ‘lepton-schematic’. *Note Working with windows::. 3150 3151_Close Window_ 3152 3153 File → Close Window (‘F C’) closes the current ‘lepton-schematic’ 3154 window. *Note Working with windows::. 3155 3156_Quit_ 3157 3158 File → Quit (‘F Q’ or ‘Alt-Q’) closes all open windows of 3159 ‘lepton-schematic’. *Note Quitting the program::. 3160 3161 3162File: lepton-manual.info, Node: Menu Edit, Next: Menu View, Prev: Menu File, Up: lepton-schematic window 3163 31645.3.3 Menu Edit 3165--------------- 3166 3167_Undo_ 3168 3169 Edit → Undo (‘Ctrl-Z’, ‘U’, ‘Shift-U’, or ‘E Shift-U’) undoes the 3170 last editing action. *Note Editing schematics::. 3171 3172_Redo_ 3173 3174 Edit → Redo (‘Shift-Ctrl-Z’, ‘Ctrl-Y’, ‘Shift-R’, or ‘E Shift-R’) 3175 repeats recently undone actions. *Note Editing schematics::. 3176 3177_Cut_ 3178 3179 Edit → Cut (‘Ctrl-X’) cuts currently selected objects to clipboard. 3180 *Note Editing schematics::. 3181 3182_Copy_ 3183 3184 Edit → Copy (‘Ctrl-C’) copies currently selected objects to 3185 clipboard. *Note Editing schematics::. 3186 3187_Paste_ 3188 3189 Edit → Paste (‘Ctrl-V’) allows to paste the current clipboard 3190 contents to the drawing area. *Note Editing schematics::. 3191 3192_Delete_ 3193 3194 Edit → Delete (‘Delete’, ‘D’, or ‘E D’) deletes currently selected 3195 objects. *Note Editing schematics::. 3196 3197_Select Mode_ 3198 Edit → Select Mode (‘S’ or ‘E S’) switches on the selection mode. 3199 *Note Selecting objects::. 3200 3201_Select All_ 3202 3203 Edit → Select All (‘Ctrl-A’) selects all non-locked objects on a 3204 page. *Note Selecting objects::. 3205 3206_Deselect_ 3207 3208 Edit → Deselect (‘Shift-Ctrl-A’) deselects all selected objects, if 3209 any. *Note Selecting objects::. 3210 3211_Copy Mode_ 3212 3213 Edit → Copy Mode (‘C’ or ‘E C’) allows one-time copy of selected 3214 objects. *Note Editing schematics::. 3215 3216_Multiple Copy Mode_ 3217 3218 Edit → Multiple Copy Mode (‘E Y’) allows to make several copies of 3219 the same objects. *Note Editing schematics::. 3220 3221_Move Mode_ 3222 3223 Edit → Move Mode (‘M’ or ‘E M’) allows you to move selected objects 3224 without depressing the left mouse button. *Note Editing 3225 schematics::. 3226 3227_Rotate 90 Mode_ 3228 3229 Edit → Rotate 90 Mode (‘E R’) rotates selected objects by 90 3230 degrees counter-clockwise each time. *Note Editing schematics::. 3231 3232_Mirror Mode_ 3233 Edit → Mirror mode (‘E I’) is used to mirror objects around the X 3234 axis. *Note Editing schematics::. 3235 3236_Object Properties..._ 3237 Edit → Object Properties... (‘E O’) opens a dialog where you can 3238 see and change the properties of primitive objects. *Note Editing 3239 schematics::. 3240 3241_Edit..._ 3242 Edit → Edit... (‘E E’) opens one of the editing dialogs, _Edit 3243 Attributes_, _Edit Attribute_, or _Edit Text_, depending on what 3244 objects are selected. *Note Editing schematics::. 3245 3246_Edit Text..._ 3247 Edit → Edit Text... (‘E X’) opens the Edit Text dialog box for 3248 editing plain text objects. *Note Editing schematics::. 3249 3250_Slot..._ 3251 Edit → Slot... (‘E Shift-S’) is used to change slot number of a 3252 slotted component. *Note Editing schematics::. 3253 3254_Lock_ 3255 Edit → Lock (‘E L’) locks selected objects, that is, makes them not 3256 selectable by just clicking on them. *Note Editing schematics::. 3257 3258_Unlock_ 3259 Edit → Unlock (‘E Shift-L’) unlocks selected locked objects. *Note 3260 Editing schematics::. 3261 3262_Embed Component/Picture_ 3263 Edit → Embed Component/Picture (‘E B’) embeds a component or a 3264 picture into schematic. *Note Editing schematics::. 3265 3266_Unembed Component/Picture_ 3267 Edit → Unembed Component/Picture (‘E Shift-B’) unembeds an embedded 3268 component or a picture from schematic. *Note Editing schematics::. 3269 3270_Update Component_ 3271 Edit → Update Component (‘E U’) updates selected components if they 3272 changed before. *Note Editing schematics::. 3273 3274_Symbol Translate..._ 3275 Edit → Symbol Translate... (‘E T’) translates a symbol being 3276 edited to origin. *Note Editing schematics::. 3277 3278 3279File: lepton-manual.info, Node: Menu View, Next: Menu Page, Prev: Menu Edit, Up: lepton-schematic window 3280 32815.3.4 Menu View 3282--------------- 3283 3284_Side Dock_ 3285 View → Side Dock (‘V A’) opens the side dock widget with three 3286 tabs: “Object”, “Text”, and “Options”. You can select the tabs 3287 with left mouse click, or by choosing one of the actions Edit → 3288 Edit... (‘E E’), Edit → Edit Text... (‘E X’), or Options → 3289 Options... (‘E X’) correspondingly. See the description of 3290 corresponding menu items for more information on that. The action 3291 is available if displaying dock widgets is enabled in *note 3292 configuration: use-docks. 3293 3294_Bottom Dock_ 3295 View → Bottom Dock (‘V S’) opens the bottom dock widget with two 3296 tabs: “Find Text” and “Log”. The action is available if showing 3297 dock widgets is enabled in *note configuration: use-docks. 3298 3299_Find Text Results_ 3300 View → Find Text Results opens a widget with results of last text 3301 searching. If the docks are enabled in *note configuration: 3302 use-docks, the widget is displayed in the bottom dock. Otherwise, 3303 a separate dialog window is open. *Note Searching for text::. 3304 3305_Redraw_ 3306 View → Redraw (‘R’ or ‘V R’) allows you to trigger redrawing of the 3307 current page if, for example, you see some rendering glitches on 3308 the canvas. 3309 3310_Pan_ 3311 View → Pan (‘X’ or ‘V P’) pans the page, that is, makes it appear 3312 so the current mouse cursor position in world coordinates becomes 3313 the center of the view. 3314 3315_Zoom Box_ 3316 View → Zoom Box (‘W’ or ‘V B’) zooms the view to coordinates 3317 defined by a box you draw on the canvas. The first coordinate of 3318 the box is the current mouse position. Move the mouse to another 3319 point and click to set the second coordinate. The view will be 3320 scaled so the box region wholly fits in the canvas. 3321 3322_Zoom Extents_ 3323 View → Zoom Extents (‘0’, ‘Ctrl-0’, ‘V E’, or ‘*’ on the additional 3324 keypad) zooms the size of the visible canvas area to the extents of 3325 all visible objects. 3326 3327_Zoom In_ 3328 View → Zoom In (‘=’, ‘Ctrl-=’, ‘Z’, ‘V I’, or ‘+’ on the additional 3329 keypad) zooms in the contents of the canvas. 3330 3331_Zoom Out_ 3332 View → Zoom Out (‘-’, ‘Ctrl-minus’, ‘Shift-Z’, ‘V O’, or ‘-’ on the 3333 additional keypad) zooms out the contents of the canvas. 3334 3335_Zoom Full_ 3336 View → Zoom Full (‘V F’) zooms the canvas to show all the available 3337 coordinate space. 3338 3339_Dark Color Scheme_ 3340 View → Dark Color Scheme (‘V D’) loads a predefined color scheme 3341 with black background. 3342 3343_Light Color Scheme_ 3344 View → Light Color Scheme (‘V L’) loads a predefined color scheme 3345 with light background. 3346 3347_BW Color Scheme_ 3348 View → BW Color Scheme (‘V W’) loads a predefined black-and-white 3349 color scheme. 3350 3351_Color Scheme Editor..._ 3352 View → Color Scheme Editor... opens a dialog in which you can edit 3353 and save a custom color map used to display schematics on the 3354 canvas. 3355 3356 3357File: lepton-manual.info, Node: Menu Page, Next: Menu Add, Prev: Menu View, Up: lepton-schematic window 3358 33595.3.5 Menu Page 3360--------------- 3361 3362_Manager..._ 3363 Page → Manager... (‘P M’) opens the page manager window where you 3364 can interactively walk through the open schematic pages. 3365 3366_Previous_ 3367 Page → Previous (‘<’, ‘PgUp’, or ‘P P’) comes to the page in the 3368 list of opened pages previous to what is currently shown in the 3369 page view. 3370 3371_Next_ 3372 Page → Next (‘>’, ‘PgDown’, or ‘P N’) comes to the page in the list 3373 of opened pages next to what is currently shown in the page view. 3374 3375_Close_ 3376 Page → Close (‘P C’, or ‘F E’) closes the page currently shown in 3377 the page view. If the page has any non-saved changes, the 3378 confirmation dialog will be shown where you can select saving or 3379 dropping changes, or cancel the operation. 3380 3381_Revert..._ 3382 Page → Revert... (‘P R’ or ‘F R’) reverts all changes in the 3383 current schematic page since the last saving. Since the operation 3384 is dangerous, the confirmation dialog will be opened in order to 3385 prevent unwanted loss of data. It may be useful though in cases 3386 when the page file has been changed by some external program such 3387 as, for example, ‘lepton-refdes_renum’. 3388 3389_Next Tab_ 3390 Page → Next Tab goes to the next tab. It is equivalent to Page → 3391 Next if tabbed view is enabled in *note configuration: use-tabs. 3392 3393_Previous Tab_ 3394 Page → Previous Tab goes to the previous tab. It is equivalent to 3395 Page → Previous if tabbed view is enabled in *note configuration: 3396 use-tabs. 3397 3398 3399File: lepton-manual.info, Node: Menu Add, Next: Menu Hierarchy, Prev: Menu Page, Up: lepton-schematic window 3400 34015.3.6 Menu Add 3402-------------- 3403 3404The menu provides several modes for inserting symbols. All the modes 3405are active until you switch to another mode or cancel it, for example, 3406by hitting ‘Esc’. 3407 3408_Component..._ 3409 Add → Component... (‘I’ or ‘A C’) opens the Add component dialog 3410 where you can choose a symbol to insert, choose the method of 3411 insertion, filter the symbols by names, or choose updating the 3412 symbols in your schematic. 3413 3414_Net_ 3415 Add → Net (‘N’ or ‘A N’) switches on net adding mode. If the mouse 3416 cursor is over the canvas, the insertion starts immediately and the 3417 first point of a new net is the point under the cursor. Otherwise 3418 you have to left-click on the canvas to start a net. Use another 3419 left click to finish it. In default configuration, the right mouse 3420 button click cancels the net adding operation but does not cancel 3421 the mode. 3422 3423_Bus_ 3424 Add → Bus (‘Shift-B’ or ‘A U’) switches on bus adding mode. If the 3425 mouse cursor is over the canvas, the insertion starts immediately 3426 and the first point of a new bus is the point under the cursor. 3427 Otherwise you have to left-click on the canvas to start a bus. Use 3428 another left click to finish drawing it. In default configuration, 3429 the right mouse button click cancels the bus addition but does not 3430 cancel the mode. 3431 3432_Attribute..._ 3433 Add → Attribute... (‘A A’) opens the Add Attribute dialog where 3434 you can interactively choose the name and value of a new attribute 3435 as well as its visibility. The position of the attribute insertion 3436 corresponds to the point of the mouse cursor at which it was at the 3437 moment of the shortcut hitting. 3438 3439_Text..._ 3440 Add → Text... (‘A T’) opens the Add Text dialog where the user can 3441 type the text contents and choose its properties: color, size, 3442 alignment, and rotation angle. Hitting the ‘Apply’ button brings 3443 the text to the canvas and allows inserting it using the left mouse 3444 click. Hitting ‘Esc’ cancels the insertion. Close the dialog by 3445 hitting the ‘Close’ button. 3446 3447_Line_ 3448 Add → Line (‘L’ or ‘A L’) starts line inserting mode. If the mouse 3449 cursor is over the canvas, the insertion starts immediately and the 3450 first point of the line is the point under the cursor. Otherwise 3451 you have to left-click to define the first point. Use the left 3452 mouse button click to finish the insertion or the right mouse click 3453 to cancel it. 3454 3455_Path_ 3456 Add → Path (‘A H’) switches on path inserting mode. You have to 3457 left-click on the canvas to insert the first point of the path. 3458 Then move the mouse to the second point defining the first part of 3459 the path. If you depress the left mouse button and continue 3460 dragging, a bezier curve will be formed instead of a straight line. 3461 Another couple of left-clicks will be necessary then to define the 3462 form and the last point of the curve. You can insert several path 3463 segments in such a way. Double left-click defines the end point of 3464 the path. Hit ‘Esc’ if you want to cancel making up a path. 3465 3466_Box_ 3467 Add → Box (‘B’ or ‘A B’) starts the box insertion mode. The box is 3468 defined by two points on the canvas. If the mouse cursor is over 3469 the canvas, the first point of a new box corresponds to the point 3470 under the cursor. Otherwise you have to left-click to define the 3471 point. Use another left-click to define the point of the second 3472 box corner. Hit ‘Esc’ if you want to cancel making up a box. 3473 3474_Circle_ 3475 Add → Circle (‘A I’) starts the circle insertion mode. The circle 3476 is defined by two points on the canvas. If the mouse cursor is 3477 over the canvas, the first point of a new circle corresponds to the 3478 point under cursor. Otherwise you have to left-click to define the 3479 point. This point will be the center of a new circle. Use another 3480 left-click to define its radius. Hit ‘Esc’ if you want to cancel 3481 making up a circle. 3482 3483_Arc_ 3484 Add → Arc (‘A R’) starts the arc insertion mode. An arc is defined 3485 by its center, radius, and its start and sweep angles. If the 3486 mouse cursor is over the canvas, the center point of a new arc 3487 corresponds to the point under the cursor. Otherwise you have to 3488 left-click to define the center point. Use another left-click to 3489 define its radius. Thereafter, the Arc Params dialog box will be 3490 shown. Whithin it, you can change the radius and angles of the 3491 arc. Press the ‘OK’ button in the dialog to apply changes or use 3492 ‘Cancel’ to cancel the operation. 3493 3494_Pin_ 3495 Add → Pin (‘A P’) starts the pin insertion mode. If the mouse 3496 cursor is over the canvas, the point under it will become the 3497 first, connectable point of the pin. Otherwise you have to define 3498 it by left-clicking on the canvas. Use another left-click to 3499 define the length of the pin. You may notice that originally the 3500 angle of the pin is the multiple of 90 degrees. This can be 3501 changed later by editing it. Don’t forget to edit the attributes 3502 of the new pin which are added and attached to it automatically. 3503 3504_Picture..._ 3505 Add → Picture... (‘A G’) opens the Add Picture dialog box where 3506 you may choose a picture for insertion into your schematic. Select 3507 the picture you want in the dialog and click on the ‘Open’ button. 3508 Two left-clicks on the canvas will define its size. If you don’t 3509 want to insert the picture, click the ‘Close’ button in the dialog. 3510 3511 3512File: lepton-manual.info, Node: Menu Hierarchy, Next: Menu Attributes, Prev: Menu Add, Up: lepton-schematic window 3513 35145.3.7 Menu Hierarchy 3515-------------------- 3516 3517This menu facilitates working on subcircuits in hierarchical schematics. 3518 3519_Up_ 3520 Hierarchy → Up (‘Shift-H U’) allows you to return to the toplevel 3521 schematic of the subcircuit or symbol you’re working on if you went 3522 into it using the one of the menu items Hierarchy → Down Schematic 3523 or Hierarchy → Down Symbol, correspondingly. 3524 3525_Down Schematic_ 3526 Hierarchy → Down Schematic (‘Shift-H D’) opens the subcircuit 3527 schematic for a selected component, of course, if it has one. 3528 3529_Down Symbol_ 3530 Hierarchy → Down Symbol (‘Shift-H S’) opens a selected symbol for 3531 editing its contents. Unlike the previous menu item, it goes into 3532 the symbol file, not into its subcircuit schematic. 3533 3534 3535File: lepton-manual.info, Node: Menu Attributes, Next: Menu Options, Prev: Menu Hierarchy, Up: lepton-schematic window 3536 35375.3.8 Menu Attributes 3538--------------------- 3539 3540_Attach_ 3541 Attributes → Attach (‘T A’) attaches a text attribute to an object. 3542 You can select attributes and other objects in any order and then 3543 hit the shortcut. However, all attributes will be attached to only 3544 one of the objects selected and it is not easy to understand which 3545 one will be chosen for that. Therefore, it is recommended to 3546 select only one object and any number of attributes to attach to 3547 it. Attached attributes change their color to the “Attribute” 3548 color and you cannot re-attach them to any other object until you 3549 detach them. 3550 3551_Detach_ 3552 Attributes → Detach (‘T D’) detaches a text attribute from the 3553 object it was attached to. After detaching attributes change their 3554 color to the “Detached attribute” color. The action does nothing 3555 for not attached attributes. 3556 3557_Show Value_ 3558 Attributes → Show Value (‘T V’) toggles the visibility of a text 3559 attribute so only its value is shown on schematic page. 3560 3561_Show Name_ 3562 Attributes → Show Name (‘T N’) toggles the visibility of a text 3563 attribute so only its name is shown on schematic page. Not very 3564 helpful for most of attributes but may be useful for those which 3565 values were historically not very well chosen, for instance, 3566 GRAPHICAL=1. 3567 3568_Show Both_ 3569 Attributes → Show Both (‘T B’) toggles the visibility of a text 3570 attribute so it is shown in the form NAME=VALUE. 3571 3572_Toggle Visibility_ 3573 Attributes → Toggle Visibility (‘T T’) switches off or on the total 3574 visibility of selected attributes. After switching off the 3575 visibility of an attribute, you won’t be able to simple select it 3576 to make it visible again. Either just undo the operation if you 3577 did this mistakenly, or use the Attributes → Show/Hide Hidden Text 3578 action in order to be able to select any hidden attribute and then 3579 toggle their visibility. Please see below for more information on 3580 that. 3581 3582_Hide Specific Text..._ 3583 Attributes → Hide Specific Text... (‘T H’) allows to quickly hide 3584 a set of text objects having the specified text prefix. For 3585 attributes you have to specify their full text, that is, the name 3586 of attribute as well (e.g. REFDES=U), no matter which style of 3587 visibility (‘name’, ‘value’, or ‘both’) each particular attribute 3588 has. 3589 3590_Show Specific Text..._ 3591 Attributes → Show Specific Text... (‘T Shift-H’) allows to quickly 3592 make visible a set of hidden text objects having the specified text 3593 prefix. The same rules apply as for Attributes → Hide Specific 3594 Text.... 3595 3596_Show/Hide Hidden Text_ 3597 Attributes → Show/Hide Hidden Text (‘T I’ or ‘E N’) toggles 3598 displaying of hidden text objects. Sometimes, it is convenient to 3599 not always show some information, e.g. attributes, or it should 3600 not be present on the printed paper. You can make some text 3601 objects invisible with the Attributes → Toggle Visibility action 3602 described above and toggle their visibility by using this action. 3603 Hidden text objects will have little markers at their anchor points 3604 like the letter “I” (which means “invisible”). 3605 3606_Find Text/Check Symbol_ 3607 Attributes → Find Text/Check Symbol (‘T F’) opens a bottom widget 3608 where you can select one of operations: searching for specific 3609 text, searching for text by a pattern, searching for text by a 3610 regular expression, or checking the symbol if you’re in the symbol 3611 editing mode. The last operation is special and allows you to 3612 interactively run the same checks ‘lepton-symcheck’ does, with 3613 feedback in the form of dialog windows where you can select the 3614 issue items and go to the place the objects in question reside in. 3615 3616_Autonumber Text..._ 3617 Attributes → Autonumber Text... (‘T U’) opens an interactive 3618 autonumber dialog window in which you can select the scope of 3619 autonumbering and several options. Hit the ‘Apply’ button after 3620 choosing the wanted settings to actually run the autonumbering or 3621 ‘Close’ to cancel it. 3622 3623 3624File: lepton-manual.info, Node: Menu Options, Next: Menu Netlist, Prev: Menu Attributes, Up: lepton-schematic window 3625 36265.3.9 Menu Options 3627------------------ 3628 3629_Options..._ 3630 Options → Options... (‘O O’) opens the Options dialog box where 3631 you can interactively select the below options related to snapping 3632 and net drawing mode. 3633 3634_Font..._ 3635 Options → Font... (‘O F’) opens the font chooser dialog where you 3636 can select your favorite font name and its style and then save it 3637 to your configuration. 3638 3639_Grid +_ 3640 Options → Grid + (‘]’) increases the size of the snapping grid 3641 twice. 3642 3643_Grid -_ 3644 Options → Grid - (‘[’) decreases the size of the snapping grid 3645 twice. 3646 3647_Grid Style: Cycle Dots/Mesh/Off_ 3648 Options → Grid Style: Cycle Dots/Mesh/Off (‘O G’) toggles one of 3649 two available styles of grid displaying or switches the grid off. 3650 The default is the ‘mesh’ style. 3651 3652_Grid Snap: Cycle Grid/Resnap/Off_ 3653 Options → Grid Snap: Cycle Grid/Resnap/Off (‘O S’) toggles grid 3654 snapping modes. The default and mostly useful is the ‘grid’ mode. 3655 If it is selected, all objects on the page are snapped to the grid 3656 when you edit them. Switching the grid off may be useful for some 3657 artistic work with graphical primitives but is not recommended for 3658 connectible objects which may stop connecting if their connectible 3659 ends are not on the grid. The ‘resnap’ mode helps just in such 3660 situations: it allows you to move the objects or their points so 3661 they again snap to the current grid. 3662 3663_Grips: On/Off_ 3664 Options → Grips: On/Off (‘O I’) toggles the visibility of grips on 3665 selected objects. Various objects have different grip position on 3666 them. However, all them can be edited only if you drag their 3667 points where grips should be. While grips may clutter your 3668 schematics when many objects are selected, it is often easier to 3669 edit them when grips are on, so this is the default setting. 3670 3671_Feedback Mode: Outline/Box_ 3672 Options → Feedback Mode: Outline/Box (‘O A’) toggles the type of 3673 component displaying when the user moves them. When (default) 3674 ‘outline’ is selected, the user will see the usual appearance of 3675 components. Otherwise, when ‘box’ is selected, only the bounding 3676 boxes of objects will be shown when moving them. This may 3677 facilitate working on schematics on old slow hardware. 3678 3679_Net: Rubberband On/Off_ 3680 Options → Net: Rubberband On/Off (‘O R’) toggles the rubberband 3681 mode for nets. If the mode is ON (default setting), the nets 3682 connected to an object you’re moving will change their size so they 3683 stay connected to the same points on the object. Otherwise, the 3684 connections will silently break leaving the connected objects 3685 unconnected. 3686 3687_Net: Magnetic On/Off_ 3688 Options → Net: Magnetic On/Off (‘O M’) toggles magnetic snapping of 3689 newly created nets. If the switch is on, you will see a little 3690 circle at the point new net would join. Otherwise, no feedback is 3691 provided. The mode is ON by default. 3692 3693_Coord Window_ 3694 Options → Coord Window (‘O C’) opens a dialog window where you can 3695 watch the current position of your mouse cursor on the page in 3696 screen and world coordinates. 3697 3698_Log Window_ 3699 Options → Log Window (‘O L’) opens the log window where you can see 3700 messages the program reports. Sometimes the messages are 3701 important, sometimes not. Anyways, look there if you think 3702 something went wrong. 3703 3704 3705File: lepton-manual.info, Node: Menu Netlist, Next: Menu Help, Prev: Menu Options, Up: lepton-schematic window 3706 37075.3.10 Menu Netlist 3708------------------- 3709 3710Currently, the menu consist of an only item demonstrating the 3711possibility to run Lepton netlisting code in GUI. 3712 3713_1 allegro_ 3714 Produce Allegro netlist. The output will go to the file 3715 ‘allegro.out’ in the current working directory. *Note Allegro 3716 backend:: for more. 3717 3718 3719File: lepton-manual.info, Node: Menu Help, Next: Non-menu actions, Prev: Menu Netlist, Up: lepton-schematic window 3720 37215.3.11 Menu Help 3722---------------- 3723 3724_Lepton EDA Reference Manual_ 3725 3726 Help → Lepton EDA Reference Manual (‘H M’) will open the manual 3727 you’re reading just now in your HTML browser. 3728 3729_gEDA Wiki Documentation_ 3730 3731 Help → gEDA Wiki Documentation (‘H W’) will open the documentation 3732 page of the legacy gEDA wiki in your HTML browser. It may still be 3733 helpful in some cases. 3734 3735_Find Component Documentation_ 3736 3737 Help → Find Component Documentation (‘H C’ or ‘H O’) tries hard to 3738 find any documentation for the first component amongst selected 3739 objects. If no component is selected, the action is unavailable. 3740 3741_Hotkeys..._ 3742 3743 Help → Hotkeys... (‘H H’) may be used to look up for some action 3744 you do not know shortcut for. It displays a dialog with all action 3745 menu names and their corresponding hotkeys. 3746 3747_About_ 3748 3749 Help → About (‘H A’) opens the standard GTK About dialog with some 3750 useful information on ‘lepton-schematic’. 3751 3752 3753File: lepton-manual.info, Node: Non-menu actions, Prev: Menu Help, Up: lepton-schematic window 3754 37555.3.12 Non-menu actions 3756----------------------- 3757 3758_Cancel_ 3759 ‘Esc’ cancels any specific mode and switches on ‘Select mode’. It 3760 also cancels in-process editing operations. 3761 3762_Pan left_ 3763 ‘Left’ pans the visible area to the left. 3764 3765_Pan right_ 3766 ‘Right’ pans the visible area to the right. 3767 3768_Pan up_ 3769 ‘Up’ pans up the visible area. 3770 3771_Pan down_ 3772 ‘Down’ pans down the visible area. 3773 3774_Repeat_ 3775 ‘.’ (period) repeats the last action done. If there were no action 3776 done, it emits a message about this to the log. If an invalid 3777 action is requested, it issues a warning which also goes to the 3778 log. 3779 3780 3781File: lepton-manual.info, Node: Dialog boxes and widgets, Next: Creating and opening schematics, Prev: lepton-schematic window, Up: lepton-schematic 3782 37835.4 Dialog boxes and widgets 3784============================ 3785 3786* Menu: 3787 3788* Add Component widget:: 3789* Save As dialog box:: 3790* Log window:: 3791* Macro widget:: 3792 3793 3794File: lepton-manual.info, Node: Add Component widget, Next: Save As dialog box, Prev: Dialog boxes and widgets, Up: Dialog boxes and widgets 3795 37965.4.1 Add Component widget 3797-------------------------- 3798 3799 3800File: lepton-manual.info, Node: Save As dialog box, Next: Log window, Prev: Add Component widget, Up: Dialog boxes and widgets 3801 38025.4.2 Save As dialog box 3803------------------------ 3804 3805 3806File: lepton-manual.info, Node: Log window, Next: Macro widget, Prev: Save As dialog box, Up: Dialog boxes and widgets 3807 38085.4.3 Log window 3809---------------- 3810 3811In the log window you’ll find important, and sometimes not, messages 3812about the work and errors of ‘lepton-schematic’. At least, the 3813developers tried hard to output anything useful and interesting. Please 3814report if you think we need to output anything other there. *Note 3815Communication:: on how to get in touch with us. 3816 3817 First when you run the program, the log window contains information 3818about the program version, about what RC files have been loaded, and 3819what schematic files have been opened. You can configure the opening of 3820log window at start-up of the program, though by default it won’t be 3821open to not make the users nervous. There are other related 3822configuration settings that you may count useful. *Note Configuration:: 3823for more. Then, when you start working, the log window contains other 3824useful info related to your work. Open the window if it seems something 3825to work wrong, maybe you’ll find a hint there. In the log window you 3826can also watch the output of macro commands you entered in the macro 3827widget. *Note Macro widget:: for more info on this. There can be also 3828another information about some long running procedures. For example, 3829about netlist creation or about the work of third-party utilities you 3830launched via a Scheme extension. 3831 3832 If your program crashed and, oddly, the log window is for some reason 3833missing after that, you will still be able to look into the log files. 3834*Note Logging:: for more info on the files. 3835 3836 If *note docks: use-docks. are enabled in your configuration, the Log 3837widget will be shown as the second tab in the bottom dock. Otherwise, a 3838separate Log window will be opened. 3839 3840 3841File: lepton-manual.info, Node: Macro widget, Prev: Log window, Up: Dialog boxes and widgets 3842 38435.4.4 Macro widget 3844------------------ 3845 3846 3847File: lepton-manual.info, Node: Creating and opening schematics, Next: Editing schematics, Prev: Dialog boxes and widgets, Up: lepton-schematic 3848 38495.5 Creating new and opening existing schematic files 3850===================================================== 3851 3852Every time you launch ‘lepton-schematic’ without arguments in a 3853terminal, or from your window manager menu, a new untitled schematic 3854page is created. Use File → New within ‘lepton-schematic’ if you want 3855to create another page. 3856 3857 The default page name for new pages is formed as a filename prefix 3858defined in the configuration key *note default-filename:: and a serial 3859number which is incremented every time a new page is created, e.g. 3860‘untitled_3.sch’. Usually, a title block symbol is inserted, *note 3861Title block symbol::. 3862 3863 Within the program, you can open an already existing schematic using 3864the menu action File → Open... In the opened dialog box select the file 3865you need and click the button ‘Open’ to actually open it, or ‘Cancel’ to 3866cancel with it. At the bottom-right of the dialog there is a filter 3867button. With it, you can change view to see schematics or symbols only, 3868both schematics and symbols, or any files in case you want to look at 3869some other stuff in the selected directory. 3870 3871 If you want to open a file you worked on recently, click the menu 3872item File → Open Recent. The submenu contains several file names. You 3873can configure how many files should be shown there using the 3874configuration key *note max-recent-files::. 3875 3876 3877File: lepton-manual.info, Node: Editing schematics, Next: Working with windows, Prev: Creating and opening schematics, Up: lepton-schematic 3878 38795.6 Editing schematics 3880====================== 3881 3882In order to do any action on some object, you have to select it first. 3883*Note Selecting objects:: if you don’t know how to do it. 3884 3885 When editing schematics, you can undo and redo several last actions 3886using Edit → Undo (‘Ctrl-Z’, ‘U’, ‘Shift-U’, or ‘E Shift-U’) and Edit → 3887Redo (‘Shift-Ctrl-Z’, ‘Ctrl-Y’, ‘Shift-R’, or ‘E Shift-R’). The latter 3888restores the results of the last editing action undone with Edit → Undo. 3889The number of possible actions for undo/redo is limited in the 3890configuration setting *note undo-levels::. 3891 3892 If you need to copy some objects, select them and do Edit → Copy Mode 3893(‘C’ or ‘E C’). The objects will be visually duplicated and you will be 3894able to put the copies where you need to by left-clicking on the canvas. 3895This allows one-time copy of the objects. Another option is copying 3896objects multiple times. Select Edit → Multiple Copy Mode or hit ‘E Y’ 3897to switch on the mode. Use left-click to insert the objects. Unlike 3898the former case, copying won’t stop after first insertion. Click once 3899again, and a new copy will be made. The copying process can be stopped 3900by switching to some other mode, for example, by hitting ‘Esc’ to choose 3901the select mode, or by clicking at the net mode button in the toolbar. 3902In both cases (one or multiple copies), the current selection does not 3903change during the process. 3904 3905 The objects on canvas can also be copied or cut to clipboard, and 3906pasted from it using Edit → Copy (‘Ctrl-C’), Edit → Cut (‘Ctrl-X’), Edit 3907→ Paste (‘Ctrl-V’) correspondingly. To delete all currently selected 3908objects use Edit → Delete (‘Delete’, ‘D’, or ‘E D’). If some of the 3909objects are locked, the dialog prompting for deletion of all selected 3910objects or only unlocked ones will appear, in which you can also cancel 3911the deletion. 3912 3913 You can move objects on the canvas using the left mouse button: click 3914on the object you want to move, keep the button depressed, drag the 3915object where you need to and release the button to place the object. 3916The object gets selected after the operation. If you select several 3917objects beforehand, the same operation allows you to move and place them 3918all. Sometimes it is more convenient to switch on move mode to move 3919objects without depressing the mouse button. Select Edit → Move Mode 3920(‘M’ or ‘E M’) and move the selected objects where you want to, then use 3921left click once to place them on the canvas. 3922 3923 Edit → Rotate 90 Mode (‘E R’) rotates selected objects by 90 degrees 3924counter-clockwise each time. The objects are rotated around the mouse 3925cursor. 3926 3927 Edit → Mirror mode (‘E I’) can be used to mirror objects such as 3928components and pictures around the X axis. Mirroring of other, simple 3929objects is supported as well, though it’s rarely useful. Mirroring 3930around the Y axis is not yet supported. However, you can use a sequence 3931of mirrorings and rotations as a workaround to get the look you want. 3932 3933 You can also rotate or mirror objects while moving them, using one of 3934the ways described above, or when inserting a component. 3935 3936 Edit → Object Properties... (‘E O’) opens a dialog where you can see 3937and change the properties of primitives such as lines, boxes, pins, text 3938and so on. The editable properties include color, stroke and filling 3939styles, and the type of pins. Changing of a property affects all 3940objects selected if they support it. 3941 3942 If *note docks: use-docks. are enabled in your configuration, the 3943properties widget will be shown as the first tab in the right dock. 3944 3945 Edit → Rotate 90 Mode (‘E R’) rotates selected objects by 90 degrees 3946counter-clockwise each time. The objects are rotated around the mouse 3947cursor. 3948 3949 You can also rotate or mirror objects while moving them, using one of 3950the ways described above, or when inserting a component. 3951 3952 Apart from editing properties of primitive objects for which the 3953_Object Properties..._ dialog described above is used, you can edit 3954text contents of text objects such as plain text and attributes. Use 3955Edit → Edit... (‘E E’) to start editing text objects. Depending on 3956what objects are selected, one of the following dialogs will be opened. 3957_Edit Attributes_ dialog is opened for connectible objects which include 3958components, pins, nets, and buses. For non-connectible graphical 3959primitives such as lines, boxes, etc. the action does nothing. For 3960plain attributes, the command opens the _Edit Attribute_ dialog (please 3961note the singular _Attribute_ instead of plural _Attributes_ in the 3962former case). In the dialog you can select and change attribute names, 3963values, and visibility. For plain text objects, the command opens the 3964_Edit Text_ dialog the same way as if you would use by Edit → Edit 3965Text.... If selected objects include a mixed set of plain text objects, 3966attributes, and connectible objects, the program opens the dialog 3967appropriate for the objects selected first so you may end up with not 3968what you really wanted. In such a case, deselect objects, select wanted 3969ones, and try again. 3970 3971 The action Edit → Edit Text... (‘E X’) and the _Edit Text_ dialog 3972box it invokes is intended for editing plain text objects. Thus, unlike 3973the attribute editing dialogs, this dialog displays attributes as 3974strings in the form “name=value”. 3975 3976 If *note docks: use-docks. are enabled in your configuration, the 3977_Edit Text_ widget will be shown as the second tab in the right dock. 3978 3979 Sometimes a symbol may represent components with different pin 3980numbers without changing it in any other aspect. For example, 3981quad-opamp has four same opamps in one package for which only pin 3982numbers differ on schematic page. Such components are called _slotted_ 3983and there is a special action in ‘lepton-schematic’ to change the slot 3984number quickly. Use Edit → Slot... (‘E Shift-S’) and enter the slot 3985number you want. It should be greater than zero but not greater than 3986the value stored in the “numslot” attribute of the symbol. While you 3987can attach the “slot” attribute to any object on the page, slots are 3988useless for graphical primitives, text, and pictures, and are only 3989meaningful for such slotted components. While you can use the attribute 3990for non-slotted components, it won’t add much to your schematics unless 3991you change the component symbol to support slots by adding both 3992“numslots” attribute and “slotdef” attributes which determine how many 3993slots will be used at all and what pin numbers will be used for each 3994particular slot. 3995 3996 Sometimes you want some objects on the page to not get in your way 3997while editing schematics. It is particularly true for big symbols like 3998title blocks (*note Title block symbol::). Such symbols are 3999intentionally put to background and other symbols are placed over them. 4000The issue here is the selection mechanism of ‘lepton-schematic’. When 4001you click on an object to select it, and there are several selectable 4002objects under the mouse cursor, the program will select each of them one 4003by one to let you choose the wanted one. Locked symbols are to be 4004excluded from such a sequence since it would be annoying to, say, every 4005time select the title block symbol when you merely want to select any 4006other object within it. Select symbols you want to be locked and use 4007Edit → Lock (‘E L’) to lock them. (By the way, you rarely need this for 4008title blocks as they usually are added as already locked when a new 4009schematic is created. *Note Title block symbol:: for more information.) 4010In order to unlock a symbol, select it using box selection (*note Box 4011selection::) and use Edit → Unlock (‘E Shift-L’). 4012 4013 Note: Locking and unlocking actions affect not only components but 4014 also all the attributes attached to them. You don’t have to select 4015 each one of them individually, it is sufficient to select just the 4016 component they are attached to. 4017 4018 Note: Primitive objects (not components) cannot be locked or 4019 unlocked, it is not supported in the current file format (*note 4020 gEDA file format::). However, a Scheme extension may be used in 4021 Lepton to achieve that. 4022 4023 There are two special actions that allow you to save data of a 4024component or a picture within schematic or undo such a change. Edit → 4025Embed Component/Picture (‘E B’) embeds the data of selected component or 4026picture into schematic. This may make sense in case you want to 4027distribute your schematic as one file and/or prevent data loss or 4028corruption due to different set of symbols available at the target and 4029destination locations. Currently, you have to embed each component or 4030picture instance if you have several of them in your schematic. 4031Otherwise, not embedded objects won’t be present in the schematic if you 4032don’t include libraries with appropriate symbols into your project. 4033This is limitation of the current file format. *Note gEDA file format:: 4034for more information. Embedding objects makes thus the file size bigger 4035(sometimes, much bigger), and after you made sure anything is OK, and 4036necessary symbols or pictures are in place, you may want to unembed the 4037objects. The action Edit → Unembed Component/Picture (‘E Shift-B’) does 4038just that. It unembeds a component or picture embedded by the menu item 4039action described above. Note that the command will be ignored if you 4040don’t have the symbol or image corresponding to your unembeddable object 4041in one of the libraries available for your schematic. Remember to open 4042the log window and see what could went wrong if your schematic file did 4043not change after this action and saving it. 4044 4045 If you edit a symbol and save it, schematics containing it are not 4046updated automatically. You have to update component instances manually. 4047Select the components you want to update and use Edit → Update Component 4048(‘E U’) to actually do it. 4049 4050 Another useful action is translation of the page contents to origin, 4051that is, to the coordinate (0, 0) of the page. It is usually necessary 4052when you create or edit a symbol. The origin defines the anchor of the 4053symbol. When you insert the symbol from the component library, this 4054point in the symbol corresponds to the position of the mouse cursor, so 4055the visible contents of your component will be positioned around the 4056mouse cursor at the same distance the contents of the corresponding 4057symbol is positioned around the origin within it. Usually, it is the 4058left-bottom point of a symbol. However you can define it anywhere. If 4059you want, for example, the anchor to be located at the center of your 4060symbol, move the symbol contents to lay around the origin. Use Edit → 4061Symbol Translate... (‘E T’) to translate the symbol you edit to origin 4062and then place its contents the way you wish. 4063 4064 Note: If the contents of your symbol is too far from origin, you 4065 may even not see the symbol when inserting. Zoom out to see if 4066 this is the case then. 4067 4068 4069File: lepton-manual.info, Node: Working with windows, Next: Quitting the program, Prev: Editing schematics, Up: lepton-schematic 4070 40715.7 Working with windows 4072======================== 4073 4074You can open new and close existing ‘lepton-schematic’ windows. 4075Schematic data may be exchanged between the windows using system 4076clipboard. 4077 4078 File → New Window (‘F W’) allows you to open a new _window_ of 4079‘lepton-schematic’ (not a _page_). In that window you can work with 4080different pages and different configuration settings. 4081 4082 File → Close Window (‘F C’) closes the currently active 4083‘lepton-schematic’ window (the window where you use this shortcut) with 4084all its pages. The _Save File_ dialog box will be open for every 4085unsaved page. *Note Saving schematic pages::. 4086 4087 4088File: lepton-manual.info, Node: Quitting the program, Next: Saving schematic pages, Prev: Working with windows, Up: lepton-schematic 4089 40905.8 Quitting the program 4091======================== 4092 4093File → Quit (‘F Q’ or ‘Alt-Q’) closes all open windows of 4094‘lepton-schematic’ stemming from the same root window with all their 4095pages. It won’t close those windows you’ve launched in a different 4096instance (from a terminal, from your window manager menu, etc.). The 4097_Save File_ dialog will be opened for every unsaved page. *Note Saving 4098schematic pages::. 4099 4100 4101File: lepton-manual.info, Node: Saving schematic pages, Next: Printing and exporting, Prev: Quitting the program, Up: lepton-schematic 4102 41035.9 Saving schematic pages 4104========================== 4105 4106Use File → Save or the ‘F S’ keyboard shortcut to save your modified 4107schematic page. Do it frequently to not lose your design. Unsaved 4108pages are marked with an asterisk before their names in window titles 4109and with little ‘Save’ buttons on tabs they are open in. 4110 4111 Use File → Save As... or the ‘F A’ if you want to save your file 4112under another name. In such a case, the _Save As_ dialog box will be 4113opened prompting you to input the file name you want. The same dialog 4114will be opened automatically if you save a newly added and not yet saved 4115untitled page. *Note Save As dialog box::. 4116 4117 Like in the _File Open_ dialog, you can use the filter entry below 4118and choose the file type you need: schematics, symbols, schematic and 4119symbols, or any files. Two first options change the saved file 4120extension as well. 4121 4122 4123File: lepton-manual.info, Node: Printing and exporting, Next: Selecting objects, Prev: Saving schematic pages, Up: lepton-schematic 4124 41255.10 Printing and exporting schematics 4126====================================== 4127 4128File → Print... (‘F P’ or ‘Ctrl+P’) will open a standard GTK printing 4129dialog. Choose your print destination, a file to print to, or a 4130printer, change printing settings if needed and go ahead. If you print 4131to a file, you can choose the file format, e.g. PDF or PostScript. The 4132button ‘Print Preview’ lets you see the preview of your page when it is 4133printed. 4134 4135 Note: GTK2 and GTK3 standard printing dialogs may support different 4136 output formats. 4137 4138 Note: You can also output PDF with the File → Write Image... menu 4139 (see below) or export your schematics and symbols with the 4140 ‘lepton-cli’ command (*note lepton-cli export::). 4141 4142 File → Write Image... (‘F I’) is used for exporting schematic and 4143symbol pages as images. In the export dialog box you can choose one of 4144several supported image format options, including PDF, as well as one of 4145predefined size of the image, and whether the image should be colored or 4146black-and-white. The sizes are not relevant for PDF files, those will 4147be sized to fit the visible contents of your schematic or symbol page. 4148The ‘lepton-cli’ utility allows more accurate control of the image 4149properties so if you want to set some custom options, please use it 4150(*note lepton-cli export::). 4151 4152 4153File: lepton-manual.info, Node: Selecting objects, Next: Searching for text, Prev: Printing and exporting, Up: lepton-schematic 4154 41555.11 Selecting objects 4156====================== 4157 4158Selecting objects is necessary to make any action on them, for instance, 4159moving, copying, or changing their size. Selected objects are 4160highlighted so you can visually distinguish them from unselected ones. 4161 4162* Menu: 4163 4164* Simple object selection:: 4165* Box selection:: 4166* Selecting and deselecting all objects:: 4167 4168 4169File: lepton-manual.info, Node: Simple object selection, Next: Box selection, Prev: Selecting objects, Up: Selecting objects 4170 41715.11.1 Simple object selection 4172------------------------------ 4173 4174Edit → Select Mode (‘S’ or ‘E S’) switches on the selection mode. All 4175unfinished actions are rejected as well as all unfinished object 4176changes. If you just started a primitive object creation, it will be 4177rejected as well. In the mode you may select object by clicking at them 4178using the left mouse button, or by selection box. Selected objects are 4179always rendered in the selection color so you can easily distinguish 4180them from all other objects. You cannot select locked objects this way. 4181They can only be selected by selection box. Hitting <Ctrl> will toggle 4182the selection state of the objects you are clicking at or selecting by 4183selection box, while hitting <Shift> in the same situation will always 4184add objects to the selection. 4185 4186 4187File: lepton-manual.info, Node: Box selection, Next: Selecting and deselecting all objects, Prev: Simple object selection, Up: Selecting objects 4188 41895.11.2 Box selection 4190-------------------- 4191 4192As it is stated in the previous section, sometimes you cannot (or it is 4193not easy to) select some object. That is what box selection is 4194convenient for. Deselect first all selected objects if there are any: 4195left-click at some empty place on the canvas. Zoom your page in our out 4196so you see any object you want to select. Left-click and drag the mouse 4197with the left button depressed so you will see a box that starts with 4198the point you clicked first and increases or decreases while you drag 4199the mouse. Drag the mouse so the objects you want are within the 4200selection box and release the mouse button. 4201 4202 4203File: lepton-manual.info, Node: Selecting and deselecting all objects, Prev: Box selection, Up: Selecting objects 4204 42055.11.3 Selecting and deselecting all objects 4206-------------------------------------------- 4207 4208Edit → Select All (‘Ctrl-A’) selects all non-locked objects on a page 4209while Edit → Deselect (‘Shift-Ctrl-A’) deselects all selected objects, 4210if any. The latter can be achieved by just left mouse click at some 4211free space of schematic. 4212 4213 4214File: lepton-manual.info, Node: Searching for text, Next: Check symbols, Prev: Selecting objects, Up: lepton-schematic 4215 42165.12 Searching for specific text 4217================================ 4218 4219Sometimes you would like to find some objects having specific attributes 4220attached to them, or just want to find and amend some text object on a 4221large page. 4222 4223 Click on the menu item Attributes → Find Text/Check Symbol... or 4224just use the shortcut ‘T F’ to open the text search widget at the bottom 4225of the window. 4226 4227 At the left hand side of the widget, there is a select button with 4228which you can select one of the different strategies for searching. The 4229following options are available: 4230 4231 • Find Text: With this option, you can look up for text by specifying 4232 a substring which will be searched for as is. 4233 • Find Pattern: This is a bit more sophisticated way to search for 4234 text. Strings are matched against a pattern containing ‘*’ and ‘?’ 4235 wildcards: ‘*’ matches an arbitrary, possibly empty, string, and 4236 ‘?’ matches an arbitrary character. Note that the wildcards ‘*’ 4237 and ‘?’ can not be escaped to include them literally in a pattern. 4238 • Find Regex: This is the most powerful way of searching for text as 4239 all regular expressions are available for searching. 4240 • Check Symbol: This option is unlike others as it aims to search for 4241 all wrong objects on a symbol page including, but not limited by, 4242 text objects. For this reason, it is described in a dedicated 4243 section. *Note Check symbols::. 4244 4245 Enter the text in the text entry and click the button ‘Find’ to start 4246searching or ‘Cancel’ to dismiss it. If the ‘descend into hierarchy’ 4247checkbox is activated, the search will be done in all the schematic 4248hierarchy. 4249 4250 The results of the last search are stored in memory and you may 4251quickly return to them by using View → Find Text Results. 4252 4253 4254File: lepton-manual.info, Node: Check symbols, Next: lepton-schematic command line options, Prev: Searching for text, Up: lepton-schematic 4255 42565.13 Interactive checking of symbol contents 4257============================================ 4258 4259As described in *note Searching for text::, you can use Attributes → 4260Find Text/Check Symbol... to look up for specific text. It opens the 4261text search widget at the bottom of the window. If you click on the 4262option button at the left hand side of the widget and select the option 4263‘Check Symbol:’, you’ll be able to check the symbol page you work with 4264almost the same way as you would do it with ‘lepton-symcheck’ though in 4265the interactive mode. Choosing the option hides widget’s text entry and 4266only two buttons, ‘Find’ and ‘Cancel’, are available then. Clicking on 4267‘Cancel’ closes the widget. Hit the ‘Find’ button and 4268‘lepton-schematic’ will check your page and open a dialog window with 4269results of the check. After looking at the issues found and hitting 4270‘OK’, a new window will be opened where your can select and zoom on any 4271problematic object on the page. 4272 4273 4274File: lepton-manual.info, Node: lepton-schematic command line options, Next: Component libraries, Prev: Check symbols, Up: lepton-schematic 4275 42765.14 lepton-schematic command line options 4277========================================== 4278 4279 4280File: lepton-manual.info, Node: Component libraries, Next: Interactive work with Scheme code, Prev: lepton-schematic command line options, Up: lepton-schematic 4281 42825.15 Component libraries 4283======================== 4284 4285The global _component library_ of a project is made up of a number of 4286_symbol libraries_, otherwise named _component resources_, each of which 4287in turn makes available a number of component _symbols_. Each resource 4288may be either a directory on disk containing symbol files, a command in 4289the system ‘PATH’ which can generate symbol data (e.g. from a 4290database), or a Scheme function which can do likewise. 4291 4292 The component library system in Lepton manages component resources 4293and symbols, and abstracts the interface to the underlying storage. The 4294libraries are used by all Lepton tools based on the code of the 4295‘liblepton’ library. 4296 4297 A directory which contains one or more symbol files in *note gEDA 4298file format:: may be used as a component resource. Each symbol file 4299should have a filename ending in ‘.sym’ (case insensitive). A component 4300resource based on a directory can be added using the functions *note 4301component-library:: or *note component-library-search::. Symbol files 4302with filenames starting with a period ‘.’ are ignored. 4303 4304 An executable program in the system search path may be used as a 4305component resource. A component resource based on a command may be 4306added using the function *note component-library-command::. 4307 4308 Scheme functions may be used as a component resource as well. A 4309component resource based on Scheme functions may be added using the 4310function *note component-library-funcs::. 4311 4312 Each symbol is identified by its _name_, which is stored in the saved 4313schematic file. The name must be a valid for storage in a Lepton 4314schematic file as the _basename_ of a _component_ object. For symbols 4315from directory resources, the filename of the symbol is taken as the 4316symbol name. For a command resource, the name may be any permissible 4317string. Guidelines to follow: 4318 4319 • Do not begin a symbol name with ‘EMBEDDED’. 4320 • Do not use whitespace, or any of the characters ‘/:!*?’. 4321 • Try to use unique names. 4322 4323* Menu: 4324 4325* Component library setup:: 4326 4327 4328File: lepton-manual.info, Node: Component library setup, Prev: Component libraries, Up: Component libraries 4329 43305.15.1 Component library setup 4331------------------------------ 4332 4333Component library functions are Scheme procedures that should be 4334specified in one of ‘gafrc’ files. *Note Legacy configuration:: for 4335more information. 4336 4337 Environment variables are expanded in all component library functions 4338working with paths. You can use, e.g. ‘${HOME}/lib/path’ to specify 4339the directory you need. You may form the path names with any Scheme 4340functions available as well. 4341 4342 The following commands are available: 4343 4344* Menu: 4345 4346* component-library:: 4347* component-library-search:: 4348* component-library-command:: 4349* component-library-funcs:: 4350* reset-component-library:: 4351 4352 4353File: lepton-manual.info, Node: component-library, Next: component-library-search, Prev: Component library setup, Up: Component library setup 4354 43555.15.1.1 component-library 4356.......................... 4357 4358The function ‘component-library’ defines a directory containing _symbol_ 4359files as a component resource. You should use it as follows: 4360 4361 (component-library path) 4362or 4363 (component-library path name) 4364 4365 PATH is a path to the directory you want to add as a component 4366resource. Environment variables in PATH are expanded. Using this 4367function is convenient if you want each of your library to have a unique 4368descriptive name. It can be specified with the second argument NAME. 4369The name is optional, if it is omitted, PATH is used instead. The name 4370will be displayed in the ‘Select component’ window of 4371‘lepton-schematic’. Obviously, it is useless for CLI Lepton tools. 4372 4373 4374File: lepton-manual.info, Node: component-library-search, Next: component-library-command, Prev: component-library, Up: Component library setup 4375 43765.15.1.2 component-library-search 4377................................. 4378 4379The function ‘component-library-search’ is similar to *note 4380component-library:: as it also defines a component resource from a 4381directory on disk. However, it adds all the directories in it 4382recursively as a tree of several component resources. This approach is 4383good when you don’t want to list each separate subdirectory in the root 4384directory. But then you won’t be able to specify unique names for the 4385subdirectories. 4386 4387 The usage is as follows: 4388 4389 (component-library-search path) 4390or 4391 (component-library-search path prefix) 4392 4393 Here PATH is a root directory from which you want to make a tree of 4394component resources. If optional PREFIX is specified, it will be 4395prepended to the names of the new libraries. 4396 4397 4398File: lepton-manual.info, Node: component-library-command, Next: component-library-funcs, Prev: component-library-search, Up: Component library setup 4399 44005.15.1.3 component-library-command 4401.................................. 4402 4403A program or set of programs can be used as a component resource. The 4404procedure used to add such a resource from a Lepton RC file is: 4405 4406 (component-library-command list-command get-command name) 4407 4408 The code adds a new library named NAME. The LIST-COMMAND argument 4409specifies a name of the program that will be executed with no further 4410arguments, and should output a list of available symbol names on stdout. 4411The GET-COMMAND argument specifies another program that should take a 4412symbol name as its only argument, and output symbol data in *note gEDA 4413file format:: on stdout. 4414 4415 If the command cannot successfully complete, it should exit with 4416non-zero exit status. Anything it has output on stdout will be ignored, 4417and any stderr output displayed to the user. 4418 4419 This is the contents of an example script: 4420 4421 #!/usr/bin/env sh 4422 if [ -z "$1" ] ; then 4423 echo "Usage: $0 symname.sym" 4424 echo "List symbols: $0 -l" 4425 echo "Get symbol: $0 symname.sym" 4426 exit 255 4427 fi 4428 4429 if test "$1" = "-l"; then 4430 echo "symname1.sym" 4431 echo "symname2.sym" 4432 else 4433 if test "$1" = "symname1.sym"; then 4434 # symname1.sym 4435 echo "v 20200604 2" 4436 echo "L 100 100 200 200 3 0 0 0 -1 -1" 4437 else 4438 # symname2.sym 4439 echo "v 20200604 2" 4440 echo "P 300 300 0 300 1 0 1" 4441 fi 4442 fi 4443 4444 As can be seen from the code, the script can function as list 4445command, if the option ‘-l’ is given, or as get command, if file name is 4446given. Otherwise, if no arguments given, it exits with an error code. 4447If the script is named, say, ‘cmd-component.sh’, then the following code 4448in ‘gafrc’ file will define a new component library: 4449 4450 (define list-command "cmd-component.sh") 4451 (define get-command (string-append list-command " -l")) 4452 (component-library-command list-command get-command "simple-cmd-lib") 4453 4454 Likewise, you can use various symbol generators written in various 4455languages. 4456 4457 4458File: lepton-manual.info, Node: component-library-funcs, Next: reset-component-library, Prev: component-library-command, Up: Component library setup 4459 44605.15.1.4 component-library-funcs 4461................................ 4462 4463A set of Scheme procedures can be used as a component resource. The 4464procedure used to add such a resource from a Lepton RC file is: 4465 4466 (component-library-funcs list-function get-function name) 4467 4468 LIST-FUNCTION and GET-FUNCTION must both be Guile procedures. 4469LIST-FUNCTION takes no arguments, and returns a list of symbol names as 4470Scheme strings. GET-FUNCTION takes a symbol name as an argument, and 4471returns symbol data in *note gEDA file format:: in a Scheme string, or 4472‘#f’ if not known. The NAME argument specifies the name of the new 4473library. 4474 4475 Thus, the user may take advantage of using currently available Scheme 4476procedures for creating schematic objects. For example: 4477 4478 (use-modules (lepton core toplevel) 4479 (lepton object) 4480 (lepton attrib) 4481 (lepton page)) 4482 4483 (define (make-attribs) 4484 (list 4485 (make-text '(200 . 200) 'lower-left 0 "pinnumber=1" 4 #f 'value 5) 4486 (make-text '(200 . 400) 'lower-left 0 "pinseq=1" 4 #f 'both 5) 4487 (make-text '(200 . 100) 'lower-left 0 "pinlabel=1" 4 #f 'value 5) 4488 (make-text '(200 . 300) 'lower-left 0 "pintype=pwr" 4 #f 'value 5))) 4489 4490 (define (set-stroke! line) 4491 (set-object-stroke! line 0 'none 'solid)) 4492 4493 (define (make-gnd-symbol) 4494 (let ((page (make-page "symbol")) 4495 (pin 4496 (make-net-pin '(100 . 300) '(100 . 100) 1)) 4497 (attribs (make-attribs)) 4498 (lines 4499 (list 4500 (set-stroke! (make-line '(0 . 100) '(200 . 100) 3)) 4501 (set-stroke! (make-line '(55 . 50) '(145 . 50) 3)) 4502 (set-stroke! (make-line '(80 . 10) '(120 . 10) 3)))) 4503 (net-attrib 4504 (make-text 4505 '(300 . 100) 'lower-left 0 "net=GND:1" 10 #f 'value 8))) 4506 4507 (apply page-append! 4508 page 4509 (append (list pin) attribs lines (list net-attrib))) 4510 4511 (apply attach-attribs! pin attribs) 4512 4513 page)) 4514 4515 4516 (define (make-vss-symbol) 4517 (let ((page (make-page "symbol")) 4518 (pin 4519 (make-net-pin '(100 . 100) '(100 . 300) 1)) 4520 (attribs (make-attribs)) 4521 (line 4522 (set-stroke! (make-line '(0 . 300) '(200 . 300) 3))) 4523 (net-attrib 4524 (make-text 4525 '(300 . 100) 'lower-left 0 "net=Vss:1" 10 #f 'value 8))) 4526 4527 (apply page-append! 4528 page 4529 (append (list pin) attribs (list line) (list net-attrib))) 4530 4531 (apply attach-attribs! pin attribs) 4532 4533 page)) 4534 4535 (define (thunk->string thunk) 4536 (%with-toplevel 4537 (%make-toplevel) 4538 (lambda () 4539 (let ((page (thunk))) 4540 (page->string page))))) 4541 4542 (define dummy-sym-contents 4543 "v 20200604 2 4544 B 0 0 500 500 3 10 1 0 -1 -1 0 -1 -1 -1 -1 -1 4545 T 0 600 21 6 1 0 0 0 1 4546 refdes=R?") 4547 4548 (define (list-function) 4549 '("my-gnd.sym" 4550 "my-vss.sym" 4551 "dummy.sym")) 4552 4553 (define (get-function symbol-name) 4554 (cond 4555 ((string=? symbol-name "my-gnd.sym") (thunk->string make-gnd-symbol)) 4556 ((string=? symbol-name "my-vss.sym") (thunk->string make-vss-symbol)) 4557 ((string=? symbol-name "dummy.sym") dummy-sym-contents) 4558 (else #f))) 4559 4560 4561 (component-library-funcs list-function get-function "power-symbols") 4562 4563 The code defines three symbols. You can see that some steps are 4564automated in the example for the first two of them: creating attributes 4565and stroke parameter setting for line objects. Some other things are 4566obscure though, like ‘toplevel’ stuff. However, this is how it 4567currently works. 4568 4569 You may also notice that the last symbol, ‘dummy.sym’, is defined 4570just as a string in the *note gEDA file format::. You can do so as 4571well, though either you lose any automation, or you have to deal with 4572strings instead of Lepton Scheme objects. 4573 4574 Put the code in some file and load it from your ‘gafrc’, e.g.: 4575 4576 (primitive-load "scm-component.scm") 4577or put it directly to ‘gafrc’. 4578 4579 4580File: lepton-manual.info, Node: reset-component-library, Prev: component-library-funcs, Up: Component library setup 4581 45825.15.1.5 reset-component-library 4583................................ 4584 4585‘reset-component-library’ initializes, i.e. empties the global 4586component library. Thus, the user can define a new set of component 4587resources from scratch. For example, sometimes it is convenient to get 4588rid of default symbols in the library window of ‘lepton-schematic’ and 4589work only with those in your own custom libraries. 4590 4591 Use the command before other component library commands, such as 4592*note component-library::. 4593 4594 Supposed you want some of your projects to use only special symbol 4595libraries, then the typical usage is as follows. First reset all 4596libraries, then populate the component library with your directories, 4597e.g.: 4598 4599 (reset-component-library) 4600 4601 (component-library-search "${HOME}/lepton/symbols") 4602 4603 The good place to do so is ‘gafrc’ in your project’s directory. 4604However, you can also disable default libraries completely by writing 4605such lines in ‘gafrc’ in the directory with your user’s settings. *Note 4606Legacy configuration:: for more information on configuration paths. 4607 4608 4609File: lepton-manual.info, Node: Interactive work with Scheme code, Prev: Component libraries, Up: lepton-schematic 4610 46115.16 Interactive work with Scheme code 4612====================================== 4613 4614You can extend the functionality of ‘lepton-schematic’, automate some 4615work on schematic or symbol creation, and learn how things are 4616internally made up playing with Scheme without even exiting the program. 4617There are several ways to get things done and they are described below. 4618 4619 Note: You can also work with Scheme using interactive mode of 4620 several non-GUI Lepton utilities, namely, ‘lepton-netlist’, 4621 ‘lepton-cli’, and ‘lepton-symcheck’. Please read their manual 4622 pages on how to run them interactively. 4623 4624 Sometimes it is very convenient to invoke a one-line script to try 4625some idea. Use File → Invoke macro... (‘:’, colon, or ‘E Shift-:’) to 4626open a macro widget which will allow you to execute some small excerpts 4627of Scheme code interactively. In the macro widget entry you may enter 4628one line consisting of one or more commands in Scheme (don’t forget 4629parentheses). Hit ‘Enter’ to make them evaluate and watch the result of 4630your expression in the _Log window_. If the script includes some 4631interactive functions, you’ll immediately see the result in GUI. 4632 4633 Another, more powerful possibility is executing a Scheme script 4634stored in some file in your file system. It allows you evaluate the 4635code of any length, so it is much more convenient if you work on some 4636complex code. Use File → Execute Script... (‘F T’) and select a Scheme 4637script to execute. You can filter the files like in the _File Open_ 4638dialog (*note Creating and opening schematics::), though you can choose 4639solely amongst showing only Scheme or any files. Switch between 4640‘lepton-schematic’ and your text editor, edit your code and try again. 4641 4642 The most powerful and convenient way of working with Scheme is using 4643REPL. There are two ways to start it: 4644 4645 • Use File → REPL... (‘F Shift-R’) to start REPL in the background 4646 terminal where you started ‘lepton-schematic’, move to the terminal 4647 and hack your Scheme code interactively. If you didn’t use a 4648 terminal for launching the program, the feature is not available. 4649 4650 • Launch the following code in the macro widget described above, in 4651 the command line using the ‘-c’ option (*note lepton-schematic 4652 command line options::), or in one of RC files available for your 4653 project (*note gschemrc::): 4654 4655 (use-modules (system repl server)) (spawn-server) 4656 4657 The command will make available a Scheme socket on the port _37146_ 4658 for your program. You can connect to it, for example, using 4659 ‘netcat’ or shiny ‘geiser’ environment for ‘Emacs’, and enjoy 4660 working with REPL using the program chosen. 4661 4662 In the REPL, you’ll immediately see the results of your expressions 4663or errors, be able to list, edit and use expressions evaluated before, 4664utilize their results again, load files, and more. So this option 4665embraces all the advantages of the former two and adds more. However, 4666be careful: 4667 4668 Caution: Trying some code pieces may be dangerous and crash your 4669 running ‘lepton-schematic’ process while working in the REPL! The 4670 reason is the lack of proper multi-threading support in GTK while 4671 Scheme supports it pretty well. If in doubt, save your designs 4672 before trying something out. 4673 4674 4675File: lepton-manual.info, Node: lepton-netlist, Next: lepton-cli, Prev: lepton-schematic, Up: Top 4676 46776 Netlister 4678*********** 4679 4680lepton-netlist is a Lepton netlister tool with command line interface. 4681It can be used directly on command line or in Makefiles to automate your 4682work. This tool consists of a front-end and back-ends parts. The 4683front-end is the program itself which creates some internal 4684representation of schematic structure and does some post-processing. 4685The back-ends use this information to output into various formats for 4686use in other programs. The user can write and use her custom back-end 4687or use several already existing backends included in the Lepton EDA 4688suite. 4689 4690 Below you’ll find the list of back-ends available in Lepton. 4691 4692 • allegro 4693 • bae 4694 • bom 4695 • bom2 4696 • calay 4697 • cascade 4698 • drc 4699 • drc2 4700 • eagle 4701 • ewnet 4702 • futurenet2 4703 • geda 4704 • gossip 4705 • gsch2pcb 4706 • liquidpcb 4707 • makedepend 4708 • mathematica 4709 • maxascii 4710 • osmond 4711 • pads 4712 • partslist1 4713 • partslist2 4714 • partslist3 4715 • PCB 4716 • pcbpins 4717 • protelII 4718 • redac 4719 • spice 4720 • spice-noqsi 4721 • spice-sdb 4722 • switcap 4723 • systemc 4724 • tango 4725 • tEDAx 4726 • vams 4727 • verilog 4728 • vhdl 4729 • vipec 4730 4731* Menu: 4732 4733* Allegro backend:: 4734* BOM backend:: 4735* Cascade backend:: 4736* PADS backend:: 4737* Switcap backend:: 4738 4739 4740File: lepton-manual.info, Node: Allegro backend, Next: BOM backend, Up: lepton-netlist 4741 47426.1 Allegro netlister backend 4743============================= 4744 4745The Allegro netlister backend by Matthew Ettus <matt@ettus.com> is a 4746backend generating netlists for the Allegro PCB designer 4747(https://www.cadence.com/en_US/home/tools/pcb-design-and-analysis/pcb-layout/allegro-pcb-designer.html). 4748 4749 It doesn’t require any additional configuration. 4750 4751 Example of netlist creation: 4752 lepton-netlist -g allegro -o schematic.out schematic.sch 4753 4754 4755File: lepton-manual.info, Node: BOM backend, Next: Cascade backend, Prev: Allegro backend, Up: lepton-netlist 4756 47576.2 BOM netlister backend 4758========================= 4759 4760The BOM (Bill of Material) netlister backend by Matthew Ettus 4761<matt@ettus.com> is a quick and simple _Bill Of Materials_ generator. 4762 4763 It takes a configuration file which tells what component information 4764should be output in the resulting netlist for a schematic (i.e. vendor, 4765part number). The config file must be named ‘attribs’ and be in the 4766current working directory. The user has to specify what _attributes_ 4767should be output. 4768 4769 Sample config file contents: 4770 device 4771 label 4772 name 4773 4774 To make BOM, just do: 4775 lepton-netlist -g bom -o schematic.bom schematic.sch 4776 4777 4778File: lepton-manual.info, Node: Cascade backend, Next: PADS backend, Prev: BOM backend, Up: lepton-netlist 4779 47806.3 Lepton RF Cascade Symbols and Netlister 4781=========================================== 4782 4783by: Dan McMahill 4784 4785 This document is released under GFDL 4786(http://www.gnu.org/copyleft/fdl.html) 4787 4788 December 3rd, 2003 4789 47906.3.1 Overview 4791-------------- 4792 4793This document describes the symbol library and ‘lepton-netlist’ backend 4794which support driving RF Cascade (<http://rfcascade.sourceforge.net>) 4795simulations from the Lepton system. Cascade is a noise figure and 4796distortion analysis tool geared towards radio receiver design. 4797 4798 The basic steps involved with using Lepton as the frontend for 4799Cascade simulations are: 4800 1. Create schematics of the circuit. 4801 4802 2. Extract the netlist. 4803 4804 3. Run Cascade. 4805 48066.3.2 Requirements 4807------------------ 4808 4809You will need the following programs to be installed: 4810 • lepton-eda A version of Lepton package. 4811 4812 • RF Cascade The executable is usually called ‘cascade’. If you do 4813 not have Cascade available on your system, you will need to get a 4814 copy from <http://rfcascade.sourceforge.net>. 4815 48166.3.3 Creating Schematics 4817------------------------- 4818 4819When creating a block diagram in the ‘lepton-schematic’ editor, use only 4820the symbols from the cascade library. Every block diagram must have a 4821‘cascadesource’ element. In addition, the block diagram must be a 4822simple cascade. No parallel paths or branches are allowed. 4823 4824 All instances must have a unique reference designator. For a 4825receiver block diagram, this is often times best achieved by manually 4826entering them. The only restriction on reference designator names is 4827that they contain no spaces. A descriptive name such as ‘RF Filter’ or 4828‘First Mixer’ is useful as it will show up in the cascade output report. 4829 48306.3.4 Extracting the Cascade Input File 4831--------------------------------------- 4832 4833To extract the Cascade input file, run: 4834 lepton-netlist -g cascade -o test.cas file1.sch [file2.sch ...] 4835 4836 For the example file contained in this archive, you can run: 4837 lepton-netlist -g cascade -o example.cas example.sch 4838 4839 The netlist will be left in ‘example.cas’. 4840 48416.3.5 Running Cascade 4842--------------------- 4843 4844Cascade is exceptionally simple to run. Just run: 4845 cascade example.cas > example.out 4846 4847 to run the analysis on the system contained in the file ‘example.cas’ 4848and write the results to the file ‘example.out’. Refer to the Cascade 4849documentation for complete details. 4850 48516.3.6 Appendix A – Symbols in the Library 4852----------------------------------------- 4853 4854Please note that all instances must have the ‘refdes=’ attribute set. 4855 48566.3.6.1 Sources (cascade-source) 4857................................ 4858 4859Source. 4860 4861 Attributes: 4862 • C=Carrier level in dBm. Optional. 4863 4864 • CN0=Carrier to Noise Spectral Density Ratio in dBm/Hz. Optional. 4865 4866 • CN=Carrier to Noise Ratio in dB. Optional. 4867 4868 • BW=Signal Bandwidth in Hz. Optional, but requred if CN= is used. 4869 48706.3.6.2 Defaults (cascade-default) 4871.................................. 4872 4873This symbol sets the default impedance levels as well as the correlation 4874coeffcient used for third order distortion calculations. There are two 4875versions of this symbol. One is used to set the defaults at the 4876beginnng of the definition. The other can be placed in series with the 4877cascade to change the defaults part way through. This is useful if you 4878wish to change impedance levels in the middle of the receiver chain. 4879Attributes: 4880 4881 • RIN=Default block input resistance in Ohms. Optional. 4882 4883 • ROUT=Default block output resistance in Ohms. Optional. 4884 4885 • RHO=Default third order distortion correlation coeffcient. 4886 Optional. 4887 48886.3.6.3 Elements 4889................ 4890 4891Cascade characterizes each block in a system by its gain and optionally 4892noise figure and third order intercept point. As such, there is no 4893distinction between various elements such as amplifiers, filters, and 4894mixers. The Lepton RF Cascade symbol library contains different symbols 4895for clarity in the diagram only. The currently available element 4896symbols are: 4897 4898 Attributes: 4899 4900 Table 1: Element Types 4901 4902‘cascade-amp’ 4903 Amplifier 4904 4905‘cascade-filter’ 4906 Filter 4907 4908‘cascade-mixer’ 4909 Mixer 4910 4911‘cascade-transformer’ 4912 Transformer 4913 4914 • Gain is specified by one of the following: 4915 4916 • ‘G’=Power gain in dB. 4917 4918 • ‘GP’=Power gain in dB. 4919 4920 • ‘GV’=Voltage gain in dB. 4921 4922 • ‘NF’=Noise Figure in dB. Optional. 4923 4924 • ‘IIP3’=Input Third Order Intercept Point in dBm. Optional. 4925 4926 • ‘RIN’=Block input resistance in Ohms. Optional. 4927 4928 • ‘ROUT’=Block output resistance in Ohms. Optional. 4929 4930 • ‘RHO’=Third order distortion correlation coeffcient. Optional. 4931 49326.3.7 Example 4933------------- 4934 4935This appendix provides a simple example of the entire process of 4936generating a schematic, producing a Cascade input file, running an 4937analysis and looking at the result. 4938 49396.3.7.1 Example Schematics 4940.......................... 4941 4942*note Figure 6.1: fig:cascade1. shows the schematic of a simple receiver 4943signal chain. 4944 4945[image src="rf_cascade.png"] 4946 4947 4948 4949Figure 6.1: Simple receiver signal chain block diagram 4950 4951 *note Figure 6.2: fig:cascade2. shows the contents of the 4952‘example.cas’ file. 4953 4954# Cascade (http://rfcascade.sourceforge.net) 4955# Created with Lepton EDA netlister 4956 4957# Initial global defaults 4958defaults RIN=75 ROUT=75 RHO=0 4959 4960# Source definition 4961source C=-35 CN0=78 CN=0 BW=1 4962 4963# Cascaded system 4964RF_FILTER1 G=-2.5 NF=2.5 4965LNA G=12 NF=2.7 IIP3=0 4966RF_FILTER2 G=-2.5 NF=2.5 4967MIXER G=-7 NF=7 IIP3=-3 4968IF_FILTER G=-6 NF=6 4969T1 G=0 NF=0 RIN=75 ROUT=50 4970defaults RIN=75 ROUT=50 RHO=0 4971IF_AMP G=12 NF=6 IIP3=7 4972 4973# End of netlist created by Lepton EDA netlister 4974 4975 4976 4977Figure 6.2: Example RF Cascade input file, ‘example.cas’ 4978 49796.3.7.2 Netlist the Design 4980.......................... 4981 4982To netlist the design, run: 4983 lepton-netlist -g cascade example.cas example.sch 4984 49856.3.7.3 Run the Analysis 4986........................ 4987 4988Run the analysis with: 4989 cascade example.cas 4990 49916.3.8 Document Revision History 4992------------------------------- 4993 4994‘December 3rd, 2003’ 4995 Created cascade.tex 4996 4997 4998File: lepton-manual.info, Node: PADS backend, Next: Switcap backend, Prev: Cascade backend, Up: lepton-netlist 4999 50006.4 Forward/backward annotation between Lepton and PADS PowerPCB 5001================================================================ 5002 5003by: Dan McMahill 5004 5005 This document is released under GFDL 5006(http://www.gnu.org/copyleft/fdl.html) 5007 5008 March 6th, 2003 5009 5010* Menu: 5011 5012* Forward annotation to PADS PowerPCB:: 5013* Back annotation from PADS PowerPCB:: 5014 5015 5016File: lepton-manual.info, Node: Forward annotation to PADS PowerPCB, Next: Back annotation from PADS PowerPCB, Up: PADS backend 5017 50186.4.1 Forward annotation of lepton schematic changes to PADS PowerPCB layout 5019---------------------------------------------------------------------------- 5020 50216.4.1.1 Overview 5022................ 5023 5024Forward annotation is the process of updating a layout to reflect 5025changes made in the schematic. This process is used when, for example, 5026a new component is added to a schematic and needs to be included in the 5027layout. This section describes how to forward annotate changes in a 5028Lepton schematic to a PADS PowerPCB layout. 5029 5030 PADS implements forward annotation through the use of an ECO 5031(Engineering Change Order) file. The ECO file describes the differences 5032between a current design and the desired design. PADS generates the ECO 5033file by performing a netlist comparison between a new netlist file and 5034the netlist contained in the current layout. 5035 50366.4.1.2 Detailed forward annotation procedure 5037............................................. 5038 5039This procedure assumes you have a board layout open in PADS and that you 5040have made your schematic changes in ‘lepton-schematic’. For the 5041purposes of illustration, assume your schematic is split into two pages 5042in the files ‘pg1.sch’ and ‘pg2.sch’. 5043 5044 • Create an updated PADS netlist by running: 5045 5046 ‘lepton-netlist -g pads -o mynet.asc pg1.sch pg2.sch’ 5047 5048 This will create the netlist file ‘mynet.asc’. 5049 5050 • Make a backup copy of your PADS layout in case things fail in a 5051 destructive way. 5052 5053 • From within PADS, choose the Tools → Compare Netlist menu item and 5054 choose the following options in the form: 5055 5056original design to compare use current PCB design 5057new design with changes mynet.asc 5058√ generate differences report 5059√ generate eco file 5060comparison options 5061√ compare only ECO registered parts 5062attribute comparison level 5063√ ignore all attributes 5064 5065 5066 Click the ‘OK’ button to create the ECO file. 5067 5068 • Examine the ECO file to make sure it looks ok (the ECO file is a 5069 text file which can be viewed with any text editor). 5070 5071 • From within PADS, choose the File → Import... menu item. Locate 5072 and choose the ECO file created previously. 5073 5074 5075File: lepton-manual.info, Node: Back annotation from PADS PowerPCB, Prev: Forward annotation to PADS PowerPCB, Up: PADS backend 5076 50776.4.2 Back annotation of PADS PowerPCB layout changes to Lepton schematic 5078------------------------------------------------------------------------- 5079 5080Backannotation is the process of updating schematics to reflect changes 5081made in the layout. This process is used, for example, when the 5082reference designators have been renumbered on the layout, when pins have 5083been swapped (e.g., on an AND gate), or slots have been swapped (e.g., 5084on a multi-gate package). This section describes how to backannotate 5085changes in a PADS PowerPCB layout to a Lepton schematic. The PADS 5086PowerPCB tool supports three types of schematic backannotation: 5087 5088 1. Reference designator changes. This is often times used at the end 5089 of a layout to give components which are geographically close a set 5090 of reference designators which are numerically close. 5091 5092 2. Slot swapping. This is commonly found in digital designs where 5093 there may be multiple identical gates in a single package. For 5094 example, you may wish to swap which slot is used in a hex inverter. 5095 5096 3. Pin swapping. During layout, the designer may wish to swap 5097 equivalent pins on a chip. For example, the two inputs on a NAND 5098 gate. 5099 5100 Currently only reference designator changes are automatically 5101processed by the PADS to ‘lepton-schematic’ backannotation tool. The 5102slot and pin swapping changes are provided in a report which the 5103schematic designer must use to manually correct the schematic. 5104 51056.4.2.1 Detailed backannotation procedure 5106......................................... 5107 5108This procedure assumes you have a board layout open in PADS. For the 5109purposes of illustration, assume your schematic is split into two pages 5110in the files ‘pg1.sch’ and ‘pg2.sch’. 5111 5112 • Create an up to date PADS netlist by running: 5113 5114 ‘lepton-netlist -g pads -o mynet.asc pg1.sch pg2.sch’ 5115 5116 This will create the netlist file ‘mynet.asc’. 5117 5118 • From within PADS, choose the Tools → Compare Netlist menu item and 5119 choose the following options in the form: 5120 5121original design to compare mynet.asc 5122new design with changes use current PCB design 5123√ generate differences report 5124√ generate eco file 5125comparison options 5126√ compare only ECO registered parts 5127attribute comparison level 5128√ ignore all attributes 5129 5130 5131 Click the ‘OK’ button to create the ECO file. 5132 5133 • Examine the ECO file to make sure it looks ok (the ECO file is a 5134 text file which can be viewed with any text editor). 5135 5136 • Make a backup copy of your Lepton schematic files in case things 5137 fail in a destructive way. 5138 5139 • Run: 5140 5141 ‘pads_backannotate file.eco pg1.sch pg2.sch | tee backanno.log’ 5142 5143 where ‘file.eco’ is the name of the ECO file created previously and 5144 ‘pg1.sch’ and ‘pg2.sch’ are all of your schematic pages. This will 5145 apply the reference designator change portion of the ECO file and 5146 also generate a list of pin and slot swapping which must be 5147 performed by hand. The file ‘backanno.log’ will contain a log of 5148 the session that can be refered to when performing the pin and slot 5149 swapping. 5150 5151 5152File: lepton-manual.info, Node: Switcap backend, Prev: PADS backend, Up: lepton-netlist 5153 51546.5 gEDA/gaf Switcap Symbols and Netlister 5155========================================== 5156 5157by: Dan McMahill 5158 5159 This document is released under GFDL 5160(http://www.gnu.org/copyleft/fdl.html) 5161 5162 April 13th, 2003 5163 5164 The original document can be found at 5165<http://web.mit.edu/~geda/arch/i386_rhel3/versions/current/share/doc/geda-doc/switcap/switcap.html> 5166 5167 The main SWITCAP page is at 5168<http://www.cisl.columbia.edu/projects/switcap/> 5169 5170 There you can find the full reference manual of the program. 5171 5172 Some probably useful tips can be found at 5173<https://web.engr.oregonstate.edu/~moon/kaj/swtips.html#manual> 5174 51756.5.1 Overview 5176-------------- 5177 5178This document describes the symbol library and ‘lepton-netlist’ backend 5179which supports driving SWITCAP simulations from the Lepton system. 5180SWITCAP is a switched capacitor circuit simulator available from 5181Columbia University. It is used in many classroom and research 5182environments. One drawback to SWITCAP is the lack of a freely available 5183schematic capture frontend. The Lepton SWITCAP symbol library and 5184‘lepton-netlist’ backend tries to fill that gap. 5185 5186 The basic steps involved with using Lepton as the frontend for 5187SWITCAP simulations are: 5188 1. Create schematics of the circuit. 5189 2. Create an analysis file. 5190 3. Extract the netlist. 5191 4. Run the SWITCAP simulation. 5192 5. Run ‘sw2asc’ to extract the results. 5193 6. View the results with ‘gwave’. 5194 51956.5.2 Requirements 5196------------------ 5197 5198You will need the following programs to be installed: 5199 1. A version of Lepton EDA. 5200 2. SWITCAP 5201 (http://innovation.columbia.edu/technologies/Proxy30_optimal-simulator-for-mixed/). 5202 The executable is usually called ‘sw’. If you do not have SWITCAP 5203 available on your system, you will need to contact Columbia 5204 University 5205 (http://innovation.columbia.edu/technologies/Proxy30_optimal-simulator-for-mixed/licensing) 5206 to obtain a copy. The Lepton SWITCAP support was tested with 5207 SWITCAP Version A.5R Release 21-Sep-87. 5208 3. Although it is optional, you may wish to install a tool which can 5209 be used for plotting the output data. SWITCAP produces both ASCII 5210 data listings as well as ugly ASCII plots (note the release date of 5211 the version of SWITCAP used). Suitable tools are: 5212 5213 1. Gwave. Gwave is an analog waveform viewer. It is fairly 5214 basic, but easy to use, includes cursors, and has zoom/pan 5215 features. See <http://gwave.sourceforge.net/>. 5216 2. Scilab. Similar to matlab. Powerful, but no cursors or 5217 panning. See <https://www.scilab.org>. 5218 3. Octave. Similar to matlab. See <http://www.octave.org/>. 5219 4. Grace. See <http://plasma-gate.weizmann.ac.il/Grace/>. 5220 5221 The utility ‘sw2asc’(1) mentioned above can be used to convert a 5222SWITCAP2 output file into ASCII data files that the above GUI tools can 5223read. It is not installed by default, you can find it in the ‘contrib/’ 5224directory of the Lepton repository or tarball. 5225 52266.5.3 Creating Schematics 5227------------------------- 5228 52296.5.3.1 Required Symbols 5230........................ 5231 5232This section assumes you are familiar with using ‘lepton-schematic’ to 5233create and edit schematics. SWITCAP netlisting is only supported for 5234the components contained in the SWITCAP symbol library as well as the 5235ground symbol found in the ‘power’ library which comes with Lepton. All 5236allowed SWITCAP elements except for subcircuits are supported. You 5237_must_ include the following elements on your schematic: 5238 5239 1. One instance of the switcap-timing symbol. This symbol will set 5240 the master clock period for your simulations. 5241 2. One or more instances of the switcap-clock symbol. This symbol 5242 defines a clock with a particular phase and period. The reference 5243 designator of the clock symbol is used by the switches to set what 5244 phase they switch on. 5245 3. One or more instances of the switcap-analysis symbol. This symbol 5246 defines an analysis by specifying a file to include in the SWITCAP 5247 netlist. By including multiple instances of this symbol, multiple 5248 analysis files may be included. 5249 52506.5.3.2 Optional Symbols 5251........................ 5252 5253You can also optionally add the following SWITCAP special symbols to 5254your schematic: 5255 1. Zero or one instance of the switcap-title symbol. This will add a 5256 TITLE: line to the SWITCAP netlist and will appear in the output 5257 file. 5258 2. Zero or one instance of the switcap-options symbol. By editing the 5259 OPTIONS attribute on this symbol you can set the various options 5260 which can be passed to SWITCAP. 5261 52626.5.3.3 Net Names 5263................. 5264 5265When creating schematics to drive SWITCAP, you should name all nets that 5266you wish to plot. To avoid possible conflicts with unnamed nets, you 5267should avoid using purely numerical names for nets because all unnamed 5268nets will be assigned (somewhat randomly) numbers without checking for 5269possible conflicts with explicitly named nets. SWITCAP limits the 5270length of node names to 7 characters. 5271 52726.5.3.4 Switches 5273................ 5274 5275When placing switches on your schematic, you will need to define which 5276clock they are controlled with. This is done by setting the clock 5277attribute on the switch to the reference designator of the clock which 5278should control it. 5279 52806.5.4 Extracting the SWITCAP Netlist 5281------------------------------------ 5282 5283To extract the SWITCAP netlist, run: 5284 5285 lepton-netlist -g switcap -o test.scn file1.sch [file2.sch ...] 5286 5287 For the example file contained in this archive, you can run: 5288 5289 lepton-netlist -g switcap -o example.scn ckt.sch clocks.sch analysis.sch 5290 5291 The netlist will be left in ‘example.scn’. 5292 52936.5.5 Running SWITCAP 5294--------------------- 5295 5296I typically use something like: 5297 5298 printf "example.scn\nexample.out\n" | sw 5299 5300 so I can use command history to rerun SWITCAP without having to 5301manually type the file names each time. 5302 5303 Refer to the SWITCAP manual for more details. 5304 53056.5.6 Appendix A – Symbols in the Library 5306----------------------------------------- 5307 53086.5.6.1 Capacitors (switcap-capacitor) 5309...................................... 5310 5311Ideal capacitor. Attributes: 5312‘_C_=capacitance’ 5313 Required. Specifies filename to be included. 5314‘_refdes_=reference designator’ 5315 Required. Must start with ‘C’ and be unique. 5316 53176.5.6.2 Switches (switcap-switch) 5318................................. 5319 5320Ideal switch. Attributes: 5321‘_clock_=Controlling clock’ 5322 Required. Specifies which clock controls this switch. 5323‘_refdes_=reference designator’ 5324 Required. Must start with ‘S’ and be unique. 5325 53266.5.6.3 Independent Voltage Sources (switcap-vsrc) 5327.................................................. 5328 5329Attributes: 5330‘_refdes_=reference designator’ 5331 Required. Must start with ‘V’ and be unique. 5332 53336.5.6.4 Dependent Voltage Sources (switcap-vcvs) 5334................................................ 5335 5336Attributes: 5337‘_gain_=gain’ 5338 Required. Specifies the gain of the controlled source. 5339‘_refdes_=reference designator’ 5340 Required. Must start with ‘E’ and be unique. 5341 53426.5.6.5 Clock Specification (switcap-clock) 5343........................................... 5344 5345Attributes: 5346‘_PSTART_=starting clock phase’ 5347 Required. Specifies on what phase of the master clock this clock 5348 turns on. 5349‘_PSTOP_=ending clock phase’ 5350 Required. Specifies on what phase of the master clock this clock 5351 turns off. 5352‘_PERIOD_=clock period’ 5353 Required. Specifies the period of the clock in terms of master 5354 clock cycles. 5355‘_refdes_=reference designator’ 5356 Required. The switches that are controlled by this clock will 5357 refer to it by the reference designator. As such, avoid running 5358 any reference designator renumbering tools. 5359 53606.5.6.6 Master Timing Specification (switcap-timing) 5361.................................................... 5362 5363Attributes: 5364‘_PERIOD_=clock period’ 5365 Required. Specifies the period of the master clock in seconds. 5366 5367 Only a single instance of this symbol is allowed. 5368 53696.5.6.7 Analysis File Include (switcap-analysis) 5370................................................ 5371 5372This symbol will cause a specified file containing SWITCAP analysis 5373commands to be included in the output netlist. Attributes: 5374‘_file_=filename’ 5375 Required. Specifies filename to be included. 5376 53776.5.6.8 Simulation Title Specification (switcap-title) 5378...................................................... 5379 5380Attributes: 5381‘_TITLE_=switcap title’ 5382 Required. Specifies the TITLE line for the SWITCAP netlist. 5383 5384 Only a single instance of this symbol is allowed. 5385 53866.5.6.9 Simulation Options Specification (switcap-options) 5387.......................................................... 5388 5389Attributes: 5390‘_OPTIONS_=switcap options’ 5391 Required. Specifies the OPTIONS line for the SWITCAP netlist. See 5392 the SWITCAP manual for allowed values. 5393 5394 Only a single instance of this symbol is allowed. 5395 53966.5.7 Example 5397------------- 5398 5399This appendix provides a simple example of the entire process of 5400generating a schematic, producing a SWITCAP netlist, running a 5401simulation, and plotting the results. 5402 5403[image src="ckt.png"] 5404 5405 5406 5407Figure 6.3: Simple switched capacitor circuit 5408 5409[image src="clocks.png"] 5410 5411 5412 5413Figure 6.4: SWITCAP clock definition schematic 5414 5415[image src="analysis.png"] 5416 5417 5418 5419Figure 6.5: SWITCAP analysis definition schematic 5420 5421ANALYZE SSS; 5422 INFREQ 100.0 1.0E6 LOG 501; 5423 SET V1 AC 1.0 0.0; 5424 PRINT VDB(OUT) VP(OUT); 5425 END; 5426 5427ANALYZE TRAN; 5428 TIME 0+ 500 1 5429 SET V1 PULSE 0 5 10e-6 5e-6 5e-6 100e-6 500e-6; 5430 PRINT V(OUT); 5431 END; 5432 5433 5434 5435 5436Figure 6.6: SWITCAP analysis file, ‘test.ana’ 5437 54386.5.7.1 Example Schematics 5439.......................... 5440 5441*note Figure 6.3: fig:switcap1. shows the schematic of a simple switched 5442capacitor circuit. Note that some switches, S1 and S3 for example, are 5443controlled by CLK1 while others, S2 and S4 for example, are controlled 5444by the complement of CLK1 (#CLK1). 5445 5446 *note Figure 6.4: fig:switcap2. shows the definition of a clock and 5447the master clock. Here we define a master clock period (_mcp_) of 1.0 5448μs in the timing block. In the clock definition symbol, we define a 5449clock called CLK1 that has a period equal to 1 master clock period 5450(_mcp_). The phase of CLK1 turning on switches is 0 and the phase of 5451CLK1 turning off switches is 3/8 mcp. Additional clock phases can be 5452defined by creating more instances of the clock definition symbol. 5453 5454 *note Figure 6.5: fig:switcap3. shows an instantiation of the title 5455block symbol which will cause “my title” to be used in the ‘TITLE’ line 5456in the SWITCAP netlist. *note Figure 6.5: fig:switcap3. also shows an 5457instantiation of an analysis block which directs the netlister to 5458include the contents of the file ‘test.ana’ in the output netlist. 5459 5460 *note Figure 6.6: fig:switcap4. shows the contents of the ‘test.ana’ 5461file. 5462 54636.5.7.2 Netlist the Design 5464.......................... 5465 5466To netlist the design, run: 5467 5468 lepton-netlist -g switcap -o example.scn ckt.sch clocks.sch analysis.sch 5469 54706.5.7.3 Run the Simulation 5471.......................... 5472 5473Run the simulation with: 5474 5475 printf "example.scn\nexample.out\n" | sw 5476 54776.5.7.4 Process the Results 5478........................... 5479 5480Convert the SWITCAP output file to something ‘gwave’ can read by 5481running: 5482 5483 sw2asc example.out 5484 54856.5.7.5 Plot the Results 5486........................ 5487 5488Start up the ‘gwave’ program and load the first sinusoidal steady state 5489result by running: 5490 5491 gwave example.out.SSS.1.asc 5492 5493 Drag the two waveforms onto the two waveform panels and change the 5494x-axis to a log scale. *note Figure 6.7: fig:switcap5. shows the 5495output. Start up the ‘gwave’ program and load the transient result by 5496running: 5497 5498FIXME: If you have access to the SWITCAP program, please consider 5499sending us the picture with simulation results for documentation. 5500 5501 5502Figure 6.7: Simulation Results - Sinusoidal steady state 5503 5504 gwave example.out.TRAN.1.asc 5505 5506 Drag the output waveform onto the waveform panel. *note Figure 6.8: 5507fig:switcap6. shows the output. 5508 5509FIXME: If you have access to the SWITCAP program, please consider 5510sending us the picture with simulation results for documentation. 5511 5512 5513Figure 6.8: Simulation Results - Transient 5514 55156.5.8 Document Revision History 5516------------------------------- 5517 5518_April 13th, 2003_ 5519 Created switcap.tex 5520 5521 5522File: lepton-manual.info, Node: lepton-cli, Next: lepton-attrib, Prev: lepton-netlist, Up: Top 5523 55247 lepton-cli - Lepton command-line utility 5525****************************************** 5526 5527‘lepton-cli’ provides a number of small command-line utilities for 5528working with Lepton schematic and symbol files, and is designed to be 5529used for batch processing of designs created using the schematic editor 5530*note lepton-schematic::. 5531 5532 General usage is: 5533 5534 lepton-cli [OPTION...] COMMAND [ARGS ...] 5535 5536 Currently, COMMAND can be one of ‘config’, ‘export’, or ‘shell’. 5537 5538 Here is the description of ‘lepton-cli’’s general options: 5539 5540‘--no-rcfiles’ 5541 Prevent *note gafrc:: Scheme initialisation files from being 5542 loaded. 5543 5544‘-h’ 5545‘--help’ 5546 Print a help message. 5547 5548‘-V’ 5549‘--version’ 5550 Print ‘lepton-cli’ version information. 5551 5552* Menu: 5553 5554* lepton-cli export:: Export images from schematic and symbol files. 5555* lepton-cli config:: Configure all Lepton tools. 5556* lepton-cli shell:: Scheme REPL for interactively processing schematics. 5557 5558 5559File: lepton-manual.info, Node: lepton-cli export, Next: lepton-cli config, Up: lepton-cli 5560 55617.1 lepton-cli export 5562===================== 5563 5564The command ‘lepton-cli export’ is used to export schematic and symbol 5565files in a variety of image formats. The resulting images can be then 5566used for printing or embedding into other documents. It currently 5567supports single-page PNG, SVG and EPS output, and multi-page PS and PDF 5568output. It accepts a variety of options for controlling how the output 5569is formatted. 5570 5571 Note: ‘lepton-cli export’ can produce multi-page PDF and PS 5572 documents in one go. 5573 5574 Usage: 5575 5576 lepton-cli export [OPTION ...] -o OUTPUT [--] FILE ... 5577 5578 The command can be used with the options described below. 5579 5580‘-o FILE’ 5581‘--output=FILE’ 5582 Output generated image data to FILE. 5583 5584‘-f FORMAT’ 5585‘--format=FORMAT’ 5586 Specify an output format. FORMAT can be one of ‘png’, ‘pdf’, 5587 ‘svg’, ‘ps’, or ‘eps’. Usually, this option is not required, 5588 because ‘lepton-cli’ will infer the correct format from the file 5589 extension of the output file. 5590 5591‘-p NAME’ 5592‘--paper=NAME’ 5593 Size the output for a particular paper size. The NAME should be a 5594 PWG 5101.1-2002 paper name. For example, valid values include 5595 ‘iso_a4’, ‘na_letter’, or ‘na_d’. You can use the ‘--paper-names’ 5596 option (see below) to obtain all valid names. 5597 5598‘-P’ 5599‘--paper-names’ 5600 Print paper size names suitable to pass to the ‘--paper’ option and 5601 exit. 5602 5603‘-l LAYOUT’ 5604‘--layout=LAYOUT’ 5605 When using a paper size, set the orientation of the output. LAYOUT 5606 can be one of ‘auto’, ‘landscape’, or ‘portrait’. If ‘auto’ layout 5607 is used, ‘lepton-cli’ selects the orientation that best fits the 5608 drawing. 5609 5610‘-s SIZE’ 5611‘--size=SIZE’ 5612 Size the output with specific dimensions. SIZE can be specified 5613 either as ‘auto’, or as two numbers in the format ‘WIDTH:HEIGHT’. 5614 If the size is ‘auto’, select the size that best fits the drawing. 5615 5616‘-k FACTOR’ 5617‘--scale=FACTOR’ 5618 Set the output scale FACTOR. This is a distance identical with 100 5619 points (1 default grid spacing) in *note lepton-schematic:: 5620 coordinate space. It is used to size the output when neither 5621 ‘--paper’ nor ‘--size’ are given, and defaults to 100 mil. 5622 5623‘-m MARGINS’ 5624‘--margins=MARGINS’ 5625 Set the widths of the margins to be used. MARGINS can be specified 5626 either as ‘auto’, or as a set from one to four numbers separated by 5627 colons. If ‘auto’ margins are specified, a sensible default value 5628 will be chosen. Up to four margin widths can be provided. If one 5629 is provided, it will be used on all four sides. If two are 5630 provided, the first will be used for the top/bottom and the second 5631 for the left/right. If three are provided, the first will be used 5632 for the top, the second for left/right, and the third for the 5633 bottom. This is summarized here: 5634 5635 ‘-m all widths defined 5636 TOP:LEFT:BOTTOM:RIGHT’ 5637 ‘-m TOP’ ↦ ‘-m TOP:TOP:TOP:TOP’ 5638 5639 ‘-m TOP:LEFT’ ↦ ‘-m TOP:LEFT:TOP:LEFT’ 5640 5641 ‘-m TOP:LEFT:BOTTOM’ ↦ ‘-m TOP:LEFT:BOTTOM:LEFT’ 5642 5643 5644‘-a ALIGN’ 5645‘--align=ALIGN’ 5646 Set how the drawing is aligned within the page. ALIGN can be 5647 specified either as ‘auto’, or as two numbers in the format 5648 ‘HALIGN:VALIGN’. ‘HALIGN’ controls the horizontal alignment, and 5649 ‘VALIGN’ the vertical. Each alignment value should be in the range 5650 0.0 to 1.0. The ‘auto’ alignment is equivalent to a value of 5651 ‘0.5:0.5’, i.e. centered. 5652 5653‘-d DPI’ 5654‘--dpi=DPI’ 5655 Set the number of pixels per inch used when generating PNG output. 5656 5657‘-c’ 5658‘--color’ 5659 Enable color output. 5660 5661‘--no-color’ 5662 Disable color output. 5663 5664‘-F FONT-FAMILY’ 5665‘--font=FONT-FAMILY’ 5666 Set the font to be used for drawing text. 5667 5668‘-h’ 5669‘--help’ 5670 Display usage information of the command ‘lepton-cli export’ and 5671 exit. 5672 5673‘--’ 5674 Treat all remaining arguments as schematic or symbol filenames. 5675 Use this if you have a schematic or symbol filename which begins 5676 with ‘-’. 5677 5678 The ‘--size’, ‘--margins’, or ‘--scale’ options described above 5679accept values using units of ‘mm’, ‘cm’, ‘in’, ‘pc’, ‘px’, or ‘pt’. If 5680you do not provide a unit, points are assumed. N.b. that ‘px’ are 5681evaluated relative to the current ‘--dpi’ setting. 5682 5683 When using the ‘--size’, ‘--margins’, or ‘--align’ options with 5684multiple values, you may use ‘;’, or ‘ ’ (space) as a separator between 5685them instead of ‘:’. In such a case, remember to properly quote your 5686arguments to avoid them to be interpreted by your shell. 5687 5688 5689File: lepton-manual.info, Node: lepton-cli config, Next: lepton-cli shell, Prev: lepton-cli export, Up: lepton-cli 5690 56917.2 lepton-cli config 5692===================== 5693 5694This section describes how to set up Lepton tools with the ‘lepton-cli 5695config’ command. 5696 5697 ‘lepton-cli config’ is a basic utility for inspecting and modifying 5698Lepton EDA configuration stores. 5699 5700 The usage of the command: 5701 5702 lepton-cli config [OPTION] [GROUP KEY [VALUE]] 5703 5704 If a GROUP and KEY are specified, it retrieves the value of that 5705configuration parameter. If a VALUE is specified as well, it sets the 5706value of that parameter. 5707 5708 The options ‘-p’, ‘-u’, and ‘-s’, listed below, can be used to select 5709what configuration store should be affected (by default, the project 5710configuration store for the current working directory). If no GROUP and 5711KEY are provided, the command outputs the filename of the selected 5712configuration store. 5713 5714‘-p [PATH]’ 5715‘--project[=PATH]’ 5716 Select the project configuration store of the project located in 5717 PATH. If no PATH is provided, selects the project in the current 5718 working directory. 5719 5720 Note: Unlike ‘--project’, for which an optional argument must 5721 be specified using ‘=’, any argument after ‘-p’ is considered 5722 to be a path, not a configuration group. It may be specified 5723 as ‘-pPATH’ or ‘-p PATH’. Please see examples below. 5724 5725‘-u’ 5726‘--user’ 5727 Select the user configuration store. 5728 5729‘-s’ 5730‘--system’ 5731 Select the system configuration store. Depending on user 5732 permissions, the system configuration store may be read-only. 5733 5734‘-c’ 5735‘--cache’ 5736 Select the program-specific configuration store (*note CACHE 5737 configuration context: cache-configuration-context.). 5738 57397.2.1 Configuration files 5740------------------------- 5741 5742Configuration settings used to configure these programs are written to 5743Lepton config files. Naming and location of those files, file format, 5744as well as configuration settings available, are described in the 5745chapter *note Configuration system: Configuration. 5746 5747 You can easily find out the location of the configuration files in 5748your system. For example, if you want to know where your user 5749configuration is stored, just type: 5750 5751 lepton-cli config -u 5752 ⊣ /home/user/.config/lepton-eda/lepton-user.conf 5753 5754 Supposed you’re a system administrator and want to look where 5755Lepton’s default system settings are stored, do: 5756 5757 lepton-cli config -s 5758 ⊣ /usr/local/share/lepton-eda/lepton-system.conf 5759 5760 Editing the system configuration file will probably require superuser 5761permissions. If you want to look up and edit just one of the settings, 5762you could do, for instance: 5763 5764 lepton-cli config -s export font 5765 ⊣ Sans 5766 sudo lepton-cli config -s export font Arial 5767 5768 The first of the above commands simply reads the file, so it doesn’t 5769require additional permissions. 5770 5771 Note: Apart from using ‘lepton-cli’ for modifying the files, you 5772 can just edit them manually in your favorite text editor. 5773 5774 All the config files consist of sections, called groups, containing 5775key-value pairs. 5776 5777 Values of some keys in the Lepton config files are lists. Note that 5778unlike the *note lepton-cli export:: command, where several list 5779separators can be used, the only separator between list values in the 5780config files is semicolon ‘;’. 5781 5782 Note: Always properly escape semicolons in key values. Use double 5783 quotes or backslash for that. Otherwise your shell may interpret 5784 your command wrong. 5785 5786 Another difference between ‘export’ and ‘config’ commands is that 5787when using the latter, you always have to specify all parameters of the 5788used list. Thus, for example, this command is wrong: 5789 5790 lepton-cli config --project export size 1000 5791 5792 The right command will look like this: 5793 5794 lepton-cli config --project export size "1000;1000" 5795 5796 Note: All sizes in the configuration files, and therefore in the 5797 ‘lepton-cli config’ command line, *must* be given in Adobe points 5798 (72 points = 1 inch). Suffixes such as ‘pt’, ‘mm’, and others, 5799 which can be used with the *note lepton-cli export:: command, are 5800 not yet supported in the config files. Fixes are welcome. 5801 5802 In some cases, your configuration may work wrongly if ever. While 5803‘lepton-cli’ supports locales for the ‘export’ command, it is not so for 5804‘config’. 5805 5806 Note: It is recommended to always use _dot_ (‘.’) as decimal point 5807 separator with ‘lepton-cli’. 5808 5809 Suppose, for example, that comma is used in your locale as decimal 5810point separator. Despite it, the following command results with wrong 5811values in your project’s configuration file, and the config just won’t 5812work properly: 5813 5814 lepton-cli config --project export align "1,0;0,0" 5815 5816 Unlike it, the following _exporting_ command will work OK under such 5817conditions: 5818 5819 lepton-cli export -a 0,0:1.0 -o file.pdf file.sch 5820 58217.2.2 lepton-cli config examples 5822-------------------------------- 5823 58247.2.2.1 Difference between -p and –project 5825.......................................... 5826 5827Please note the difference between specifying the options ‘-p’ and 5828‘--project’. Supposed that your ‘lepton.conf’ in the current working 5829directory has the contents as follows: 5830 5831 [export] 5832 dpi=144 5833 5834 the following commands work as expected: 5835 5836 lepton-cli config --project=. export dpi 5837 ⊣ 144 5838 lepton-cli config --project export dpi 5839 ⊣ 144 5840 lepton-cli config -p . export dpi 5841 ⊣ 144 5842 lepton-cli config -p. export dpi 5843 ⊣ 144 5844 5845 while the following ones are wrong and output errors: 5846 5847 lepton-cli config -p export dpi 5848 ⊣ ERROR: Directory "export" does not exist. 5849 lepton-cli config -p=export dpi 5850 ⊣ ERROR: Directory "=export" does not exist. 5851 5852 This is because _any_ argument after ‘-p’, be it specified with space 5853or without it between the option and the argument, is considered to be a 5854path, not a configuration group, and the equal sign cannot be used as a 5855separator like for ‘--project’. Conversely, the following command: 5856 5857 lepton-cli config --project . export dpi 5858 5859 will silently exit and result in the following content in 5860‘./lepton.conf’: 5861 5862 [.] 5863 export=dpi 5864 5865 which is not you would expect here, right? This is because an 5866optional argument for the option ‘--project’ *must* be used with ‘=’ as 5867separator, not space. Therefore in the above command, ‘.’ was 5868interpreted as a configuration group, and ‘export’ and ‘dpi’ as a key 5869and its value within it. 5870 58717.2.2.2 Set up exporting 5872........................ 5873 5874Use the “landscape” layout by default for a local project: 5875 5876 lepton-cli config --project export layout landscape 5877 5878 Use the “letter” paper size by default for all your printouts: 5879 5880 lepton-cli config --user export paper na_letter 5881 5882 Set paper size to the definite value of 1x2 inch for a local project: 5883 5884 lepton-cli config --project export size "72;144" 5885 5886 Set margins as a half of inch for left and right sides and as a 5887quarter of inch for top and bottom for a local project: 5888 5889 lepton-cli config --project export margins "18;36;18;36" 5890 5891 This command will align your project’s schematics to the right. 5892 5893 lepton-cli config --project export align "1.0;0.5" 5894 5895 Export schematics in a project in color (note: ‘False’ or ‘FALSE’ 5896will not work): 5897 5898 lepton-cli config --project export monochrome false 5899 5900 Set up a custom user font: 5901 5902 lepton-cli config --user export font "OpenGost Type B TT Italic" 5903 5904 Choose another font for a local project: 5905 5906 lepton-cli config --project export font "Arial Bold" 5907 59087.2.2.3 Set up netlisting 5909......................... 5910 5911Use shorter net names for unnamed nets in all netlists: 5912 5913 lepton-cli config --user netlist default-net-name net 5914 5915 Ensure that a local project will use hierarchical net names despite 5916of settings in ‘lepton-user.conf’: 5917 5918 lepton-cli config --project netlist.hierarchy traverse-hierarchy true 5919 5920 Promote ‘net’ attribute over ‘netname’: 5921 5922 lepton-cli config --project netlist net-naming-priority net-attribute 5923 59247.2.2.4 Set up lepton-schematic 5925............................... 5926 5927Use shorter names for new pages: 5928 5929 lepton-cli config --user schematic default-filename empty 5930 5931 Set up select component widget to always show all attributes: 5932 5933 lepton-cli config --project schematic.library component-attributes "*" 5934 5935 Please be careful when using this command in the command line. If 5936you forget the quotes, your shell will substitute the first file name in 5937the working directory file list for the attribute name. This is most 5938likely not what you want. 5939 5940 Display only attributes that are in the filter list: 5941 5942 lepton-cli config --project lepton-schematic.library \ 5943 component-attributes "refdes;device;description" 5944 5945 Please note that if you replace semicolons with commas, 5946‘lepton-schematic’ will consider the string in quotes just one attribute 5947name, which is obviously wrong, and you will see no attribute at all. 5948 5949 Sort component library in ‘lepton-schematic’ alphabetically: 5950 5951 lepton-cli config --user schematic.library sort true 5952 5953 5954File: lepton-manual.info, Node: lepton-cli shell, Prev: lepton-cli config, Up: lepton-cli 5955 59567.3 lepton-cli shell 5957==================== 5958 5959‘lepton-cli shell’ provides an interactive Scheme Read-Eval-Print Loop 5960(REPL) for automating processing of schematic and symbol files. It is 5961designed to be used with the Lepton EDA Scheme API. *Note 5962(lepton-scheme)Top:: for more information on which Lepton EDA Scheme 5963procedures you can use. 5964 5965 Usage: 5966 5967 lepton-cli shell [OPTION ...] 5968 5969 Options: 5970 5971‘-L DIRECTORY’ 5972 Prepend DIRECTORY to the list of directories to be searched for 5973 Scheme files. 5974 5975‘-l FILE’ 5976 Evaluate Scheme source code from FILE. 5977 5978‘-s FILE’ 5979 Evaluate Scheme source code from FILE, and exit. 5980 5981‘-c EXPR’ 5982 Evaluate the Scheme expression EXPR, and exit. 5983 5984‘--’ 5985 Stop scanning arguments; run interactively. 5986 5987 The switches ‘-s’, ‘-c’ and ‘--’ stop argument processing and pass 5988all the remaining arguments as the value of ‘(command-line)’. 5989 5990 A couple of simple examples would not harm? Imagine you would want 5991to find out the path to your user configuration directory. Type: 5992 5993 lepton-cli shell -c \ 5994 "(use-modules (lepton os)) (display (user-config-dir))" 5995 ⊣ /home/user/.config/lepton-eda 5996 5997 Now, suppose you want to know where is better to put your system-wide 5998configuration files: 5999 6000 lepton-cli shell -c \ 6001 "(use-modules (lepton os)) (display (sys-config-dirs))" 6002 ⊣ (/etc/xdg/lepton-eda /usr/local/share/lepton-eda) 6003 6004 Hopefully, you don’t need this for any of your project’s directories 6005;-) But who knows... If so, try to compose a useful command yourself. 6006 6007 6008File: lepton-manual.info, Node: lepton-attrib, Next: lepton-update, Prev: lepton-cli, Up: Top 6009 60108 Spreadsheet attribute editor 6011****************************** 6012 60138.1 Introduction to lepton-attrib 6014================================= 6015 6016‘lepton-attrib’ is Lepton’s attribute editor. It reads a set of 6017schematic files (‘.sch’), and creates a spreadsheet showing all 6018components in rows, with the associated component attributes listed in 6019the columns. It allows the user to add, modify, or delete component 6020attributes outside of ‘lepton-schematic’, and then save the ‘.sch’ files 6021back out. When it is completed, it will allow the user to edit 6022attributes attached to components. 6023 6024 ‘lepton-attrib’ is useful in situations where you need to view, add, 6025modify, or delete a number of attributes all at once. It saves you the 6026pain of clicking on each component and repeatedly using 6027‘lepton-schematic’’s attribute editor to modify component attributes. 6028For example, if you create a large design with generic components, and 6029then later want to attach ‘footprint’ attributes to your components, it 6030is a real hassle to do so using ‘lepton-schematic’. In this situation, 6031you can run ‘lepton-attrib’ on your design files to attach the 6032‘footprint’ attributes all at once using an easy-to-use spreadsheet. 6033 6034 Warning: While ‘lepton-attrib’ has been tested on many designs, it 6035 is not guaranteed to work properly in all cases. It may even trash 6036 your design! Therefore, always keep a back-up copy of your design 6037 files. Note that this is good advice when using any software on 6038 critical files. 6039 6040* Menu: 6041 6042* Usage of lepton-attrib:: 6043* lepton-attrib menus:: 6044* Installation of lepton-attrib:: 6045* Credits and history of lepton-attrib:: 6046 6047 6048File: lepton-manual.info, Node: Usage of lepton-attrib, Next: lepton-attrib menus, Prev: lepton-attrib, Up: lepton-attrib 6049 60508.2 Usage of lepton-attrib 6051========================== 6052 6053You can invoke ‘lepton-attrib’ on your design from the command line in 6054the following way: 6055 6056 lepton-attrib file1.sch file2.sch ... 6057 6058 For example: 6059 6060 lepton-attrib my_design_*.sch 6061 6062 (This assumes you have a multi-page design with file names 6063‘my_design_1.sch’, ‘my_design_2.sch’, etc.) ‘lepton-attrib’ will then 6064read in your design, and present you with a spreadsheet showing all 6065components and associated attributes. 6066 6067 You can also just run ‘lepton-attrib’, and select the input files in 6068the “Open” dialog box. 6069 6070 To edit your attributes, just edit the cells in the spreadsheet. 6071 6072 6073File: lepton-manual.info, Node: lepton-attrib menus, Next: Installation of lepton-attrib, Prev: Usage of lepton-attrib, Up: lepton-attrib 6074 60758.3 lepton-attrib menus 6076======================= 6077 6078 • File 6079 6080 − File → Save 6081 6082 Saves your design, that is all schematic files you opened. 6083 6084 Note: No checks are currently done when you select Save. 6085 Be careful! 6086 6087 − File → Export CSV 6088 6089 Saves out a CSV (Comma Separated Values) file, which can later 6090 be imported into a more general spreadsheet editor, e.g. 6091 Libre Office Calc. This can be useful for BOM (Bill Of 6092 Materials) management. 6093 6094 − File → Quit 6095 6096 Quits ‘lepton-attrib’. 6097 6098 Note: Currently no checks that you have saved your design 6099 are done when you quit. 6100 6101 • Edit 6102 6103 − Edit → Add new attrib column 6104 6105 Allows you to add an entirely new attribute to your design 6106 (i.e. one which doesn’t exist on any component). 6107 6108 − Edit → Delete attrib column 6109 6110 Allows you to delete an entire attribute column. 6111 6112 • Visibility 6113 6114 You can set the visibility of any particular attribute, or an 6115 entire column of attributes through the menu. Just select the 6116 attribute or column first, then do one of: 6117 6118 − Visibility → Set selected invisible 6119 − Visibility → Set selected name visible only 6120 − Visibility → Set selected value visible only 6121 − Visibility → Set selected name and value visible 6122 6123 Component visibility is indicated by changing the color of the 6124 attribute in each cell. The following colors are used: 6125 6126 • Invisible attributes: light grey 6127 • Name only visible: red 6128 • Value only visible: black 6129 • Name and value both visible: blue 6130 6131 • Help 6132 − Help → About Opens the “About” dialog box. 6133 6134 6135File: lepton-manual.info, Node: Installation of lepton-attrib, Next: Credits and history of lepton-attrib, Prev: lepton-attrib menus, Up: lepton-attrib 6136 61378.4 Installation of lepton-attrib 6138================================= 6139 6140To install ‘lepton-attrib’ from sources, just install Lepton EDA. *Note 6141Installation::. 6142 6143 Installation of ‘lepton-attrib’ can be disabled with the option 6144‘--disable-attrib’ on the ‘configure’ stage: 6145 6146 autoreconf -ivf && ./configure --disable-attrib && make 6147 sudo make install 6148 6149 Currently, ‘lepton-attrib’ depends on the third-party library 6150‘gtkextra’ which has to be installed on your system. On some systems 6151you also need to install _development packages_ containing C header 6152files necessary for compilation. For example, on Debian, you would need 6153‘libgtkextra-dev’. 6154 6155 If you want to try new GTK3 interface, you have to install another 6156library, ‘gtksheet’: <https://github.com/fpaquet/gtksheet>. Then use 6157the ‘--with-gtk3’ for ‘configure’: 6158 6159 autoreconf -ivf && ./configure --with-gtk3 && make 6160 sudo make install 6161 6162 If you install Lepton from sources to a place not known for your 6163system dynamic linker, you may need to set ‘LD_LIBRARY_PATH’ to get it 6164to work. 6165 6166 For example, if you use ‘csh’, do: 6167 setenv LD_LIBRARY_PATH /home/user/lepton/lib:$LD_LIBRARY_PATH 6168 6169 For ‘bash’ and the like shells: 6170 export LD_LIBRARY_PATH=/home/user/lepton/lib:$LD_LIBRARY_PATH 6171 6172 6173File: lepton-manual.info, Node: Credits and history of lepton-attrib, Prev: Installation of lepton-attrib, Up: lepton-attrib 6174 61758.5 Credits and history of lepton-attrib 6176======================================== 6177 6178The original code of ‘lepton-attrib’ under name ‘gattrib’ has been 6179written by Stuart Brorson (<sdb@cloud9.net>) for the gEDA project. 6180‘gattrib’ was cobbled together in December 2003 from parts culled from 6181GtkSheet (GTK+Extra) and gEDA. 6182 6183 6184File: lepton-manual.info, Node: lepton-update, Next: Communication, Prev: lepton-attrib, Up: Top 6185 61869 lepton-update 6187*************** 6188 6189This is a utility for schematics and symbols for updating schematics and 6190symbols in old gEDA/gaf file formats. It updates attribute and pin 6191objects in files of version ‘20030921’ or earlier up to the current 6192version of Lepton. 6193 6194 The usage is as follows: 6195 6196 lepton-update FILE ... 6197 6198 The program takes a number of schematic or symbol filenames on the 6199command-line, makes a backup for each one, and then updates the files. 6200 6201 For both symbols and schematics, the program fixes obsolete text and 6202pin format lines and sets the current format version. 6203 6204 For schematics, it replaces the LABEL attribute on nets with NETNAME, 6205and UREF with REFDES. 6206 6207 For symbols, it changes them as follows: 6208 6209 • Converts all PIN#=# attributes (e.g. PIN1=1, PIN2=2, and so on) 6210 into PINNUMBER and PINSEQ attributes. 6211 6212 • Converts all SLOT#=# attributes (e.g. SLOT1=1,2,3) into SLOTDEF 6213 attributes. 6214 6215 • Replaces symbol pin attributes TYPE with PINTYPE. 6216 6217 • Replaces symbol pin attributes LABEL with PINLABEL. 6218 6219 • Replaces symbol attribute UREF with REFDES. 6220 62219.1 lepton-update command-line options 6222====================================== 6223 6224‘-h, --help’ 6225 Display help on invoking ‘lepton-update’, and then exit. 6226 6227‘-V, --version’ 6228 Display the current version of ‘lepton-update’, and then exit. 6229 6230 6231File: lepton-manual.info, Node: Communication, Next: Development, Prev: lepton-update, Up: Top 6232 623310 Communication 6234**************** 6235 6236We are using the following resources for almost all communication about 6237Lepton EDA and gEDA: 6238 6239 • our site on Github (https://github.com/lepton-eda/lepton-eda): 6240 report and discuss issues, add your patches, join to the project 6241 6242 • gitter.im chat room (https://gitter.im/Lepton-EDA/Lobby): get in 6243 touch with Lepton EDA users and developers 6244 6245 • geda-user mailing list 6246 (http://wiki.geda-project.org/geda:mailinglists): discuss anything 6247 about Lepton and gEDA 6248 6249 Do not hesitate to get in touch the current maintainers privately. 6250We very appreciate any contribution and would be glad to help you if you 6251have any trouble with Lepton. 6252 6253 We are interested in having new developers join and stay with our 6254project. Get involved! 6255 6256 6257File: lepton-manual.info, Node: Development, Next: gEDA file format, Prev: Communication, Up: Top 6258 625911 Development 6260************** 6261 6262Most of Lepton tools are written in Guile Scheme and work the same way 6263independently of their location. This provides an interesting 6264opportunity: you can copy any of them to your home directory and play 6265with it, edit and run without touching anything else. 6266 6267* Menu: 6268 6269* Debugging:: Debugging the tools 6270 6271 6272File: lepton-manual.info, Node: Debugging, Prev: Development, Up: Development 6273 627411.1 Debugging the tools 6275======================== 6276 6277Most of Lepton programs are written in Guile Scheme. GUI tools are 6278based on Glib and GTK libraries. It’s worth to be aware of how to debug 6279the code in order to fix or report issues. 6280 6281* Menu: 6282 6283* Debug Scheme code:: 6284* Debuggers:: 6285* Debug Glib and GTK:: 6286 6287 6288File: lepton-manual.info, Node: Debug Scheme code, Next: Debuggers, Prev: Debugging, Up: Debugging 6289 629011.1.1 Debug Guile Scheme code 6291------------------------------ 6292 6293Sometimes code in Scheme may fail and output a backtrace looking out 6294something like this: 6295 6296 Backtrace: 6297 In unknown file: 6298 ?: 19 [apply-smob/1 #<catch-closure 55e36cf0a020>] 6299 In ice-9/boot-9.scm: 6300 66: 18 [call-with-prompt prompt0 ...] 6301 ... 6302 many more lines 6303 ... 6304 In ice-9/boot-9.scm: 6305 105: 1 [#<procedure 55e36e0eee80 at ice-9/boot-9.scm:100:6 6306 (thrown-k . args)> wrong-type-arg ...] 6307 In unknown file: 6308 ?: 0 [apply-smob/1 #<catch-closure 55e36e0edae0> wrong-type-arg ...] 6309 6310 ERROR: In procedure apply-smob/1: 6311 ERROR: In procedure struct-vtable: Wrong type argument in position 1 6312 (expecting struct): #f 6313 6314 The output is incomprehensible, isn’t it? The issue gets worse due 6315to abbreviation of the output, look at the ellipses in some of the 6316lines. 6317 6318 The length of the output lines depends on the environment variable 6319‘COLUMNS’ set in your environment. Sometimes you can improve 6320readability of such errors by setting the variable to a bigger value. 6321For instance, if you launch your program in terminal, do: 6322 6323 echo $COLUMNS 6324 ⊣ 106 6325 export COLUMNS=1000 6326 lepton-schematic 6327 6328 You can do it in your Scheme code as well: 6329 6330 (setenv "COLUMNS" "1000") 6331 6332 Sometimes you have to find the code you could insert such a line in. 6333For example, the code of Lepton Scheme unit tests contains this line in 6334‘unit-test.scm’, though it is commented out as this is unnecessary in 6335most cases. 6336 6337 Another approach is using of interactive mode of Guile or one of 6338Lepton tools to debug your code. Load your modules or files with code 6339in this mode one by one and see what’s wrong with them. 6340‘lepton-netlist’ and ‘lepton-symcheck’ support this. 6341 6342 6343File: lepton-manual.info, Node: Debuggers, Next: Debug Glib and GTK, Prev: Debug Scheme code, Up: Debugging 6344 634511.1.2 Debug C code with debugger tools 6346--------------------------------------- 6347 6348One of the most popular tools to debug C code is ‘gdb’. The issue with 6349‘gdb’ is that it cannot work with programs written in Scheme and most of 6350Lepton tools are such programs. This is easily solvable. Instead of 6351the call 6352 6353 gdb lepton-schematic 6354 6355use 6356 6357 gdb --args guile -s /usr/local/bin/lepton-schematic 6358 6359because this is the very command which is used internally in the 6360‘lepton-schematic’ script. Please note using of the full path to the 6361script here. 6362 6363 6364File: lepton-manual.info, Node: Debug Glib and GTK, Prev: Debuggers, Up: Debugging 6365 636611.1.3 Debug C code based on Glib and GTK 6367----------------------------------------- 6368 6369Sometimes you may encounter critical warnings by ‘glib’ or ‘gtk’, which 6370look like this: 6371 6372 GLib-GObject-CRITICAL **: ... 6373 6374 In order to debug them, you need to know the way of reproducing them. 6375Then, you can use the following command to fiddle with them in ‘gdb’: 6376 6377 G_DEBUG=fatal_criticals gdb --args \ 6378 guile -s /usr/local/bin/lepton-schematic 6379 6380 6381File: lepton-manual.info, Node: gEDA file format, Next: Master attribute list, Prev: Development, Up: Top 6382 638312 gEDA/gaf File Format Document 6384******************************** 6385 6386The origin of this document is gEDA file format page 6387(http://wiki.geda-project.org/geda:file_format_spec). 6388 6389 by: Ales V. Hvezda, <ahvezda@geda.seul.org> 6390 6391 This document is released under GFDL 6392(http://www.gnu.org/copyleft/fdl.html) 6393 6394 December 31st, 2003 6395 6396* Menu: 6397 6398* File format overview:: 6399* Coordinate space:: 6400* Filenames:: 6401* Object types:: 6402* Colors:: 6403* Attributes:: 6404* Embedded Components:: 6405* Path data:: 6406* gEDA File Format Document Revision History:: 6407 6408 6409File: lepton-manual.info, Node: File format overview, Next: Coordinate space, Prev: gEDA file format, Up: gEDA file format 6410 641112.1 Overview 6412============= 6413 6414This file is the official documentation for the file formats in gEDA/gaf 6415(gschem And Friends). The primary file format used in gEDA/gaf is the 6416schematic/symbol format. Files which end with ‘.sch’ or ‘.sym’ are 6417schematics or symbol files. Until there is another file type in 6418gEDA/gaf, then this document will only cover the symbol/schematic file 6419format. 6420 6421 This file format document is current as of gEDA/gaf version 20040111. 6422This document covers file format version 1 and 2. 6423 6424 Note, this file format and any other file formats associated with 6425gEDA are placed under the General Public License (GPL) version 2.0. The 6426gEDA/gaf symbol and schematic file format is Copyright (C) 1998-2004 6427Ales Hvezda. 6428 6429 6430File: lepton-manual.info, Node: Coordinate space, Next: Filenames, Prev: File format overview, Up: gEDA file format 6431 643212.2 Coordinate Space 6433===================== 6434 6435All coordinates are in mils (1/1000 of an inch). This is an arbitrary 6436decision. Remember in there is no concept of physical 6437lengths/dimensions in schematics and symbols (for schematic capture 6438only). 6439 6440 • Origin is in lower left hand corner. 6441 6442 • The size of the coordinate space is unlimited, but it is 6443 recommended that all objects stay within (120.0, 90.0) (x, y 6444 inches). 6445 6446 • It is generally advisable to have positive x and y coordinates, 6447 however, negative coordinates work too, but not recommended. 6448 6449 The following figure shows how the coordinate space is setup: 6450 6451[image src="coordinate-space.png"] 6452 6453 6454 X axis increases going to the right. Y axis increase going up. 6455Coordinate system is landscape and corresponds to a sheet of paper 6456turned on its side. 6457 6458 6459File: lepton-manual.info, Node: Filenames, Next: Object types, Prev: Coordinate space, Up: gEDA file format 6460 646112.3 Filenames 6462============== 6463 6464Symbol names end in ‘.sym’. The only symbol filename convention that is 6465used in gEDA/gaf is that if there are multiple instances of a symbol 6466with the same name (like a 7400), then a -1, -2, -3, ... -N suffix is 6467added to the end of the filename. Example: ‘7400-1.sym’, ‘7400-2.sym’, 6468‘7400-3.sym’... 6469 6470 Schematic names end in ‘.sch’. There used to be a schematic filename 6471convention (adding a -1 .. -N to the end of the basename), but this 6472convention is now obsolete. Schematic filenames can be anything that 6473makes sense to the creator. 6474 6475 6476File: lepton-manual.info, Node: Object types, Next: Colors, Prev: Filenames, Up: gEDA file format 6477 647812.4 Object types 6479================= 6480 6481A schematic/symbol file for gEDA/gaf consists of: 6482 6483 • A version (‘v’) as the first item in the file. This is required. 6484 6485 • Any number of objects and the correct data. Objects are specified 6486 by an “object type”. 6487 6488 • Most objects are a single line, however text objects are two lines 6489 long. 6490 6491 • No blank lines at the end of the file (these are ignored by the 6492 tools) 6493 6494 • For all enumerated types in the gEDA/gaf file formats, the field 6495 takes on the numeric value. 6496 6497 The “object type” ID is a single letter and this ID must start in the 6498first column. The object type ID is case sensitive. 6499 6500 The schematic and symbol files share the same file layout. A symbol 6501is nothing more than a collection of primitive objects (lines, boxes, 6502circles, arcs, text, and pins). A schematic is a collection of symbols 6503(components), nets, and buses. 6504 6505 The following sections describe the specifics of each recognized 6506object type. Each section has the name of the object, which file type 6507(sch/sym) the object can appear in, the format of the data, a 6508description of each individual field, details and caveats of the fields, 6509and finally an example with description. 6510 6511 For information on the color index (which is used in practically all 6512objects), see the *note Colors:: section. 6513 6514* Menu: 6515 6516* version:: 6517* line:: 6518* picture:: 6519* box:: 6520* circle:: 6521* arc:: 6522* text and attributes:: 6523* net:: 6524* bus:: 6525* pin:: 6526* component:: 6527* path:: 6528* font:: 6529 6530 6531File: lepton-manual.info, Node: version, Next: line, Prev: Object types, Up: Object types 6532 653312.4.1 version 6534-------------- 6535 6536Valid in: Schematic and Symbol files 6537 6538type version fileformat_version 6539 6540Pos. Field Type/unit Description 6541 6542--------------------------------------------------------------------------- 6543# type char v 6544 65451 version int version of gEDA/gaf that 6546 wrote this file 6547 65482 fileformat_versionint gEDA/gaf file format 6549 version number 6550 6551 6552 • The type is a lower case “v” (as in Victor). 6553 6554 • This object must be in every file used or created by the gEDA/gaf 6555 tools. 6556 6557 • The format of the first version field is YYYYMMDD. 6558 6559 • The version number is not an arbitrary timestamp. Do not make up a 6560 version number and expect the tools to behave properly. 6561 6562 • The “version of gEDA/gaf that wrote this file” was used in all 6563 versions of gEDA/gaf up to 20030921 as the file formats version. 6564 This field should no longer be used to determine the file format. 6565 It is used for information purposes only now. 6566 6567 • Starting at and after gEDA/gaf version 20031004, the 6568 ‘fileformat_version’ field is used to determine the file format 6569 version. All file format code should key off of this field. 6570 6571 • ‘fileformat_version’ increases when the file format changes. 6572 6573 • The starting point for ‘fileformat_version’ was 1. The current 6574 file format version is 2. 6575 6576 • fileformat version is just an integer with no minor number. 6577 6578 • Development versions include: 19990601, 19990610, 19990705, 6579 19990829, 19990919, 19991011, 20000220, 20000704, 20001006, 6580 20001217, 20010304, 20010708, 20010722, 20020209, 20020414, 6581 20020527, 20020825, 20021103, 20030223, 20030525, 20030901, 6582 20040111, 20040710, 20041228, 20050313, 20050820, 20060123, 6583 20060824, 20060906, 20061020, 20070216, 20070705, 20070708, 6584 20070818, 20071229, 20080110, 20080127, 20080706, 20081220, 6585 20081221, 20090328, 20090829, 20090830, 20110116, 20110619, 6586 20111231 6587 6588 • Stable versions include: 20070526, 20070626, 20070902, 20071231, 6589 20080127, 20080929, 20081220, 20081231, 20091004, 20100214, 6590 20110115 6591 6592 • CVS or test versions (should not be used): 20030921, 20031004, 6593 20031019, 20031231, 20050814 6594 6595 • Keep in mind that each of the above listed versions might have had 6596 file format variations. This document only covers the last 6597 version’s file format. 6598 6599 Example: 6600 v 20040111 1 6601 6602 6603File: lepton-manual.info, Node: line, Next: picture, Prev: version, Up: Object types 6604 660512.4.2 line 6606----------- 6607 6608Valid in: Schematic and Symbol files 6609 6610type x1 y1 x2 y2 color width capstyle dashstyle dashlength dashspace 6611 6612Pos. Field Type/unit Description 6613 6614--------------------------------------------------------------------------- 6615# type char L 6616 66171 x1 int/mils First X coordinate 6618 66192 y1 int/mils First Y coordinate 6620 66213 x2 int/mils Second X coordinate 6622 66234 y2 int/mils Second Y coordinate 6624 66255 color int Color index 6626 66276 width int/mils Width of line 6628 66297 capstyle int Line cap style 6630 66318 dashstyle int Type of dash style 6632 66339 dashlength int/mils Length of dash 6634 663510 dashspace int/mils Space inbetween dashes 6636 6637 6638 • The capstyle is an enumerated type: 6639 • END NONE = 0 6640 6641 • END SQUARE = 1 6642 6643 • END ROUND = 2 6644 6645 • The dashstyle is an enumerated type: 6646 • TYPE SOLID = 0 6647 6648 • TYPE DOTTED = 1 6649 6650 • TYPE DASHED = 2 6651 6652 • TYPE CENTER = 3 6653 6654 • TYPE PHANTOM = 4 6655 6656 • The dashlength parameter is not used for TYPE SOLID and TYPE 6657 DOTTED. This parameter should take on a value of -1 in these cases. 6658 6659 • The dashspace parameter is not used for TYPE SOLID. This parameter 6660 should take on a value of -1 in these case. 6661 6662 Example: 6663 L 23000 69000 28000 69000 3 40 0 1 -1 75 6664 6665 A line segment from (23000, 69000) to (28000, 69000) with color index 66663, 40 mils thick, no cap, dotted line style, and with a spacing of 75 6667mils in between each dot. 6668 6669 6670File: lepton-manual.info, Node: picture, Next: box, Prev: line, Up: Object types 6671 667212.4.3 picture 6673-------------- 6674 6675Valid in: Schematic and Symbol files 6676 6677type x y width height angle mirrored embedded filename 6678[encoded picture data 6679encoded picture end] 6680 6681Pos. Field Type/unit Description 6682 6683--------------------------------------------------------------------------- 6684# type char G 6685 66861 x int/mils Lower left X coordinate 6687 66882 y int/mils Lower left Y coordinate 6689 66903 width int/mils Width of the picture 6691 66924 height int/mils Height of the picture 6693 66945 angle int/degrees Angle of the picture 6695 66966 mirrored char Mirrored or normal picture 6697 66987 embedded char Embedded or link to the 6699 picture file 6700 67018 filename string path and filename of a not 6702 embedded picture 6703 67049 encoded string Serialized picture encoded 6705 picture data using base64 6706 670710 encoded string A line containing only a 6708 picture end dot character 6709 6710 6711 • This object is a picture object. The first line contains all the 6712 picture parameters, and the second line is the path and filename of 6713 the picture. The filename is not used if the picture is embedded. 6714 6715 • The angle of the picture can only take on one of the following 6716 values: 0, 90, 180, 270. 6717 6718 • The mirrored field is an enumerated type: 6719 • NOT MIRRORED = 0 6720 6721 • MIRRORED = 1 6722 6723 • The embedded field is an enumerated type: 6724 • NOT EMBEDDED = 0 6725 6726 • EMBEDDED = 1 (not yet supported) 6727 6728 • The encoded picture and encoded picture end fields are only in the 6729 file if the picture is embedded in the schematic: 6730 • encoded picture data: This is a multiple line field. The 6731 picture is serialized and then encoded using base64. This way 6732 the encoded data uses only printable characters. This field 6733 is the result of these two operations. 6734 6735 • encoded picture end : A line containing only a single dot ‘.’ 6736 character marks the end of the encoded picture data. 6737 6738 Example 1: 6739 G 16900 35800 1400 2175 0 0 0 6740 ../bitmaps/logo.jpg 6741 6742 A picture object with the lower left corner at (16900, 35800). The 6743width of the image is 1400 mils, and its height is 2175 mils. The 6744picture rotation is 0 degrees and the picture is not mirrored, neither 6745embedded. 6746 6747 The picture path and filename is showed in the second line. 6748 6749 Example 2: 6750 G 16900 35800 1400 2175 0 0 1 6751 ../bitmaps/logo.jpg 6752 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 6753 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 6754 . 6755 6756 A picture object with the lower left corner at (16900, 35800). The 6757width of the image is 1400 mils, and its height is 2175 mils. 6758 6759 The picture rotation is 0 degrees, it is not mirrored, and it is 6760embedded. 6761 6762 The picture path and filename is showed in the second line. Since 6763this is an embedded picture, the filename and path are not used. 6764 6765 The encoded picture data is only an example (it is not real data). 6766The last line containing a single dot ‘.’ character marks the end of the 6767encoded picture data. 6768 6769 6770File: lepton-manual.info, Node: box, Next: circle, Prev: picture, Up: Object types 6771 677212.4.4 box 6773---------- 6774 6775Valid in: Schematic and Symbol files 6776 6777type x y width height color width capstyle dashstyle dashlength dashspace filltype fillwidth angle1 pitch1 angle2 pitch2 6778 6779Pos. Field Type/unit Description 6780 6781--------------------------------------------------------------------------- 6782# type char B 6783 67841 x int/mils Lower left hand X 6785 coordinate 6786 67872 y int/mils Lower left hand Y 6788 coordinate 6789 67903 width int/mils Width of the box (x 6791 direction) 6792 67934 height int/mils Height of the box (y 6794 direction) 6795 67965 color int Color index 6797 67986 width int/mils Width of lines 6799 68007 capstyle int/mils Line cap style 6801 68028 dashstyle int Type of dash style 6803 68049 dashlength int/mils Length of dash 6805 680610 dashspace int/mils Space inbetween dashes 6807 680811 filltype int Type of fill 6809 681012 fillwidth int/mils Width of the fill lines 6811 681213 angle1 int/degrees First angle of fill 6813 681414 pitch1 int/mils First pitch/spacing of fill 6815 681615 angle2 int/degrees Second angle of fill 6817 681816 pitch2 int/mils Second pitch/spacing of 6819 fill 6820 6821 6822 • The capstyle is an enumerated type: 6823 • END NONE = 0 6824 6825 • END SQUARE = 1 6826 6827 • END ROUND = 2 6828 6829 • The dashstyle is an enumerated type: 6830 • TYPE SOLID = 0 6831 6832 • TYPE DOTTED = 1 6833 6834 • TYPE DASHED = 2 6835 6836 • TYPE CENTER = 3 6837 6838 • TYPE PHANTOM = 4 6839 6840 • The dashlength parameter is not used for TYPE SOLID and TYPE 6841 DOTTED. This parameter should take on a value of -1 in these cases. 6842 6843 • The dashspace parameter is not used for TYPE SOLID. This parameter 6844 should take on a value of -1 in these case. 6845 6846 • The filltype parameter is an enumerated type: 6847 • FILLING HOLLOW = 0 6848 6849 • FILLING FILL = 1 6850 6851 • FILLING MESH = 2 6852 6853 • FILLING HATCH = 3 6854 6855 • FILLING VOID = 4 unused 6856 6857 • If the filltype is 0 (FILLING HOLLOW), then all the fill parameters 6858 should take on a value of -1. 6859 6860 • The fill type FILLING FILL is a solid color fill. 6861 6862 • The two pairs of pitch and spacing control the fill or hatch if the 6863 fill type is FILLING MESH. 6864 6865 • Only the first pair of pitch and spacing are used if the fill type 6866 is FILLING HATCH. 6867 6868 Example: 6869 B 33000 67300 2000 2000 3 60 0 2 75 50 0 -1 -1 -1 -1 -1 6870 6871 A box with the lower left hand corner at (33000, 67300) and a width 6872and height of (2000, 2000), color index 3, line width of 60 mils, no 6873cap, dashed line type, dash length of 75 mils, dash spacing of 50 mils, 6874no fill, rest parameters unset. 6875 6876 6877File: lepton-manual.info, Node: circle, Next: arc, Prev: box, Up: Object types 6878 687912.4.5 circle 6880------------- 6881 6882Valid in: Schematic and Symbol files 6883 6884type x y radius color width capstyle dashstyle dashlength dashspace filltype fillwidth angle1 pitch1 angle2 pitch2 6885 6886Pos. Field Type/unit Description 6887 6888--------------------------------------------------------------------------- 6889# type char V 6890 68911 x int/mils Center X coordinate 6892 68932 y int/mils Center Y coordinate 6894 68953 radius int/mils Radius of the circle 6896 68974 color int Color index 6898 68995 width int/mils Width of circle line 6900 69016 capstyle int/mils 0 unused 6902 69037 dashstyle int Type of dash style 6904 69058 dashlength int/mils Length of dash 6906 69079 dashspace int/mils Space inbetween dashes 6908 690910 filltype int Type of fill 6910 691111 fillwidth int/mils Width of the fill lines 6912 691312 angle1 int/degrees First angle of fill 6914 691513 pitch1 int/mils First pitch/spacing of fill 6916 691714 angle2 int/degrees Second angle of fill 6918 691915 pitch2 int/mils Second pitch/spacing of 6920 fill 6921 6922 6923 • The dashstyle is an enumerated type: 6924 • TYPE SOLID = 0 6925 6926 • TYPE DOTTED = 1 6927 6928 • TYPE DASHED = 2 6929 6930 • TYPE CENTER = 3 6931 6932 • TYPE PHANTOM = 4 6933 6934 • The dashlength parameter is not used for TYPE SOLID and TYPE 6935 DOTTED. This parameter should take on a value of -1 in these cases. 6936 6937 • The dashspace parameter is not used for TYPE SOLID. This parameter 6938 should take on a value of -1 in these case. 6939 6940 • The filltype parameter is an enumerated type: 6941 • FILLING HOLLOW = 0 6942 6943 • FILLING FILL = 1 6944 6945 • FILLING MESH = 2 6946 6947 • FILLING HATCH = 3 6948 6949 • FILLING VOID = 4 unused 6950 6951 • If the filltype is 0 (FILLING HOLLOW), then all the fill parameters 6952 should take on a value of -1. 6953 6954 • The fill type FILLING FILL is a solid color fill. 6955 6956 • The two pairs of pitch and spacing control the fill or hatch if the 6957 fill type is FILLING MESH. 6958 6959 • Only the first pair of pitch and spacing are used if the fill type 6960 is FILLING HATCH. 6961 6962 Example: 6963 V 38000 67000 900 3 0 0 2 75 50 2 10 20 30 90 50 6964 6965 A circle with the center at (38000, 67000) and a radius of 900 mils, 6966color index 3, line width of 0 mils (smallest size), no cap, dashed line 6967type, dash length of 75 mils, dash spacing of 50 mils, mesh fill, 10 6968mils thick mesh lines, first mesh line: 20 degrees, with a spacing of 30 6969mils, second mesh line: 90 degrees, with a spacing of 50 mils. 6970 6971 6972File: lepton-manual.info, Node: arc, Next: text and attributes, Prev: circle, Up: Object types 6973 697412.4.6 arc 6975---------- 6976 6977Valid in: Schematic and Symbol files 6978 6979type x y radius startangle sweepangle color width capstyle dashstyle dashlength dashspace 6980 6981Pos. Field Type/unit Description 6982 6983--------------------------------------------------------------------------- 6984# type char A 6985 69861 x int/mils Center X coordinate 6987 69882 y int/mils Center Y coordinate 6989 69903 radius int/mils Radius of the arc 6991 69924 startangle int/degrees Starting angle of the arc 6993 69945 sweepangle int/degrees Amount the arc sweeps 6995 69966 color int Color index 6997 69987 width int/mils Width of circle line 6999 70008 capstyle int Cap style 7001 70029 dashstyle int Type of dash style 7003 700410 dashlength int/mils Length of dash 7005 700611 dashspace int/mils Space inbetween dashes 7007 7008 7009 • The startangle can be negative, but not recommended. 7010 7011 • The sweepangle can be negative, but not recommended. 7012 7013 • The capstyle is an enumerated type: 7014 • END NONE = 0 7015 7016 • END SQUARE = 1 7017 7018 • END ROUND = 2 7019 7020 • The dashstyle is an enumerated type: 7021 • TYPE SOLID = 0 7022 7023 • TYPE DOTTED = 1 7024 7025 • TYPE DASHED = 2 7026 7027 • TYPE CENTER = 3 7028 7029 • TYPE PHANTOM = 4 7030 7031 • The dashlength parameter is not used for TYPE SOLID and TYPE 7032 DOTTED. This parameter should take on a value of -1 in these cases. 7033 7034 • The dashspace parameter is not used for TYPE SOLID. This parameter 7035 should take on a value of -1 in these case. 7036 7037 Example: 7038 A 30600 75000 2000 0 45 3 0 0 3 75 50 7039 7040 An arc with the center at (30600, 75000) and a radius of 2000 mils, a 7041starting angle of 0, sweeping 45 degrees, color index 3, line width of 0 7042mils (smallest size), no cap, center line type, dash length of 75 mils, 7043dash spacing of 50 mils. 7044 7045 7046File: lepton-manual.info, Node: text and attributes, Next: net, Prev: arc, Up: Object types 7047 704812.4.7 text and attributes 7049-------------------------- 7050 7051Depending on context, text objects can play different roles. Outside 7052any environment, they represent informative lines of text. When 7053enclosed by curly braces, they are interpreted as attributes. See the 7054*note attributes section: Attributes. 7055 7056 Valid in: Schematic and Symbol files 7057 7058type x y color size visibility show_name_value angle alignment num_lines 7059string line 1 7060string line 2 7061string line 3 7062... 7063string line N 7064 7065Pos. Field Type/unit Description 7066 7067--------------------------------------------------------------------------- 7068# type char T 7069 70701 x int/mils First X coordinate 7071 70722 y int/mils First Y coordinate 7073 70743 color int Color index 7075 70764 size int/points Size of text 7077 70785 visibility int Visibility of text 7079 70806 show_name_valueint Attribute visibility 7081 control 7082 70837 angle int/degrees Angle of the text 7084 70858 alignment int Alignment/origin of the 7086 text 7087 70889 num_lines int Number of lines of text (1 7089 based) 7090 709110 string line string The text strings, on a 7092 1 ... N separate line 7093 7094 7095 • This object is a multi line object. The first line contains all 7096 the text parameters and the subsequent lines are the text strings. 7097 7098 • There must be exactly num lines of text following the T ... 7099 string. 7100 7101 • The maximum length of any single text string is 1024, however there 7102 is no limit to the number of text string lines. 7103 7104 • The minimum size is 2 points (1/72 of an inch). 7105 7106 • There is no maximum size. 7107 7108 • The coordinate pair is the origin of the text item. 7109 7110 • The visibility field is an enumerated type: 7111 • INVISIBLE = 0 7112 7113 • VISIBLE = 1 7114 7115 • The show_name_value is an enumerated type: 7116 • SHOW NAME VALUE = 0 (show both name and value of an attribute) 7117 7118 • SHOW VALUE = 1 (show only the value of an attribute) 7119 7120 • SHOW NAME = 2 (show only the name of an attribute) 7121 7122 • The show_name_value field is only valid if the string is an 7123 attribute (string has to be in the form: name=value to be 7124 considered an attribute). 7125 7126 • The angle of the text can only take on one of the following values: 7127 0, 90, 180, 270. A value of 270 will always generate upright text. 7128 7129 • The alignment/origin field controls the relative location of the 7130 origin. 7131 7132 • The alignment field can take a value from 0 to 8. 7133 7134 The following diagram shows what the values for the alignment field 7135 mean: 7136 7137[image src="text-layout.png"] 7138 7139 7140 • The num_lines field always starts at 1. 7141 7142 The num_lines field was added starting with file format version 1. 7143 Past versions (0 or earlier) only supported single line text 7144 objects. 7145 7146 • The text strings of the string line(s) can have overbars if the 7147 text is embedded in two overbar markers ‘\_’. A single backslash 7148 needs to be written as ‘\\’. 7149 7150 Example 1: 7151 T 16900 35800 3 10 1 0 0 0 1 7152 Text string! 7153 7154 A text object with the origin at (16900, 35800), color index 3, 10 7155points in size, visible, attribute flags not valid (not an attribute), 7156origin at lower left, not rotated, string: Text string! 7157 7158 Example 2: 7159 T 16900 35800 3 10 1 0 0 0 5 7160 Text string line 1 7161 Text string line 2 7162 Text string line 3 7163 Text string line 4 7164 Text string line 5 7165 7166 This is a similar text object as the above example, however here 7167there are five lines of text. 7168 7169 Example 3: 7170 T 10000 20000 3 10 1 1 8 90 1 7171 pinlabel=R/\_W\_ 7172 7173 A text object with the origin at (10000, 20000), color index 3, 10 7174points in size, visible, only the value of the attribute is visible, 7175text origin at upper right, the text is rotated by 90 degree, the 7176string: “R/W” has an overbar over the “W”. 7177 7178 7179File: lepton-manual.info, Node: net, Next: bus, Prev: text and attributes, Up: Object types 7180 718112.4.8 net 7182---------- 7183 7184Valid in: Schematic files ONLY 7185 7186type x1 y1 x2 y2 color 7187 7188Pos. Field Type/unit Description 7189 7190--------------------------------------------------------------------------- 7191# type char N 7192 71931 x1 int/mils First X coordinate 7194 71952 y1 int/mils First Y coordinate 7196 71973 x2 int/mils Second X coordinate 7198 71994 y2 int/mils Second Y coordinate 7200 72015 color int Color index 7202 7203 7204 • Nets can only appear in schematic files. 7205 7206 • You cannot have a zero length net (the tools will throw them away). 7207 7208 Example: 7209 N 12700 29400 32900 29400 4 7210 7211 A net segment from (12700, 29400) to (32900, 29400) with color index 72124. 7213 7214 7215File: lepton-manual.info, Node: bus, Next: pin, Prev: net, Up: Object types 7216 721712.4.9 bus 7218---------- 7219 7220Valid in: Schematic files ONLY 7221 7222type x1 y1 x2 y2 color ripperdir 7223 7224Pos. Field Type/unit Description 7225 7226--------------------------------------------------------------------------- 7227# type char U 7228 72291 x1 int/mils First X coordinate 7230 72312 y1 int/mils First Y coordinate 7232 72333 x2 int/mils Second X coordinate 7234 72354 y2 int/mils Second Y coordinate 7236 72375 color int Color index 7238 72396 ripperdir int Direction of bus rippers 7240 7241 7242 • The ripperdir field for an brand new bus is 0. 7243 7244 • The ripperdir field takes on a value of 1 or -1 when a net is 7245 connected to the bus for the first time. This value indicates the 7246 direction of the ripper symbol. The ripper direction is set to the 7247 same value for the entire life of the bus object. 7248 7249 • Buses can only appear in schematic files. 7250 7251 • You cannot have a zero length bus (the tools will throw them away). 7252 7253 Example: 7254 U 27300 37400 27300 35300 3 0 7255 7256 A bus segment from (27300, 37400) to (27300, 35300) with color index 72573 and no nets have been connected to this bus segment. 7258 7259 7260File: lepton-manual.info, Node: pin, Next: component, Prev: bus, Up: Object types 7261 726212.4.10 pin 7263----------- 7264 7265Valid in: Symbol files ONLY 7266 7267type x1 y1 x2 y2 color pintype whichend 7268 7269Pos. Field Type/unit Description 7270 7271--------------------------------------------------------------------------- 7272# type char P 7273 72741 x1 int/mils First X coordinate 7275 72762 y1 int/mils First Y coordinate 7277 72783 x2 int/mils Second X coordinate 7279 72804 y2 int/mils Second Y coordinate 7281 72825 color int Color index 7283 72846 pintype int Type of pin 7285 72867 whichend int Specifies the active end 7287 7288 7289 • The pintype is an enumerated type: 7290 • NORMAL PIN = 0 7291 7292 • BUS PIN = 1 unused 7293 7294 • The whichend specifies which end point of the pin is the active 7295 connection port. Only this end point can have other pins or nets 7296 connected to it. 7297 7298 • To make the first end point active, whichend should be 0, else to 7299 specify the other end, whichend should be 1. 7300 7301 • Pins can only appear in symbol files. 7302 7303 • Zero length pins are allowed 7304 7305 Example: 7306 P 0 200 200 200 1 0 0 7307 7308 A pin from (0, 200) to (200, 200) with color index 1, a regular pin, 7309and the first point being the active connection end. 7310 7311 7312File: lepton-manual.info, Node: component, Next: path, Prev: pin, Up: Object types 7313 731412.4.11 component 7315----------------- 7316 7317Valid in: Schematic files ONLY 7318 7319type x y selectable angle mirror basename 7320 7321Pos. Field Type/unit Description 7322 7323--------------------------------------------------------------------------- 7324# type char C 7325 73261 x int/mils Origin X coordinate 7327 73282 y int/mils Origin Y coordinate 7329 73303 selectable int Selectable flag 7331 73324 angle int/degrees Angle of the component 7333 73345 mirror int Mirror around Y axis 7335 73366 basename string The filename of the 7337 component 7338 7339 7340 • The selectable field is either 1 for selectable or 0 if not 7341 selectable. 7342 7343 • The angle field can only take on the following values: 0, 90, 180, 7344 270. 7345 7346 • The angle field can only be positive. 7347 7348 • The mirror flag is 0 if the component is not mirrored (around the Y 7349 axis). 7350 7351 • The mirror flag is 1 if the component is mirrored (around the Y 7352 axis). 7353 7354 • The just basename is the filename of the component. This filename 7355 is not the full path. 7356 7357 Example: 7358 C 18600 19900 1 0 0 7400-1.sym 7359 7360 A component who’s origin is at (18600,19900), is selectable, not 7361rotated, not mirrored, and the basename of the component is 7362‘7400-1.sym’. 7363 7364 7365File: lepton-manual.info, Node: path, Next: font, Prev: component, Up: Object types 7366 736712.4.12 path 7368------------ 7369 7370Valid in: Schematic and Symbol files 7371 7372 Valid since: Fileformat version 2 (release 1.5.1) 7373 7374type color width capstyle dashstyle dashlength dashspace filltype fillwidth angle1 pitch1 angle2 pitch2 numlines 7375path data line 1 7376path data line 2 7377path data line 3 7378... 7379path data line N 7380 7381Pos. Field Type/unit Description 7382 7383--------------------------------------------------------------------------- 7384# type char H 7385 73861 color int Color index 7387 73882 width int/mils Width of line 7389 73903 capstyle int Line cap style 7391 73924 dashstyle int Type of dash style 7393 73945 dashlength int/mils Length of dash 7395 73966 dashspace int/mils Space inbetween dashes 7397 73987 filltype int Type of fill 7399 74008 fillwidth int/mils Width of the fill lines 7401 74029 angle1 int/degrees First angle of fill 7403 740410 pitch1 int/mils First pitch/spacing of fill 7405 740611 angle2 int/degrees Second angle of fill 7407 740812 pitch2 int/mils Second pitch/spacing of 7409 fill 7410 741113 num_lines int Number of lines of path 7412 data (1 based) 7413 741414 path data path data The path data, on separate 7415 line 1 ... lines 7416 N 7417 7418 • The capstyle is an enumerated type: 7419 • END NONE = 0 7420 7421 • END SQUARE = 1 7422 7423 • END ROUND = 2 7424 7425 • The dashstyle is an enumerated type: 7426 • TYPE SOLID = 0 7427 7428 • TYPE DOTTED = 1 7429 7430 • TYPE DASHED = 2 7431 7432 • TYPE CENTER = 3 7433 7434 • TYPE PHANTOM = 4 7435 7436 • The dashlength parameter is not used for TYPE SOLID and TYPE 7437 DOTTED. This parameter should take on a value of -1 in these cases. 7438 7439 • The dashspace parameter is not used for TYPE SOLID. This parameter 7440 should take on a value of -1 in these case. 7441 7442 • The filltype parameter is an enumerated type: 7443 • FILLING HOLLOW = 0 7444 7445 • FILLING FILL = 1 7446 7447 • FILLING MESH = 2 7448 7449 • FILLING HATCH = 3 7450 7451 • FILLING VOID = 4 unused 7452 7453 • If the filltype is 0 (FILLING HOLLOW), then all the fill parameters 7454 should take on a value of -1. 7455 7456 • The fill type FILLING FILL is a solid color fill. 7457 7458 • The two pairs of pitch and spacing control the fill or hatch if the 7459 fill type is FILLING MESH. 7460 7461 • Only the first pair of pitch and spacing are used if the fill type 7462 is FILLING HATCH. 7463 7464 • The format of path data is deliberately similar to that of paths in 7465 the W3C SVG standard (http://www.w3.org/TR/SVG/paths.html). 7466 7467 • The subset of the SVG path syntax emitted by gEDA is documented 7468 below in section *note Path data::. 7469 7470 • As an implementation detail; libgeda takes code from librsvg, an 7471 SVG parsing library. As a result, the majority of SVG path syntax 7472 is read correctly, however this is always normalised to absolute 7473 move, line, Bézier curve and close-path commands internally (and is 7474 saved as such). 7475 7476 • Coordinates along the path are specified in the standard gschem 7477 coordinate space. 7478 7479 Example: 7480 H 3 10 0 0 -1 -1 0 -1 -1 -1 -1 -1 5 7481 M 410,240 7482 L 501,200 7483 L 455,295 7484 L 435,265 7485 z 7486 7487 A path starting at (410,240) with lines drawn from there, and joining 7488points (501,200), (455,295), (435,265), closing back to its origin. It 7489has color index 3, is 10 mils thick, no cap, solid style. There are 5 7490lines of path data. 7491 7492