Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Arithmetic operation log

Please, i need to calculate this function (X²)(Z=2) with vhdl language and Z it is real number. There are two maners: calculate it directly or applicate the log10 function. how can i resolve this problem.

Thinks

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I would say the best way is to use a NIOS.

    Did you find any log10 IP core ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I use nios II, but he need many time to calculate the value. for exemple i find that it need's about 0.5 seconde to calculate 1000 result. But in my application, this time is greatest. For this reason i decide to change this function in vhdl to will be fast.

    For this reason i search how i implement my function in vhdl(component), to will be more fast that the software solution.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    if Z is a real number (ie floating point) dont expect it to be any quicker in an FPGA. I dont quite understand the function thouhg. What is Z=2 meant to mean?