Verilog Lab This presentation includes some material that is selected from BUCKNELL VERILOG HANDBOOK. Instructor: Dr. Charles Liu Prepared by John Ren.

Slides:



Advertisements
Similar presentations
Xilinx 6.3 Tutorial Integrated Software Environment (ISE) Set up basic environment Select Gates or Modules to Be simulated (Insert Program Code) Run Waveform.
Advertisements

ENEL111 Digital Electronics
Verilog.
Simulation executable (simv)
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
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.
Hardware Description Language (HDL)
Combinational Logic with Verilog Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer.
16/04/20151 Hardware Descriptive Languages these notes are taken from Mano’s book It can represent: Truth Table Boolean Expression Diagrams of gates and.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part3: Verilog – Part 1.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
CSE 341 Verilog HDL An Introduction. Hardware Specification Languages Verilog  Similar syntax to C  Commonly used in  Industry (USA & Japan) VHDL 
DON’T CARE CONDITIONS Functions that have unspecified output for some input combinations are called incompletely specified functions. Unspecified minterms.
Verilog and VeriWell Bo Cheng.
ECE 353 Computer Systems Lab I Verilog Hardware Description Language.
Silicon Programming--Intro. to HDLs1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities.
CSE241 R1 Verilog.1Kahng & Cichy, UCSD ©2003 CSE241 VLSI Digital Circuits Winter 2003 Recitation 1: Verilog Introduction.
Hardware Description Language HDL. 2 Hardware Description Language HDL  Describes circuits and systems in text. −As a software program.  Can be processed.
Reconfigurable Computing (EN2911X, Fall07) Lecture 05: Verilog (1/3) Prof. Sherief Reda Division of Engineering, Brown University
Computer Organization Lecture Set – 03 Introduction to Verilog Huei-Yung Lin.
University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Guest Lecture by Ben Magstadt CprE 281: Digital Logic.
Guest Lecture by Ben Magstadt CprE 281: Digital Logic.
Lecture Note on Verilog, Course # , EE, NTU, C.H Tsai Basic Logic Design with Verilog TA: Chen-han Tsai.
1 VERILOG Fundamentals Workshop סמסטר א ' תשע " ה מרצה : משה דורון הפקולטה להנדסה Workshop Objectives: Gain basic understanding of the essential concepts.
ECE 2372 Modern Digital System Design
HDL Bencher FPGA Design Workshop. For Academic Use Only Presentation Name 2 Objectives After completing this module, you will be able to:  Describe the.
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.
Module 1.2 Verilog Simulator.  A Verilog program for a particular application consists of two blocks : ◦ Design Block (Module) ◦ Testing Block (Stimulus.
Fall 08, Oct 31ELEC Lecture 8 (Updated) 1 Lecture 8: Design, Simulation Synthesis and Test Tools ELEC 2200: Digital Logic Circuits Nitin Yogi
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
Slide 1 2. Verilog Elements. Slide 2 Why (V)HDL? (VHDL, Verilog etc.), Karen Parnell, Nick Mehta, “Programmable Logic Design Quick Start Handbook”, Xilinx.
ELEE 4303 Digital II Introduction to Verilog. ELEE 4303 Digital II Learning Objectives Get familiar with background of HDLs Basic concepts of Verilog.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
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
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 4: Testing, Dataflow Modeling Spring 2009.
Introduction to Verilog. Data Types A wire specifies a combinational signal. – Think of it as an actual wire. A reg (register) holds a value. – A reg.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Chapter1: Introduction Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 1-1 Chapter 1: Introduction Prof. Ming-Bo.
Verilog Intro: Part 1. Hardware Description Languages A Hardware Description Language (HDL) is a language used to describe a digital system, for example,
CprE 281: Verilog Tutorial Ben Magstadt – Master’s Student Electrical Engineering.
Introduction to Verilog. Structure of a Verilog Program A Verilog program is structured as a set of modules, which may represent anything from a collection.
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.
Introduction to Vivado
TODAY’S OUTLINE Introduction to Verilog Verilog coding format
University of Maryland Baltimore County Department of Computer Science and Electrical Engineering   CMPE 212 Laboratory (Discussion 2) Hasibul Hasan
Introduction to Verilog
Discussion 2: More to discuss
Verilog-HDL-1 by Dr. Amin Danial Asham.
KARTHIK.S Lecturer/ECE S.N.G.C.E
Verilog-HDL-3 by Dr. Amin Danial Asham.
Introduction to Verilog
Hardware Descriptive Languages these notes are taken from Mano’s book
Introduction to Verilog
Instructions to get MAX PLUS running
Lecture 1.3 Hardware Description Languages (HDLs)
Levels in computer design
Hardware Descriptive Languages these notes are taken from Mano’s book
Introduction to Verilog
Introduction to Verilog
Introduction to Verilog
Reconfigurable Computing (EN2911X, Fall07)
Presentation transcript:

Verilog Lab This presentation includes some material that is selected from BUCKNELL VERILOG HANDBOOK. Instructor: Dr. Charles Liu Prepared by John Ren Modified 5/13/04

Verilog Objective. Verilog and HDL.Structural-level modeling and simulation Behavioral modeling and simulation Timing specification Stimulus and control specification Response generation and verification Interactive debugging Achieving optimal performance issues Verilog environment

Verilog Verilog is one of the two major Hardware Description Languages(HDL) used by hardware designers in industry and academia. VHDL is another one Verilog is easier to learn and use than VHDL Verilog is C-like. VHDL is very Aad-like. Verilog HDL allows a hardware designer to describer designs at a high level of abstraction such as at the architectural or behavioral level as well as the lower implementation levels(i.e., gate and switch levels).

Why use Verilog HDL Digital system are highly complex. Verilog language provides the digital designer a software platform. Verilog allow user to express their design with BEHAVIORAL CONSTRUCTS. A program tool can convert the verilog program to a description that was used to make exactly chip, like VLSI.

Using Verilogger Pro V9.0 Evaluation Version. enter the window of Verilogger Start  Program  SynaptiCad  Verilogg er Pro..

How to build a new project Project]  [New Project] Click Menu [ Project]  [New Project]  enter the conversation window. Enter the Project Name. default: untitled.hpj. *.hpj Enter the Project Directory C:\SynaptiCAD\project\ Or others..Click the [Finish] to close the window.

Other menus of [Project] [Open Project] [Open Project] [Close Project] [Close Project] [Save Project] [Save Project] [Save Project as] [Save Project as] [Add User Source Files] [Add User Source Files] all the user source used by this project. all the user source used by this project. Project setting Project setting Print Project Hierarchy Print Project Hierarchy

Verilogger Editor Use the Verilogger Editor to build a program. In the Verilogger Window: click [Editor]  [New HDL file]  pop up a editor window for you.. Others Menu in the [Editor] same as Menu[Project]

Lexical Convention Lexical convention are close to C++. Comment // to the end of the line. /* to */ across several lines. Keywords are lower case letter. the language is case sensitive

Lexical Convention Numbers are specified in the traditional form or below. Size: contains decimal digitals that specify the size of the constant in the number of bits. Base format: is the single character ‘ followed by one of the following characters b(binary),d(decimal),o(octal),h(hex). Number: legal digital.

Lexical Convention Example : 347 // decimal number 4 ’ b101 // 4- bit binary number ’ o12 // 2-bit octal number 5 ’ h87f7 // 5-bit hex number h87f7 2 ’ d83 // 2-bit decimal number String in double quotes “ this is a introduction ”

Lexical Convention Operator are one, two, or three characters and are use in the expressions. just like C++. Identifier: specified by a letter or underscore followed by more letter or digits, or signs. identifier can up to 1024 characters

Program structure Structure module ( ); endmodule. Module name an identifier that uniquely names the module.. Port list a list of input, inout and output ports which are used to other modules.

Program structure. Declares section specifies data objects as registers, memories and wires as well as procedural constructs such as functions and tasks.. Module items initial constructs always constructs assignment ……………….

Test Module structure module ; // Data type declaration // Data type declaration // Instantiate module ( call the module that is going to be tested) // Instantiate module ( call the module that is going to be tested) // Apply the stimulus // Apply the stimulus // Display results // Display results endmodule

Example of gate NAND Truth Table in1 in2 out

Example of gate NAND Behavioral model of a Nand gate //Behavioral model of a Nand gate // program nand1.v module NAND(in1, in2, out); input in1,in2; output out; assign out=~(in1&in2); endmodule

Example of gate NAND Test module test_nand for the nand1.v module test_nand; // high level module to test nand, test_nand1.v reg a,b; wire out1; NAND test_nand1(a,b,out1); // call the module NAND. initial begin // apply the stimulus, test data a=0; b=0; // initial value #1 a=1; // delay one simulation cycle, then change a=1. #1 b=1; #1 a=0; #1; end initial begin // setup monitoring $monitor( “ Time=%0d a=%b b=%b out1=%b ”, $time,a,b,out1); end endmodule

Example of gate NAND Save the HDL files as nand1.v in menu [Editor]  [Save HDL File As] and save another HDL file as test_nand1.v Attach these two HDL files to a new project test.hpj in [project window] Run the simulation program run/resume simulation button or in the [simulate].

How to build a new project?

How to create a HDL file?

How to save the HDL file?

How to add a source HDL file to a Project(project1)

Now, Ready to run the program!

The Report Window of Verilogger.(all the simulation information is in this window)

Example of gate NAND Simulation report from Verilog-Report window. Running... Time=0 a=0 b=0 out1=1 Time=1 a=1 b=0 out1=1 Time=2 a=1 b=1 out1=0 Time=3 a=0 b=1 out1=1 0 Errors, 0 Warnings Compile time = , Load time = , Execution time = Normal exit

Diagram window of Simulation result

How to copy the diagram to Microsoft Word!

Example of gate NAND Wave from Verilog diagram. Verilog windows click the diagram windows  click [edit]  copy to clipboard  select “ wave form, name and time line ”  select “ ok ”  then you can paste the diagram to anywhere you want.

You can paste the diagram here!

Examples 2 NAND Structural model //structural model of a Nand gate // program nand2.v module NAND(in1, in2, out2); input in1,in2; output out2; nand nand2(out2,in1,in2);// first port must be output. endmodule

Examples 2 NAND Test module same as the behavioral model. Save the HDL Editor program as nand2.v, another as test_nand2.v Attach these two HDL files to a new project test.hpj Run the simulation program run/resume simulation button or in the [simulate].

Examples 2 NAND Nand2 simulation report. Running... Time=0 a=0 b=0 out1=1 Time=1 a=1 b=0 out1=1 Time=2 a=1 b=1 out1=0 Time=3 a=0 b=1 out1=1 0 Errors, 0 Warnings Compile time = , Load time = , Execution time = Normal exit

Examples 2 NAND Wave of Nand2

Example 3 Run the additional program in the verilogger to understand the detail of programming. MUX2_1. OR gate NOT gate Fulladder