0% found this document useful (0 votes)
7 views9 pages

Verilog Behavioral Modeling Guide

The document provides a tutorial on latches and behavioral modeling in Verilog, highlighting different modeling styles such as gate-level, dataflow, and behavioral modeling. It explains the distinction between structural and behavioral modeling, emphasizing that behavioral modeling focuses on the system's logic rather than its physical structure. Additionally, it discusses the use of always blocks and procedural statements in behavioral modeling, and mentions upcoming lab preparations for various modules.

Uploaded by

f20231115
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views9 pages

Verilog Behavioral Modeling Guide

The document provides a tutorial on latches and behavioral modeling in Verilog, highlighting different modeling styles such as gate-level, dataflow, and behavioral modeling. It explains the distinction between structural and behavioral modeling, emphasizing that behavioral modeling focuses on the system's logic rather than its physical structure. Additionally, it discusses the use of always blocks and procedural statements in behavioral modeling, and mentions upcoming lab preparations for various modules.

Uploaded by

f20231115
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Latches + Behavioural

Modelling Tutorial
Manan Nandha
Hrishant Bheda
SR Latch
D Latch
Verilog Modeling Styles

● Gate-level modeling: Describes circuits with logic gates (and, or, not).

● Dataflow modeling: Uses continuous assignments and operators (assign out


= a & b;).

● Behavioral modeling: Describes what the circuit should do, not how it’s built.

● Behavioral = closest to writing pseudo-code → compiler synthesizes hardware.


What is behavioural modelling?

This approach focuses on describing the behavior of the system rather than the
specific [Link] allows you to specify the logic of the system using higher-level
constructs like if, case, and loops. Structural Modeling describes the hardware by
specifying how different components (modules, gates, etc.) are connected. It mirrors
the actual physical circuit.

Structural - WHAT
Behavioural - HOW
Always Block

Defined using always @(sensitivity_list)

Executed whenever signals in sensitivity list change.

begin and end are like opening and closing parenthesis in a code.

In the given example y is updated to the value of a&b whenever input a or input b
changes.
Procedural Statements
wire in Structural vs reg in Behavioral

Structural Modeling Behavioral Modeling

● Outputs are driven by continuous ● Outputs are assigned inside an always


assignments (assign) or gate primitives. block.

● Hence, outputs are usually wire type. ● always requires storage → must be
declared reg.
Please refer to the shared verilog code to see the
behavioral implementation of SR latch and D latch.
For the next lab please prepare mux, decoder,
encoder and other modules covered in class.

You might also like