Home > Community > Blogs > Functional Verification > my constraint was ignored is it a tool bug
Login with a Cadence account.
Not a member yet?
Create a permanent login account to make interactions with Cadence more convenient.

Register | Membership benefits
Get email delivery of the Functional Verification blog (individual posts).


* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

My Constraint was Ignored – Is it a Tool Bug? IntelliGen Gen Debugger Can Help!

Comments(0)Filed under: Functional Verification, Specman, IntelliGen, verification, debug, e language, constraints, Gen debugger, Gen, generation, test generation, constraint not enforced, AF

The IntelliGen Gen Debugger is a powerful Specman tool that can debug any generation problem that you might face. The most obvious and common generation problem is a contradiction, but the Gen Debugger can handle various other problems, such as user errors, performance problems and unexpected generation results.

In this post, we will focus on one of the most extreme cases of unexpected generation: a constraint which is not enforced. This can happen due to problems with your code, even in a simple example such as the following:


Let’s explore a situation where the above code fails with a DUT error, and examine the full debug process – from detecting and identifying the problem to tracing its root cause.

Let’s debug!

Because the above code does a check that p.x == 100, we must conclude that if this check failed, it must be that p.x is not 100, and the constraint we gave was not enforced. Now our task is to identify the cause of failure.

We can do this by performing the following steps:

1.       Open the Gen Debugger at the generation of the field. We do this as follows:

a.       Issue the following command: ‘config gen –collect = ALL’. This activates the Gen Debugger, and ensures that it keeps all information. (Note: In Specman versions prior to version 11.1, the command is: ‘br gen err; config gen –del_old_dbg_info = FALSE’)

b.      Issue the following command: ‘br on error’. This ensures that the Gen Debugger stops at the dut_error, so that we can determine what failed.

c.       After the Gen Debugger stops, issue the following command: ‘show gen –instance p.x’ (you can specify any legal path to the relevant variable). This opens the Gen Debugger at the generation of the problematic field. This command is particularly useful when using the Gen Debugger in ‘offline’ mode, after the generation has finished. If you stop during generation (for example, on an error), the ‘gtree’ command will open the gen debugger in its current state.

In our example, the following figure illustrates the result.

Interestingly, the generated value (highlighted by the Gen Debugger in blue) shows us that the constraint was enforced.

This means that for an error to have occurred, that generated value had to have been changed later on during processing. But where? How do we find the procedural location of the change?

The good news is that we can use the Gen Debugger to help us as we try to pinpoint the location of the problem. But first we need to perform a rerun, stopping immediately after the generation.

2.       Ascertain the needed values and then rerun the test as follows:

a.       In the Gen Debugger, look for the Gen-Action and Connect Field Set (CFS) values. In our example (see the following figures), the Gen Action value is 2, and the CFS value is 20.


b.       Reload the code and issue ‘br on gen action # cfs #’ (in our example, ‘br on gen action 2 cfs 20’), so that the test reruns and stops immediately after the generation.

c.      After the run is completed, issue ‘gfinish’, which will advance to the completion of this CFS, and check the results (see the following figure). Notice that p.x. has the correct value.

At this point, the role of the Gen Debugger is over, and we need to use the source debugger. Since the problem is not in generation, we need to find out where in the procedural code this value was changed.

3.       Issue the source-debugger command ‘br on change sys.p.x’ and continue. This will stop at the code which is responsible for the discrepancy (see the following figure).


In summary:

Through this example, we saw that what might seem to be an ignored constraint can actually be caused by a problem elsewhere (that is, that the constraint has not been ignored.)

And in the process, we learned how to use the Gen Debugger to help locate the actual source of the problem, and we saw several aspects of the Gen Debugger, including:

·         its offline and online debug capabilities (Steps 1 & 2, respectively)

·         its connection to the source debugger (Step 3)

In the next post, we will see additional possible causes for the “ignored constraint” behavior, and in the process we will further examine Gen Debugger functionality.

Reuven Naveh, IntelliGen team, Specman R&D




Leave a Comment

E-mail (will not be published)
 I have read and agree to the Terms of use and Community Guidelines.
Community Guidelines
The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.