After playong a little with above patch, I have tried to write a complement, wich suits better to my needs, ie to give some parameters to a geda symbol, which is linked to a .subckt file, whith an attribute called param. I do not want to use value, because I am using value for BOM, and and try to have the same schematic for simulation and for PCB...
In gnet-spice-sdb.scm, in write-ic function, just add the lines between ";;;;;; mod ;;;;;". Sorry, but I do not know now how tu use diff and generate proper patch...
;; ---- file holds a subcircuit ----
((string=? file-type ".SUBCKT")
(begin
(debug-spew (string-append "Found .SUBCKT with model-file and model-name for " package "\n")) (spice-sdb:write-prefix package "X" port) ;; this prepends an "X" to the refdes if needed, since we have a .subckt (spice-sdb:write-component-no-value package port)
;; (display (string-append model-name "\n" ) port) (display (string-append model-name " " ) port)
;;;;;;;;;;;;;;;; mod RG ;;;;;;;;;;;;;;;;;;;;
(let ((value (gnetlist:get-package-attribute package "param")))
(if (not (string=? value "param"))
(display (string-append value "\n" ) port))
)
;;;;;;;;;;;;;;;; end mod RG ;;;;;;;;;;;;;;;;;;;;
After playong a little with above patch, I have tried to write a complement, wich suits better to my needs, ie to give some parameters to a geda symbol, which is linked to a .subckt file, whith an attribute called param. I do not want to use value, because I am using value for BOM, and and try to have the same schematic for simulation and for PCB...
In gnet-spice-sdb.scm, in write-ic function, just add the lines between ";;;;;; mod ;;;;;". Sorry, but I do not know now how tu use diff and generate proper patch...
;; ---- file holds a subcircuit ----
(spice- sdb:write- prefix package "X" port) ;; this prepends an "X" to the refdes if needed, since we have a .subckt
(spice- sdb:write- component- no-value package port)
(display (string-append model-name " " ) port)
((string=? file-type ".SUBCKT")
(begin
(debug-spew (string-append "Found .SUBCKT with model-file and model-name for " package "\n"))
;; (display (string-append model-name "\n" ) port)
;;;;;;;;;;;;;;;; mod RG ;;;;;;; ;;;;;;; ;;;;;; get-package- attribute package "param"))) ;;;;;;; ;;;;;;
(let ((value (gnetlist:
(if (not (string=? value "param"))
(display (string-append value "\n" ) port))
)
;;;;;;;;;;;;;;;; end mod RG ;;;;;;;