diff --git a/doc/xschem_man/developer_info.html b/doc/xschem_man/developer_info.html index 10d1e9c6..51884201 100644 --- a/doc/xschem_man/developer_info.html +++ b/doc/xschem_man/developer_info.html @@ -1861,21 +1861,20 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
  • Instantiate a component and wire it up with specific nets on its terminals.


  • - - + + - - + + - - -
    +
    # Create a 5V Vvdd voltage source
     xschem instance vsource.sym 100 100 0 0 {name=Vvdd value=5}
    -
    +
    # Attach labels, They will get the symbol pin labels
     xschem select instance vvdd
     xschem attach_labels
    -
    -
    +
    # Select labels, unselect vsource and change positive and negative terminal
     # labels to VCC and GND respectively
     # The first item in the selected_set list is the first vsource terminal
    @@ -1886,61 +1885,65 @@ xschem select instance Vvdd clear
     xschem setprop instance [lindex [xschem selected_set] 0] lab VCC
     xschem setprop instance [lindex [xschem selected_set] 1] lab GND
     xschem unselect_all
    -
    -
    + + +
  • Disable a component in the schematic


  • - - -
    +
    # Add spice_ignore=true attribute
     # the component will be ignored in generated netlists.
     xschem setprop instance Vvdd spice_ignore true
    -     
    + + + +
  • Delete a component together with its attached nets


  • - - + + + - - -
    +
    # select component, select attached nets and delete
     # this will also select wire segments if labels are attached to selected instance with wires.
     xschem select instance Vvdd
     xschem connected_nets
    -     
    +
    # Delete selection
     xschem delete
    -     
    + + + +
  • Delete dangling nets and labels


  • - - -
    +
    # If after some editing or deletions dangling nets are present
     # they can all be selected. Deletion may be done with a "xschem delete" command.
     xschem select_dangling_nets
    -     
    + + + +
  • Change attributes of a group of components


  • - - + + + - - -
    +
    # From this situation we want to select all MOS elements with L=2
     # and modify L (gate length) to 3
    -     
    +
    # Do an exact search of elements with L=2
     xschem search exact 1 L 2
     # a more precise search to avoid selecting unwanted elements might be:
    @@ -1949,20 +1952,22 @@ xschem search exact 1 L 2
     # instance property string (the special token propstring)
     foreach i [xschem selected_set] { xschem setprop instance $i L 3}
     xschem unselect_all
    -     
    + + + +
  • Copy a components with its wired terminals


  • - - + + + - - -
    +
    # From this situation we want to copy Vvdd to a different location
     # and change the instance name, voltage value  and its positive terminal net name
    -     
    +
    # select the desired instance
     xschem select instance Vvdd
     # select attached wires
    @@ -1976,23 +1981,24 @@ xschem setprop instance [lindex [xschem selected_set] 0] name Vvpp
     xschem setprop instance [lindex [xschem selected_set] 0] value 12
     # Following item is the net label attached to the first symbol pin
     xschem setprop instance [lindex [xschem selected_set] 1] lab VPP 
    -
    -     
    + + + +
  • Transform a component into a short


  • - - + + + - - -
    +
    # We want to transform this voltage source into a short, passing the 
     # negative label onto the positive terminal.
     # Warning: no net label must be present on the positive net, otherwise you end up with 
     # an ERC error (multiple differnet labels on the same net)
    -     
    +
    # add spice_ignore=short attribute to instance
     # All pins of the instance will be shorted together to the same net.
     # Instance will be shown in red to indicate the short condition.
    @@ -2001,122 +2007,137 @@ xschem setprop instance [lindex [xschem selected_set] 1] lab VPP
     # you see the left resistor terminal is GND now.
     
     xschem setprop instance Vvdd spice_ignore short
    -
    -     
    + + + +
  • Move a selected portion of the schematic


  • - - + + + - - -
    +
    # After selecting some objects...
    -     
    +
    # ... We move them by some X / Y quantities.
     xschem move_objects 100 0
    -     
    + + + +
  • Rotate a selected portion of the schematic


  • - - + + + - - -
    +
    # After selecting some objects ...
    -     
    +
    # ... We rotate them clockwise around point 1100,-800 (shown with the red cross)
     xschem rotate 1100 -800
    -     
    + + + +
  • Flip a selected portion of the schematic


  • - - -
    +
    # After selecting some objects as before ...
     # ... We flip them horizontally around point 1100,-800 (shown with the red cross)
     xschem flip 1100 -800
    -     
    + + + +
  • Rotate in place a selected portion of the schematic


  • - - + + + - - -
    +
    # After selecting some objects ...
    -     
    +
    # ... We rotate clockwise each object around their origins
     # the same command 'flip_in_place' is available for flipping horizontally.
     xschem rotate_in_place
    -     
    + + + +
  • Move a wired object


  • - - + + + - - + + + - - + + + -
    +
    # After selecting some objects ...
    -     
    +
    # ... we select only the first segments attached to their pins ...
     xschem connected_nets 2
    -     
    +
    # ... And then move the selection.
     xschem move_objects 100 0
    -     
    +
  • Add and wire parallel devices


  • - - + + + - - -
    +
    # Given this instance ...
    -     
    +
    # ... The following commands will copy-paste the object and move it 
    -# using the "connect by kissing" feature: when separating connected instances a wire is added.
    +# using the "connect by kissing" feature: when separating connected
    +#  instances a wire is added.
     xschem select instance Q1
     xschem copy
     xschem paste 0 0
     xschem move_objects 120 0 kissing
     xschem unselect_all
    -     
    + + + +
  • Replace symbols


  • - - + + + - - -
    +
    # In the following schematic we want to replace the nfet3/pfet3 with nfet and pfet
     # that have the bulk connection pin.
    -     
    +
    -xschem search regex 1 model {fet_01v8} ;# select all instances that match "fet_01v8" model name
    +# select all instances that match "fet_01v8" model name
    +xschem search regex 1 model {fet_01v8}
     set f {}
     foreach i [xschem selected_set] {
       # Replace fet3 with fet in symbol reference
    @@ -2124,13 +2145,15 @@ foreach i [xschem selected_set] {
       xschem replace_symbol $i $newname $f
       # remove body attribute since it is now assigned to the bulk pin
       xschem setprop instance $i body fast
    -  set f fast ;# the f parameter is for optimzing (avoid pushing undo at each iteration)
    +  # the f parameter is for optimzing (avoid pushing undo at each iteration)
    +  set f fast
     }
     xschem unselect_all
     xschem redraw
    -     
    + + + +