[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.7.0-20110116-120-gb6bc950)



The branch, master has been updated
       via  b6bc950edee6e2e3baa7906f75ebb29c08dac2c8 (commit)
       via  1295421746393d17405b3c4bf37b96caac5f44d0 (commit)
      from  09c6613f93b65d3f9193e7dbc65bd696cf8a6b06 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gnetlist/scheme/gnet-spice-sdb.scm |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)


=================
 Commit Messages
=================

commit b6bc950edee6e2e3baa7906f75ebb29c08dac2c8
Author: Clif Cox <clif@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gnetlist: flexable netlisting for NGspice Code Models
    
    Closes-bug: lp-702752
    Reviewed-by: Peter TB Brett <peter@xxxxxxxxxxxxx>

:100644 100644 d89f7a1... 6d0453a... M	gnetlist/scheme/gnet-spice-sdb.scm

commit 1295421746393d17405b3c4bf37b96caac5f44d0
Author: Clif Cox <clif@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gnetlist: Add some comments to spice-sdb backend.
    
    Affects-bug: lp-702752

:100644 100644 b355dd6... d89f7a1... M	gnetlist/scheme/gnet-spice-sdb.scm

=========
 Changes
=========

commit b6bc950edee6e2e3baa7906f75ebb29c08dac2c8
Author: Clif Cox <clif@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gnetlist: flexable netlisting for NGspice Code Models
    
    Closes-bug: lp-702752
    Reviewed-by: Peter TB Brett <peter@xxxxxxxxxxxxx>

diff --git a/gnetlist/scheme/gnet-spice-sdb.scm b/gnetlist/scheme/gnet-spice-sdb.scm
index d89f7a1..6d0453a 100644
--- a/gnetlist/scheme/gnet-spice-sdb.scm
+++ b/gnetlist/scheme/gnet-spice-sdb.scm
@@ -93,6 +93,8 @@
 ;;              write-net-names-on-component to make it a bit more flexible.
 ;;              Combine write-probe-item and write-net-names-on-component.  Add
 ;;              a range utility function.  CC
+;;  1.13.2011 -- Add four lines of code (and some comments) that allow formaitting strings
+;;               to be used for netlisting NGspice device models. CC
 ;;
 ;;**********************************************************************************
 ;;
@@ -534,7 +536,7 @@
 	  )  ;; end of let*
      )  ;; end of if
 ))
-	    
+
 
 ;;**********************************************************************************
 ;;***************  Dealing with nets, devices, & SPICE cards.    *******************
@@ -1245,7 +1247,9 @@
 
 ;;--------------------------------------------------------------------
 ;; Given a refdes and port, and optionaly a format string, this writes
-;; out the nets attached to the component's pins.  This is used to write
+;; out the nets attached to the component's pins. If it's not called
+;; with a format string it looks for one in the net-format attribute,
+;; otherwise it writes out the pins unformated. This is used to write
 ;; out non-slotted parts.
 ;;--------------------------------------------------------------------
 (define (spice-sdb:write-net-names-on-component refdes port . format)
@@ -1280,9 +1284,12 @@
     ;; First do local assignments
     (let ((netnames (filter-map get-net-name (range 1 (length (gnetlist:get-pins refdes)))))
          )  ;; let
-      (if (null? format)
-        (display (string-join netnames " " 'suffix) port)			;; write out nets.
-        (apply simple-format (cons port (cons (car format) netnames))) )	;; write out nets with format string
+      (if (null? format) ;; Format agument take priority, otherwise use attribute
+        (set! format (gnetlist:get-package-attribute refdes "net-format"))
+        (set! format (car format)) )
+      (if (string=? format "unknown")
+        (display (string-join netnames " " 'suffix) port)		;; write out nets.
+        (apply simple-format (cons port (cons format netnames))) )	;; write out nets with format string
     )  ;; let
 )
 
@@ -1480,6 +1487,8 @@
 ;;  1.  Gets the refdes (package).
 ;;  2.  Checks the refdes against a short list of possible values.
 ;;      Depending upon the refdes, it does the following thing:
+;;      A? -- Invokes write-ic. This provides the opportunity for a code model
+;;            which may include a .model line.
 ;;      D? -- Invokes write-diode
 ;;      Q? -- Invokes write-transistor-diode. (The "type" attribute is <unknown> 
 ;;            in this case so that the spice simulator will barf if the user
@@ -1500,6 +1509,7 @@
 
     (let ((first-char (string (string-ref package 0)) ))  ;; extract first char of refdes.
       (cond
+       ((string=? first-char "A") (spice-sdb:write-ic package file-info-list port))
        ((string=? first-char "D") (spice-sdb:write-diode package port))
        ((string=? first-char "Q") (spice-sdb:write-transistor-diode package #f "<unknown>" (list) port))
        ((string=? first-char "M") (spice-sdb:write-transistor-diode package #f "<unknown>" (list) port))

commit 1295421746393d17405b3c4bf37b96caac5f44d0
Author: Clif Cox <clif@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gnetlist: Add some comments to spice-sdb backend.
    
    Affects-bug: lp-702752

diff --git a/gnetlist/scheme/gnet-spice-sdb.scm b/gnetlist/scheme/gnet-spice-sdb.scm
index b355dd6..d89f7a1 100644
--- a/gnetlist/scheme/gnet-spice-sdb.scm
+++ b/gnetlist/scheme/gnet-spice-sdb.scm
@@ -368,7 +368,8 @@
 
 ;;----------------------------------------------------------
 ;;  This returns a list of all the integers from start to
-;;  stop. It is similar to perl's range operator '..'
+;;  stop, with the optional step size.
+;;  It is similar to perl's range operator '..'
 ;;----------------------------------------------------------
 (define (range start stop . step)
   (if (null? step)
@@ -1219,7 +1220,7 @@
 
 
 ;;----------------------------------------------------------------------------
-; write a voltage probe
+;; write a voltage probe
 ;;----------------------------------------------------------------------------
 (define (spice-sdb:write-probe package port)
     ;; fetch only one attr we care about, so far
@@ -1483,6 +1484,7 @@
 ;;      Q? -- Invokes write-transistor-diode. (The "type" attribute is <unknown> 
 ;;            in this case so that the spice simulator will barf if the user
 ;;            has been careless.)
+;;      M? -- Same as Q
 ;;      U? -- Invokes write-ic. This provides the opportunity for a component
 ;;            model to be instantiated.
 ;;      X? -- Invokes write-ic.  This provides the opportunity for a component




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs