From 9522e0e9ddb5ff03053bd262d1a433cadd1d2e3f Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Fri, 29 May 2020 11:23:39 -0400 Subject: [PATCH] Added CDL to the types of file extensions checked by the readspice script. --- tcltk/readspice.tcl | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tcltk/readspice.tcl b/tcltk/readspice.tcl index 923bc69a..0ba6ab79 100644 --- a/tcltk/readspice.tcl +++ b/tcltk/readspice.tcl @@ -14,10 +14,16 @@ global Opts proc readspice {netfile} { + if {[file ext $netfile] == ".cdl"} { + is_cdl = true + } else { + is_cdl = false + } + if [catch {open $netfile r} fnet] { set netname [file rootname $netfile] - # Check for standard extensions (.spi, .spc, .spice, .sp, .ckt) + # Check for standard extensions (.spi, .spc, .spice, .sp, .ckt, .cdl) set testnetfile ${netname}.spi if [catch {open ${testnetfile} r} fnet] { @@ -29,8 +35,13 @@ proc readspice {netfile} { if [catch {open ${testnetfile} r} fnet] { set testnetfile ${netname}.ckt if [catch {open ${testnetfile} r} fnet] { - puts stderr "Error: Can't read netlist file $netfile" - return 1; + set testnetfile ${netname}.cdl + if [catch {open ${testnetfile} r} fnet] { + puts stderr "Error: Can't read netlist file $netfile" + return 1; + } else { + is_cdl = true + } } } }