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

gEDA-user: Try to add component



Hi, I'm trying to make library include symbol, somewhat similar to 
spice-include-1.sym. I created symbol:

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=Typ

And add a strings into gnet-spice-sdb.scm:
;;----------------------------------------------------------
;; 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 ((value (gnetlist:get-package-attribute package "value"))
	  (file (gnetlist:get-package-attribute package "file"))
	  )   ;; end of local assignments
       (debug-spew (string-append "   value = " value "\n"))
       (debug-spew (string-append "   file = " file "\n"))
       (display (string-append ".LIB " value "\n") port)
       (debug-spew "placing .lib directive string into netlist.\n"))

    )
)

When I run gnetlist -v -g spice-gdb ....., i've got:

Now process the items in model file list -- stick appropriate references to models in output SPICE file.
Handling spice model file modelcard.pmos
Done processing items in model file list.
Make second pass through design and write out a SPICE card for each component found.
--- checking package = A5
     device = library
Found unknown component.  Refdes = A5

What I'm doing wrong.

Thanks,
AB.



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