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,

Slides:



Advertisements
Similar presentations
Digital System Design-II (CSEB312)
Advertisements

Stimulus and Response. Simple Stimulus Verifying the Output Self-Checking Testbenches Complex Stimulus Complex Response Predicting the Output.
Chapter 15:Introduction to Verilog Testbenches Objectives In this section,you will learn about designing a testbench: Creating clocks Including files Strategic.
Verilog XL Tutorial By Greg Edmiston Scott McClure August 2004.
Verilog Fundamentals Shubham Singh Junior Undergrad. Electrical Engineering.
Verilog.
Simulation executable (simv)
The Verilog Hardware Description Language
Supplement on Verilog adder examples
Synchronous Sequential Logic
Verilog Modules for Common Digital Functions
Verilog Intro: Part 1.
Anurag Dwivedi.  Verilog- Hardware Description Language  Modules  Combinational circuits  assign statement  Control statements  Sequential circuits.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
Verilog. 2 Behavioral Description initial:  is executed once at the beginning. always:  is repeated until the end of simulation.
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.
1 Verilog Digital Computer Logic Kashif Bashir WWW: http//:
Calculator Lab Exercises Bruce Wile, IBM Design Automation Conference Sunday, June 9, 2002.
Calculator Design n Calculator has 4 functions: è Add è Subtract è Shift left è Shift right n Calculator can handle 4 requests in parallel è All 4 requestors.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.
Communication IC & Signal Processing Lab. Chih-Peng Fan1 PreSim CoreGenerator IP in ISE 5.1i with Verilog HDL.
Verilog Sequential Circuits Ibrahim Korpeoglu. Verilog can be used to describe storage elements and sequential circuits as well. So far continuous assignment.
Arbitrary Waveform Discussion 12.2 Example 34. Recall Divide-by-8 Counter Use q2, q1, q0 as inputs to a combinational circuit to produce an arbitrary.
Silicon Programming--Intro. to HDLs1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities.
Lab 1 Calculator Overview CSE Functional Verification SUNY New Paltz.
Lessons from last lab: 1.Many had the “# skipping” problem 2.Most assumed there was something wrong with their code 3.How does one check their code? 4.SIMULATE!!
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
Guest Lecture by Ben Magstadt CprE 281: Digital Logic.
RTL Coding tips Lecture 7,8 Prepared by: Engr. Qazi Zia, Assistant Professor EED, COMSATS Attock.
Guest Lecture by Ben Magstadt CprE 281: Digital Logic.
Verilog Intro: Part 2. Procedural Blocks There are two types of procedural blocks in Verilog. – initial for single-pass behavior: initial blocks execute.
ECE 2372 Modern Digital System Design
Mentor Tools tutorial Bold Browser Design Manager Design Architect Library Components Quicksim Creating and Compiling the VHDL Model.
Week Four Design & Simulation Example slides. Agenda Review the tiny example (Minako “logic”)from last week – look at the detailed static timing report.
SoC Verification HW #2 TA: Wei-Ting Tu Assignment: 04/12/06
CS 3850 Lecture 3 The Verilog Language. 3.1 Lexical Conventions The lexical conventions are close to the programming language C++. Comments are designated.
Lecture 9. MIPS Processor Design – Instruction Fetch Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education &
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
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.
FPGA-Based System Design Copyright  2004 Prentice Hall PTR Logic Design Process n Functional/ Non-functional requirements n Mapping into an FPGA n Hardware.
1 CSE-308 Digital System Design (DSD) N-W.F.P. University of Engineering & Technology, Peshawar.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
Behavioral Modelling - 1. Verilog Behavioral Modelling Behavioral Models represent functionality of the digital hardware. It describes how the circuit.
Using Simulator With Undertow Suite. Source environment variables For example, envsource has all the environment variables set up. You can change the.
Switch Level Modeling Part II 26 September Contents 1.Clarifications: a)nMOS and pMOS instantiations b)Testbenches for NOR gate example c)Use of.
Speaker: Tsung-Yi Wu FPGA Design Flow (Part 2) : Simulation.
1 Arithmetic, ALUs Lecture 9 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Calculator Lab Exercises Bruce Wile, IBM Design Automation Conference Sunday, June 9, 2002.
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 4: Testing, Dataflow Modeling Spring 2009.
Lab for Cell-Based IC Design
 A test bench is an HDL program used for applying stimulus to an HDL design in order to test it and observe its response during simulation.  In addition.
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.
Introduction to Verilog Section Outline Set Up the Environment Your First Verilog File Set Up the Test Bench Running the Simulation.
Calculator Overview Functional Verification. Calculator Design n Calculator has 4 functions: Add Subtract Shift left Shift right n Calculator can handle.
CprE 281: Verilog Tutorial Ben Magstadt – Master’s Student Electrical Engineering.
Lecture 5. Verilog HDL #3 Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Logic Design.
1 Lecture 3: Modeling Sequential Logic in Verilog HDL.
Structural Description
Supplement on Verilog FF circuit examples
Discussion 2: More to discuss
‘if-else’ & ‘case’ Statements
Hardware Description Languages
Topics The logic design process..
FSM MODELING MOORE FSM MELAY FSM. Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-2]
Test Fixture (Testbench)
CS 153 Logic Design Lab Professor Ian G. Harris
Doing the VCS Assignment
The Verilog Hardware Description Language
Presentation transcript:

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, scan_out, a_clk, b_clk, c_clk, error_found, req1_cmd_in, req1_data_in, req2_cmd_in, req2_data_in, req3_cmd_in, req3_data_in, req4_cmd_in, req4_data_in, reset, scan_in); Go to the directory with the Verilog code I assume that it is all in one directory Compile and simulate the top file, testbench.v This will force the compilation/simulation of all other files testbench.v

Running VCS Type vcs -RI testbench.v The Interactive Window appears All other windows invoked from here “Window” pulldown on top bar window icons below top bar

Waveform Window Open the Waveform Window Need to select the signals you want to see, use Hierarchy Window

Hierarchy Window Select the bigtest module to see its signals Drag-and-drop the signals into the Waveform Window

Waveform Window with Signals The signals are on display, but they are blank

Execute Simulation Simulate by selecting Continue Printed results are shown in top pane

Waveforms Results Waveform Window is updated with results Zoom out and scroll over time

Waveforms Results, Zoomed and Scrolled

Testbench for Combinational Logic module stimulus; reg clk; reg [7:0] in1,in2; wire[7:0] out; // instantiate the design block adder r1(out, in1, in2); initial begin in1 = 8b’ ; in2 = 8b’ l; #10 in1 = 8b’ ; in2 = 8b’ ; end endmodule Apply test data to all inputs Add a delay, then check results and apply new inputs

Testbench for Sequential Logic module stimulus; reg clk; reg reset; wire[3:0] q; // instantiate the design block ripple_carry_counter r1(q, clk, reset); // Control the clock initial clk = 1'b0; always #5 clk = ~clk; // Control the reset initial begin reset = 1'b1; #10 reset = 1'b0; #20 reset = 1'b1; #10 reset = 1'b0; #20 $stop; end endmodule Change inputs before positive clock edge Check results after positive clock edge