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

Re: Rep:Re: [f-cpu] I forgot to tell you...



hi,

Michael Riepe wrote:
> On Fri, Jul 05, 2002 at 03:37:07AM +0200, Yann Guidon wrote:
> [...]
> > you mean, i copy it verbatim in the code ?
> 
> This function, yes. You can of course call it differently (redefined
> operators are tricky sometimes).
> 
> I probably should add something like that to package Generic_Adder.

that would be cool, sure !

> > > That should work at all operand sizes you need. But note that the
> > > delay will probably be big (d=4...5 per CIAdd), that is, a 64-bit
> > > result will need 4 pipeline stages :( We may reduce that to 3 if the
> > > adders are broken down into their components (CIA_Row and CIA_Inc).
> > i don't understand well... here the operands are 3 to 6 bit wide.
> The function above can add two operands that have the same size.
> Whether they both have 3, 4, 5, 6 or 64 (or 640) bits doesn't matter.
> 
> The delay of the outputs, however, depends on the operand size: for
> 1...4 bit operands, the delay is d=4; for 5...8 bit, the delay increases
> to d=5.

ok, this is the kind of thing you could write in your readme :-)
whether there is a 4-cycle latency for POPCOUNT is not a problem
because it's not a "critical" unit.

> On Fri, Jul 05, 2002 at 08:13:05AM +0200, Yann Guidon wrote:
> > huh, Houston ? i got a little issue...
<snip>
> >
> > The problem here is that a N+N addition will return a N-bit result.
> > I remarked that when Simili elaborated the design and loudly complained
> > of a size mismatch...
> 
> Oh sorry... I forgot. You can use `gg' as the most significant output
> bit. That is, rename the function, change the declaration of yy to
>         variable yy : std_ulogic_vector(w downto 0);
> and then call
>         CIAdd(aa, bb, yy(w-1 downto 0), cc, yy(w), pp);
>         return yy;
> (cc and pp are still unused dummies).
cool, i'll try :-)

> > How does one manage the cc, gg and pp outputs ? and how do we do
> > an aggregate of the result, that is independent of the to/downto (direction) ?
> You'll need the other variables if you build an adder with
> carry-in/carry-out. `cc' is an `increment vector' for yy (like the
> INC EU uses it, but precomputed and with less delay than yy itself).
> That is, you can add a carry-in with
>         yy := yy xor (cc and (cc'range => Cin));
> Carry-out is generated from Cin, gg and pp:
>         Cout := gg or (pp and Cin);
> If Cin = 0, the sum equals yy and Cout equals gg.

wow, i hope you'll copy-paste it to your readme :-)

>  Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
WHYGEE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/