通用加法器
`timescale 1ns/1ps /* 时延单位为1ns,时延精度为1ps */ module adderN #( parameter N=4 )( input [N-1:0] a, input [N-1:0] b, input cin, output cout, output [N-1:0]sum ); assign {cout, sum} = a + b + cin; endmodule
原文:https://www.cnblogs.com/gmh1996/p/12870413.html