名称:调用FPGA乘法器Verilog代码Quartus仿真
软件:Quartus
语言:Verilog
代码功能:
调用FPGA乘法器IP,实现一款16bitx16bit的正整数二进制数乘法器,以设计报告的格式提交。
设计报告中必须包括:
1.IP请用过程截图,并配以文字说明。
2.仿真截图,并配以文字说明特别的截图中应包括11×11.12×12和13x13的仿真运算结果。
3.FPGA的实现结果,包括FPGA资源利用率。
4.RTL代码以及TB作为附录提供。
FPGA代码Verilog/VHDL代码资源下载:www.hdlcode.com
演示视频:
设计文档:
1. 工程文件
2. 程序文件
IP核调用过程
2.1 选择IP菜单
2.2 选择乘法器IP核
2.3设置位宽为16X16
2.3 设置IP为正数
2.4 点finish
3. 程序编译
4. RTL图
5. 资源占用情况
6. TB(testbench)
7. 仿真图
multiplier_1、multiplier_2是输入的16位乘数,product是32位乘积
转换为十进制显示
可以看到11*11=121,12*12=144,13*13=169
部分代码展示:
// megafunction wizard: %LPM_MULT% // GENERATION: STANDARD // VERSION: WM1.0 // MODULE: lpm_mult // ============================================================ // File Name: MULT16.v // Megafunction Name(s): // lpm_mult // // Simulation Library Files(s): // lpm // ============================================================ // ************************************************************ // THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE! // // 13.0.1 Build 232 06/12/2013 SP 1 SJ Full Version // ************************************************************ //Copyright (C) 1991-2013 Altera Corporation //Your use of Altera Corporation's design tools, logic functions //and other software and tools, and its AMPP partner logic //functions, and any output files from any of the foregoing //(including device programming or simulation files), and any //associated documentation or information are expressly subject //to the terms and conditions of the Altera Program License //Subscription Agreement, Altera MegaCore Function License //Agreement, or other applicable license agreement, including, //without limitation, that your use is for the sole purpose of //programming logic devices manufactured by Altera and sold by //Altera or its authorized distributors. Please refer to the //applicable agreement for further details. // synopsys translate_off `timescale 1 ps / 1 ps // synopsys translate_on module MULT16 ( dataa, datab, result); input[15:0] dataa; input[15:0] datab; output[31:0] result;
点击链接获取代码文件:http://www.hdlcode.com/index.php?m=home&c=View&a=index&aid=660
827