verilog_modules
Table of Contents
Verilog Modules
So far we have been writing Verilog top-level modules that test components. In this lecture we learn how to write te components themselves.
Outline
A Verilog top-level (i.e. main) module consists of the following section:
- A
moduleheader - A declaration block
- A circuit block where all the needed components are instantiated and connected via
assign. - One
initialblock - One or more
alwaysblocks.
A Verilog component (i.e. reusable in other modules) differs slightly from a top-level module as indicated below:
- The
moduleheaders is followed by ports, the names of the wires that connect this component to the outside world. - The declaration section indicates which wire is incoming (by using
input) and which is outgoing (usingoutput).
The functionality of the component can be implemented procedurally (in an always block) or structurally (in the circuit instantiation section).
To Do
- Look at the program
alu1band its testeralu1bClientin the Resource Directory.alu1bis a 1-bit adder component made up of basic gates.
- Look at the program
alu2band its testeralu2bClientin the Resource Directory.alu2bis a 2-bit adder component made up of twoalu1badders.
verilog_modules.txt · Last modified: by roumani
