Digital System Verification. VERIFICATION OUTLINE Purpose of Verification –Verification effort and cost Verification Tools –Linting tools –Code Coverage.

Slides:



Advertisements
Similar presentations
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
Advertisements

CSE241 Formal Verification.1Cichy, UCSD ©2003 CSE241A VLSI Digital Circuits Winter 2003 Recitation 6: Formal Verification.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL ECE 448 Lecture 10 Advanced Testbenches.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 7 - Verification.
ECE Synthesis & Verification1 ECE 667 Spring 2011 Synthesis and Verification of Digital Systems Verification Introduction.
Kazi Fall 2006 EEGN 4941 EEGN-494 HDL Design Principles for VLSI/FPGAs Khurram Kazi Some of the slides were taken from K Gaj’s lecture slides from GMU’s.
EE694v-Verification-Lect5-1- Lecture 5 - Verification Tools Automation improves the efficiency and reliability of the verification process Some tools,
Simple Testbenches Behavioral Modeling of Combinational Logic
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
Advanced FPGA Based System Design Lecture-9 & 10 VHDL Sequential Code By: Dr Imtiaz Hussain 1.
CMPUT Computer Organization and Architecture II 1 CMPUT329 - Fall 2003 Topic 6: Testbenches Paras Mehta and José Nelson Amaral.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
IAY 0600 Digitaalsüsteemide disain Event-Driven Simulation Alexander Sudnitson Tallinn University of Technology.
ASIC/FPGA design flow. FPGA Design Flow Detailed (RTL) Design Detailed (RTL) Design Ideas (Specifications) Design Ideas (Specifications) Device Programming.
Some Course Info Jean-Michel Chabloz. Main idea This is a course on writing efficient testbenches Very lab-centric course: –You are supposed to learn.
High-Level Interconnect Architectures for FPGAs Nick Barrow-Williams.
EE694v-Verification-Lect10-1- Lect 10 - Stimulus & Response Applying input stimulus to a design Creating clock signals Other waveforms Synchronizing inputs.
Functional Verification Figure 1.1 p 6 Detection of errors in the design Before fab for design errors, after fab for physical errors.
Copyright © 1997 Altera Corporation & 提供 What is VHDL Very high speed integrated Hardware Description Language (VHDL) –is.
ECE 545 Project 2 Specification. Schedule of Projects (1) Project 1 RTL design for FPGAs (20 points) Due date: Tuesday, November 22, midnight (firm) Checkpoints:
George Mason University ECE 545 Lecture 7 Advanced Testbenches.
IAY 0600 Digital Systems Design VHDL discussion Verification: Testbenches Alexander Sudnitson Tallinn University of Technology.
Copyright © 1997 Altera Corporation 11/20/2015 P.1 Beginner VHDL Training Class Danny Mok Altera HK FAE
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
Copyright © 1997 Altera Corporation & 提供 Beginner VHDL Training Class Danny Mok Altera HK FAE
An Overview of Hardware Design Methodology Ian Mitchelle De Vera.
15-Dec-15EE5141 Chapter 4 Sequential Statements ä Variable assignment statement ä Signal assignment statement ä If statement ä Case statement ä Loop statement.
George Mason University Simple Testbenches ECE 545 Lecture 4.
Assignment write a short notes on 1.Manufacturing Testing. 2.Functional Testing. 3.Files and Text I/O. 4.Differentiate the cpld and fpga architecture.
1 Part III: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
VHDL Hardware Description Language. GUIDELINES How to write HDL code: How to write HDL code:
EE694v-Verification-Lect7-1- Verification Plan & Levels of Verification The Verification Plan Yesterdays and today’s design environment Design specification.
IAY 0600 Digital Systems Design Event-Driven Simulation VHDL Discussion Alexander Sudnitson Tallinn University of Technology.
55:032 - Intro. to Digital DesignPage 1 VHDL and Processes Defining Sequential Circuit Behavior.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
IAY 0600 Digital Systems Design VHDL discussion Verification: Testbenches Alexander Sudnitson Tallinn University of Technology.
George Mason University Behavioral Modeling of Sequential-Circuit Building Blocks ECE 545 Lecture 8.
Case Study: Xilinx Synthesis Tool (XST). Arrays & Records 2.
04/21/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Functional & Timing Verification 10.2: Faults & Testing.
George Mason University Advanced Testbenches Lecture 4.
ECE 448 – FPGA and ASIC Design with VHDL George Mason University ECE 448 Lab 2 Implementing Combinational Logic in VHDL.
CDA 4253 FPGA System Design VHDL Testbench Development Hao Zheng Comp. Sci & Eng USF.
1 Introduction to Engineering Spring 2007 Lecture 19: Digital Tools 3.
Sequential statements (1) process
ASIC Design Methodology
IAY 0600 Digitaalsüsteemide disain
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
Verification: Testbenches in Combinational Design
B e h a v i o r a l to R T L Coding
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Digital System Verification
Lect 11 - Stimulus & Response
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
ECE 545 Lecture 10 Advanced Testbenches.
ECE 448 Lab 1a Developing Effective Testbenches
RTL Style در RTL مدار ترتيبي به دو بخش (تركيبي و عناصر حافظه) تقسيم مي شود. مي توان براي هر بخش يك پروسس نوشت يا براي هر دو فقط يك پروسس نوشت. مرتضي صاحب.
Hardware Description Languages
Verification Plan & Levels of Verification
Lect 11 - Stimulus & Response
Digital Design Verification
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
Variables variable variable_name: variable_type
ECE 545 Lecture 5 Simple Testbenches.
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL code ECE 448 – FPGA and ASIC Design.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Sequntial-Circuit Building Blocks
EEL4712 Digital Design (VHDL Tutorial).
(Simple Testbenches & Arithmetic Operations)
Presentation transcript:

Digital System Verification

VERIFICATION OUTLINE Purpose of Verification –Verification effort and cost Verification Tools –Linting tools –Code Coverage –Simulation –Equivalence Checking –Rapid Prototyping Verification Strategy –Verification plan –Directed Testing –Constrained-Random Testing –Coverage-driven verification Verification Techniques –Text I/O –Self-checking Testbench –OOP in Testbenches

VERIFICATION (1/2) The process of demonstrating the functional correctness of a design For multi-million gate ASICs, SoCs and reusable IP: –70% of design effort goes to verification –More (twice as many) verification engineers than designers –Testbench code is 4 times more than RTL code

VERIFICATION (2/2) It is impossible to prove that a design meets the intent of its specification. Specification documents are open to interpretation Functional verification can show that a design meets the intent of its specification, but it cannot prove it. It can prove that the design does not implement the intended function by identifying a single discrepancy.

LINTING TOOLS (1/2) Input: HDL source Output: Warning and error messages They do not require stimulus, or a description of the expected output. They perform checks that are entirely static, with the expectations built into the linting tool itself. The warning messages should be filtered

LINTING TOOLS (2/2) entity my_entity is port (my_input: in std_logic); end my_entity; architecture sample of my_entity is signal s1: std_logic; begin statement1: s1 <= my_input; statement2: s1 <= not my_input; end sample; Linting tool output Warning: file my_entity.vhd: Signal "s1" is multiply driven.

SIMULATION Input: HDL with stimulus Output: Waveform Simulation requires stimulus The simulation outputs are validated externally (the simulator cannot check them itself) Event-driven simulation – Change in values (events) drive the simulation process. – Necessary in combinational circuits – Slow Cycle-based simulation – Clock events drive the simulation process – Used in sequential circuits – Faster, timing information is lost Transaction-based simulation

CODE COVERAGE Shows if all functions and statements are executed during a simulation run If coverage is low, then the testbench is poor

EQUIVALENCE CHECKING Input: HDL, post-synthesis netlist Checks if the RTL description and the post-synthesis gate- level netlist have the same functionality If yes, post-synthesis simulation is not necessary

RAPID PROTOTYPING Using FPGAs to create a prototype of the final design Faster than simulation The prototype doesn’t have to meet final product constraints (speed, area, power) Important: Write reusable HDL code to re- use it for the final ASIC product

VERIFICATION PLAN The verification plan is a specification document for the verification effort Ad-hoc approaches are inefficient Define first-time success –Which features are critical and which optional Define a verification schedule Specify the features that must be verified –The RTL design team must contribute Plan how to verify the response –Some responses are difficult to verify visually

VERIFICATION PLAN A definition of what the design does shall be specified. –input patterns it can handle, –errors it can sustain –based on functional specification document of the design agreed upon by the design and verification teams. A definition of what the design must not do shall be specified. –The verification requirements must outline which errors to look for. Any functionality not covered by the verification process shall be defined –The conditions considered to be outside the usage space of the design must be outlined Each verification requirement must have a unique identifier. Requirements should be ranked and ordered Stimulus requirements shall be identified.

ETHERNET CORE VERIFICATION PLAN SAMPLE R3.1/14/0 Packets are limited to MAXFL bytes SHOULD R3.1/13/0 Does not append a CRC SHOULD R3.1/13/1 Appends a valid CRC MUST R3.1/9/0 Frames are lost only if attempt limit is reached SHOULD

VERIFICATION STRATEGIES Directed verification –Writing specific testbenches to test specific specification features –Easy to perform, slow coverage –Only covers the bugs the designer can think of Constrained Random Verification –Not random ones and zeroes, but valid operations in random sequence and with random data –They provide stimuli the designer didn’t think of –Harder to perform, faster coverage –Hard to predict the output

VERIFICATION STRATEGIES Realistic Verification –Provide realistic inputs (e.g. packet traces, etc) Design for verification –Add datapath bypass circuits –Add observability through memory-mapped registers

TESTBENCHES Non-synthesizable code is allowed and, in fact, essential Do not use RTL code in testbenches

STIMULUS Clocks signal clk: std_logic:=0; begin clk <= not clk after 50 ns; ns period clock Deterministic waveforms s <= ‘0’, ‘1’ after 100 ns, ’0’ after 200 ns, ‘1’ after 240 ns; Modeling of synchronous signals sync_data_gen: process(clk) begin if clk = ’0’ then data <=... after 1 ns; end if; end process sync_data_gen;

RESPONSE VERIFICATION Visual inspection (waveform or list) –Too difficult for large designs with complex responses Writing to a file process (clk) variable L: line; begin if clk’event and clk = ’0’ then write(L,...); writeline(output, L); end if; end process;

SELF-CHECKING TESTBENCH A testbench that besides the input vectors also checks the response The designer must accurately predict output –Simple for RAM, FIFOs, networks etc. –Complex for DSP, voice, image, video applications

ATTRIBUTES Data attributes(all synthesizable) –d’LOW --returns lower index –d’HIGH--returns higher index –d’LEFT --returns leftmost index –d’RIGHT--returns rightmost index –d’LENGTH --returns vector size –d’RANGE--returns vector range –d’REVERSE_RANGE--returns reverse vector range Signal attributes(first two synthesizable) –s’EVENT--returns true when event on s –s’STABLE--returns true when no event on s –s’ACTIVE--returns true when s=‘1’ –s’QUIET --returns true when no event on s for specified time –s’LAST_EVENT--returns time since last event on s –s’LAST_ACTIVE--returns time since s = ‘1’ –s’LAST_VALUE--returns value of s before last event

WAIT STATEMENT wait for --simulation only –wait for 5 ns; wait on --both simulation and RTL –wait on clk, rst_n --instead of sensitivity list wait until --both simulation and RTL –wait until clk’event and clk=‘1’ --instead of if

ASSERTION statement assert boolean-expression report string-expression severity severity-level{note, warning, error, failure }; check: process begin wait until clk'event and clk='1'; assert d’STABLE(setup_time) report "Setup Time Violation" severity error; wait for hold_time; assert d’STABLE(hold_time) report "Hold Time Violation" severity error; end process check;

EXAMPLE Use the previous VHDL features to automatically check the following condition: –If signal sel=“01”, output =“0010” Apply the above to create a self-checking decoder testbench

TEXT I/O A standard package for text file input and output –library std; –use std.textio.all; A variable of line type is used for I/O –readline(L,k) --reads line from file –read(k,v) --reads value from k –write(k,v) --writes value to k –writeline(L,k) --writes k to file The text file must be defined –file Prog: text is in "file_name"; --text file "file_name" –variable L: line; -- read lines from file to L

TEXT I/O EXAMPLE process variable text_line1, text_line2: line; variable i, j : integer; file text_in: text open read_mode is "akiyo1.txt"; file text_out: text open write_mode is "akiyo2.txt"; begin while not endfile(text_in) loop if count4(1) = '0' then readline(text_in, text_line1); read(text_line1, i); cword_in <= std_logic_vector(conv_unsigned(i, cword_in'length)); end if; j:= conv_integer('0' & cword_sub2_out); if count4 = "10" then write(text_line2, j); writeline(text_out, text_line2); end if; wait until clk = '1' and rst_n = '1' and en = '1'; end loop; wait; end process;

TEXT I/O EXAMPLE 2 Write a testbench that writes a counter output to a text file