Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Fmax

Altera_Forum
Honored Contributor II
1,110 Views

:oops:  

Hi, 

In my architecture I need to do the following formula: 

 

 

" ("conv_integer (byte) * 10000)/127 + 10000 

 

I'm working with 10MHz clock. 

The code Fmax is: 14.5MHz ("TimeQueast" is all blue after clock constrain to 10MHz) 

Is it going to be enough for the calculation to be quick for using the date immediately inside the Process or must I use pipeline stages and divider IP block instead of "/" operator?  

in simulation is works just fine.  

 

Thanks, 

Idan 

0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
385 Views

 

--- Quote Start ---  

:oops:  

Hi, 

In my architecture I need to do the following formula: 

 

 

" ("conv_integer (byte) * 10000)/127 + 10000 

 

I'm working with 10MHz clock. 

The code Fmax is: 14.5MHz ("TimeQueast" is all blue after clock constrain to 10MHz) 

Is it going to be enough for the calculation to be quick for using the date immediately inside the Process or must I use pipeline stages and divider IP block instead of "/" operator?  

in simulation is works just fine.  

 

Thanks, 

Idan 

 

--- Quote End ---  

 

 

RTL simulation has no knowledge of 'delays' 

instead of dividing by a number, multiply by a scaled reciprocal of that number. 

You are almost halfway there 

your formula (a * 10000) / 127 + 10000 can be changed to ( a * 79) + 10000 if you want more precision you can scale it up further like e.g. (a * 20157) / 256 + 10000 As the 256 is a power of 2 the compiler will graciously implement a right shift of 8 

Result: no divider, less LEs used and maximum speed ...
0 Kudos
Altera_Forum
Honored Contributor II
385 Views

Brilliant! 

Thank you very much, I learned something new. 

Idan :-P
0 Kudos
Reply