基于FPGA的FSK调制与解调有详细代码和注释(上传百度) 联系客服

发布时间 : 星期一 文章基于FPGA的FSK调制与解调有详细代码和注释(上传百度)更新完毕开始阅读5c2ccd7e7cd184254b3535ae

摘 要

现代通信系统要求通信距离远、通信容量大、传输质量好。作为其关键技术之一的调制解调技术一直是人们研究的一个重要方向。调制解调的方法与实现方式多种多样,其性能的好坏直接关系到整个系统的性能。本次设计采用2FSK,它实现起来较容易,抗噪声与抗衰减的性能较好。可广泛用于计算机网络、办公自动化、远程自控系统及移频通信中。

二进制频移键控是利用基带信号控制载波频率来传送信息。例如:码元‘1’用f1来传输,码元‘0’用f2来传输。本设计采用键控法来实现2FSK信号的调制,既在二进制基带信号的控制下通过开关对两个不同的独立频率源进行选通,使其在每一个码元Ts期间输出f1或f2两个载波之一。而解调则采用在一个码元周期内统计收到信号的过零数进行判决的方法实现。鉴于EDA技术的广泛应用,本设计使用VHDL语言描述并实现该系统功能。

本文先对2FSK调制解调的原理、EDA技术和Quartus II软件作了简介。而后对具体的硬件描述语句进行了分析说明,对设计结果进行了仿真和分析。在此基础上使用EDA GW-48实验箱进行硬件测试,证明设计确实合理可靠。

关键词:2FSK调制解调,仿真,调试,VHDL语言

I

Abstract

Modern communication systems require far distance communications, telecommunications capacity, and transmission quality. As one of the key technologies of its modem technology has always been an important researching direction of people. There are various methods to implement it, its performance has a direct relationship to the overall system performances. This design use 2FSK modulation because of its well anti-noise and anti-attenuation performances, and ease to implement. It can also be widely used in computer networking, office automation, remote-controlled system and the frequency shift in communication.

The 2FSK transmit information with two different carrier frequency which is selected by the baseband signal. For example, the data ?0? is presented by the carrier frequency f1 and the data ?1? is presented by the carrier freqnency f2. This design uses the keying to implement the 2FSK modulation. It means that two independent frequency is gated through the switch under the control of binary baseband signal in each symbol period. The demodulation is implemented with counting the number of received signal's zero crossing and decision in a symbol period . Thanks to the wide use of EDA technology, This design using VHDL language(Hardware description language)to describe and implement the system functions.

In this paper, firstly, the principle of 2FSK?s modulation and demodulation or EDA technology and the Quartus II software are introduced particularly. Secondly, it analyze the specific hardware description statement and simulation. On this basis, the EDA GW-48 test box hardware test to prove that the design is indeed reasonable and reliable.

Keywords: 2FSK modem, Simulation,debugging, the VHDL language

II

目 录

摘 要 ····················································································································································· I Abstract ················································································································································· II

第一章 绪论 ··········································································································································· 1

第二章EDA技术简介 ···························································································································· 3

2.1、Quartus II简介 ················································································································· 3

2.1.1、QuartusII开发系统的特点 ·················································································· 3 2.2、VHDL语言简介 ······················································································································ 4

2.2.1、VHDL 语言的特点 ···································································································· 4 2.2.2、VHDL语言的基本结构 ····························································································· 5 2.3、本章小结 ······························································································································· 6

第三章 2FSK调制解调基本原理 ······································································································· 7

3.1、2FSK的调制原理 ················································································································· 7 3.2、2FSK的解调原理 ················································································································· 8 3.3、本章小结 ······························································································································· 9

第四章 基于VHDL语言的2FSK调制解调设计 ············································································ 10

4.1、2FSK调制器设计 ··············································································································· 10

4.1.1、基于VHDL语言的调制程序 ················································································· 10 4.2、2FSK解调器设计 ··············································································································· 12

4.2.1、基于VHDL语言的解调程序 ················································································· 12 4.3、分频器与信号发生器设计 ······························································································· 17

4.3.1、基于VHDL语言的分频程序 ················································································· 17 4.3.2基于VHDL语言的信号发生器程序 ······································································· 18 4.4、本章小结 ····························································································································· 20

第五章 基于VHDL语言的2FSK调制解调的仿真 ········································································ 21

5.1、2FSK调制器波形仿真 ······································································································· 21 5.2、2FSK解调器波形仿真 ······································································································· 22 5.3、分频器与信号发生器波形仿真 ······················································································ 23

III

5.3.1、分频器波形仿真 ···································································································· 23 5.3.2、信号发生器波形仿真 ···························································································· 24 5.4、本章小结 ····························································································································· 24

第六章 上机测试 ································································································································· 25

6.1、程序下载 ····························································································································· 25 6.2、波形测试 ····························································································································· 25 6.3、本章小结 ····························································································································· 27

总结 ························································································································································· 28 参考文献 ················································································································································ 29 致谢 ·························································································································· 错误!未定义书签。

IV