Re: multiply/divide algorithm



"skyworld" <chenyong20000@xxxxxxxxx> wrote in message
news:1125465038.773039.135260@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> that is: is there any algorithm which i could use to implement multiply
> and divide by verilog?

Bottom line: yes there are algorithms to do multiply and divide.
Where are these algorithms found? Here and there - all over but hard to
find.
Multiplies and divides are typically optimized to the target hardware where
ASICs have precompiled libraries and FPGAs have dedicated silicon to handle
fixed-point multiplies. Division takes longer than mults because it's
typically performed in a similar manner to how we do long division.
Floating point is typically a standards-related endeavor and less useful in
systems with dedicated functionality (dealing with numbers in a restricted
range) as opposed to generic needs like those in a processor.

If you want floating point multiplies and divides, you'll probably need to
find existing IP that costs money or is (at best) slightly supported in such
places as www.opencores.org. The functionality might seem basic enough that
everyone should have something in their tool box. The reality is the
optimized silicon and libraries keeps us from doing our own algorithms
unless we absolutely have to. Most hardware folks stay away from floating
point, using fixed-point representations instead.

If you want to do simulation and synthesis for both ASICs and FPGAs,
consider using code optimized for the ASIC and code optimized for the FPGA
and verify the two modules/algorithms produce the same results.

I'm sorry that responses to your post weren't all attempting to be helpful
responses. Consider asking a question that can be answered well in the
first place and you may get better responses.


.



Relevant Pages

  • Re: the reach of VHDL
    ... formula or it should be left for microblaze. ... particularly from the ever inspiring DSP litterature. ... Since you divide by 12.5, you actually use another 100x factor. ... which uses multiplies and add/sub operators. ...
    (comp.arch.fpga)
  • Re: [PATCH] SLAB : use a multiply instead of a divide in obj_to_index()
    ... can be used from other parts of the kernel as well? ... AFAIK this particular divide is the only one that hurts performance on ... s for the version using multiplies ... When some objects are allocated by one CPU but freed by another CPU we can ...
    (Linux-Kernel)
  • Re: Fast Binary to BCD method on ARM9 with huge numbers?
    ... The legacy codebase works in BCD, ... I also need all the digits, ... For a simple improvement, instead of dividing my ten, divide by ... If you've got an ARM with long multiplies, ...
    (comp.arch.embedded)
  • Re: Divide instruction in IA64
    ... > just as fast as a real divide? ... along the line but the 1992 Alpha Architecture Handbook says: ... Having prior knowledge of the possible sizes of the divisor ... number of multiplies to about five (compared to a best case of one and a ...
    (comp.os.vms)
  • Re: Fast Cube Root Using C33
    ... algorithms and those run on a computer with a good divide, and usually, the computer version needs fewer steps. ... With machinery that can divide, one wants the best approximation without regard to the number of digits produced. ... There is a transform called the "Integer Cosine Transform", ... faster processor with high speed arithmetic hardware. ...
    (comp.dsp)