[EMAIL PROTECTED] wrote:
On Thu, Jul 31, 2008 at 02:50:48PM -0500, Gabriel Sechan wrote:
Sure.  Now lets say we have 10 registers of 32 bits.  Since we don't know how 
they may effect state we have to try all combinations, that's a mere 2^320 
states per instruction, for a mere 2^352 total tests.  Let me know when they 
finish, and we can start testing ram configurations :)

Ideally I'd like to brute force everything but I *can* use a little judgment to
trim down the search space....

For example, I can try just a few register values like

0x00000000
0xffffffff
0x7fffffff
etc.

Likewise for RAM.  That would have to be good enough until someone
gives me a quantum computer.

Can you? Are you sure that those values hit *all* the internal states? How do you know?

Before thinking about this in terms of a microprocessor, think about it solely for a 64bit x 64bit multiplier. It's a whole lot easier and doesn't have that nasty "state" stuff mucking it up, and you know *exactly* how many input and output values there are. It also has the property that multiple input states can map to the same output state (6x8=48 and 12*4=48, for example) so you can't rely on the fact that enumerating all output states is sufficient.

So, what are the "interesting" test values? Which values are required to test all of the internal gates? How do I *know* that my algorithm is correct (most hardware multipliers do Booth recoding--that creates some unusual "interesting" test values)?

There is a reason why the high reliability microprocessors compute a "residue multiplication" alongside the real multiplication. If the computed residue doesn't match the residue of the result, it throws a machine fault.

Normally, this is to catch intermittent errors (it will retry the computation before fully halting), but it can also catch implementation faults.

-a


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to