`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 02/06/2018 [Link] PM
// Design Name:
// Module Name: fulladder01sim
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module fulladder01sim( );
reg a,b,c;
fulladder01 inst(a,b,c,s,c1);
initial
begin
a=0;
b=0;
c=0;
#20;
c=1;
#20;
b=1;
c=0;
#20;
c=1;
#20;
a=1;
b=0;
c=0;
#20;
c=1;
#20;
b=1;
c=0;
#20;
c=1;
end
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 02/06/2018 [Link] PM
// Design Name:
// Module Name: fulladder01sim
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module fulladder01sim();
reg a,b,c;
fulladder01 inst(a,b,c,s,c1);
initial
begin
a=0;
b=0;
c=0;
#20;
c=1;
#20;
b=1;
c=0;
#20;
c=1;
#20;
a=1;
b=0;
c=0;
#20;
c=1;
#20;
b=1;
c=0;
#20;
c=1;
end
endmodule
endmodule
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 02/06/2018 [Link] PM
// Design Name:
// Module Name: fulladder01
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module fulladder01(
input a,
input b,
input c,
output s,
output c1
);
assign s=a^b^c;
assign c1=(a&c)|(b&c);
endmodule