wire
Mouse buttons in conjunction with the wire tool implement various wire commands (see the tool command reference).
wire option
where option may be one of the following:
- help
- Print help information
- horizontal [to x y]
- Add a new horizontal wire leg. If coordinates are specified, the wire is drawn between the current last position and the indicated coordinate ("y" value ignored). If a coordinate is not specified, the wire is drawn from the current last position to the "x" position of the cursor.
- leg [to x y]
- Add a new horizontal or vertical leg. This behaves like wire horizontal or wire vertical, but chooses the orientation depending on which orientation ends closer to the cursor position or to the indicated coordinate.
- switch [layer width]
- Place contact and switch layers
- type [layer width]
- Select the type and size of wires. If the layer and width are not given, the the layer and width are chosen from the material that is found under the location of the cursor, with the width determined by the largest square that will fit completely inside the material at that point.
- type at x y]
- Select the type and size of wire, determining the wire type and size from the material found at the given coordinate.
- vertical [to x y]
- Add a new vertical wire leg. If coordinates are specified, the wire is drawn between the current last position and the indicated coordinate ("x" value ignored). If a coordinate is not specified, the wire is drawn from the current last position to the "y" position of the cursor.
- segment layer width x1 y1 x2 y2... [-noendcap]
- Paint one or more wire segments
- segment layer width filename [-noendcap]
- Paint one or more wire segments taken from the text file filename containing two coordinates X and Y per line, one line per path point.
- show
- Determine where the next wire leg will be according to the rules for wire leg, but place the result in the selection buffer rather than directly on the layout.
- increment layer
- Change the layer type used for wires to the wire type on the plane above the plane of the current wire type.
- decrement layer
- Change the layer type used for wires to the wire type on the plane below the plane of the current wire type.
- increment width
- Increment the width of the current wire by 1 internal unit.
- decrement width
- Decrement the width of the current wire by 1 internal unit.
The wire command allows quick generation of wires on the layout. Some of these commands are bound to mouse button events in the wire tool, making a convenient interface for fast wiring where full netlist routing is not required. Due to the presence of the wire tool, most of these commands are not typically called from the command line.The wire segment command can generate non-Manhattan segments. All other wiring commands generate only Manhattan routes. This command places wire segments in relation to the centerline coordinates specified by x1 y1, x2 y2, and so forth. By default, wires are drawn with an endcap extension of one-half the wire width. The -noendcap option causes the wire to end at the coordinate, with no extension. The wire segment command is intended to be used from Tcl scripts for automatic layout generation.
The first format for wire segment has coordinates specified on the command line. For wire segments with too many points, this command may overrun the internal limit on either number of command-line arguments or the total number of characters in the command line. To work around these limits, the second format of the command specifies a filename in place of the coordinate list. The file is a simple text file, with one line per coordinate pair. X and Y values must be separated by whitespace. The syntax for each value is the same as for the command; e.g., one can use integers which will be interpreted relative to the current snap setting, or one can specify the units, such as "100um".
When generating path points from a script, the most convenient method is to create an empty list ("{}"), then use "lappend" to add coordinates to the list. Once the list is complete, it is necessary to use "eval" to decompose the list.
Incorrect: wire segment m1 50 $pointlist
Correct: eval "wire segment m1 50 $pointlist"
wire is implemented as a built-in command in magic.
polygon
Return to command index |
Last updated: March 7, 2020 at 1:06pm