adder16.v
来自「design compile synthesis user guide」· Verilog 代码 · 共 22 行
V
22 行
module Adder16 (ain, bin, cin, sout, cout, clk);/* Sixteen Bit Adder Module */output [15:0] sout;output cout;input [15:0] ain, bin;input cin, clk; wire [15:0] sout_tmp, ain, bin;wire cout_tmp;reg [15:0] sout, ain_tmp, bin_tmp;reg cout, cin_tmp; always @(posedge clk) begin cout = cout_tmp; sout = sout_tmp; ain_tmp = ain; bin_tmp = bin; cin_tmp = cin;end assign {cout_tmp,sout_tmp} = ain_tmp + bin_tmp + cin_tmp;endmodule
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?