Rev | Line | |
---|
[11] | 1 | # Define common subformulae. |
---|
| 2 | \define START (start=1 * FPM.state[1:0]=0) |
---|
| 3 | \define BUSY !(FPM.state[1:0]=0) |
---|
| 4 | \define Validx (x[6:3]=0 -> x[2:0]=0) |
---|
| 5 | \define Validy (y[6:3]=0 -> y[2:0]=0) |
---|
| 6 | \define Validz (z[6:3]=0 -> z[2:0]=0) |
---|
| 7 | \define NaNx (x[6:3]=b1111 * !(x[2:0]=0)) |
---|
| 8 | \define NaNy (y[6:3]=b1111 * !(y[2:0]=0)) |
---|
| 9 | \define NaNz (z[6:3]=b1111 * !(z[2:0]=0)) |
---|
| 10 | \define Infx x[6:0]=b1111000 |
---|
| 11 | \define Infy y[6:0]=b1111000 |
---|
| 12 | \define Infz z[6:0]=b1111000 |
---|
| 13 | |
---|
| 14 | #PASS: Legal operands cannot produce illegal results. The only illegal |
---|
| 15 | # operands in our case are the denormals. |
---|
| 16 | |
---|
| 17 | (\BUSY * \Validx * \Validy) -> \Validz; |
---|
| 18 | |
---|
| 19 | #FAIL: If the sign bits are different the result is negative. |
---|
| 20 | # This formula fails because one operand may be NaN. |
---|
| 21 | |
---|
| 22 | (\BUSY * !(y[7]==x[7])) -> z[7]=1; |
---|
Note: See
TracBrowser
for help on using the repository browser.