• 方案介绍
  • 附件下载
  • 相关推荐
申请入驻 产业图谱

基于FPGA的8位booth乘法器Verilog代码Quartus仿真

07/21 11:05
313
加入交流群
扫码加入
获取工程师必备礼包
参与热点资讯讨论

2-240205101FD36.doc

共1个文件

名称:基于FPGA的8位booth乘法器Verilog代码Quartus仿真

软件:Quartus

语言:Verilog

代码功能:8位booth乘法器

FPGA代码Verilog/VHDL代码资源下载:www.hdlcode.com

设计文档:

1. 工程文件

2. 程序文件

3. 程序编译

4. 资源占用

5. RTL图

6. 仿真文件

7. 仿真图

部分代码展示:

module Multiplier_8bit(mult_A, mult_B, mult_product);
parameter width=8;
input [width-1:0] mult_A;
input [width-1:0] mult_B;
output [width+width-1:0] mult_product;
reg [width+width-1:0] mult_product;
integer Count;
reg [width+width:0] PA,right;
always @ (mult_A or mult_B)
begin
PA[width+width:0]={16'b0,mult_A,1'b0}; //{mult_product, mult_A, 1'b0}
for(Count=0;Count<width;Count=Count+1)
begin
 case(PA[1:0])
2'b10://
begin
 //PA=PA-mult_B ;
 PA[width+width:width+1]=PA[width+width:width+1] - mult_B[width-1:0];
rightsh1(PA,right);
end
2'b01:
begin
     //PA=PA+mult_B
PA[width+width:width+1]=PA[width+width:width+1] + mult_B[width-1:0]; 
rightsh1(PA,right);
end

点击链接获取代码文件:http://www.hdlcode.com/index.php?m=home&c=View&a=index&aid=674

  • 2-240205101FD36.doc
    下载

相关推荐