forked from tanchou/Verilog
Training exercise
This commit is contained in:
12
Introduction/bidouille/Gates4.v
Normal file
12
Introduction/bidouille/Gates4.v
Normal file
@@ -0,0 +1,12 @@
|
||||
module top_module(
|
||||
input [3:0] in,
|
||||
output out_and,
|
||||
output out_or,
|
||||
output out_xor
|
||||
);
|
||||
|
||||
assign out_and = in[0] & in[1] & in[2] & in[3];
|
||||
assign out_or = in[0] | in[1] | in[2] | in[3];
|
||||
assign out_xor = in[0] ^ in[1] ^ in[2] ^ in[3];
|
||||
|
||||
endmodule
|
Reference in New Issue
Block a user