← Back to team overview

kicad-developers team mailing list archive

Re: Odp: Re: SPICE_VALUE behavior

 

I'm not sure this applies also for symbol Spice_Model fields (or Value
field of Spice_Model is empty), but if it does then please make sure that
one can still pass extra parameters there, such as "pot k=0.5 r=100k".

On Wed, May 19, 2021 at 6:45 PM Sylwester Kocjan <s.kocjan@xxxxx> wrote:

> Hi Wayne,
>
> Dnia 19 maja 2021 00:32 Wayne Stambaugh <stambaughw@xxxxxxxxx> napisał(a):
>
> The test cases look correct so I don't see any issues here.
>
>
> Could you please check again with better formatting below? Hertz is a
> valid SI unit, so strings: "10m" and "10mHz" are valid, but
> values ending with "Hzz" are invalid:
>
>
>
>
>
> *Scenario:*
> *Input:*
> *Actual behavior:*
> *Expected behavior:*
> *Result:*
> Positive
> 10m
> Value parsed correctly
> Value parsed correctly
> PASS
> Positive
> 10mHz
> Value parsed correctly
> Value parsed correctly
> PASS
> Negative
> 10mHzz
> Value parsed correctly
> Exception thrown
> FAIL
> Positive
> 10Hz
> Exception thrown
> Value parsed correctly
> FAIL
> Negative
> 10Hzz
> Exception thrown
> Exception thrown
> PASS
>
> Parsing strings in V7 wouldn't hurt, that's no problem, but the easiest
> solution is to reject all extra characters:
>
>
>
> *Input:*
> *Actual behavior:*
> 10m
> Value parsed correctly
> 10mHz
> Exception thrown
> 10mHzz
> Exception thrown
> 10Hz
> Exception thrown
> 10Hzz
> Exception thrown
>
> Best regards,
> Sylwester
>
> Dnia 19 maja 2021 00:32 Wayne Stambaugh <stambaughw@xxxxxxxxx> napisał(a):
>
> Hi Sylwester,
>
> I don't know that we need to support SI units in spice strings but I
> suppose it wouldn't hurt.  That would have to wait until V7 as it is a
> new feature.  The test cases look correct so I don't see any issues here.
>
> - Wayne
>
> On 5/18/21 2:06 PM, Sylwester Kocjan wrote:
>
> Hello!
>
> I've noticed a minor bug in SPICE_VALUE class. Could you please let me
> know if we should parse SI units in SPICE strings or ignore them, so I
> can fix it? I think ngspice accepts units like, V, I, Ohm, but this may
> be an overkill. The easiest solution is to ignore everything after
> number and prefix.
>
> See below the testcases I made on AC tab of Simulation Settings dialog:
>
> Input:      Actual behavior:        Expected behavior:
> 10m         Value parsed correctly  Value parsed correctly
> 10mHz       Value parsed correctly  Value parsed correctly
> 10mHzz      Value parsed correctly  Exception thrown
> 10Hz        Exception thrown        Value parsed correctly
> 10Hzz       Exception thrown        Exception thrown
>
> Best regards,
> Sylwester
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>


-- 
/Jonatan
http://kymatica.com

References