Article may be outdated

This article is 3 days old. Some details may have changed since publication.

Hacker News·4 min read·hard

The VHDL standard's float package gets sqrt(2) wrong

L
lmtlssss
The VHDL standard's float package gets sqrt(2) wrong
✦AI Summary

A technical analysis reveals that the IEEE VHDL floating-point package contains significant calculation errors, specifically failing to correctly compute square roots and other operations. The findings suggest that standard-compliant simulation tools are producing inaccurate results.

Why it matters

Errors in foundational hardware description language standards can lead to critical failures in chip design and electronic system reliability.

✦Dive DeeperCreate a free account to unlock

ieee.float_pkg is the floating-point package of the VHDL standard, IEEE Std 1076-2008 and 1076-2019. The source is the IEEE's own: ieee/float_generic_pkg-body.vhdl on the release branch of opensource.ieee.org/vasg/Packages , 5,712 lines, $Revision: 1220 $ . The working group's develop branch at gitlab.com/IEEE-P1076/Packages has the same bytes, and GHDL and NVC ship them unchanged. The runs here are in GHDL 7.0.0-dev and NVC 1.23.1, and where both ran the same vectors they wrote the same result file.

The package is set beside exact arithmetic. An operand is a sign and a fraction of two integers, the operation is done on the fractions, and the result is rounded once into the format in the rounding style the call names. exact.py is that reference.

With the package's own settings: round_nearest , 3 guard bits, denormal numbers on.

Continue reading on Headlinne

Create a free account to read the full article.

Read full article →
technologyscience
✦

Get smarter about the news

Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.

Create free account

Already have an account? Sign in