Simulation and Testbench - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Simulation and Testbench

Description:

To make the package visible: use std.textio.all; Data Types: ... Writing File Example. Simulation Results. Reading Assignment. Chapter 11 Model Simulation ... – PowerPoint PPT presentation

Number of Views:105
Avg rating:3.0/5.0
Slides: 25
Provided by: personal
Category:

less

Transcript and Presenter's Notes

Title: Simulation and Testbench


1
Simulation and Testbench

Nov. 3rd 2005
2
Simulation
3
Chip tester
4
Test bench
5
A Simple Test Bench
6
Simulation result
7
Using Assert Statement
Assert boolean-expression report
string-expression severity expression
The boolean-expression is evaluated and if the
expression is false, the string-expression
specified in report statement is displayed in the
simulator window. The severity statement then
indicates to the simulator what action should be
taken in response to the assertion
failure. Severity NOTE, WARNING, ERROR, FAILURE.
8
Using Assert Example
9
Simulation result
10
continued
Wrong AND code
11
Failed assert
12
Can we change assert positions?
changed
13
Simulation of wrong test bench
14
Explain the simulation result
15
Using Loop and Multiple Processes
data_in
data_out
clock
16
Simulation results
17
Using Test Vectors
18
Simulation Results
19
Reading and Writing Files
THE TEXTIO PACKAGE TEXTIO is a package of VHDL
functions that read and write text files. To make
the package visible use std.textio.all Data
Types text -- a file of character strings
line -- one string from a text file Example
Declarations    file Prog text is in
"file_name" --text file "file_name"   
variable L line              -- read lines
from file to L Reading Values From a
File readline --Read one line from "text" file
F to "line" L read --Read one value from "line"
L into variable VALUE Writing values to a
file writeline --Write one line to "text" file
F from "line" L   write --Write one value to
"line" L from variable VALUE
20
Reading File Example
21
Simulation Results
22
Writing File Example
23
Simulation Results
24
Reading Assignment
Chapter 11 Model Simulation
Write a Comment
User Comments (0)
About PowerShow.com