Hello everyone,

I would like to solicit some advice from the group, especially from those with 
more experience writing simulators.

I have recently started toying with a simulation of the AT&T 3B2/400 Math 
Acceleration Unit (the WE32106 MAU). This was an optional co-processor that 
could be fitted into any 3B2/310 or 3B2/400 and supplied hardware acceleration 
for floating point math. It implements the IEEE 754-1985 spec faithfully. It 
offers fairly complex features, including instructions to cast any type to any 
other type (single precision, double precision, or extended precision). 
Internally, all operations are done on 80-bit extended precision values, but on 
output these can be cast to the appropriate type. And of course it handles all 
of the exceptional cases that you would expect it to (underflow, overflow, 
divide by zero, etc.)

For my prototype code, I've just done a nasty kludge and used C casting to 
convert between types -- it just so happens that on the platform and compiler 
I'm using, the standard C float, double, and long double types are stored in 
precisely the same IEEE-754 format that the WE32016 MAU uses. But of course the 
C standard doesn't require that, it's just lucky chance. Obviously this is not 
cross-platform code, and it's very brittle.

Floating point is not my cup of tea. I'm not an expert in IEEE-754, nor do I 
really want to reinvent the wheel. Nevertheless, I'd like to find a suitable 
cross-platform way to handle it, without leaning too much on assumptions about 
the compiler.

If you've done any work on floating point emulation, can you drop me a line? 
I'd like to figure out how best to proceed with this project.

All the best,

-Seth
-- 
  Seth Morabito
  Poulsbo, WA
  [email protected]
_______________________________________________
Simh mailing list
[email protected]
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to