1 / 23
文档名称:

电子科技大学 电子技术实验 FPGA 频率计 实验报告.docx

格式:docx   大小:425KB   页数:23页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

电子科技大学 电子技术实验 FPGA 频率计 实验报告.docx

上传人:shijijielong001 2022/6/19 文件大小:425 KB

下载得到文件列表

电子科技大学 电子技术实验 FPGA 频率计 实验报告.docx

相关文档

文档介绍

文档介绍:现代电子技术综合实验》论文报告
29013050XXXXX
中文摘要
摘要:随着电子信息产业的不断发展,信号频率的测量在科技研究和实际应用中的作用日益重要。传统的频率计通常是用很多的逻辑电路和时序电路来实现的,这种电路一般运行缓慢,而
clkinclkoutl
clkoutw
clkoutlOO
clkoutlk
entityfreq_dividerisport(clkin:instd_logic;
clkoutl:outstd_logic;clkoutlO:outstd_logic;clkoutlOO:outstd_logic;clkoutlk:outstd_logic);
endfreq_divider;
architectureBehavioraloffreq_dividerissignalclkcnt1:integerrange0to48000000:=0;signalclkcnt10:integerrange0to4800000:=0;signalclkcnt100:integerrange0to480000:=0;signalclkcnt1k:integerrange0to48000:=0;signalclk1,clk10,clk100,clk1k:std_logic:=T;
begin
fc1:process(clkin)
begin
ifrising_edge(clkin)then
讦clkcnt1=24000000then
clkcnt1<=1;
clk1<=notclk1;
else
clkcnt1v=clkcnt1+1;endif;
endif;
endprocess;
fc10:process(clkin)
begin
ifrising_edge(clkin)then
ifclkcnt10=2400000thenclkcnt10<=1;clk10<=notclk10;
elseclkcnt10<=clkcnt10+1;
endif;
endif;
endprocess;
fc100:process(clkin)
begin
ifrising_edge(clkin)then
ifclkcnt100=240000thenclkcnt100<=1;clk100<=notclk100;elseclkcnt100<=clkcnt100+1;endif;
endif;
endprocess;
fc1k:process(clkin)
begin
ifrising_edge(clkin)then
ifclkcnt1k=24000thenclkcnt1k<=1;clk1k<=notclk1k;
elseclkcnt1k<=clkcnt1k+1;
endif;
endif;
endprocess;
--assignment
clkout1<=clk1;
clkout10<=clk10;
clkout100<=clk100;
clkout1k<=clk1k;
endBehavioral;
2、闸门选择
gatesel
sei
fref
selO
dpi
selOO
f1
dp2
f10
dp3
fl00
entitygate_selis
port(sel:instd_logic;selO:instd_logic;selOO:instd_logic;fl:instd_logic;flO:instd_logic;flOO:instd_logic;fref:outstd_logic;dpl:outstd_logic;dp2:outstd_logic;dp3:outstd_logic);endgate_sel;
architectureBehavioralofgate_selis
signalsel:std_logic_vector(2downto0):="000";begin
sel<=se1&selO&selOO;
process(sel,f1,f1O,f1OO)begin
caseselis
when"100"=>
fref<=f1;
dp1<='0';
dp2v=T;
dp3v=T;
when"010"=>
fref<=f10;
dp1v=T;
dp2v='O';
dp3v=T;
when"001"=>
frefv=flOO;dplv=T;dp2v=T;dp3v='O';
whenothers=>fref<='0';dp1v=T;dp2v=T;dp3v=T;
endcase;
endprocess;
en