Sunday, 2 February 2014

XOR verilog HDL code

dataflow:

module sw(
    input a,
    input b,
    output c
    );
assign c= a^b;

endmodule

Behavioral :
module sw(
    input a,
    input b,
    output c
    );
reg c;
always @(a or b) begin
c=a^b;
end
endmodule 

No comments:

Post a Comment