diff --git a/doc/xschem_man/creating_symbols.html b/doc/xschem_man/creating_symbols.html index 073670f7..b77bf05b 100644 --- a/doc/xschem_man/creating_symbols.html +++ b/doc/xschem_man/creating_symbols.html @@ -20,9 +20,74 @@ p{padding: 15px 30px 10px;}

CREATING SYMBOLS


-

creating a new symbol and schematic by cloning

+

Creating a subcircuit symbol

- A useful approach to create a new component (both symbol and schematic view) is to 'clone' it + Suppose you have just finished creating a circuit and you now want to create a + symbol for it so you can use this circuit as a sub block in other schematics: +

+ +

+ Above schematic contains VPP, PLUS, MINUS, + VSS, VNN input pins and OUT output pin.
+ If you press the a key xschem will generate a symbol automatically. +

+ +

+ If your schematic is called mos_power_amplifier.sch the symbol will be saved + in the same place as the schematic and named mos_power_amplifier.sym.
+ If you open a new empty schematic and use the Insert or Shift-I key + to insert a symbol and select the mos_power_amplifier.sym you get this: +

+ +

+ If you select the symbol instance and press q you see the instance name + attribute; the name attribute specifies an unique name in current schematic. There can not be two + x2 instances in a schematic. If you copy the placed instance to get two of them the new + one will be automatically renamed (to x3 or x1, or any available unique name). +

+ +

+ If you descend into the symbol and press q you see the following attributes: +

+ +
+type=subcircuit
+format="@name @pinlist @symname"
+template="name=x1"
+ 
+

+ These attributes are using by xschem to generate the subcircuit netlist line. the format + attribute tells xschem that a line containing the instance name (@name, replaced by + x2), the list of attached nets + (@pinlist, replaced by the nets attached to the symbol i/o ports in the + order they are declared in the subcircuit) + and the symbol name (@symname, replaced by mos_power_amplifier).
+ The type attribute tells xschem that the symbol is a subcircuit (not a terminal symbol) + and netlister should further descend into the corresponding schematic to complete the netlist.
+ The template attribute defines default values for attributes when the symbol is + placed in a schematic. For example if you place an instance of this symbol in an empty schematic + the instance name attribute will be set to x1. If there is already an + x1 instance xschem will automatically rename the instance to a unique name. +

+ You can manually edit the symbol to change its shape or change the pin ordering.
+ If you change the pin positions always move the pin (the red square) and the label together. +

+ +

+ If you select one pin (the small red square box) and press 'q' you see the pin attributes:
+ name specifies the pin name.
+ dir specifies the pin direction (in, out, inout).
+ It is good practice to verify that the pin name attribute matches the name of the text label next to it. +

+

+ If you edit the text label next to a pin the pin name attribute will be changed automatically. +

+ +
+ +

Creating a new symbol and schematic by cloning

+

+ Another useful approach to create a new component (both symbol and schematic view) is to 'clone' it from a similar existing component: after copying a component to a different place in the schematic, press the edit property bindkey (q key) and set a new name for the symbol, set also the copy cell checkbox: diff --git a/doc/xschem_man/creating_symbols01.png b/doc/xschem_man/creating_symbols01.png new file mode 100644 index 00000000..4bb35c16 Binary files /dev/null and b/doc/xschem_man/creating_symbols01.png differ diff --git a/doc/xschem_man/creating_symbols02.png b/doc/xschem_man/creating_symbols02.png new file mode 100644 index 00000000..94cbd612 Binary files /dev/null and b/doc/xschem_man/creating_symbols02.png differ diff --git a/doc/xschem_man/creating_symbols03.png b/doc/xschem_man/creating_symbols03.png new file mode 100644 index 00000000..77b2430e Binary files /dev/null and b/doc/xschem_man/creating_symbols03.png differ diff --git a/doc/xschem_man/creating_symbols04.png b/doc/xschem_man/creating_symbols04.png new file mode 100644 index 00000000..d9a0adec Binary files /dev/null and b/doc/xschem_man/creating_symbols04.png differ diff --git a/doc/xschem_man/creating_symbols05.png b/doc/xschem_man/creating_symbols05.png new file mode 100644 index 00000000..e7315e78 Binary files /dev/null and b/doc/xschem_man/creating_symbols05.png differ diff --git a/doc/xschem_man/creating_symbols06.png b/doc/xschem_man/creating_symbols06.png new file mode 100644 index 00000000..fe393c97 Binary files /dev/null and b/doc/xschem_man/creating_symbols06.png differ diff --git a/doc/xschem_man/creating_symbols07.png b/doc/xschem_man/creating_symbols07.png new file mode 100644 index 00000000..61356962 Binary files /dev/null and b/doc/xschem_man/creating_symbols07.png differ