- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
i have a problem. I have to divide two 36 Bit Values, but i can't find a right design in Vhdl, which can do it. All the moduls can divide up to 32 bit, but no more. It should be synthesizable. I need the quotient and the rest. Can anyone help me? The input type's of my entity are two std_logic_vector(35 downto 0) which i would convert in unsigned values (of the package "ieee.numeric_std.all") with the same length. And this values, i have to divide. The dividend is the bigest value, so that the result's are only positive. Thank's a lot, photLink Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The LPM Divide megafunction will go up to 64 bits for both the numerator and denominator:
http://www.altera.com/literature/ug/ug_lpm_alt_mfug.pdf- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank's a lot for the fast answer.
Is there also a seperate module (entity) and not a function?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is a module.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A divide function is not appropriate as it does now allow pipelining (unless your clock speed is about 2 MHz). The LPM_Divide is a module that is fully pipelined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you use the divide function and put a chain of flip flops after the division and use the value from the end of the chain for the output you might get lucky and Quartus will retime those registers (if you enable it) and shove them into the division logic. That said I would just use the megafunction or build your own if you want something custom.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page