11.verification 07
11.verification 07
李昆忠
國立成功大學電機系
06-2757575 X 62371
[email protected]
Testbench
Design
Under
Verification
Transformation
Verification
Interpretation
Specification
Verification
Synthesis
Schematic
RTL
(gate level)
Equivalence Checking
VLSI System Design Verification.8 NCKUEE-KJLEE
Formal Verification - Model Checking
• Assertions or characteristics of a
design are formally proven or
disapproved. RTL Coding RTL
Specific
− Look for generic problems or violation
of user-defined rules about the Model
behavior or the design. Interpretation Checking
• Examples: Assertions
− Unreachable or isolated states of a FSM
− Occurrence of deadlock
− Given that a signal will be asserted =>
Other signals will be asserted
Specifics RTL
Functional
Verification
Errors No Errors
Bad Type Ⅱ
Design (False Positive)
Good Type Ⅰ
Design (False Negative)
Assertain Tool - Two mode both static verification (for Linting) and
dynamic verification (for simulator).
Dynamic verification - Use a set of stimuli to exercise one or more models
of a design or a hardware implementation of the design.
VLSI System Design Verification.13 NCKUEE-KJLEE
Message generated by nLint
Warning: more than one top module detected.
Warning: output signal should not be referenced inside the
module.
Warning: glue logic found in top module.
Warning: more than one clock signal detected in the
module, clocks.
Error: register should have a set or reset signal.
Warning: the port is not in order with port update.
Warning: Asynchronous clock detected.
Warning: the input port and output port should not be
connected directly.
Warning: the port should be connected by name.
VLSI System Design Verification.14 NCKUEE-KJLEE
Code Coverage & FSM Coverage
• Code coverage refers to the percentage of the code
that has been (and more importantly not been)
executed under verification.
(1) Code Coverage
− Statement Coverage (Block Coverage)
− Branch coverage
− Condition Coverage (Expression Coverage)
− Trigger Coverage
− Toggle Coverage
− Path Coverage …
(2) Finite State Machine Coverage
− State Coverage
− Arc Coverage
− Path Coverage …
VLSI System Design Verification.15 NCKUEE-KJLEE
Statement Coverage
• How many of the total lines of code were executed?
• Ex:
□ if (parity == ODD || parity == EVEN) begin
□ tx <= compute_parity(data, parity);
□ #(tx_time);
end
□ tx <= 1’b0; When
□ #(tx_time); parity!=ODD &
□ if (stop_bits == 2) begin Parity!=EVEN &
stop_bits=2
□ tx<=1’b0;
□ #(tx_time);
end
• Statement Coverage = 6/8 = 75%
VLSI System Design Verification.16 NCKUEE-KJLEE
Path Coverage
• Decision to be made
− Type of testcases, the level of granularity, ...
− Level of abstraction: With higher levels of abstraction, you
have less detailed control over the timing and coordination of the
stimulus and response, but it is much easier to generate a lot of
stimulus and verify long response.
• High-level modeling
− To efficiently accomplish the verification task, a skilled verification
engineer must be well versed in behavioral (i.e., non-
synthesizable and highly algorithmic) description.
− Necessary to understand the side effects of the simulation
algorithm and limitations of the language.
• Testbenches need a model to be debugged.
− RTL is slow to develop while testbenches continue to be written.
− Codes for testbench surpasses RTL.
− Do not use RTL-like code when writing testbenches.
• Behavioral models are used to debug testbenches.
− Behavioral models are available earlier than RTL models.
− Behavioral models run faster then RTL models.
ACK = 1 ACK = 0
REQ = 1 REQ = 0
ACK = 0 ACK = 1