Merge branch 'RTimothyEdwards:master' into master
This commit is contained in:
commit
998b931a2a
|
|
@ -1054,11 +1054,24 @@ ResExtractNet(node, resisdata, cellname)
|
|||
|
||||
/* Copy Paint */
|
||||
|
||||
scx.scx_area.r_ll.p_x = node->location.p_x - 2;
|
||||
scx.scx_area.r_ll.p_y = node->location.p_y - 2;
|
||||
scx.scx_area.r_ur.p_x = node->location.p_x + 2;
|
||||
scx.scx_area.r_ur.p_y = node->location.p_y + 2;
|
||||
startpoint = node->location;
|
||||
/* If the node location is INFINITY, then use the rs_bbox */
|
||||
|
||||
if ((node->location.p_x == INFINITY) || (node->location.p_y == INFINITY))
|
||||
{
|
||||
scx.scx_area.r_ll.p_x = node->rs_bbox.r_xbot;
|
||||
scx.scx_area.r_ll.p_y = node->rs_bbox.r_ybot;
|
||||
scx.scx_area.r_ur.p_x = node->rs_bbox.r_xtop;
|
||||
scx.scx_area.r_ur.p_y = node->rs_bbox.r_ytop;
|
||||
startpoint = node->drivepoint;
|
||||
}
|
||||
else
|
||||
{
|
||||
scx.scx_area.r_ll.p_x = node->location.p_x - 2;
|
||||
scx.scx_area.r_ll.p_y = node->location.p_y - 2;
|
||||
scx.scx_area.r_ur.p_x = node->location.p_x + 2;
|
||||
scx.scx_area.r_ur.p_y = node->location.p_y + 2;
|
||||
startpoint = node->location;
|
||||
}
|
||||
|
||||
/* Because node->type might come from a label with a sticky type
|
||||
* that does not correspond exactly to the layer underneath, include
|
||||
|
|
|
|||
|
|
@ -525,11 +525,31 @@ proc magic::netlist_to_layout {netfile library} {
|
|||
# Pre-generate placeholders for all subcircuits.
|
||||
set curtop [cellname list self]
|
||||
|
||||
array set existing_cells {}
|
||||
foreach subckt $allsubs {
|
||||
# Diagnostic output
|
||||
puts stdout "Pre-generating subcircuit $subckt placeholder"
|
||||
load $subckt -silent
|
||||
if {$subckt == $curtop || $subckt == $topname} {
|
||||
set existing_cells($subckt) "false"
|
||||
load $subckt -silent
|
||||
continue
|
||||
}
|
||||
|
||||
if {[catch {load $subckt -fail -silent}] == 0} {
|
||||
puts stdout "Subcircuit $subckt successfully loaded."
|
||||
set existing_cells($subckt) "true"
|
||||
|
||||
# Make sure to load all cells into memory to avoid
|
||||
# corruption when saving all files (files get loaded
|
||||
# without taking the scale into account)
|
||||
select top cell
|
||||
expand
|
||||
} else {
|
||||
puts stdout "Subcircuit $subckt not found. Will generate."
|
||||
set existing_cells($subckt) "false"
|
||||
# Now we load it normally to create the placeholder for the generator
|
||||
load $subckt -silent
|
||||
}
|
||||
}
|
||||
|
||||
load $curtop
|
||||
|
||||
# Parse the file and process all lines
|
||||
|
|
@ -561,7 +581,14 @@ proc magic::netlist_to_layout {netfile library} {
|
|||
} else {
|
||||
if {[regexp -nocase {^[ \t]*\.ends} $line]} {
|
||||
set insub false
|
||||
magic::generate_layout_add $subname $subpins $complist $library
|
||||
|
||||
if {[info exists existing_cells($subname)] && $existing_cells($subname) == "false"} {
|
||||
puts stdout "Cell $subname is empty. Generating initial layout..."
|
||||
magic::generate_layout_add $subname $subpins $complist $library
|
||||
} else {
|
||||
puts stdout "Cell $subname already contains layout. Skipping generation."
|
||||
}
|
||||
|
||||
set subname ""
|
||||
set subpins ""
|
||||
set complist {}
|
||||
|
|
|
|||
|
|
@ -706,7 +706,7 @@ proc magic::cursorview {win} {
|
|||
*bypass logcommands resume
|
||||
}
|
||||
|
||||
proc magic::toolupdate {win {yesno "yes"} {layerlist "none"}} {
|
||||
proc magic::toolupdate {win {yesno "yes"} {layerlist ""}} {
|
||||
global Winopts
|
||||
|
||||
if {[magic::display] == "NULL"} {return}
|
||||
|
|
@ -728,7 +728,9 @@ proc magic::toolupdate {win {yesno "yes"} {layerlist "none"}} {
|
|||
# Don't do anything if toolbar is not present
|
||||
if { $Winopts(${topname},toolbar) == 0 } { return }
|
||||
|
||||
if {$layerlist == "none"} {
|
||||
# To ensure backwards compatibility, we check if the
|
||||
# layer is called none, so avoid naming a layer none.
|
||||
if {$layerlist == "" || $layerlist == "none"} {
|
||||
set layerlist $yesno
|
||||
set yesno "yes"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue