# help needed to implementinh some formula on xilinx FPGA

Status
Not open for further replies.

#### vaf20

##### Full Member level 3
help needed to . . .

hi all
i would like to implement following formula on xilinx FPGA

A=(Sqrt(x^2+y^2)*Sqrt(z^2+t^2))/(Sqrt(k^2+H^2)*Sqrt(L^2+M^2))
B=[ArcTan(x/y)-ArcTan(z/t)]-[ArcTan(k/h)-ArcTan(l/m)]

i know i can implement Sqrt and Arctan or even sin , ... by implementing cordic block,but i feel there is better way to do it.
how i can implement exactly with better method?
how about xilinx coregenerator - cordic block , anyone try it?

any comment or idea or help is highly appreciated

#### vaf20

##### Full Member level 3
Re: help needed to . . .

hi again
i think this message is not off-topic but i can not undrestand why there
is no idea or comment!
is there anyone ot drop message to help me?
thanks

#### r_e_m_y

##### Member level 4
Re: help needed to . . .

Hi,

may be nobody on this forum has ever tryed to implement an ArcTan function in a FPGA.

#### ashishjindal76

##### Member level 4
help needed to . . .

try for the embeded solution or system on chip solution that would really help u out and impliment it on fpga.

ashish

#### vaf20

##### Full Member level 3
Re: help needed to . . .

tnx really 2 ashish
can u tell more about embeded solution or system on chip solution ?

#### Big Boy

##### Full Member level 4
Re: help needed to . . .

Look at opencores.org, I remember seeing a co-processor core.

From there, implementing roots and trigo are more complicated. You will need to do it over multiple clock cycles. I suggest looking for papers on series expansion (for trigo functions) and on root extractions.

In any case, you can't implement those as a single clock cycle operations.

#### eltonjohn

Re: help needed to . . .

To implement that in a core .. You need Matlab .. Then Sysgen .
to generate a core in VHDL with that equation

#### vaf20

##### Full Member level 3
Re: help needed to . . .

tnx 2 eltonjohn
any help!