Overview Motivation ECE 553: TESTING AND What is simulation? - - PDF document

overview
SMART_READER_LITE
LIVE PREVIEW

Overview Motivation ECE 553: TESTING AND What is simulation? - - PDF document

9/18/2014 Overview Motivation ECE 553: TESTING AND What is simulation? Design verification TESTABLE DESIGN OF Circuit modeling Circuit modeling DIGITAL SYSTES DIGITAL SYSTES Determining signal values True-value


slide-1
SLIDE 1

9/18/2014 1

ECE 553: TESTING AND TESTABLE DESIGN OF DIGITAL SYSTES DIGITAL SYSTES

Logic Simulation

Overview

  • Motivation
  • What is simulation?
  • Design verification
  • Circuit modeling

9/18/2014 2

Circuit modeling

  • Determining signal values
  • True-value simulation algorithms
  • Compiled-code simulation
  • Event-driven simulation
  • Summary

Motivation

  • Logic simulation is used to verify or

ascertain assertions (design, device, …)

  • It avoids building costly hardware

9/18/2014 3

  • Can help debug a design in many more

ways than the real hardware could

  • Understanding simulation will help

understand the limitations of the simulation process and the simulator(s) in question

Simulation Defined

  • Definition: Simulation refers to modeling of a design,

its function and performance.

  • A software simulator is a computer program; an

emulator is a hardware simulator.

  • Simulation is used for design verification:

9/18/2014 4

  • Validate assumptions
  • Verify logic
  • Verify performance (timing)
  • Types of simulation:
  • Logic or switch level
  • Timing
  • Circuit
  • Fault

Simulation for Verification

Specification Design Response Synthesis Design

9/18/2014 5

True-value simulation Design (netlist) Input stimuli Computed responses Response analysis Design changes

Modeling for Simulation

  • Modules, blocks or components described by
  • Input/output (I/O) function
  • Delays associated with I/O signals
  • Examples: binary adder, Boolean gates, FET, resistors and

capacitors

I

9/18/2014 6

  • Interconnects represent
  • ideal signal carriers, or
  • ideal electrical conductors
  • Netlist: a format (or language) that describes a

design as an interconnection of modules. Netlist may use hierarchy.

slide-2
SLIDE 2

9/18/2014 2

Ca

Logic Model of MOS Circuit

Cc VDD a b c pMOS FETs Dc Da c a b Db

9/18/2014 7

Cc Cb b nMOS FETs Ca , Cb and Cc are parasitic capacitances Da and Db are interconnect or propagation delays Dc is inertial delay

  • f gate

Options for Inertial Delay

(simulation of a NAND gate)

b a c (CMOS)

Inputs Transient region

9/18/2014 8

Time units 5

c (zero delay) c (unit delay) c (multiple delay) c (minmax delay)

Logic simulation

min =2, max =5 rise=5, fall=3 Unknow n (X)

Signal States

  • Two-states (0, 1) can be used for purely

combinational logic with zero-delay.

  • Three-states (0, 1, X) are essential for timing

hazards and for sequential logic initialization.

  • Four-states (0, 1, X, Z) are essential for MOS

devices See example below

9/18/2014 9

  • devices. See example below.
  • Analog signals are used for exact timing of digital

logic and for analog circuits.

Z (hold previous value)

Determining Gate Values

  • Use of software logic primitives such as

AND, OR, NOT instructions

  • Search the truth table
  • Use cubes and cube intersection rules for

i

9/18/2014 10

processing

  • Use of X value and its processing

– Example: x value simulation, problems associated with it, possible fixes and conservative processing

True-Value Simulation Algorithms

  • Compiled-code simulation
  • Applicable to zero-delay combinational logic
  • Also used for cycle-accurate synchronous sequential circuits for logic

verification

  • Efficient for highly active circuits, but inefficient for low-activity circuits

Hi h l l ( C l ) d l b d

9/18/2014 11

  • High-level (e.g., C language) models can be used
  • Event-driven simulation
  • Only gates or modules with input events are evaluated (event means a

signal change)

  • Delays can be accurately simulated for timing verification
  • Efficient for low-activity circuits
  • Can be extended for fault simulation

Compiled-Code Algorithm

  • Step 1: Levelize combinational logic and encode in a

compilable programming language

  • Step 2: Initialize internal state variables (flip-flops)

St 3 F h i t t

9/18/2014 12

  • Step 3: For each input vector

– Set primary input variables – Repeat (until steady-state or max. iterations)

  • Execute compiled code

– Report or save computed variables

slide-3
SLIDE 3

9/18/2014 3

Event-Driven Algorithm

(Example)

2 2 2 a =1 c =1 0 d = 0 e =1 g =1

t = 0 1 2 Scheduled events c = 0 d = 1, e = 0 Activity list d, e f, g

9/18/2014 13

4 b =1 d = 0 f =0 Time, t

4 8

g

3 4 5 6 7 8 g = 0 f = 1 g = 1 g

Time stack

Time Wheel (Circular Stack)

t=0 1 2 max Current time pointer Event link-list

9/18/2014 14

3 4 5 6 7

Efficiency of Event-driven Simulator

  • Simulates events (value changes) only
  • Speed up over compiled-code can be ten times
  • r more; in large logic circuits about 0.1 to

10% gates become active for an input change

9/18/2014 15

10% gates become active for an input change

Large logic block w ithout activity Steady 0 0 to 1 event Steady 0 (no event)

Summary

  • Logic or true-value simulators are essential tools for

design verification.

  • Verification vectors and expected responses are

generated (often manually) from specifications. A l i i l b i l d i i h

9/18/2014 16

  • A logic simulator can be implemented using either

compiled-code or event-driven method.

  • Per vector complexity of a logic simulator is

approximately linear in circuit size.

  • Modeling level determines the evaluation procedures

used in the simulator.