• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Blogs
  2. System, PCB, & Package Design
  3. Debugging RAVEL Rules: From Silent Failures to Visual P…
ACat299612
ACat299612

Community Member

Blog Activity
Options
  • Subscribe by email
  • More
  • Cancel
CDNS - RequestDemo

Try Cadence Software for your next design!

Free Trials
ravel
PCB Editor
Constraint Manager
design verification
PCB design

Debugging RAVEL Rules: From Silent Failures to Visual Proof

26 Apr 2026 • 4 minute read

Debugging a RAVEL rule can be deceptively difficult. A rule may run without errors, complete successfully, and yet quietly return empty relations or worse, incorrect results. Without debugging cues or a stack trace, these silent failures can stall progress and undermine confidence in the correctness of the rules.

This blog presents a structured, practical approach to debugging RAVEL rules by making their behavior visible. This approach focuses on four core techniques: tracing, profiling, reporting, and drawing. These techniques help you understand how relations are evaluated and where logic breaks down, providing actionable insights.

Why Debugging RAVEL Rules Is Different

Unlike procedural code, RAVEL rules are declarative and relation-based. As a result, traditional debugging cues such as step-through execution, stack trace, or error messages are simply unavailable.

When a rule fails, it often does so silently by producing empty relations. Effective debugging, therefore, requires shifting focus away from syntax alone and toward understanding how relations are constructed and evaluated throughout the rule.

Technique 1: Tracing the Code

Tracing helps you understand the rule execution flow. It is enabled by setting the ravel_trace environment variable before running a rule.

When tracing is enabled, RAVEL writes execution details to the standard PCB Editor or APD. This includes when operations are invoked and what relations they return. Tracing makes it easier to detect subtle syntax issues, such as missing parentheses, that can otherwise go unnoticed.

Technique 2: Profiling the Code

Profiling provides a summary of every relation in a rule, including its type, size, and evaluation time. By running the ravel profile command, you can quickly identify whether relations are empty and locate potential logic errors.

Real-Life Example: Using Profiling to Debug a Manufacturing Rule

Consider a PCB design rule intended to detect mirrored reference designators before manufacturing. The rule runs successfully but reports no violations. By profiling the rule, you discover that several key relations have a size of 0, which immediately indicates a logic problem. After correcting the selection expression and profiling again, the relations show the expected sizes, confirming that the fix is effective. In this case, profiling transforms a silent failure into a clear, actionable diagnosis.

Technique 3: Inspecting Data with the Report Statement

The report statement prints tuple data from a relation directly to the console. It allows you to inspect the actual objects returned by a rule, such as text, symbols, and their properties. The report helps validate that relations contain the expected data.

Technique 4: Visualizing with the Drawing Operator

The drawing operator creates visible geometry on a specified layer for each tuple in a relation. This enables immediate visual feedback directly in the PCB layout. This technique is especially useful during design reviews.

Conclusion

Debugging RAVEL rules is about making relations visible. Tracing reveals execution flow, profiling exposes structural and logic issues, reporting provides object-level insight, and drawing delivers immediate visual confirmation.

Together, these techniques form a disciplined and efficient debugging strategy that reduces guesswork, shortens debug cycles, and increases confidence in rule correctness—making them essential tools for tracking real-world PCB design challenges with RAVEL.

 To learn more about debugging rules and other RAVEL information, enroll in the Advanced Design Verification with the RAVEL Programming Language v25.1S030 course on the Cadence ASK portal.

 You can become Cadence Certified once you complete the course. Cadence Training Services now offers free Digital Badges for all popular online training courses. These badges indicate proficiency in a certain technology or skill and give you a way to validate your expertise to managers and potential employers. You can add the digital badge to your email signature or any social media channels, such as Facebook or LinkedIn, to highlight your expertise.

To find out more, see the blog post Take a Cadence Masterclass and Get a Badge.

You might also be interested in the training Learning Map that guides you through recommended course flows as well as tool experience and knowledge-level training modules. To find information on how to get an account on the Cadence ASK portal, see here.

An accelerated learning option is now available, which will help you learn Cadence technical content in the fastest, most effective way.

Before you begin the accelerated online course, take the pre-quiz to assess your current knowledge. This quiz lets you skip content you are already familiar with and helps you achieve your training goals more efficiently. For further guidance and explanations, refer to Accelerated Learning – The More You Know, the Faster You Go.

SUBSCRIBE to the Cadence training newsletter to be updated about upcoming training, webinars, and much more. If you have any questions about courses, schedules, online training, blended/virtual, or live training, reach out to us at Cadence Training.

Related Training Bytes

Click the following links, or visit the Cadence ASK portal and search for this training byte under Video Library.

  • How to Run a RAVEL Rule from the Constraint Manager
  • How to Run a RAVEL Rule from the GUI
  • A RAVEL Expand Expression
  • A RAVEL Transform Expression
  • A RAVEL Union Expression

CDNS - RequestDemo

Have a question? Need more information?

Contact Us

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information