欢迎来到天天文库
浏览记录
ID:6634179
大小:30.00 KB
页数:15页
时间:2018-01-20
《基于dds信号技术的信号发生器的设计》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、基于DDS信号技术的信号发生器的设计直接数字式频率合成技术DDS是新一代的频率合成技术,采用数字控制信号的相位增加技术,具有频率分辨率高,频率切换快,频率切换时相位连续和相位噪声低以及全数字化易于集成等优点而被广泛采用。一.程序代码(1)ADDER32Blibraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entityADDER32Bisport(ain:instd_logic_vector(31downto0);bin:instd_logic_vector(31downto0);cout:outstd_lo
2、gic_vector(31downto0));end;architectureoneofADDER32Bisbegincout<=ain+bin;end;(2)juxing_romLIBRARYieee;USEieee.std_logic_1164.all;LIBRARYaltera_mf;USEaltera_mf.all;ENTITYjuxing_romISPORT(address:INSTD_LOGIC_VECTOR(11DOWNTO0);clock:INSTD_LOGIC;q:OUTSTD_LOGIC_VECTOR(7DOWNTO0));ENDjuxing_rom;ARCHITECTUR
3、ESYNOFjuxing_romISSIGNALsub_wire0:STD_LOGIC_VECTOR(7DOWNTO0);COMPONENTaltsyncramGENERIC(address_aclr_a:STRING;init_file:STRING;intended_device_family:STRING;lpm_hint:STRING;lpm_type:STRING;numwords_a:NATURAL;operation_mode:STRING;outdata_aclr_a:STRING;outdata_reg_a:STRING;widthad_a:NATURAL;width_a:N
4、ATURAL;width_byteena_a:NATURAL);PORT(clock0:INSTD_LOGIC;address_a:INSTD_LOGIC_VECTOR(11DOWNTO0);q_a:OUTSTD_LOGIC_VECTOR(7DOWNTO0));ENDCOMPONENT;BEGINq<=sub_wire0(7DOWNTO0);altsyncram_component:altsyncramGENERICMAP(address_aclr_a=>"NONE",init_file=>"../MIF/juxing.mif",intended_device_family=>"Cyclone
5、",lpm_hint=>"ENABLE_RUNTIME_MOD=NO",lpm_type=>"altsyncram",numwords_a=>4096,operation_mode=>"ROM",outdata_aclr_a=>"NONE",outdata_reg_a=>"CLOCK0",widthad_a=>12,width_a=>8,width_byteena_a=>1)PORTMAP(clock0=>clock,address_a=>address,q_a=>sub_wire0);ENDSYN;(3)mux3_1libraryieee;useieee.std_logic_1164.all
6、;entitymux3_1isport(sin:instd_logic_vector(7downto0);sanjiao,juxing:instd_logic_vector(7downto0);a,b:instd_logic;cout:outstd_logic_vector(7downto0));endmux3_1;architecturebehaviorofmux3_1issignaladdr:std_logic_vector(1downto0);beginprocess(a,b)beginaddr(0)<=a;addr(1)<=b;caseaddriswhen"00"=>cout<=sin
7、;when"01"=>cout<=sanjiao;when"10"=>cout<=juxing;whenothers=>null;endcase;endprocess;endbehavior;(4)sanjiao_romLIBRARYieee;USEieee.std_logic_1164.all;LIBRARYaltera_mf;USEaltera_mf.all;ENTITYsanjiao_rom
此文档下载收益归作者所有