TODAY’S OUTLINE Introduction to Verilog Verilog coding format

Slides:



Advertisements
Similar presentations
The Verilog Hardware Description Language
Advertisements

Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Supplement on Verilog adder examples
ELEN 468 Lecture 21 ELEN 468 Advanced Logic Design Lecture 2 Hardware Modeling.
Chapter 11 Verilog HDL Application-Specific Integrated Circuits Michael John Sebastian Smith Addison Wesley, 1997.
Verilog Intro: Part 1.
Combinational Logic with Verilog Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part3: Verilog – Part 1.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
ECE 353 Computer Systems Lab I Verilog Hardware Description Language.
Verilog Lab This presentation includes some material that is selected from BUCKNELL VERILOG HANDBOOK. Instructor: Dr. Charles Liu Prepared by John Ren.
University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
B. RAMAMURTHY Hardware Description Language 8/2/
Lecture Note on Verilog, Course # , EE, NTU, C.H Tsai Basic Logic Design with Verilog TA: Chen-han Tsai.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
ECE 2372 Modern Digital System Design
Verilog Language Concepts
CS 3850 Lecture 3 The Verilog Language. 3.1 Lexical Conventions The lexical conventions are close to the programming language C++. Comments are designated.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
EEE2243 Digital System Design Chapter 3: Verilog HDL (Combinational) by Muhazam Mustapha, January 2011.
Module 1.2 Introduction to Verilog
L12 – VHDL Overview. VHDL Overview  HDL history and background  HDL CAD systems  HDL view of design  Low level HDL examples  Ref: text Unit 10, 17,
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
Introduction to VLSI Design – Lec01. Chapter 1 Introduction to VLSI Design Lecture # 11 High Desecration Language- Based Design.
1/8/ L2 VHDL Introcution© Copyright Joanne DeGroat, ECE, OSU1 Introduction to VHDL.
ELEE 4303 Digital II Introduction to Verilog. ELEE 4303 Digital II Learning Objectives Get familiar with background of HDLs Basic concepts of Verilog.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Introduction to ASIC flow and Verilog HDL
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Verilog Intro: Part 1. Hardware Description Languages A Hardware Description Language (HDL) is a language used to describe a digital system, for example,
1 University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
1 A hardware description language is a computer language that is used to describe hardware. Two HDLs are widely used Verilog HDL VHDL (Very High Speed.
Introduction to Verilog COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals.
EMT 351/4 DIGITAL IC DESIGN Week # 1 EDA & HDL.
Hardware Description Languages: Verilog
Hardware Description Language
EECE6017C - Lab 0 Introduction to Altera tools and Basic Digital Logic
TODAY’S OUTLINE Verilog Codings Concurrent and Sequential If-else
Reg and Wire:.
Discussion 2: More to discuss
Verilog Introduction Fall
Verilog-HDL-1 by Dr. Amin Danial Asham.
Topics Modeling with hardware description languages (HDLs).
‘if-else’ & ‘case’ Statements
TODAY’S OUTLINE Testbench Circuit Verilog Operators
Verilog-HDL-3 by Dr. Amin Danial Asham.
Hardware Description Languages: Verilog
Topics Modeling with hardware description languages (HDLs).
Chapter 4 Combinational Logic
Programmable Logic Devices: CPLDs and FPGAs with VHDL Design
Hardware Descriptive Languages these notes are taken from Mano’s book
Hardware Description Language
Hardware Description Language
Hardware Description Language
Introduction to Verilog
Lecture 1.3 Hardware Description Languages (HDLs)
102-1 Under-Graduate Project Verilog
Hardware Descriptive Languages these notes are taken from Mano’s book
VHDL Introduction.
Introduction to Digital System and Microprocessor Design
Hardware Description Language
Hardware Description Language
Hardware Description Language
The Verilog Hardware Description Language
EEE2243 Digital System Design Chapter 1: Verilog HDL (Combinational) by Muhazam Mustapha, February 2012.
© Copyright Joanne DeGroat, ECE, OSU
Presentation transcript:

TODAY’S OUTLINE Introduction to Verilog Verilog coding format Module declaration Verilog Data Types Sensitivity list Numbers in Verilog Comments in Verilog

Introduction to Verilog Many companies uses Verilog Can be divided into 3 types of Verilog Structural – netlist format Behavioural – mostly used for analog circuit RTL – describes the functionality of circuit and synthesizable codes

What is RTL RTL – synthesizable codes Some design tools in market capable to auto-generate RTL based on graphical modes Graphical entry can be in the form of flowcharts, truth tables, state diagrams

Cont.. Example of tools widely used for RTL generation: Mentor Graphic’s HDL series With good RTL coding styles, timing and area can be greatly optimized It is therefore essential that any new designs coded by inexperienced designers be checked by experienced Verilog designers

Verilog simulators There are many Verilog simulators Among the more user friendly and widely used is Mentor Graphics ModelSim environment consists of: Verilog editor Verilog simulator Waveform analysis Design debugging ModelSim

TODAY’S OUTLINE Introduction to Verilog Verilog coding format Module declaration Verilog Data Types Sensitivity list Numbers in Verilog Comments in Verilog

Verilog format Unlike VHDL that have entity, architecture and configuration, Verilog only have module declaration The module declaration declares the name of the module being coded and have a list of all the interface signals

Module declaration All Verilog code starts with the keyword “module” Purposely used to describe the name of a module together with interface signals All Verilog code ends with the keyword “endmodule” for terminating the module declaration

Cont.. Example : module test (A,B,C,Y) //enter your verilog code Specification module name = test input = A, B, C output = Y Verilog format module test (A,B,C,Y) //enter your verilog code //more of your verilog code endmodule

Cont.. The module declaration is then followed by the declaration of the direction of the interface signals: input …….; output ……; inout …….;

Cont.. Example : module test (A,B,C,Y) input A,B,C; output Y; Specification module name = test input = A, B, C output = Y Verilog format module test (A,B,C,Y) input A,B,C; output Y; //more of your verilog code endmodule

Cont.. Example : module test (A,B,C,Y) input [2:0] A,B; input [7:0] C; Specification module name = test input = A(3 bit), B(3 bit), C(8 bit) output = Y(5 bit) Verilog format module test (A,B,C,Y) input [2:0] A,B; input [7:0] C; output [4:0] Y; //more of your Verilog code endmodule

Verilog data types Interface signals are declared as either type “reg” or “wire” (commonly used) Other data types such as tri, wand, wor, integer, real, time etc.

Cont.. “reg” – able to hold a value in the Verilog code – a signal being assigned values during certain circuit conditions

Cont.. “wire” – able to assign a value in the Verilog code – real physical wire connection between two gates whereby the value on the wire is consistently updated (continuous)

When to use “reg” and “wire” When using assignment of values in an “always” block, use “reg” declaration When using “assign” statement, always use “wire” declaration

Examples module ANDgate (A, B, Y) input A, B; output Y; wire Y; Data type - wire Data type - reg module ANDgate (A, B, Y) input A, B; output Y; wire Y; assign Y = A & B; endmodule module ANDgate (A, B, Y) input A, B; output Y; reg Y; always @ (A or B) begin Y = A & B; end endmodule

Sensitivity list Sensitivity list is associated with an “always” block Signals that will cause an evaluation of the “always” block MUST be included in the sensitivity list

Example module ANDgate (A, B, Y) input A, B; output Y; reg Y; always @ (A or B) begin Y = A & B; end endmodule Sensitivity list “always” block will be evaluated whenever there is a change in the signals listed in sensitivity list

Numbers in Verilog Numbers in Verilog can be represented as: Real numbers Integer numbers Base numbers (binary, octal, hex, decimal)

Examples Real numbers Integer numbers module …… real A; A = 3.142345; endmodule module …… integer A; A = 3; endmodule Base numbers module …… integer A, B, C; A = 4b’0101; B = 5’o14; C = 8’ha5; D = 5’d14; endmodule Commonly used in Verilog

Comments in Verilog Many designers always neglect to put comments in the code Comments is an important form of documentation on the functionality/objective of the code It helps in making the code readable

Cont.. Single line comments begins with the symbol // Multiple line comments begins with /* and ends with */

Examples module ANDgate (A, B, Y) input A, B; output Y; reg Y; always @ (A or B) begin Y = (A & B)|( A | B); /* (A and B) or (A or B) */ end endmodule module ANDgate (A, B, Y) input A, B; output Y; reg Y; always @ (A or B) begin Y = A & B; // A and B end endmodule

That’s all for today. See u on Tuesday (18 July 2006)..