|
From: Stephen W. <st...@ic...> - 2008-04-29 23:27:41
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm thinking that it's not a bad time right now to integrate the contributed va_math library into the Icarus Verilog git distribution. We get to decide on a method. 1. The va_math.c code is pretty compact. We could just include it as part of the system.vpi in the vpi/ directory. This would also mean that the va_math.sft becomes part of the system.sft file and every user just gets it. 2. We could include it in the vpi/ directory, but make a separate va_math.vpi module. The vpi/Makefile.in would gain the rules needed to make and install the va_math.vpi module and install the va_math.sft. 3. Create a va_math directory similar to the vpi/ directory. Option #1 has the advantage that it is completely transparent to the Icarus Verilog user, except that now there are all these nifty new system functions. The only disadvantage I can think of it that there is a slight bit of bloat in system.vpi. There is also some name space pollution. Option #2 has the advantage that system.vpi and va_math.vpi are kept lighter weight. Name space pollution is also reduced. The disadvantage is that the user has to use the -mXXX flags to load the va_math library. (That's not unlike the "-lm" flag that C programmers sometimes have to remember.) Option #3 is just a worse version of #2. Preferences? - -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep." -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFIF67orPt1Sc2b3ikRAt0mAJwODv8MHGmVtNeHIdVUBh51n/o5iQCdEijS JLwnW2YMbRILwTMPoP18wPk= =nFy6 -----END PGP SIGNATURE----- |
|
From: Larry D. <ldo...@re...> - 2008-04-29 23:34:57
|
Steve -
On Tue, Apr 29, 2008 at 04:27:36PM -0700, Stephen Williams wrote:
> I'm thinking that it's not a bad time right now to integrate the
> contributed va_math library into the Icarus Verilog git distribution.
And also, therefore, upcoming development snapshots.
> Option #2 has the advantage that system.vpi and va_math.vpi are
> kept lighter weight. Name space pollution is also reduced. The
> disadvantage is that the user has to use the -mXXX flags to load
> the va_math library. (That's not unlike the "-lm" flag that C
> programmers sometimes have to remember.)
I value unpolluted standards-based name spaces. This looks
like a reasonable choice.
- Larry
|
|
From: Stephen W. <st...@ic...> - 2008-04-30 00:04:08
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Larry Doolittle wrote:
| Steve -
|
| On Tue, Apr 29, 2008 at 04:27:36PM -0700, Stephen Williams wrote:
|> I'm thinking that it's not a bad time right now to integrate the
|> contributed va_math library into the Icarus Verilog git distribution.
|
| And also, therefore, upcoming development snapshots.
And also*2, when Verilog-AMS extensions are enabled, the code
generator can implicitly generate calls to these functions when
the true-AMS syntax is encountered in non-analog code. The functions
in the library are system-function versions of built-in functions
in Verilog-A[MS].
|> Option #2 has the advantage that system.vpi and va_math.vpi are
|> kept lighter weight. Name space pollution is also reduced. The
|> disadvantage is that the user has to use the -mXXX flags to load
|> the va_math library. (That's not unlike the "-lm" flag that C
|> programmers sometimes have to remember.)
|
| I value unpolluted standards-based name spaces. This looks
| like a reasonable choice.
The above can still work with Option #2 by having the compiler
implicitly include va_math.{sft,vpi} when Verilog-A extensions
are enabled, thus getting it some of the advantages of #1.
Hmm.. I think I just figured out that Option #1 can be implemented
by Option #2. Maybe that dictates the answer?
- --
Steve Williams "The woods are lovely, dark and deep.
steve at icarus.com But I have promises to keep,
http://www.icarus.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFIF7d7rPt1Sc2b3ikRAs8rAKCTevybosaCvyn8/nM02jQi4T0d0QCfb4nu
vyWAHm04F4922RjLdRnHUnI=
=bbLw
-----END PGP SIGNATURE-----
|
|
From: Cary R. <cy...@ya...> - 2008-04-30 00:18:13
|
--- On Tue, 4/29/08, Stephen Williams <st...@ic...> wrote:
> And also*2, when Verilog-AMS extensions are enabled, the
> code
> generator can implicitly generate calls to these functions
> when
> the true-AMS syntax is encountered in non-analog code. The
> functions
> in the library are system-function versions of built-in
> functions
> in Verilog-A[MS].
Lets get 1.0 out first! I know, I know, it's fun to dream ;-).
> Hmm.. I think I just figured out that Option #1 can be
> implemented
> by Option #2. Maybe that dictates the answer?
See my previous comment (make sure the library can be overridden).
Cary
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
|
|
From: Cary R. <cy...@ya...> - 2008-04-30 00:13:50
|
--- On Tue, 4/29/08, Stephen Williams <st...@ic...> wrote:
> 2. We could include it in the vpi/ directory, but make a
> separate
> va_math.vpi module. The vpi/Makefile.in would gain the
> rules needed
> to make and install the va_math.vpi module and install the
> va_math.sft.
I think this is the way to go. It gives the end user the maximum flexibility. They can easily override the library if they want to. I'm uncertain why they would want to do that, but I will admit to being a bit biased. We are currently at 168 downloads and not a single problem has been reported! Remember the library code is the same between the RC and final version.
Cary
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
|
|
From: Stephen W. <st...@ic...> - 2008-04-30 00:29:00
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Cary R. wrote: | --- On Tue, 4/29/08, Stephen Williams <st...@ic...> wrote: | |> 2. We could include it in the vpi/ directory, but make a |> separate |> va_math.vpi module. The vpi/Makefile.in would gain the |> rules needed |> to make and install the va_math.vpi module and install the |> va_math.sft. | | I think this is the way to go. It gives the end user the maximum flexibility. They can easily override the library if they want to. I'm uncertain why they would want to do that, but I will admit to being a bit biased. We are currently at 168 downloads and not a single problem has been reported! Remember the library code is the same between the RC and final version. So far, Option#2 is winning. Is it OK with you if I remove the v0.8 compatibility from the va_math.c that I put into git? I'll also add configure tests for the functions fmin/fmax and use the vpi_config.h to report them. - -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep." -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFIF71PrPt1Sc2b3ikRAndEAJoDJvfhvRoshRW1EnIhjTf+oFsbyQCePMmK ozlwV6c7LZfznAQJu9jq4tQ= =Wp/A -----END PGP SIGNATURE----- |
|
From: Cary R. <cy...@ya...> - 2008-04-30 16:32:51
|
--- On Tue, 4/29/08, Stephen Williams <st...@ic...> wrote:
> Is it OK with you if I remove the v0.8 compatibility from
> the
> va_math.c that I put into git? I'll also add configure
> tests for
> the functions fmin/fmax and use the vpi_config.h to report
> them.
I had mistakenly responded directly to Steve on this. Basically I said make the integrated version as simple as possible so remove the V0.8 and old version of 0.9 workaround code.
Do we want to include the example files from 1.0 in the example directory and reference them in the va_math.txt file?
Cary
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
|
|
From: Stephen W. <st...@ic...> - 2008-04-30 16:35:34
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Cary R. wrote: | --- On Tue, 4/29/08, Stephen Williams <st...@ic...> wrote: | |> Is it OK with you if I remove the v0.8 compatibility from |> the |> va_math.c that I put into git? I'll also add configure |> tests for |> the functions fmin/fmax and use the vpi_config.h to report |> them. | | I had mistakenly responded directly to Steve on this. Basically I said make the integrated version as simple as possible so remove the V0.8 and old version of 0.9 workaround code. | | Do we want to include the example files from 1.0 in the example directory and reference them in the va_math.txt file? Unsure about the examples in the bundle, but I put the test program in the ivtest suite. There are a few differences that we may want to wrinkle out so that the test can give an accurate pass/fail. - -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep." -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFIGJ/drPt1Sc2b3ikRAvh/AKCr00hRwtxCRg2eYB4tX3YhIAr/MgCfXw7c 0X/CnC5p+66VKaYJZGON1zs= =2f8j -----END PGP SIGNATURE----- |
|
From: Cary R. <cy...@ya...> - 2008-04-30 17:18:12
|
--- On Wed, 4/30/08, Stephen Williams <st...@ic...> wrote:
> Unsure about the examples in the bundle, but I put the test
> program
> in the ivtest suite. There are a few differences that we
> may want
> to wrinkle out so that the test can give an accurate
> pass/fail.
OK on the examples. I probably should put together something for the wiki "Analog modeling using Icarus Verilog".
I'm not so certain test_va_math should even be in the test suite. These tests explicitly push into the obscure corners of the native math library. Because of this you can get different results depending on the underlying math library. These differences are usually not significant and when they are they usually do not indicate a problem in the va_math library. I always meant for these tests to be subjective not absolute.
The main difference I know about is taking the tan of pi/2 or -pi/2. My two system would match the pi/2 tests if we truncated the result to four digits, but MinGW has many differences (inf/nan representation and some other corner case deviations from the FP standard).
FYI the tan tests for my two machines give 1.63318e+16 (RHEL 4) and 1.63312e+16 (cygwin). So when you consider rounding 1.633e+16 is the common result. Making the two pi/2 test use %.4g instead of %g should work for me (remember for %g the number after the . is the number of significant digits not the number of digits).
Cary
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
|
|
From: Cary R. <cy...@ya...> - 2008-04-30 17:24:49
|
--- On Wed, 4/30/08, Cary R. <cy...@ya...> wrote:
> (remember for %g the number after the . is the number of
> significant digits not the number of digits).
Ack, that should be not the number of digits after the decimal point!
Cary
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
|
|
From: Stephen W. <st...@ic...> - 2008-04-30 17:27:26
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Cary R. wrote: | --- On Wed, 4/30/08, Stephen Williams <st...@ic...> wrote: | |> Unsure about the examples in the bundle, but I put the test |> program |> in the ivtest suite. There are a few differences that we |> may want |> to wrinkle out so that the test can give an accurate |> pass/fail. | | OK on the examples. I probably should put together something for the wiki "Analog modeling using Icarus Verilog". Sounds exactly perfect. | I'm not so certain test_va_math should even be in the test suite. These tests explicitly push into the obscure corners of the native math library. Because of this you can get different results depending on the underlying math library. These differences are usually not significant and when they are they usually do not indicate a problem in the va_math library. I always meant for these tests to be subjective not absolute. | | The main difference I know about is taking the tan of pi/2 or -pi/2. My two system would match the pi/2 tests if we truncated the result to four digits, but MinGW has many differences (inf/nan representation and some other corner case deviations from the FP standard). | | FYI the tan tests for my two machines give 1.63318e+16 (RHEL 4) and 1.63312e+16 (cygwin). So when you consider rounding 1.633e+16 is the common result. Making the two pi/2 test use %.4g instead of %g should work for me (remember for %g the number after the . is the number of significant digits not the number of digits). I have found that on my mac a few of the numbers came out different only at the least significant bits. I also found, though, that one of the 0.0 values turns out to be -0.0. I don't remember which that is, as the mac is currently with the wife at school. I think we can tweak the test and the gold file to turn it into a practical test suite test. It's already in ivtest CVS. - -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep." -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFIGKv9rPt1Sc2b3ikRAl3ZAKC2JKq1b+Jjh2PzcFU7ELgWSx78zwCgsVCT OEOc84xUmqW6B+cfXDqVUGE= =CpnM -----END PGP SIGNATURE----- |