[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [fpu] FPU operations
I agree with you on all what you said but do not think
that the comparison results are used only after
compare instruction? so they will act as register from
teh cpu point of view that will be read only after the
comparison.
Damjan can OR1k handel different speeds of execution
units? does teh FPU have to do any action regarding
that or should I assume that all instructions will be
ordered properly that no contention will be on teh
result interface?
Regards
Jamil Khatib
>
> I think we should keep it around for now, we can
> always
> remove it later. Perhaps we should add a infinity
> flag
> to the compare operations, which would work just
> like
> unordered but for infinity ?
>
> I can see the need to test for infinity at some
> point ...
>
> Look at the change below, may be that is better.
>
> >you missed teh divide by zero exception
>
> right
>
> >We need also an interface to rounding modes which
> >should be an input to the FPU if we want to support
> >more rounding modes. another alternative is to put
> as
> >part of teh operation.
>
> right, I missed that as well
>
> >Anyhow I suggest to have a register to store teh
> mode
> >to avoid having different instructions only one
> will
> >be needed that sets teh rounding mode
>
> No, I disagree, there should be no register in the
> FPU to
> hold those values, it should be a simple input,
> which
> propagates through the FPU pipeline, so that the
> rounding
> mode can be changed between operations.
> The CPU should keep those values in it's 'FPU
> config'
> register.
>
> So the FPU interface looks now something like this:
>
> Main FPU Interface
> ==================
> INPUT [31:0] operand A
> INPUT [31:0] operand B
> INPUT [3:0] operation type (TBD, perhaps more bits
> ?)
> INPUT [1:0] rounding mode, something like:
> 0 - To nearest (DEFAULT)
> 1 - To +INF
> 2 - To -INF
> 3 - To ZERO
> OUTPUT [31:0] result
>
> Compare Result (Mutually exclusive)
> ===================================
> OUTPUT larger then ( A > B )
> OUTPUT smaller then (A < B)
> OUTPUT equal ( A == B )
> OUTPUT unordered ( A == NAN | B == NAN )
> OUTPUT infinity ( A == INF | B == INF )
>
> Exceptions
> ==========
> OUTPUT overflow
> OUTPUT underflow
> OUTPUT divide by zero
> OUTPUT SNAN
> OUTPUT INE
>
>
> >Regards
> >Jamil KHatib
>
> rudi
__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/