1、 1 基于基于 FPGA 自动量程频率计自动量程频率计 摘要摘要: 系统基于 EDA 技术的自动量程频率计实现,以现场可编程门阵列(FPGA)为设 计核心,集成于一片 ALtera 公司的 ACEX 系列 EP1K100QC2083 芯片上,采用超高速硬 件描述语言(VHDL)模块化编程,实现了被测信号的频率、计数、周期测量,并显示在 8 个数 码管上等功能。 本设计的特点在于能够完成被测信号的频率手动和自动测量, 当超量程和欠 量程时能报警提示,并当自动模式时能自动切换到适合的量程,该系统具有集成度高、灵活 性强、易于开发和维护等特点。 关键字关键字: FPGA VHDL 自动量程频率计 计
2、数 周期测量 A Abstract: bstract: The system based on the EDA technique achieve the Automatic measurement frequency meter, centering on FPGA(Field Programmable Gate Array) and adopting VHDL(VHSIC Hardware Description Language) as the platform to carry out the modularization programming. The whole design i
3、ntegrates on the ACEX series EP1K100QC2083 chip of the ALtera company .Our design realizes the measurement of measured signal s frequency and cycle ,counting and displaying the results on the nixie tubes. This design features in achieving the measurement of frequency manually or automatically, and i
4、t can give an alarm when it over range or owe range. When you choose the automatic mode, it also can change for the suitable range. The system has the features of high integration , strong flexibility and easy to develop and maintain. Key word: FPGA VHDL Automatic range frequency meter counting peri
5、odic measurement 2 目目 录录 一、设计要求一、设计要求 5 二、系统设计二、系统设计 5 三、单元模块设计三、单元模块设计 .6 四、仿真与调试四、仿真与调试 . 13 五、优化与约束五、优化与约束 . 13 六、协同与分工六、协同与分工 . 14 七、心得体会七、心得体会 (总结)(总结) . 14 八、参考文献八、参考文献 14 九、附录(所有程序)九、附录(所有程序) 15 3 一、设计要求一、设计要求 设计一个 3 位十进制频率计, 分三个基本量程: 1kHz、 10kHz、 100kHz (读数对应 .999 、 9.99、99.9,单位 kHz) ,量程自动或手
6、动转换。 量程自动或手动转换规则 1、当读数大于 999 时,处于超量程状态,显示器发出溢出指示(最高位显示 F) ,下一 测量周期量程增加一档; 2、当读数小于 90 时,处于欠量程状态,显示器发出欠量程指示(最高位显示 L) ,下 一测量周期量程减小一档; 超欠量程时时声音提示; 频率计同时具有计数功能,计数范围为 09999999,由显示计数值时,最高位显示 c; 超出计数范围时,显示 cF。 要求:测量周期固定为 500ms,3 个“量程选择”键、1 个“手/自动量程” 模式选择 建和 1 个“频率/计数”显示模式选择键以及 1 个“计数清零”键;量程模式状态、显示模 式状态、量程状态分别由 LED 指示。 发挥:信号周期测量、占空比测量等。 二、系统设计二、系统设计 基准信号选择 4.19MHz 频率的方波,通过分频可产生系统所需信号,数码管使用 8 个, 动态扫描显示,可显示频率值、计数值、周期值。一个开关控制频率/计数功能切换,一个 控制自动或手动量程功能, 一个开关控制信号周期的显示。 三