Uri Shaked
02/20/2025, 12:42 AMTim Edwards
02/20/2025, 1:21 AMgoto A
box
If you want to pass back the coordinates to do something with in another command, then
set rect [box values]
This will give you the coordinates of the box shape to which the label is attached. If you want a point, then you will have to compute the center or use the lower left corner. Values will be in internal coordinates; you can convert from internal units to microns using magic::i2u <value>
.Uri Shaked
02/20/2025, 1:22 AMUri Shaked
02/20/2025, 1:23 AMclk
port together by drawing a metal2 wire via a scriptUri Shaked
02/20/2025, 1:23 AMclk
ports that are inside the subcellsTim Edwards
02/20/2025, 1:26 AMgoto instance_0/clk
, then, where instance_0
is the instance name, and do the same thing, then goto instance_1/clk
, repeat.Uri Shaked
02/20/2025, 1:30 AMcorner
command that helps me do L shapes when routing. Are there any other commands that are similarly useful when I lay down wires through a scripts?Uri Shaked
02/20/2025, 1:43 AMproc port_coords {name} {
goto $name
set coords [box values]
return [list [magic::i2u [lindex $coords 0]] [magic::i2u [lindex $coords 1]] [magic::i2u [lindex $coords 2]] [magic::i2u [lindex $coords 3]]]
}
# Route clk net
goto x2/clk
box grow left 1u
paint metal1
goto x3/clk
box grow left 1u
paint metal1
set start_point [port_coords x2/clk]
set end_point [port_coords x3/clk]
box [lindex $start_point 0]u [lindex $start_point 3]u [lindex $end_point 2]u [lindex $end_point 1]u
box move left 1u
paint metal1
Uri Shaked
02/20/2025, 1:43 AMUri Shaked
02/20/2025, 1:44 AMUri Shaked
02/20/2025, 1:44 AMUri Shaked
02/20/2025, 1:44 AMTim Edwards
02/20/2025, 2:37 AMwire segment <layer> <width> <x1> <y1> <x2> <y2> [-noendcap]
Tim Edwards
02/20/2025, 2:39 AMwire
, so it can be scripted as well as done interactively, although I have not tried that approach before.Tim Edwards
02/20/2025, 2:39 AMpolygon <layer> <x1> <y1> <x2> <y2> ...
Tim Edwards
02/20/2025, 2:49 AMlogcommands
meaning that I am missing command options to make the interactive wiring able to be logged, which would require the ability to express the statement with a cursor position, like wire horizonal at 500 0
. But that doesn't exist and won't until I code it up.)