From 56be41932f46aec6585df13d7b03f5f106183898 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Thu, 11 Mar 2021 12:27:14 -0500 Subject: [PATCH] Restored the toolkit behavior of spreading out cells that are read in from a SPICE netlist in a row instead of placing them on top of each other. --- tcltk/toolkit.tcl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tcltk/toolkit.tcl b/tcltk/toolkit.tcl index 89758b22..47feb865 100644 --- a/tcltk/toolkit.tcl +++ b/tcltk/toolkit.tcl @@ -274,9 +274,11 @@ proc magic::generate_layout_add {subname subpins complist library} { lappend outparts [lindex $param 1] } - if {[catch {[eval [join $outparts]]}]} { + if {[catch {eval [join $outparts]}]} { + # Assume this is not a gencell, and get an instance. magic::get_and_move_inst $devtype $instname $mult } else { + # Move forward for next gencell magic::move_forward_by_width $instname } } @@ -462,6 +464,11 @@ proc magic::gencell {gencell_name {instname {}} args} { set gencell_type $gencell_name } + # Check that the device exists as a gencell, or else return an error + if {[namespace eval ::${library} info commands ${gencell_type}_convert] == ""} { + error "No import routine for ${library} library cell ${gencell_type}!" + } + if {$instname == {}} { # Case: Interactive, new device with parameters in args (if any) if {$spicemode == 1} { @@ -515,6 +522,7 @@ proc magic::gencell {gencell_name {instname {}} args} { } } } + return 0 } #-------------------------------------------------------------