From 788c73b8675c76959bd0eb12c6c3ff8326a16c4c Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Mon, 8 Jun 2026 15:10:14 -0400 Subject: [PATCH] Added some support for the open PDKs in the technology manager GUI. This uses environment variable PDK_ROOT to search for available technologies, and loads them by sourcing the .magicrc file instead of using "tech load". However, there are currently some caveats: (1) The device generators do not immediately appear in the window menu; a new window must be created for the extra menu buttons to be added; (2) Once a PDK sets up the menus, they cannot be revised. Switching to another technology causes the extra menu items to not appear at all. Both issues need to be addressed. --- VERSION | 2 +- tcltk/wrapper.tcl | 22 ++++++++++++++++++++++ utils/main.c | 4 ++-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index cafb4a15..f8794c2c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.660 +8.3.661 diff --git a/tcltk/wrapper.tcl b/tcltk/wrapper.tcl index 7ee3ec98..f1ea6cec 100644 --- a/tcltk/wrapper.tcl +++ b/tcltk/wrapper.tcl @@ -481,6 +481,28 @@ proc magic::techmanager {{option "update"}} { "magic::tech load $j ; \ magic::techmanager update" } + + # Open PDK support: If environment variable $PDK_ROOT exists + # then search in that directory using the standard open PDK + # path /libs.tech/magic/.tech. NOTE: + # This can be done by sourcing the .magicrc file instead of + # loading the .tech file, but the window menus will not be + # updated until the next window is opened. + + set dirtop {} + if {[catch {set dirtop $PDK_ROOT}]} { + catch {set dirtop $::env(PDK_ROOT)} + } + if {$dirtop != {}} { + set tlist [glob -nocomplain ${dirtop}/*] + foreach i [join $tlist] { + set j [file tail ${i}] + set rcfile ${i}/libs.tech/magic/${j}.magicrc + .techmgr.title.tname.menu add command -label ${j} -command \ + "source ${rcfile} ; \ + magic::techmanager update" + } + } } set techlambda [magic::tech lambda] diff --git a/utils/main.c b/utils/main.c index 3fabc6ca..f02e3bd1 100644 --- a/utils/main.c +++ b/utils/main.c @@ -563,6 +563,7 @@ mainInitAfterArgs() SectionID sec_cifinput, sec_cifoutput; SectionID sec_drc, sec_extract, sec_wiring, sec_router; SectionID sec_plow, sec_plot, sec_mzrouter; + char *syspath; DBTypeInit(); MacroInit(); @@ -577,9 +578,8 @@ mainInitAfterArgs() #endif /* - * Setup path names for system directory searches + * Set up path names for system directory searches */ - StrDup(&SysLibPath, MAGIC_SYS_PATH); /*