[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [f-cpu] ADD/SUB unit, v2 ?



On Sat, Jan 05, 2002 at 01:42:23AM +0100, Yann Guidon wrote:

> while reading through the ASU code, i read that
> there is no "time" for a 1-bit most-shift
> (which would be useful for fractional operations).

Since fractional operands are in sign-magnitude (rather than 2's
complement) form, we'll need more pre- and postprocessing than a single
shift.

> I thought about the following solution :
>  1) duplicate the unit 
>  2) drop the input xors and propagate the change in the
>     rest of one of the unit. We thus get one sub and one
>     add operation
>  3) add the post-shift
> 
> Since there is a provision for a simultaneous add/sub
> instruction, this is fine :-) The new form of ASU
> (optional) would have the same 2 write ports
> and the simultaneous add/sub will disallow carry/borrow.

If addsub is required to perform both operations simultaneously, we'll
need to duplicate the unit anyway. On the other hand, there probably
are many programs that perform lots of ADD operations but no SUB
(address calculations, for example). Therefore, I'd rather keep the
ASU as-is and add an ADD-only unit.

-- 
 Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
 "All I wanna do is have a little fun before I die"
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/