Introduction to Verilog Section 3.10. Outline Set Up the Environment Your First Verilog File Set Up the Test Bench Running the Simulation.

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

ECE 3130 – Digital Electronics and Design
Verilog Section 3.10 Section 4.5. Keywords Keywords are predefined lowercase identifiers that define the language constructs – Key example of keywords:
Verilog XL Tutorial By Greg Edmiston Scott McClure August 2004.
Verilog.
Simulation executable (simv)
CPEN Digital System Design
Review for Exam 2 Using MUXs to implement logic
Verilog Intro: Part 1.
Hardware Description Language (HDL)
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.
Half Adder Sec Sec. 4.5, Schedule 11/13MondayCourse intro, diagnostic test 21/15Wednesday Fundamentals of digital logic design (1) (signed.
Anurag Dwivedi.  Verilog- Hardware Description Language  Modules  Combinational circuits  assign statement  Control statements  Sequential circuits.
Full Adder Section 4.5 Spring, 2014 J.Ou. Schedule 62/3MondayBinary addition: full adder 72/5WednesdayBinary addition: full adder/four-bit adder L2/6ThursdayLab.
1 Brief Introduction to Verilog Weiping Shi. 2 What is Verilog? It is a hardware description language Originally designed to model and verify a design.
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
ECE 272 Xilinx Tutorial. Workshop Goals Learn how to use Xilinx to: Draw a schematic Create a symbol Generate a testbench Simulate your circuit.
Cadence Verilog Simulation Guide and Tutorial PART I ECE 4680 Computer Architecture Fall 2005.
ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.
Introduction to Verilog (Behavioral Modeling). Agenda Gate Delays and User-Defined Primitives Behavioral Modeling Design Examples Hands-on Practice.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
ENEE 408C Lab Capstone Project: Digital System Design Verilog Tutorial Class Web Site:
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.
Hardware Description Language HDL. 2 Hardware Description Language HDL  Describes circuits and systems in text. −As a software program.  Can be processed.
Introduction to Basys 2. Switches Slide switchesPush button switches.
Guest Lecture by Ben Magstadt CprE 281: Digital Logic.
Guest Lecture by Ben Magstadt CprE 281: Digital Logic.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
Lecture Note on Verilog, Course # , EE, NTU, C.H Tsai Basic Logic Design with Verilog TA: Chen-han Tsai.
 Delay values control the time between the change in a right-hand-side operand and when the new value is assigned to the left- hand side.  Three ways.
Mentor Tools tutorial Bold Browser Design Manager Design Architect Library Components Quicksim Creating and Compiling the VHDL Model.
ECE122 – Digital Electronics & 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.
CS 3850 Lecture 3 The Verilog Language. 3.1 Lexical Conventions The lexical conventions are close to the programming language C++. Comments are designated.
The George Washington University School of Engineering and Applied Science Department of Electrical and Computer Engineering ECE122 – 30 Lab 3: Layout.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Module 2.1 Gate-Level/Structural Modeling UNIT 2: Modeling in Verilog.
Use CMOS Transistors to bit a 4-bit Adder. NAND2 symbol Schematic.
Module 1.2 Introduction to Verilog
Simulating a Verilog Description module bigtest;. calc1_top D1(out_data1, out_data2, out_data3, out_data4, out_resp1, out_resp2, out_resp3, out_resp4,
Chap. 4 Modules and Ports. 2 Modules and Ports Modules Ports Hierarchical Names Summary.
ECE 2372 Modern Digital System Design Section 4.8 Xilinx Schematic Capture Simulation Tutorial.
LECTURE III INTRODUCTION TO HDL/VERILOG. HDL: Hardware Description Languages (Verilog for this class) are a way in which digital circuits can be described.
LECTURE IV MODELSIM. Go to the link listed below for a demonstration of how to begin working with Modelsim. The video shows you how to write a Verilog.
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.
Random Number Generation Section 3.10 Section 4.12.
Multiplexers Section Topics Multiplexers – Definition – Examples – Verilog Modeling.
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Verilog Intro: Part 1. Hardware Description Languages A Hardware Description Language (HDL) is a language used to describe a digital system, for example,
LECTURE V TEST BENCHES. As your projects become more complex and multiple modules are employed, it will no longer be possible to simulate them as we did.
CprE 281: Verilog Tutorial Ben Magstadt – Master’s Student Electrical Engineering.
1 VHDL & Verilog Simulator. Modelsim. 2 Change the directory to where your files exist (All of the files must be in a same folder). Modelsim.
ECE122 – Digital Electronics & Design Tanner Tools Tutorial Ritu Bajpai September 4, 2008.
Copyright © 2007 by Pearson Education 1 UNIT 6A COMBINATIONAL CIRCUIT DESIGN WITH VHDL by Gregory L. Moss Click hyperlink below to select: Tutorial for.
Full Adder Verilog(HO: wires/regs, always) Section 4.5 (Full adder)
Introduction to Verilog COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals.
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
Discussion 2: More to discuss
Verilog Introduction Fall
Verilog-HDL-1 by Dr. Amin Danial Asham.
Hardware Descriptive Languages these notes are taken from Mano’s book
Introduction to Verilog
Hardware Descriptive Languages these notes are taken from Mano’s book
Introduction to Verilog sonoma
Doing the VCS Assignment
COE 202 Introduction to Verilog
Presentation transcript:

Introduction to Verilog Section 3.10

Outline Set Up the Environment Your First Verilog File Set Up the Test Bench Running the Simulation

Set Up the Environment Set up the es210 library Create verilogSandBox directory

Add a New Library Pre-requisite step: 1. Start Redhat &Cadence as shown in the lab manual.

Create a verilogSandBox directory Open a terminal. Go to ~r2d2/design/cmrf7sf.V ML/es210 – cd design – cd cmrf7sf.V ML – cd es210 Create a directory called verilogSandBox – mkdir verilogSandBox

Your First Verilog Program module fig3p37 (A,B,C,D,E); output D,E; input A,B,C; wire w1; and G1(w1,A,B); not G2(E,C); or G3(D,w1,E); endmodule

module....endmodule module fig3p37 (A,B,C,D,E); output D,E; input A,B,C; wire w1; and G1(w1,A,B); not G2(E,C); or G3(D,w1,E); endmodule Always start the verilog program with the keyword pair module…endmodule The keyword module must always be terminated by the keyword endmodule.

Keywords module fig3p37 (A,B,C,D,E); output D,E; input A,B,C; wire w1; and G1(w1,A,B); not G2(E,C); or G3(D,w1,E); endmodule fig3p37 is the name of the module.

Semicolon module fig3p37 (A,B,C,D,E); output D,E; input A,B,C; wire w1; and G1(w1,A,B); not G2(E,C); or G3(D,w1,E); endmodule Each Statement is terminated with semicolon.

wire module fig3p37 (A,B,C,D,E); output D,E; input A,B,C; wire w1; and G1(w1,A,B); not G2(E,C); or G3(D,w1,E); endmodule Internal connection is declared with the keyword wire.

Your First Verilog Program module fig3p37 (A,B,C,D,E); output D,E; input A,B,C; wire w1; and G1(w1,A,B); not G2(E,C); or G3(D,w1,E); endmodule And, not or are primitive gates. The output of a primitive gate is always listed first. The inputs can be listed in any order. G1 is an instance of the and gate.

Set Up the Testbench

Test Bench Definition of the module fig3p37 is the module name. I1 is the instance of the module.

Declare A, B, C as Outputs

Test Bench (`) is a back quote. The first number specifies the unit of measurement for delays. The second number specifies the precision for which delays are rounded off.

Initial begin…end The initial keyword is used with a set of statements That begin executing when the simulation is initialized. begin….end The statements are executed in sequence from top to bottom.

Delay/Number Specification # specifies the delay in the number of time units A is one bit with a value of 1.

Running Simulation Execute the Verilog Simulation Display the waveforms Use Schematic Tracer

Execute Verilog Simulation

View Waveform Via SimVision 1: Select on fig3p37_tb 2. Ctrl+ Select Signals 3. Select waveform editor

Run Simulation 1. Click on the play button

Change the Units to ms

Zoom Out

Display Schematic 1. Select the signals with Ctrl. 2. Activate Schematic Tracer.

Move the Cursor and Observe Change in Node Values

Assignment Replace G3 with an XOR gate. Submit – A print-out of the Verilog file – A print-out (screen capture) of the SimVision Window