Verilog

Here are a list of commonly designed modules with Verilog codes, testbench, simulation and explanations:
Note that all the below codes are completely synthesizable.
Level-1 Verilog codes

Level-2 Verilog Codes

Simple MIPS Processor Design Using Verilog 

Verilog Practice:

Verilog/VHDL are regarded as HDLs or Hardware Descriptive Languages. They are essentially used to model digital hardware designs.

Verilog modelling methods:
  1. Gate-level modelling:  This is the lowest level of modelling that directly deals with logic gates using pre-defined gate models.
  2. Dataflow Modelling: This method makes use of operators to obtain the desired operation of the logic circuit based on their function.
  3. Behavioural Modelling: This method uses an algorithmic approach to obtain the desired logic circuit and makes use of statements like if-else, case etc.
An ideal digital designer is one who can completely design the circuit (Combinational/Sequential) by following the design steps, model the circuit in a HDL like Verilog and simulate the circuit to ensure correct operation.

For purely Combinational circuits, Gate-level modelling is ideal, if not go for Dataflow.
For complex designs that include Combinational as well as Sequential circuits, Behavioural modelling is the preferred mode due to its algorithmic style.

Main differences between Verilog and programming languages:
  1. Verilog statements do not execute from top to bottom. All statements execute at the same time unless there is an always block with specific conditions.
  2. Verilog coding is not just about getting the output. It is about how much of hardware resources have been consumed to obtain that output. Hence the code must be as compact as possible to avoid excess hardware usage.

No comments:

Post a Comment