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

Re: gEDA-user: Try to add component



Hi Stuart,

Thank you very much for the instructions. Following your instruction I 
produced next patch and new symbol.

Thanks,
Alex.


--- geda-gnetlist-1.5.2/scheme/gnet-spice-sdb.scm    2009-06-11 
04:42:06.063911837 -0700
+++ geda-gnetlist/scheme/gnet-spice-sdb.scm    2009-06-17 
17:28:10.236009806 -0700
@@ -1425,6 +1425,38 @@
  )))

  ;;----------------------------------------------------------
+;; Include a file using an .LIB directive
+;;----------------------------------------------------------
+(define spice-sdb:write-library
+  (lambda (package port)
+    (debug-spew (string-append "Found SPICE .LIB box.  Refdes = " 
package "\n"))
+    (let ((corner (gnetlist:get-package-attribute package "corner"))
+      (file (gnetlist:get-package-attribute package "file"))
+      )   ;; end of local assignments
+      (debug-spew (string-append "   corner = " corner "\n"))
+      (debug-spew (string-append "   file = " file "\n"))
+      (display (string-append ".LIB " file " " corner "\n") port)
+      (debug-spew "placing .lib directive string into netlist.\n"))
+
+   )
+)
+
+;;----------------------------------------------------------
+;; Include a simulation directive
+;;----------------------------------------------------------
+(define spice-sdb:write-simulation
+  (lambda (package port)
+    (debug-spew (string-append "Found SPICE Simulation box.  Refdes = " 
package "\n"))
+    (let ((value (gnetlist:get-package-attribute package "value"))
+      )   ;; end of local assignments
+      (debug-spew (string-append "value=" value "\n"))
+      (display (string-append value "\n") port)
+      (debug-spew "placing simulation directive string into netlist.\n"))
+
+   )
+)
+
+;;----------------------------------------------------------
  ;; Include an option using an .OPTIONS directive
  ;;----------------------------------------------------------
  (define spice-sdb:write-options
@@ -1617,6 +1649,10 @@
                (spice-sdb:write-directive package port))
            ( (string=? device "include")
                (spice-sdb:write-include package port))
+          ( (string=? device "library")
+              (spice-sdb:write-library package port))
+          ( (string=? device "simulation")
+              (spice-sdb:write-simulation package port))
            ( else
            (spice-sdb:write-default-component package file-info-list port))
          ) ;; end of cond


*********************************************************************************************************8
v 20090328 2
B 0 400 1900 300 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1
T 100 300 9 10 0 1 0 0 1
device=library
T 100 500 9 10 1 1 0 0 1
refdes=A?
T 600 500 9 10 1 0 0 0 1
SPICE LIBR
T 500 200 8 10 1 1 0 0 1
file=?
T 100 200 9 10 1 0 0 0 1
File:
T 0 -5 8 10 1 0 0 0 1
corner=?



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