HDL & Verification
What is the purpose of a module in Verilog?
- ATo define a circuit component with input and output ports so it can be used inside other modules
- BTo pause program execution temporarily
- CTo print simulation results on the screen
Show answer and explanation
Answer: A. To define a circuit component with input and output ports so it can be used inside other modules
A module defines a block of circuitry with input and output ports, representing anything from an adder or counter to an entire CPU. A defined module can be used as a component any number of times inside other modules (instantiation), with its ports wired together to build larger circuits. Circuits are built hierarchically, much like placing and wiring parts on a board.
- A. Correct. It is the unit for building circuits hierarchically.
- B. It does not pause execution.
- C. Display uses $display and similar.