User Tools

Site Tools


geda:gnetlist_ug:config

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revision Both sides next revision
geda:gnetlist_ug:config [2012/11/17 12:19]
peter-b created
geda:gnetlist_ug:config [2012/11/17 12:48]
peter-b
Line 2: Line 2:
  
 ===== Configuring gnetlist ===== ===== Configuring gnetlist =====
 +
 +gnetlist loads a series of configuration files at start-up, if they exist:
 +
 +  - The suite'​s system configuration file, called ''​$PREFIX/​share/​gEDA/​system-gafrc''​
 +  - The suite'​s user configuration file, called ''​$HOME/​.gEDA/​gafrc''​
 +  - A ''​gafrc''​ file in the current working directory.
 +  - gnetlist'​s system configuration file, called ''​$PREFIX/​share/​gEDA/​system-gnetlistrc''​
 +  - gnetlist'​s user configuration file, called ''​$HOME/​.gEDA/​gnetlistrc''​
 +  - A ''​gnetlistrc''​ file in the current working directory.
 +
 +$PREFIX denotes the base installation directory for gnetlist (''/​usr''​ on most systems), and $HOME denotes your home directory.
 +
 +These files are scripts written in Scheme, and they are executed using a Scheme interpreter. This means that you can use the configuration files as a way of customising and extending gnetlist.
 +
 +There are a very large number of options that affect the way gnetlist works, and only the most commonly-used are listed here. For a full list, see the ''​system-gnetlistrc''​ file installed with gEDA.
 +
 +==== Symbol and source libraries ====
 +
 +When using gnetlist, it is very important that your symbol and source libraries are set up correctly. ​ You will almost always want to put these settings in a suite configuration file (one of the "''​gafrc''"​ files) so that the same libraries are used by gschem and gnetlist. ​ For an explanation of how to set up symbol and source libraries, see the [[geda:​gschem_ug:​config|gEDA gschem User Guide]].
 +
 +==== Hierarchical name "​mangling"​ ====
 +
 +When working with [[hierarchy]],​ gnetlist renames nets and components based on where in the hierarchy they occur. ​ You can configure how this "​mangling"​ is carried out, and disable it if necessary.
 +
 +By default, gnetlist appends names at each level of hierarchy together, using "/"​ as the separator (so the component "​U1"​ in the subcircuit "​A3"​ becomes "​A3/​U1"​). ​ For component names ("​refdes"​),​ the ''​hierarchy-uref-order''​ and ''​hierarchy-uref-separator''​ functions can be used to change this.  For example, to change the "​refdes"​ mangling to prepend names at each level with the separator ":",​ you could use:
 +
 +<​code>​(hierarchy-uref-order "​prepend"​)
 +(hierarchy-uref-separator ":"​)</​code>​
 +
 +Now "​U1"​ in the subcircuit "​A3"​ would be renamed to "​U1:​A3"​ by gnetlist.
 +
 +The ''​hierarchy-uref-mangle''​ function can be used to turn off "​refdes"​ mangling entirely:
 +
 +<​code>​(hierarchy-uref-mangle "​disabled"​)</​code>​
 +
 +This is very rarely a useful thing to do.
 +
 +Similar settings exist for net names set using the "''​netname=''"​ attribute, and net names set using [[implicit pins]] and the "''​net=''"​ attribute.  ​
 +
 +  * The ''​hierarchy-netname-order'',​ ''​hierarchy-netname-separator''​ and ''​hierarchy-netname-mangle''​ functions control "''​netname=''"​ mangling.
 +  * The ''​hierarchy-netattrib-order'',​ ''​hierarchy-netattrib-separator''​ and ''​hierarchy-netattrib-mangle''​ functions control "''​net=''"​ mangling.
 +
 +==== Automatic net naming ====
 +
 +You can control how gnetlist automatically names nets that are not named in the schematic files using the ''​unnamed-netname''​ function. ​ gnetlist will add a unique number to the end of the string you provide. ​ For example:
 +
 +<​code>​(unnamed-netname "​unnamed_net"​)</​code>​
 +
 +This would make gnetlist automatically give unnamed nets names of the form "​unnamed_net12345"​.
geda/gnetlist_ug/config.txt ยท Last modified: 2012/11/17 13:31 by peter-b