Pink Iguana

Home » Code » The Federal Reserve and FPGA/C Paranoia

The Federal Reserve and FPGA/C Paranoia


Roger Lowenstein, NYT, The Federal Resrve’s Framers Would Be Shocked, here.

ONE hundred years ago today,President Woodrow Wilson went before Congress and demanded that it “act now” to create the Federal Reserve System. His proposal set off a fierce debate. One of the plan’s most strident critics, Representative Charles A. Lindbergh Sr., the father of the aviator, predicted that the Federal Reserve Act would establish “the most gigantic trust on earth,” and that the Fed would become an economic dictator or, as he put it, an “invisible government by the money power.”

Tan, Boland, and Constantinides, FPGA Paranoia: Testing numerical properties of FPGA floating point IP-cores, here. If you go to a future where your code execution is not in the economic sweet  spot driving microprocessor and system board design maybe you have to resort to FPGA hackery to continue to scale with Moore’s Law. The Maxeler folks did impress on me that floating point performance has always been a wide spectrum of possible engineering solutions. Vector math double precision ICC/MKL hacking on commodity processors is somewhere in the middle of the spectrum of stuff you can do.

Aside from exhaustive testing across every possible input value, the only way to confirm that hardware performs exactly as specified is to perform some sort of formal verification of the hardware implementation [12–14]. However, such a process typically requires a lot of time and effort, which is unacceptable, espe- cially when new algorithms that save time and area are being developed all the time. As such a more tractable approach is to create a test suite that identifies corner cases that are most likely to cause errors in the output, and test the hard- ware against these cases, alongside further random tests, to ensure it works as desired. In terms of floating point verification, the TestFloat [15], the IeeeCC754 test suite [16] and Paranoia [17] are three such test suites. In this project, we have chosen to focus on the latter, for it is the most well-known, as can be seen by its various translations – from its original BASIC program [17] into various languages, including Pascal [18] and C [19]. The popularity of Paranoia has en- sured it is still used on modern CPU hardware to show flaws in many floating point arithmetic implementations [20], as well as to benchmark GPU floating point arithmetic  and for this reason, we wish to create the same level of scrutiny towards FPGA IP-cores.

Thos Sumner and David Gay, A C version of Kahan’s Floating Point Test “Paranoia”, here. Interesting if there is a vectorized math and FMA version somewhere.

static char *hist[] = {
	"The program attempts to discriminate among",
	"   FLAWs, like lack of a sticky bit,",
	"   Serious DEFECTs, like lack of a guard digit, and",
	"   FAILUREs, like 2+2 == 5 .",
	"Failures may confound subsequent diagnoses.\n",
	"The diagnostic capabilities of this program go beyond an earlier",
	"program called `MACHAR', which can be found at the end of the",
	"book  `Software Manual for the Elementary Functions' (1980) by",
	"W. J. Cody and W. Waite. Although both programs try to discover",
	"the Radix, Precision and range (over/underflow thresholds)",
	"of the arithmetic, this program tries to cope with a wider variety",
	"of pathologies, and to say how well the arithmetic is implemented.",
	"\nThe program is based upon a conventional radix representation for",
	"floating-point numbers, but also allows logarithmic encoding",
	"as used by certain early WANG machines.\n",
	"BASIC version of this program (C) 1983 by Prof. W. M. Kahan;",
	"see source comments for more history.",

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: