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.

[SOLVED] How to convert angle to binary representation during writing of verilog code for CORDIC algorithm?

Status
Not open for further replies.

ryan1122

Newbie
Joined
Nov 15, 2020
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
62
Hi,
I am writing the verilog code for CORDIC (COordinate Rotation DIgital Computer) in xilinx vivado. For that I need 45, 26.565 degree rotation angle in 32-bit binary form. After searching in the internet I got 45 degree angle can be represented as

assign z[00] = 'b00100000000000000000000000000000;

and 26.565 degree angle can be represented as

assign z[01] = 'b00010010111001000000010100011101;

Can anybody explain to me how they are representing the 45 degree and 26.565 degree angle in binary form? Is there any formula behind it?
 

Hi,
I am writing the verilog code for CORDIC (COordinate Rotation DIgital Computer) in xilinx vivado. For that I need 45, 26.565 degree rotation angle in 32-bit binary form. After searching in the internet I got 45 degree angle can be represented as

assign z[00] = 'b00100000000000000000000000000000;

and 26.565 degree angle can be represented as

assign z[01] = 'b00010010111001000000010100011101;

Can anybody explain to me how they are representing the 45 degree and 26.565 degree angle in binary form? Is there any formula behind it?
bin2dec('00100000000000000000000000000000')/2^32
= 0.12500 %fraction of full circle
convert to degrees
bin2dec('00100000000000000000000000000000')/2^32*360 = 45

similarly:
bin2dec('00010010111001000000010100011101')/2^32*360
= 26.565

by the way xilinx have ip for cordic I believe.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top