CORDIC算法VHDL实现

CORDIC算法VHDL实现

ID:40474908

大小:53.01 KB

页数:5页

时间:2019-08-03

CORDIC算法VHDL实现_第1页
CORDIC算法VHDL实现_第2页
CORDIC算法VHDL实现_第3页
CORDIC算法VHDL实现_第4页
CORDIC算法VHDL实现_第5页
资源描述:

《CORDIC算法VHDL实现》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、LIBRARYieee;USEieee.std_logic_1164.all;USEieee.std_logic_arith.all;USEieee.STD_LOGIC_UNSIGNED.all;ENTITYcordicCOS_SINISPORT(clk:INstd_logic;deg_in:INstd_logic_vector(13downto0);cos:OUTstd_logic_vector(15downto0);sin:OUTstd_logic_vector(15downto0));ENDcordicCOS_SIN;architecturerlt_cordicCOS_SINo

2、fcordicCOS_SINisconstantc1:std_logic_vector(13downto0):=CONV_STD_LOGIC_VECTOR(4096,14);constantc2:std_logic_vector(13downto0):=CONV_STD_LOGIC_VECTOR(2048,14);constantc3:std_logic_vector(13downto0):=CONV_STD_LOGIC_VECTOR(1209,14);--arctan(1/2)constantc4:std_logic_vector(13downto0):=CONV_STD_LOGI

3、C_VECTOR(639,14);--arctan(1/4)--constantx0:std_logic_vector(15downto0):=CONV_STD_LOGIC_VECTOR(19895,16);signalx0:std_logic_vector(15downto0);signaly1,x1:std_logic_vector(15downto0);signaly2,x2:std_logic_vector(15downto0);signaly3,x3:std_logic_vector(17downto0);signaly4,x4:std_logic_vector(19dow

4、nto0);signalp1,p2,p3,p4:std_logic_vector(13downto0);beginx0<=conv_std_logic_vector(26980,16);---------------------------------step1------------------------------------process(clk)beginifrising_edge(clk)thenifdeg_in(13)='1'theny1<=x"0000"-x0;elsey1<=x0;endif;endif;endprocess;process(clk)beginifr

5、ising_edge(clk)thenx1<=(others=>'0');endif;endprocess;process(clk)beginifrising_edge(clk)thenifdeg_in(13)='1'thenp1<=deg_in+c1;elsep1<=deg_in-c1;endif;endif;endprocess;---------------------------------step2------------------------------------process(clk)beginifrising_edge(clk)thenifp1(13)='1'th

6、eny2<=y1-x1;elsey2<=y1+x1;endif;endif;endprocess;process(clk)beginifrising_edge(clk)thenifp1(13)='1'thenx2<=x1+y1;elsex2<=x1-y1;endif;endif;endprocess;process(clk)beginifrising_edge(clk)thenifp1(13)='1'thenp2<=p1+c2;elsep2<=p1-c2;endif;endif;endprocess;---------------------------------step3----

7、--------------------------------process(clk)beginifrising_edge(clk)thenifp2(13)='1'theny3<=(y2(15)&y2&'0')-(x2(15)&x2(15)&x2);elsey3<=(y2(15)&y2&'0')+(x2(15)&x2(15)&x2);endif;endif;endprocess;process(clk)beginifrising_edge(clk)the

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。