a) Use Quartus to create a structural Verilog model of a 3x8 decoder using only NAND gates and inverters. You may use NAND gates having any number of inputs. Simulate the Verilog model and verify that it gives the correct output. Carefully consider what set of input values would provide a good test of the decoder's function. Submit the source code for your Verilog model and the simulation waveform that shows all inputs and outputs.
b) Count the number of transistors in the circuit that you represented in part (a) of this problem. Show your calculations.
Using the decoder module you created for part a, implement the Boolean function ZXX+Z.AX+ZXX=Z'xX by instantiating the decoder and one OR gate. Submit the source code for your Verilog model and the simulation waveform that shows all inputs and outputs.
Reminder: Put the decoder module definition in the same .v file as your top-level module. Make sure your .v file has the necessary wire declarations to connect the decoder and OR gate in your top-level module.
Hint: If you need to concatenate signals in Verilog, use (.....). For example, to combine the three scalar signals A, B, and C into a 3-bit vector with A as the most significant bit and C as the least significant bit, it looks like this (A,B,C).