Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17049 Discussions

Synthesizing an exponential equation (base and mantissa are large numbers)

Altera_Forum
Honored Contributor II
1,671 Views

Hello, 

 

I am trying to synthesize an exponential equation (This is used in my look up table). The equation involves real number and therefore I have to find another way to represent it. The actual equation is 1.211^4000. 

I am therefore,trying to implement 1211 ^ 4000. The equation is simulated using cadence tool and DC compiler is used for synthesis.  

 

I have an exponential function running that calculates the value up to a particular range. After that,it picks up a random value as the simulator goes out of range and is not able to represent such huge number. 

 

Is there a way to implement such large numbers? I want it to synthesize as well.  

 

 

Any input is appreciated! Thanks in advance!:)
0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
902 Views

you could do it with fixed point, but you'll need a lot of bits. 

you'll need N (base number of bits) *4000 bits.
0 Kudos
Altera_Forum
Honored Contributor II
902 Views

Hello, 

 

Thank you for your reply. Is there a work around for it, to avoid using a lot of bits?
0 Kudos
Altera_Forum
Honored Contributor II
902 Views

Why do you need such a crazy number, any why does it need to be in an FPGA? 

Why not just use matlab to do it?
0 Kudos
Altera_Forum
Honored Contributor II
902 Views

Well, we already had the Matlab implement it. But,trying to do it in Verilog/SV to avoid timing problem later. If there is a way to break the number to find the exponent, that would be great!

0 Kudos
Altera_Forum
Honored Contributor II
902 Views

If you don't need digit accuracy, you could use a quadruple-precision floating point number. Those are good up to 10^4962. But the maximum integer that can be stored without loosing accuracy is 2^113.

0 Kudos
Altera_Forum
Honored Contributor II
902 Views

Cryptography and digital currency (bitcoin etc) do this kind of stuff. In answer to the OP's question, you will need to use on chip memory blocks for this to maintain speed. Set up a series of multipliers with DMA to read inputs and write outputs. Whole books and PHD papers have been written on how to do this stuff. Have fun.

0 Kudos
Altera_Forum
Honored Contributor II
902 Views

 

--- Quote Start ---  

If you don't need digit accuracy, you could use a quadruple-precision floating point number. Those are good up to 10^4962. But the maximum integer that can be stored without loosing accuracy is 2^113. 

--- Quote End ---  

 

 

 

Hello, 

 

Thank you so much for your response :). Could you please elaborate more on this? I think we can compromise a little bit of accuracy. 

 

 

Thanks!
0 Kudos
Altera_Forum
Honored Contributor II
902 Views

I would also like to know if there is a way to represent this equation without using a flaoting point representation. Having said that , is there a way to process such huge numbers as an integer?

0 Kudos
Reply