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

gEDA-cvs: gaf.git: branch: master updated (1.6.1-20100214-129-g7bf44da)



The branch, master has been updated
       via  7bf44da290d1a3a6761b60739b4ce3561ad0c152 (commit)
      from  8e19b5509a40826aeacd6b43efa35403f13763f8 (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 |   56 ++++++++++++++++++++++++++++++++++++
 1 files changed, 56 insertions(+), 0 deletions(-)


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

commit 7bf44da290d1a3a6761b60739b4ce3561ad0c152
Author: Stuart Brorson <sdb@xxxxxxxxxx>
Commit: Stuart Brorson <sdb@xxxxxxxxxx>

    Apply patch from agaran, which implements probes in spice-sdb.

:100644 100644 5156734... 39ea063... M	gnetlist/scheme/gnet-spice-sdb.scm

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

commit 7bf44da290d1a3a6761b60739b4ce3561ad0c152
Author: Stuart Brorson <sdb@xxxxxxxxxx>
Commit: Stuart Brorson <sdb@xxxxxxxxxx>

    Apply patch from agaran, which implements probes in spice-sdb.

diff --git a/gnetlist/scheme/gnet-spice-sdb.scm b/gnetlist/scheme/gnet-spice-sdb.scm
index 5156734..39ea063 100644
--- a/gnetlist/scheme/gnet-spice-sdb.scm
+++ b/gnetlist/scheme/gnet-spice-sdb.scm
@@ -1256,6 +1256,60 @@
   )
 )
 
+; most of this code is shamelessly copied from write-net-names-on-component
+; probably net-on-component could take one more argument that will be formater
+; which receives pin data those generated in let, etc
+; then this cruft might just provide own formater and reuse code
+(define spice-sdb:write-probe-item
+  (lambda (refdes number-of-pins port)
+    (if (> number-of-pins 0)
+      (begin
+        (spice-sdb:write-probe-item refdes (- number-of-pins 1) port)
+        (let* ((pin-name (number->string number-of-pins))
+	       (pinnumber (gnetlist:get-attribute-by-pinseq refdes pin-name "pinnumber"))
+	       (pinseq (gnetlist:get-attribute-by-pinseq refdes pin-name "pinseq"))
+	       (netname (car (spice-sdb:get-net refdes pinnumber)) )
+	       )
+
+;; -------  Super debug stuff  --------
+	  (debug-spew "  In write-probe-item. . . . \n")
+	  (debug-spew (string-append "     pin-name = " pin-name "\n"))
+	  (debug-spew (string-append "     pinnumber = " pinnumber "\n"))
+	  (debug-spew (string-append "     pinseq = " pinseq "\n"))
+	  (debug-spew (string-append "     netname = " netname "\n"))
+;; ------------------------------ 
+
+	  (if (not (string=? netname "ERROR_INVALID_PIN"))
+             (display (string-append "V(" netname ") ") port)     ;; write out attached net if OK.
+             (debug-spew (string-append "For " refdes ", found pin with no pinseq attribute.  Ignoring. . . .\n"))
+          )
+        )  ;; let*
+      ) ;; begin
+    ) ;; if
+  ) ;; lambda
+)
+
+(define spice-sdb:write-probe
+  (lambda (package port)
+    ;; fetch only one attr we care about, so far
+    (let ((value (gnetlist:get-package-attribute package "value"))
+	 ) ;; end of local assignments
+
+    (debug-spew (string-append "Found Probe item, refdes = " package "\n"))
+
+    (if (string=? value "unknown")
+      (set! value "TRAN"))
+
+    (display (string-append "* Probe device " package " on nets ") port)
+    (spice-sdb:write-probe-item package (length (gnetlist:get-pins package)) port)
+    (newline port)
+    (display (string-append ".print " value " +") port)
+    (spice-sdb:write-probe-item package (length (gnetlist:get-pins package)) port)
+    (newline port)
+  ) ;; end of let
+ ) ;; close of lambda
+) ;; close of define
+
 ;;--------------------------------------------------------------------
 ;; Given a refdes and number of pins, this writes out the nets
 ;; attached to the component's pins.  This is used to write out
@@ -1617,6 +1671,8 @@
               (spice-sdb:write-directive package port))
           ( (string=? device "include")
               (spice-sdb:write-include package port))
+          ( (string=? device "TESTPOINT")
+              (spice-sdb:write-probe package port))
           ( else 
 	      (spice-sdb:write-default-component package file-info-list port))
         ) ;; end of cond




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