名称:基于FPGA的4位二进制加法器设计Verilog代码VIVADO仿真
软件:VIVADO
语言:Verilog
代码功能:4位二进制加法器
FPGA代码Verilog/VHDL代码资源下载:www.hdlcode.com
演示视频:
设计文档:
1. 工程文件
2. 程序文件
3. 程序编译
4. IP核
5. 管脚约束
6. Testbench
7. 仿真图
部分代码展示:
`timescale 1ns / 1ps ////////////////////////////////////////////////////////////////////////////////// // Company: // Engineer: // // Create Date: 2019/09/01 13:05:36 // Design Name: // Module Name: adder_test // Project Name: // Target Devices: // Tool Versions: // Description: // // Dependencies: // // Revision: // Revision 0.01 - File Created // Additional Comments: // ////////////////////////////////////////////////////////////////////////////////// module adder_test(); reg [3 : 0] add_a; reg [3 : 0] add_b; reg add_cin; wire [3 : 0] sum_out; wire cout_out; adder_4bit i_adder_4bit( . add_a(add_a), . add_b(add_b), . add_cin(add_cin), . sum_out(sum_out), . cout_out(cout_out) ); initial begin add_a=4'd0; add_b=4'd0; add_cin=0; #100; add_a=4'd10; add_b=4'd5; add_cin=0; #100; add_a=4'd8; add_b=4'd9; add_cin=1; #100; #100; add_a=4'd12; add_b=4'd10; add_cin=0; #100; end
点击链接获取代码文件:http://www.hdlcode.com/index.php?m=home&c=View&a=index&aid=831
阅读全文
866