Write a Verilog test bench that goes through every possible input, and for each input, prints out either “match” or “mismatch” depending on whether the above two modules produce the same or different output.
Expert Solution
arrow_forward
Step 1
- Add module definition.
- Declare port.
- internal wire declaration.
- gate instantiations.
arrow_forward
Step 2
// module definition
module AOI(A, B, C, D, Y);
// port declaration
input A, B, C;
output D;
// internal wireing declaration
wire E, F;
// instantiations to gate
or or1(E, A, B);
and and1(F, B, C);
nand nand1(D, E, F);
endmodule