full_adder_1.v
上传用户:saul_905
上传日期:2013-11-27
资源大小:184k
文件大小:0k
源码类别:

VHDL/FPGA/Verilog

开发平台:

Visual C++

  1. module full_adder(a,b,cin,out,carry);
  2. input a,b,cin;
  3. output out,carry;
  4. reg out,carry;
  5. reg t1,t2,t3;
  6. always@
  7.           (a or b or cin)begin
  8.           out   =    a^b^cin;
  9.           t1    =    a&cin;
  10.           t2    =    b&cin;
  11.           t3    =    a&b;
  12.           carry =    t1|t2|t3;
  13.           end
  14. endmodule