<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://simhard.com/wiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://simhard.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Open_Source_VHDL_Verification_Methodology%2FFunctional_Coverage</id>
		<title>Open Source VHDL Verification Methodology/Functional Coverage - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://simhard.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Open_Source_VHDL_Verification_Methodology%2FFunctional_Coverage"/>
		<link rel="alternate" type="text/html" href="http://simhard.com/wiki/index.php?title=Open_Source_VHDL_Verification_Methodology/Functional_Coverage&amp;action=history"/>
		<updated>2026-04-06T03:59:02Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.21.3</generator>

	<entry>
		<id>http://simhard.com/wiki/index.php?title=Open_Source_VHDL_Verification_Methodology/Functional_Coverage&amp;diff=1120&amp;oldid=prev</id>
		<title>ANA: Новая страница: «{{OS-VVM TOC}}  The objective of functional verification is to determine if the design requirements, as defined in our specification, are functioning as intended....»</title>
		<link rel="alternate" type="text/html" href="http://simhard.com/wiki/index.php?title=Open_Source_VHDL_Verification_Methodology/Functional_Coverage&amp;diff=1120&amp;oldid=prev"/>
				<updated>2012-12-11T14:41:49Z</updated>
		
		<summary type="html">&lt;p&gt;Новая страница: «{{OS-VVM TOC}}  The objective of functional verification is to determine if the design requirements, as defined in our specification, are functioning as intended....»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{OS-VVM TOC}}&lt;br /&gt;
&lt;br /&gt;
The objective of functional verification is to determine if the design requirements, as defined in our specification, are&lt;br /&gt;
functioning as intended. But how do you know if all the specified functionality was actually implemented? Furthermore,&lt;br /&gt;
how do we know if all the specified functionality was really tested? Code coverage metrics will not help us answer these&lt;br /&gt;
questions.&lt;br /&gt;
&lt;br /&gt;
In this section, we introduce an explicit coverage metric referred to as functional coverage, which can be associated with&lt;br /&gt;
either the design's specification or implementation coverage space. The objective of measuring functional coverage is to&lt;br /&gt;
measure verification progress with respect to the functional requirements of the design. That is, functional coverage helps&lt;br /&gt;
us answer the question: Have all specified functional requirements been implemented, and then exercised during&lt;br /&gt;
simulation? The details on how to create a functional coverage model are discussed separately in the Specification to&lt;br /&gt;
functional coverage chapter.&lt;br /&gt;
&lt;br /&gt;
'''''Benefits:'''''&lt;br /&gt;
&lt;br /&gt;
The origin of functional coverage can be traced back to the 1990's with the emergence of constrained-random&lt;br /&gt;
simulation. Obviously, one of the value propositions of constrained-random stimulus generation is that the simulation&lt;br /&gt;
environment can automatically generate thousands of tests that would have normally required a significant amount of&lt;br /&gt;
manual effort to create as directed tests. However, one of the problems with constrained-random stimulus generation is&lt;br /&gt;
that you never know exactly what functionality has been tested without the tedious effort of examining waveforms after a&lt;br /&gt;
simulation run. Hence, functional coverage was invented as a measurement to help determine exactly what&lt;br /&gt;
functionality a simulation regression tested without the need for visual inspection of waveforms.&lt;br /&gt;
&lt;br /&gt;
Today, the adoption of functional coverage is not limited to constrained-random simulation environments. In fact,&lt;br /&gt;
functional coverage provides an automatic means for performing requirements tracing during simulation, which is often&lt;br /&gt;
a critical step required for DO-254 compliance checking. For example, functional coverage can be implemented with a&lt;br /&gt;
mechanism that links to specific requirements defined in a specification. Then, after a simulation run, it is possible&lt;br /&gt;
to automatically measure which requirements were checked by a specific directed or constrained-random test—as well&lt;br /&gt;
as automatically determine which requirements were never tested.&lt;br /&gt;
&lt;br /&gt;
'''''Limitations:'''''&lt;br /&gt;
&lt;br /&gt;
Since functional coverage is not an implicit coverage metric, it cannot be automatically extracted. Hence, this requires&lt;br /&gt;
the user to manually create the coverage model.  From a high-level, there are two different steps involved in creating a&lt;br /&gt;
functional coverage model that need to be considered:&lt;br /&gt;
&lt;br /&gt;
1. Identify the functionality or design intent that you want to measure&lt;br /&gt;
&lt;br /&gt;
2. Implementing the machinery to measure the functionality or design intent&lt;br /&gt;
&lt;br /&gt;
The first step is addressed through verification planning, and the details are addressed in the section on getting from a&lt;br /&gt;
specification to functional coverage.&lt;br /&gt;
&lt;br /&gt;
The second step involves coding the machinery for each of the coverage items identified in the verification planning&lt;br /&gt;
step (for example, coding a set of SystemVerilog covergroups for each verification objective identified in the verification&lt;br /&gt;
plan). During the coverage model implementation phase, there are also many details that need to be considered, such as:&lt;br /&gt;
identifying the appropriate point to trigger a measurement and defining controllability (disable/enable) aspects for the&lt;br /&gt;
measurement. These and many other details are addressed in the detailed coverage examples.&lt;br /&gt;
&lt;br /&gt;
Since the functional coverage must be manually created, there is always a risk that some functionality that was specified&lt;br /&gt;
is missing in the coverage model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Types of Functional Coverage Metrics ==&lt;br /&gt;
&lt;br /&gt;
The functional behavior of any design, at least as observed from any interface within the verification environment,&lt;br /&gt;
consists of both data and temporal components. Hence, from a high-level, there are two main types of functional&lt;br /&gt;
coverage measurement we need to consider: Cover Groups' and Cover Properties.&lt;br /&gt;
&lt;br /&gt;
=== Cover Group Modeling ===&lt;br /&gt;
&lt;br /&gt;
With respect to functional coverage, the samping of state values within a design model or on an interface is probably the&lt;br /&gt;
easiest to understand. We refer to this form of funcational coverage as cover group modeling. It consists of state values&lt;br /&gt;
observed on buses, grouping of interface control signals, as well as register. The point is that the values that are being&lt;br /&gt;
measured occur at a single explicitly or implicitly sampled point in time. SystemVerilog covergroups are part of the&lt;br /&gt;
machinery we typically use to build the functional data coverage models, and the details are discussed in the block level&lt;br /&gt;
design example and the discussion of the corresponding example covergroup implementations.&lt;br /&gt;
&lt;br /&gt;
=== Cover Property Modeling ===&lt;br /&gt;
&lt;br /&gt;
With respect to functional coverage, temporal relationships between sequences of events are probably the hardest to&lt;br /&gt;
reason about. However, ensuring that these sequences of events are properly tested is important. We use cover property&lt;br /&gt;
modeling to measure temporal relationships between sequences of events. Probably the most popular example of cover&lt;br /&gt;
properties  involves the handshaking sequence between control signals on a bus protocol. Other examples include&lt;br /&gt;
power-state transition coverage associated with verifying a low-power design. Assertions and coverage properties are&lt;br /&gt;
part of the machinery that we use to build temporal coverage models, and are addressed in the bus protocol monitor&lt;br /&gt;
example.&lt;br /&gt;
&lt;br /&gt;
=== Assertion Coverage ===&lt;br /&gt;
&lt;br /&gt;
The term assertion coverage has many meanings in the industry today. For example, some people define assertion&lt;br /&gt;
coverage as the ratio of number of assertions to RTL lines of code. However, assertion density is a more accurate term&lt;br /&gt;
that is often used for this metric. For our discussion, we use the term assertion coverage to describe an implementation of&lt;br /&gt;
of coverage properties using assertions.&lt;br /&gt;
&lt;br /&gt;
=== Difference Between Cover Groups and Cover Properties ===&lt;br /&gt;
&lt;br /&gt;
To help illustrate the difference between coverage modeled with covergroups and cover properties, lets look at a simple&lt;br /&gt;
nonpipelined bus example, as illustrated in Figure 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| align=center&lt;br /&gt;
!&lt;br /&gt;
|-&lt;br /&gt;
! Figure 1. Simple nonpipelined bus interface&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A single write and read bus sequence for&lt;br /&gt;
our non-pipelined bus protocol are&lt;br /&gt;
illustrated in Figure 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| align=center&lt;br /&gt;
!&lt;br /&gt;
|-&lt;br /&gt;
! Figure 2. Write and read cycles for a simple nonpipelined bus protocol&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To verify our bus example, it's important&lt;br /&gt;
to test the boundary conditions for the&lt;br /&gt;
address bus for both the write sequence&lt;br /&gt;
and read sequence (that is, the bits&lt;br /&gt;
within addr at some point contained all&lt;br /&gt;
zeros and all ones). In addition, it's also&lt;br /&gt;
important that we have covered a&lt;br /&gt;
sufficient number of non-boundary&lt;br /&gt;
conditions on the address bus during our&lt;br /&gt;
regression.  We are only interested in&lt;br /&gt;
sampling the address bus when the slave&lt;br /&gt;
is selected and the enable strobe is active&lt;br /&gt;
(that is, sel==1'b1 &amp;amp;&amp;amp; en==1'b1).&lt;br /&gt;
Finally, we will want to keep track of&lt;br /&gt;
separate write and read events for these&lt;br /&gt;
coverage items to ensure that we have tested both these operations sufficiently.&lt;br /&gt;
&lt;br /&gt;
This is one example of using ''cover groups'' to model functional coverage  (e.g., the SystemVerilog ''covergroup''&lt;br /&gt;
construct). In addition, we could apply the same data coverage approach to measuring the read and write data busses.&lt;br /&gt;
&lt;br /&gt;
Now, let's look at ''cover properties'' with respect to this example. There is a standard sequence that is followed for both&lt;br /&gt;
the write and read cycle. For example, let's examine a write cycle. At clock one, since both the slave select (''sel'') and bus&lt;br /&gt;
enable (''en'') signals are de-asserted, our bus is in an INACTIVE state. The first clock of the write sequence is called the&lt;br /&gt;
bus START state, which the master initiates by asserting one of the slave select line (''sel==1'b1''). During the START&lt;br /&gt;
state, the master places a valid address and valid data on the bus. The data transfer (referred to as the bus ACTIVE state)&lt;br /&gt;
actually occurs when the master asserts the bus enable strobe signal (en). In our case, it is detected on the rising edge of&lt;br /&gt;
clock three. The address, data, and control signals all remain valid throughout the ACTIVE state.&lt;br /&gt;
&lt;br /&gt;
When the ACTIVE state completes, the bus enable strobe signal (''en'') is de-asserted by the bus master, and thus&lt;br /&gt;
completes the current single write operation. If the master has finished transferring all data to the slave (that is, there are&lt;br /&gt;
no more write operations), then the master de-asserts the slave select signal (''sel''). Otherwise, the slave select signal&lt;br /&gt;
remains asserted, and the bus returns to the bus START state to initiate a new write operation. Multiple back-to-back&lt;br /&gt;
write operations (without returning to the bus INACTIVE state) are known as burst write.&lt;br /&gt;
&lt;br /&gt;
From a temporal coverage perspective, a set of assertions could be written to ensure proper sequencing of states on the&lt;br /&gt;
bus. For example, the only legal bus state transitions are illustrated in Figure 3. Furthermore, it's important to test a single&lt;br /&gt;
write and read cycle, as well as the burst read in write operation. In fact, we might want to measure the various burst&lt;br /&gt;
write and read cycles.&lt;/div&gt;</summary>
		<author><name>ANA</name></author>	</entry>

	</feed>