Forum: GHDL ieee math_real standards compliance

Posted by Thomas Sailer (Guest)
on 2009-04-02 15:38
Attachment: ieee-mathreal.patch (12,8 KB)
Attachment: ieee-mathreal-nocompat.patch (8,88 KB)
Attachment: t.vhd (369 Bytes)
Attachment: ghdl-ppc64abort.patch (392 Bytes)
(Received via mailing list)
A relatively longstanding issue is that some of the math_real functions
provided by ghdl use a nonstandard function name. I got annoyed by
having to maintain two different versions of my testbenches for ghdl and
another simulator, so I wrote a two patches to make math_real more
standards compliant.

ieee-mathreal-nocompat.patch just renames the functions. It will break
code that relies on the ghdl function names.

ieee-mathreal.patch also contains backward compatible functions that
warn once that they will disappear in the future. However, to implement
the warn once feature, these functions had to be marked impure, which
breaks existing code that relies on these functions being pure.

Comments?

I'd really like to see ghdl moving towards standards compliant function
names...

And now for something different:

$ ghdl -a t.vhd
t.vhd:13:14:warning: universal integer bound must be numeric literal or 
attribute

This warning seems totally bogus, the bounds _are_ numeric literals.
What's wrong here?

Also, to compile ghdl on ppc64, I had to use the hack in
ghdl-ppc64abort.patch. Is there a better solution?

Tom
Posted by unknown (Guest)
on 2009-04-03 18:04
(Received via mailing list)
Quoting Thomas Sailer <t.sailer@alumni.ethz.ch>:

> A relatively longstanding issue is that some of the math_real functions
> provided by ghdl use a nonstandard function name. I got annoyed by
> having to maintain two different versions of my testbenches for ghdl and
> another simulator, so I wrote a two patches to make math_real more
> standards compliant.

Thank you for working on this issue.

> I'd really like to see ghdl moving towards standards compliant function
> names...

I will have a look on these patches.  The current situation is:
* official math vhdl sources cannot be distributed freely (but you can 
get it
 from the web)
* an early draft is available (the one provided with ghdl) but the final 
draft
 is somewhat different.

> And now for something different:
>
> $ ghdl -a t.vhd
> t.vhd:13:14:warning: universal integer bound must be numeric literal or
> attribute
>
> This warning seems totally bogus, the bounds _are_ numeric literals.
> What's wrong here?

Well -10 is not a numeric literal.  The warning is correct but the vhdl 
standard
is crazy on this point!

> Also, to compile ghdl on ppc64, I had to use the hack in
> ghdl-ppc64abort.patch. Is there a better solution?

Looks not bad.

Tristan.
This topic is locked and can not be replied to.