Mail Archives: geda-user/2024/04/24/17:18:00
Stephan:
...
> >> My patch was doing simple text substitutions in attributes after the
> >> hierarchy was built, so the parameters cannot effect the netlist
> >> itself, just some output. I used it only with value= attributes. That
> >> would be the minimal functionality.
> >
> > So, it would be the bom list and the like that would be affected ?
> > In that case an external program could do the transform, so you do your
> > usual stuff and then as a final step you modify some output files with a
> > separate program. Would that be fine (at least till it is integrated
> > into lepton) ?
>
> I extract my boms from the .pcb file, and usually there are a lot of
> handwritten changes before it goes to a technician, so it is not
> essential to have this functionally in the netlister. When the bom now
> says value=$R2 it is at least obvious where I need to add information :-)
...
Soo, what do you use the substitution for ?
///
My thoughts is more in line with
in a page
C ... source_symbol.sym
{
T ...
source=led_resistor
input_voltage=12
}
and its subpage
C ... led.fp
{
T ...
led_voltage=2
led_current=0.020
}
C .... resistor.fp
{
T ...
value=E6((input_voltage - led_voltage) / led_current)
}
where E6() chooses a nearest value in the E6 series, or
if you like, the available values of som component serie.
Also nice would it be if I could use units, like in
led_current=20mA or at least 20m.
I do have code for unit prefixes and E6 etc. in
https://aspodata.se/git/openhw/bin/Prefix.pm
https://aspodata.se/git/openhw/bin/Eseries.pm
///
Regarding bom's, I have
https://aspodata.se/git/openhw/bin/GnetBom2.pl
which converts lepton-netlist -g bom2 output file
to something like
(i.e. sorted by device, footprint, component value):
Capacitor ipc7351b_2012Ar.fp 1n 1 aC3
Capacitor ipc7351b_2012Ar.fp 10n 1 3C2
Capacitor ipc7351b_2012Ar.fp 15n 5% 8 t0C21 ...
Capacitor ipc7351b_2012Ar.fp 33n 5% 8 t0C11 ...
Capacitor ipc7351b_2012Ar.fp 100n 19 12C2 ...
Capacitor ipc7351b_2012Ar.fp 1u 10 12C1 ...
Regards,
/Karl Hammar
- Raw text -