Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

xilinx ip core to calculate square root without cordic

Status
Not open for further replies.

DilshanSampath

Newbie level 6
Newbie level 6
Joined
Aug 5, 2017
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
101
hi all,
I am new to this forum and i am beginer in FPGA verilog designs. I need to calculate square root of a decimal number (ex:- 23.456) in zc702 board in efficient way than CORDIC ip core for my project. It is very kind of you if anyone can let me know about any ipcore or algorithms which can calculate square root of decimal number within 2 or 3 clock cycles. thank you.
 

KlausST

Super Moderator
Staff member
Advanced Member level 7
Joined
Apr 17, 2014
Messages
23,495
Helped
4,757
Reputation
9,535
Reaction score
5,172
Trophy points
1,393
Activity points
155,828
Hi,

What range are your decimal values? What resolution and what precision do you need?
--> maybe it's possible to switch to binary numbers instead of decimal numbers.

Btw: why decimal values inside an FPGA? Quite unusual.

Klaus
 

DilshanSampath

Newbie level 6
Newbie level 6
Joined
Aug 5, 2017
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
101
Thank you for replying me. Sorry if my post is unclear. What my target is to have fixed point representation for decimal numbers.(18 bit for integer part and 14 bit for fractional part). What I want to perform is square root of number represented in 32 bits. It's okay to have precision up to 2 bit. Our project is about running vision algorithm and this is a part of it.
 

KlausST

Super Moderator
Staff member
Advanced Member level 7
Joined
Apr 17, 2014
Messages
23,495
Helped
4,757
Reputation
9,535
Reaction score
5,172
Trophy points
1,393
Activity points
155,828
Hi,

Then perfor the square root of the uint32.
The result is uint16 with 9 integers and 7 fractional bits.

Klaus
 

DilshanSampath

Newbie level 6
Newbie level 6
Joined
Aug 5, 2017
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
101
Hi,
Thank you Klaus. Is there a way to perform it without using CORDIC ip available in xilinx tools? Yes I know there are many research papers for that, but I am looking for special IP. Thank you for keep replying me. :smile:
 

KlausST

Super Moderator
Staff member
Advanced Member level 7
Joined
Apr 17, 2014
Messages
23,495
Helped
4,757
Reputation
9,535
Reaction score
5,172
Trophy points
1,393
Activity points
155,828
Hi,

I can't help you with existing IP.

But you could code it on your own.
I once build a very efficient and precise to 1LSB square root algorithm with 16 bit result for microcontrollers.
It worked with a 256 item lookup table, if I remember right.

Klaus
 

DilshanSampath

Newbie level 6
Newbie level 6
Joined
Aug 5, 2017
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
101
Hi,
Thank you very much for your guidance Klaus. You did a great job for me. :thumbsup:
 

dipin

Full Member level 4
Full Member level 4
Joined
Jul 16, 2014
Messages
223
Helped
14
Reputation
28
Reaction score
14
Trophy points
18
Activity points
1,731
hi,

you can do it with restoring or non restoring algorithm. you need to code it
It is very kind of you if anyone can let me know about any ipcore or algorithms which can calculate square root of decimal number within 2 or 3 clock cycles
yes you can do it, but your working frequency will be low. you need to code it serially .there is one paper available in google. search for it please.

regards
 

DilshanSampath

Newbie level 6
Newbie level 6
Joined
Aug 5, 2017
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
101
Hi,
Thank you diplin for your reply. Can you tell me whether we can find square root within 2 or 3 clock cycles using restoring or non restoring algorithm?Is this the paper you mentioned.
Name: New efficient hardware design methodology for modified non-restoring square root algorithm
Authors: Atul Rahman, Abdullah-Al-Kafi
Link: https://ieeexplore.ieee.org/document/6850816/?reload=true

In this paper it says it can be configured to calculate square root of 32 bit length number within 8 clock cycles( more than 2 or 3 clock cycles ;-) )

Thank you very much for your guidance and it's very great if you can guide me more
 

vGoodtimes

Advanced Member level 4
Advanced Member level 4
Joined
Feb 16, 2015
Messages
1,089
Helped
307
Reputation
614
Reaction score
303
Trophy points
83
Activity points
8,730
I think you should refactor your design. Computer vision makes me think you have several pixels, channels, etc... If this is the case you can likely channelize the design where you make use of a pipeline and have multiple independent calculations in the pipeline. I am suspicious that you actually need low-latency vs high-bandwidth.
 

dipin

Full Member level 4
Full Member level 4
Joined
Jul 16, 2014
Messages
223
Helped
14
Reputation
28
Reaction score
14
Trophy points
18
Activity points
1,731
hi,
Can you tell me whether we can find square root within 2 or 3 clock cycles using restoring or non restoring algorithm?
if you pipeline your design, then you will have a initial latency of 16 clock cycles (may be 17 ) after that for every clock cycle you will get the out put. so the initial latency is allowed or not?
if not how you need the output of your design, every 3rd/2nd clock cycle ? input to your square root module is coming from some other system or only your square root module ?
above one is a good paper, instead of doing a single iteration, they are doing two iterations which will reduce the initial latency by half .

what is the operating frequency of your design?

regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top