[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: gnet-spice-sdb.scm
User: sdb
Date: 05/06/12 15:35:41
Modified: . gnet-spice-sdb.scm
Log:
Changed order of writing out netlist and .model/.subckt cards to
facilitate use of numparam with ngspice.
Revision Changes Path
1.14 +23 -17 eda/geda/devel/gnetlist/scheme/gnet-spice-sdb.scm
(In the diff below, changes in quantity of whitespace are not shown.)
Index: gnet-spice-sdb.scm
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gnetlist/scheme/gnet-spice-sdb.scm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- gnet-spice-sdb.scm 17 May 2005 19:44:21 -0000 1.13
+++ gnet-spice-sdb.scm 12 Jun 2005 19:35:41 -0000 1.14
@@ -1,4 +1,4 @@
-;;; $Id: gnet-spice-sdb.scm,v 1.13 2005/05/17 19:44:21 sdb Exp $
+;;; $Id: gnet-spice-sdb.scm,v 1.14 2005/06/12 19:35:41 sdb Exp $
;;;
;;; gEDA - GNU Electronic Design Automation
;;; gnetlist - GNU Netlist
@@ -72,7 +72,9 @@
;; spits out the string instead of putting the contents of the file
;; into the SPICE netlist. You can force insertion of the file using
;; the -e flag.
-;;
+;; 6.12.2005 -- Changed order of writing out netlist and .model/.subckt cards to
+;; facilitate use of numparam with ngspice. Change supplied by
+;; Dominique Michel.
;;**********************************************************************************
;;
;; Organization of gnet-spice-sdb.scm file:
@@ -1252,7 +1254,7 @@
;;----------------------------------------------------------
;; Include a file using an .INCLUDE directive
-;; Changed on 5.16.2005: to embedd the contents of the file,
+;; Changed on 6.12.2005: to embedd the contents of the file,
;; you must call gnetlist with the -e flag set.
;;----------------------------------------------------------
(define spice-sdb:write-include
@@ -1609,7 +1611,7 @@
(lambda (port)
(display "*********************************************************\n" port)
(display "* Spice file generated by gnetlist *\n" port)
- (display "* spice-sdb version 5.16.2005 by SDB -- *\n" port)
+ (display "* spice-sdb version 6.12.2005 by SDB -- *\n" port)
(display "* provides advanced spice netlisting capability. *\n" port)
(display "* Documentation at http://www.brorson.com/gEDA/SPICE/ *\n" port)
(display "*********************************************************\n" port)
@@ -1623,7 +1625,7 @@
(lambda (port)
(display "*******************************\n" port)
(display "* Begin .SUBCKT model *\n" port)
- (display "* spice-sdb ver 5.16.2005 *\n" port)
+ (display "* spice-sdb ver 6.12.2005 *\n" port)
(display "*******************************\n" port)
)
)
@@ -1678,7 +1680,7 @@
(model-name (spice-sdb:get-subcircuit-modelname schematic-type))
(file-info-list (list))
)
- (display "Using SPICE backend by SDB -- Version of 5.16.2005\n")
+ (display "Using SPICE backend by SDB -- Version of 6.12.2005\n")
(display (string-append "schematic-type = " schematic-type "\n"))
;; (display (string-append "model-name = " model-name "\n"))
@@ -1727,11 +1729,26 @@
;;
+;; Moved this loop before the next one to get numparam to work with ngspice,
+;; because numparam will at the subckt definition come before the main netlist.
+;; Change suggested by Dominique Michel; implemented in code on 6.12.2005.
+;;
+;; Next loop through all items in file-info-list in the SPICE netlist.
+;; For each model-name, open up the corresponding file, and call handle-spice-file
+;; to stick the corresponding stuff into the output SPICE file.
+;;
+ (debug-spew "Now process the items in model file list -- stick appropriate references to models in output SPICE file.\n")
+ (spice-sdb:loop-through-files file-info-list port)
+ (debug-spew "Done processing items in model file list.\n")
+
+
+;;
;; Now write out netlist as before. But don't write file contents out.
;; **** Modified by kh to sort list of packages so Spice directives, etc. (A?) are output last,
;; **** and in increasing order.
;;
(debug-spew "Make second pass through design and write out a SPICE card for each component found.\n")
+ (display (string-append "*============== Begin SPICE netlist of main design ============\n") port)
(if (spice-sdb:sort-refdes? (gnetlist:get-calling-flags))
(spice-sdb:write-netlist port file-info-list (sort packages spice-sdb:packsort)) ;; sort on refdes
(spice-sdb:write-netlist port file-info-list packages) ;; don't sort.
@@ -1740,17 +1757,6 @@
;;
-;; Next loop through all items in file-info-list in the SPICE netlist.
-;; For each model-name, open up the corresponding file, and call handle-spice-file
-;; to stick the corresponding stuff into the output SPICE file.
-;;
- (debug-spew "Now process the items in model file list -- stick appropriate references to models in output SPICE file.\n")
- (spice-sdb:loop-through-files file-info-list port)
- (debug-spew "Done processing items in model file list.\n")
-
-
-
-;;
;; Now write out .END(S) of netlist, depending upon whether this schematic is a
;; "normal schematic" or a .SUBCKT.
;;