基于FPGA定点乘法器
21世纪,随着计算机的普及,以及信息技术的高速发展,对各电子产品中的器件处理速度和性能的要求日益提上日程。在高速数字信号处理器和位处理器等各类芯片中,乘法器扮演了一个相当重要的角色。可以说,它是各芯片中必不可少的逻辑基础单元。在一些器件的延时电路中,乘法器对器件的性能及处理速度也往往起到了决定性的作用。在电子科学中,我们知道在一个时钟周期内,需要将乘法运算完成。而这个乘法运算的周期基本上决定了乘法器所在的处理器的主频。因此高性能的乘法器是现代微处理器及高速数字信号处理中的重要部件。在数字信号处理运算中,乘法器是最基本的设计单元之一,它是现代微处理器中的关键部件,比如最常用的的滤波器、FFT都要用到用到乘法器。现实中可以用多种多样的方法实现乘法器。针对目前国内乘法器的几种主流的设计思想,我们将对移位相加乘法器、加法器树乘法器、阵列乘法器、查找表乘法器、BOOTH乘法器、混合乘法器等进行详细研究。M000109
关键字:定点数 乘法器 硬件描述语言(VHDL) QuartusⅡ
FPGA Based fixed-point multiplier
In twenty-first Century, along with the popularization of computer, and the rapid development of the information technology, the electronic products in thedevice processing speed and performance requirements increasingly on the agenda. In the high speed digital signal processor and the processor and other kinds of chips, multiplier plays a very important role. Can say, it is thelogical basis of essential element in each chip. In the delay circuit, some devices, performance and processing speed multiplier on the device is also often played a decisive role. In the electronic science, we know in one clock cycle, will need to complete the multiplication. And the cycle of the multiplication basically determines the frequency multiplier is processor. So the high performance multiplier is an important part of modern microprocessor and high-speed digital signal processing. In the digital signal processing operations, the multiplier is one of the most basic unit of the design, it is the key component in the modern microprocessors, such as the most commonly used filter, FFT should be used using multiplier. Realization of multiplier with a variety of methods to reality. According to the design idea of the current several mainstream domestic multiplier, we will make a detailed research on the shifter adder multiplier, adder tree multiplier, multiplier, multiplier arraylookup table, BOOTH multiplier, multiplier.
Key words:Fixed-point number ;multiplier ;Hardware description language ;QuartusⅡ
目录 查看完整请+Q:351916072获取
1. 引言 6
1.1概述 6
1.2研究背景 6
2. 基础知识介绍 8
2.1定点数 8
2.2 定点表示与浮点表示的比较 9
2.3乘法器 10
3. 运行平台及仿真软件简介 12
3.1 实验平台 12
3.2 Verilog HDL及QuartusⅡ9.0 简介 12
4. 移位相加乘法器 15
4.1 原理介绍 15
4.2 模块设计 15
4.3 程序代码 16
4.4 程序仿真与验证 21
4.5资源消耗 21
5. 加法器树乘法器 23
5.1 设计原理 23
5.2 程序代码 23
5.3资源消耗 25
6. 并行乘法器 26
6.1 设计原理 26
6.2程序代码 26
6.3 时序仿真 26
6.4 资源消耗 27
7. 查表乘法器 28
7.1 查表乘法器 28
7.2 顶层原理图 28
7.3 仿真结果 29
7.4 资源消耗 29
8.混合乘法器 30
8.1 混合乘法器原理 30
8.2 混合乘法器程序代码 30
8.3 模块建立与原理图设计 34
8.4 仿真与验证 35
9. 乘法器比较 36
结束语 37
参考文献 38
致谢词 39
2.3乘法器
乘法器(multiplier)是一种特殊而又基本的电子器件,其作用就是完成两个互不相关的模拟信号的相乘。它可以将两个二进制数相乘。它是由更基本的器件加法器组成的。假设两个无符号数A和B,位宽分别为X和Y。那么为了说明乘法运算,则A和B可以用二进制的形式表示,如下:
注:式子中,,{0,1}.
根据乘法的定义,则有如下的式子:
实现乘法运算最简单的方法就是采用一个两输入的加法器。假设是X和Y位宽的输入,那么乘法采用一个Y位的加法器需要X个周期。这个乘法的移位和相加的算法把X个部分积(partial product)加在一起。每一个部分积是通过将被乘数与乘数的一位相乘,这本质上相当于一次“与”操作,然后将结果移位到这个乘数的位置得到的。
另一个利用类似手工乘法的方法可以更快的实现乘法功能。 这种方法里所有的部分
3.2 Verilog HDL及QuartusⅡ9.0 简介
3.2.1 Verilog HDL
自Verilog HDL的出现,数字电路的设计方法有了根本的改变,使得设计者可以像写C语言程序那样设计电路,从而把更多的精力集中到系统结构和算法实现上。Verilog HDL是一门优秀的硬件描述语言,直观易学,在工业学获得广发应用。
Verilog HDL作为一种硬件描述语言,有如下功能:
1.可以对数字系统建模(多种抽样层次),
2.可以描述设计的行为特性、数据流特性、结构组成,
3.包含监控和设计验证方面的延时与波形产生机制。
4.此外,它提供了编程语言接口,用户可以通过该接口在模拟、验证阶段,从外部访问设计。
因此,用这种语言编程的模型能够在使用Verilog HDL仿真器进行验证。另外,Verilog HDL在C语言的基础上发展起来,很多操作符和机制都从中继承下来,所以在形式上Verilog HDL和C语言有很多异曲同工之妙。
Verilog HDL设计流程图如下所示:查看完整请+Q:351916072获取
关键字:定点数 乘法器 硬件描述语言(VHDL) QuartusⅡ
FPGA Based fixed-point multiplier
In twenty-first Century, along with the popularization of computer, and the rapid development of the information technology, the electronic products in thedevice processing speed and performance requirements increasingly on the agenda. In the high speed digital signal processor and the processor and other kinds of chips, multiplier plays a very important role. Can say, it is thelogical basis of essential element in each chip. In the delay circuit, some devices, performance and processing speed multiplier on the device is also often played a decisive role. In the electronic science, we know in one clock cycle, will need to complete the multiplication. And the cycle of the multiplication basically determines the frequency multiplier is processor. So the high performance multiplier is an important part of modern microprocessor and high-speed digital signal processing. In the digital signal processing operations, the multiplier is one of the most basic unit of the design, it is the key component in the modern microprocessors, such as the most commonly used filter, FFT should be used using multiplier. Realization of multiplier with a variety of methods to reality. According to the design idea of the current several mainstream domestic multiplier, we will make a detailed research on the shifter adder multiplier, adder tree multiplier, multiplier, multiplier arraylookup table, BOOTH multiplier, multiplier.
Key words:Fixed-point number ;multiplier ;Hardware description language ;QuartusⅡ
目录 查看完整请+Q:351916072获取
1. 引言 6
1.1概述 6
1.2研究背景 6
2. 基础知识介绍 8
2.1定点数 8
2.2 定点表示与浮点表示的比较 9
2.3乘法器 10
3. 运行平台及仿真软件简介 12
3.1 实验平台 12
3.2 Verilog HDL及QuartusⅡ9.0 简介 12
4. 移位相加乘法器 15
4.1 原理介绍 15
4.2 模块设计 15
4.3 程序代码 16
4.4 程序仿真与验证 21
4.5资源消耗 21
5. 加法器树乘法器 23
5.1 设计原理 23
5.2 程序代码 23
5.3资源消耗 25
6. 并行乘法器 26
6.1 设计原理 26
6.2程序代码 26
6.3 时序仿真 26
6.4 资源消耗 27
7. 查表乘法器 28
7.1 查表乘法器 28
7.2 顶层原理图 28
7.3 仿真结果 29
7.4 资源消耗 29
8.混合乘法器 30
8.1 混合乘法器原理 30
8.2 混合乘法器程序代码 30
8.3 模块建立与原理图设计 34
8.4 仿真与验证 35
9. 乘法器比较 36
结束语 37
参考文献 38
致谢词 39
2.3乘法器
乘法器(multiplier)是一种特殊而又基本的电子器件,其作用就是完成两个互不相关的模拟信号的相乘。它可以将两个二进制数相乘。它是由更基本的器件加法器组成的。假设两个无符号数A和B,位宽分别为X和Y。那么为了说明乘法运算,则A和B可以用二进制的形式表示,如下:
注:式子中,,{0,1}.
根据乘法的定义,则有如下的式子:
实现乘法运算最简单的方法就是采用一个两输入的加法器。假设是X和Y位宽的输入,那么乘法采用一个Y位的加法器需要X个周期。这个乘法的移位和相加的算法把X个部分积(partial product)加在一起。每一个部分积是通过将被乘数与乘数的一位相乘,这本质上相当于一次“与”操作,然后将结果移位到这个乘数的位置得到的。
另一个利用类似手工乘法的方法可以更快的实现乘法功能。 这种方法里所有的部分
3.2 Verilog HDL及QuartusⅡ9.0 简介
3.2.1 Verilog HDL
自Verilog HDL的出现,数字电路的设计方法有了根本的改变,使得设计者可以像写C语言程序那样设计电路,从而把更多的精力集中到系统结构和算法实现上。Verilog HDL是一门优秀的硬件描述语言,直观易学,在工业学获得广发应用。
Verilog HDL作为一种硬件描述语言,有如下功能:
1.可以对数字系统建模(多种抽样层次),
2.可以描述设计的行为特性、数据流特性、结构组成,
3.包含监控和设计验证方面的延时与波形产生机制。
4.此外,它提供了编程语言接口,用户可以通过该接口在模拟、验证阶段,从外部访问设计。
因此,用这种语言编程的模型能够在使用Verilog HDL仿真器进行验证。另外,Verilog HDL在C语言的基础上发展起来,很多操作符和机制都从中继承下来,所以在形式上Verilog HDL和C语言有很多异曲同工之妙。
Verilog HDL设计流程图如下所示:查看完整请+Q:351916072获取
版权保护: 本文由 hbsrm.com编辑,转载请保留链接: www.hbsrm.com/dzxx/gdxx/495.html