gnetlist: spice-sdb: write provided subckt parameters from v

Bug #698736 reported by Dan White
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gEDA
New
Undecided
Unassigned

Bug Description

For input pages defining a subcircuit (has a
"device=spice-subcircuit-LL" attribute). Information is provided
through the value= attribute attached to the "spice-subcircuit-LL"
symbol.

E.g.:
.subckt name n1 n2 n3 n4 M=1 foo=43
*contents
.ends

Revision history for this message
Dan White (etihwnad) wrote :
Revision history for this message
Dan White (etihwnad) wrote :

This (updated) patch makes spice-sdb use the "value=" attribute atteched to the symbol with "device=spice-subcircuit-LL" to pass subcircuit parameters.

The patch also lives in the "whiteaudio" branch at:
git://repo.or.cz/geda-gaf/whiteaudio.git
as commit:
cb0bf864cd3a1a7e38559ebc74669e78792a4b7b

Revision history for this message
Abhijit (abhijit86k) wrote :

Most useful!
Thanks! Has this been included into the main gEDA distribution?
~Abhijit

Revision history for this message
Dan White (etihwnad) wrote : Re: [Bug 698736] Re: gnetlist: spice-sdb: write provided subckt parameters from v

On Fri, May 3, 2013 at 1:36 PM, Abhijit <email address hidden> wrote:

> Most useful!
> Thanks! Has this been included into the main gEDA distribution?
>

Thanks for the kind words, sorry for the delay.

As far as I know, it has not been included.

Dan

--
SDG
www.whiteaudio.com

Revision history for this message
tvrusso (russo-bogodyn) wrote :

This is a great patch and it would be terrific if it would be included in the distribution.

Revision history for this message
Dan White (etihwnad) wrote :

.. and a minor cleanup to the previous patch.

Applies to both the current master/HEAD and stable-1.8 branches.

Revision history for this message
Gag (renaud-gaglione) wrote :

Thank you for this patch !
I would recommend to add it to stable distribution !
RG

Revision history for this message
Gag (renaud-gaglione) wrote :

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 ;;;;;;;;;;;;;;;;;;;;

Revision history for this message
Gag (renaud-gaglione) wrote :

This should be better. Sorry for my misunderstanding.

;;;;;;;;;;;;;;;; mod RG ;;;;;;;;;;;;;;;;;;;;
    (let ((param (gnetlist:get-package-attribute package "param")))
        (if (not (string=? param "unknown"))
  (display (string-append param "\n" ) port))
    )
(newline port)
;;;;;;;;;;;;;;;; end mod RG ;;;;;;;;;;;;;;;;;;;;

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.