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

Re: [f-cpu] DivMod unit



> Separate abs/neg stages are an option (at least for FC0).  They'll
> take two more cycles, but I don't really care for it.
So it's ok, only unsigned version will be done for the FC0.
 
[...]
> I've been playing with the SRT approach for quite a while, and my
> conclusion was to stick with radix-2 (one result bit at a time).
> You won't be able to calculate 2 or more bits in one F-CPU (6 gate)
> pipeline stage, and the decision logic becomes much more complex
I don't understood the problem, the division is not signed, so were is the
problem with pipeline stage ?
> quickly when you increase the radix.  Maybe there will be a speed
> improvement if you use radix-16 or greater, but you'll have to pay for it
> (complexity, area, and possibility of errors).
So, i think that i will write the C program to generate the radix division
that we want, and we do the choice of wich version to use at the last moment.
 
> On the other hand, a radix-2 SRT *can* do 1 result bit per cycle
> independent of the operand size, while most other algorithms can't.
 
> > An other things, I am currently looking to the divider unit (idiv.vhdl). 
> > And I thing that it's possible to do 8, 16, 32 and 64bits divisions in
> > parallel.

> Yes and no.  You can do e.g. 8-but divisions with a 32-bit divider
> (just set the unused bits to zero), but it seems to be impossible (within
> the scope of the F-CPU) to split the divider and let both halves operate
> independently, because the split logic will increase the delay too
> much.
So, if i correctly understand this, this is not the solution, right ? ;-)

I currently instantiate 8 * 8bits divider, 4 * 16bits divider and so on. So
we can use them in parallel. I dont know how it increase the size of the unit
compared to the reuse of 32bits divider.

> I proposed a solution a while ago (YG said it was "crayzee as usual"),
> but it requires a lot of code duplication (150% overhead, compared to
> a "straight" 64-bit divider).
And what is the solution ? I am really interested by it.

A+
  Cedric
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/