Questa
Questa
Questa
User Guide
This document contains information that is proprietary to Mentor Graphics Corporation. The original recipient of this
document may duplicate this document in whole or in part for internal business purposes only, provided that this entire
notice appears in all copies. In duplicating any part of this document, the recipient agrees to make every reasonable
effort to prevent the unauthorized use and distribution of the proprietary information.
This document is for information and instruction purposes. Mentor Graphics reserves the right to make
changes in specifications and other information contained in this publication without prior notice, and the
reader should, in all cases, consult Mentor Graphics to determine whether any changes have been
made.
The terms and conditions governing the sale and licensing of Mentor Graphics products are set forth in
written agreements between Mentor Graphics and its customers. No representation or other affirmation
of fact contained in this publication shall be deemed to be a warranty or give rise to any liability of Mentor
Graphics whatsoever.
MENTOR GRAPHICS MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE.
MENTOR GRAPHICS SHALL NOT BE LIABLE FOR ANY INCIDENTAL, INDIRECT, SPECIAL, OR
CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS)
ARISING OUT OF OR RELATED TO THIS PUBLICATION OR THE INFORMATION CONTAINED IN IT,
EVEN IF MENTOR GRAPHICS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
U.S. GOVERNMENT LICENSE RIGHTS: The software and documentation were developed entirely at
private expense and are commercial computer software and commercial computer software
documentation within the meaning of the applicable acquisition regulations. Accordingly, pursuant to
FAR 48 CFR 12.212 and DFARS 48 CFR 227.7202, use, duplication and disclosure by or for the U.S.
Government or a U.S. Government subcontractor is subject solely to the terms and conditions set forth
in the license agreement provided with the software, except for provisions which are contrary to
applicable mandatory federal laws.
TRADEMARKS: The trademarks, logos and service marks ("Marks") used herein are the property of
Mentor Graphics Corporation or other parties. No one is permitted to use these Marks without the prior
written consent of Mentor Graphics or the owner of the Mark, as applicable. The use herein of a third-
party Mark is not an attempt to indicate Mentor Graphics as a source of a product, but is intended to
indicate a product from, or associated with, a particular third party. A current list of Mentor Graphics’
trademarks may be viewed at: www.mentor.com/trademarks.
Chapter 1
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Questa Static Manuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Notational Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Mentor Graphics Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Chapter 2
CDC Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
CDC Design Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Clock Domains. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Clock Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Metastability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Metastability in Hardware. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Metastability in Standard RTL Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
CDC-FX Injected RTL Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Synchronizers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Reconvergence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Reconvergence Severity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Verifying Reconvergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
CDC Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Attributes of CDC Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
CDC Synchronization Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Schemes with Potential CDC Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Complex Crossings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
FIFO Memory and FIFO Crossings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Static CDC Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Formal CDC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
CDC Protocol Checker Promotion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Status Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Chapter 3
CDC Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
qcdc Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Batch Mode: qcdc -c -do. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
GUI Mode: qcdc cdc.db . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Static CDC Verification Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Phase 1. Compiling the Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Phase 2: Running CDC Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Phase 3: Running GUI Debug. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Dynamic CDC Verification Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Chapter 4
CDC-FX Metastability Injection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Specifying Metastability Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Metastability Windows Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Running CDC-FX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Running Metastability-injected Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Simulation Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
CDC-FX PLI Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Verilog Glue Logic Option Impact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
VHDL Glue Logic Option Impact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Metastability Injector Simulation Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Assertion Violations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Chapter 5
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
CDC Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
and_gate_dmux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
async_reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
async_reset_no_sync. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
black_box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
bus_custom_sync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
bus_custom_sync_no_sync. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
bus_dff_sync_gated_clk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
bus_four_latch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
bus_shift_reg. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
bus_two_dff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
bus_two_dff_phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
clock_no_sync. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
combo_logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
custom_sync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
custom_sync_no_sync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
custom_sync_with_crossing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
dff_sync_gated_clk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
dmux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
fanin_different_clks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
fifo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
fifo_memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
fifo_memory_ptr_mismatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
fifo_ptr_no_sync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
forward_simple_dmux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
four_latch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
handshake . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
multi_bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
multi_sync_mux_select. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
mux_lock_dmux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
no_sync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
port_constraint_mismatch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
pulse_sync. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
reconvergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
redundant. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
series_redundant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
shift_reg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
simple_dmux. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
single_source_reconvergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
two_dff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
two_dff_phase. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Protocol/FX Checkers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Standard Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
cdc_dsel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
cdc_fifo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
cdc_glitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
cdc_hamming_distance_one . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
cdc_handshake_data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
cdc_sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
cdc_sync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
cdc_fx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
cdc_mfx. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
GUI Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
CDC Checks Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Index
Third-Party Information
End-User License Agreement
Welcome to the Questa® Static analysis suite, a collection of functional verification solutions
from Mentor Graphics. The Questa Static analysis suite provides a complete, integrated
functional verification environment for static analysis and verification of your complex HDL
designs.
The Questa Static suite has the following functional verification solution sets:
• Questa AutoCheck, for analyzing violations of various standard design rules and
common coding practices.
• Questa Formal, for static formal analysis of SVA, PSL, OVL and QVL assertions.
• Questa CDC, for clock domain crossing analysis, CDC transfer protocol checking and
CDC-FX metastability effects injection.
These analysis environments, plus the Questa Sim simulator use a common set of front-end
utilities to compile and maintain design and resource libraries. In particular, the Questa
AutoCheck, Formal and CDC analyzers already are compatible with your simulation
environment, if you use the Questa Sim simulator. The Questa Static products analyze
synthesizable logic, so some variance with simulation is common, but this is not unlike the
restrictions for logic synthesis and design emulation.
Each analyzer comes with a GUI debugger environment for organizing, waiving and debugging
verification results. These GUI environments are tightly integrated with their verification
analysis solutions. All have a common look-and-feel, as they are based on a common set of GUI
widgets (which are also used for the Questa Sim GUI environment). In addition to tabs and
windows for organizing source data and running the analyzers, the GUIs have useful analysis
windows, such as language-oriented source code editors, schematic browsers, waveform
viewers, finite-state-machine viewers and assertion thread viewers. Since their use models are
so similar, once you are familiar with the operation of one GUI environment, you can easily
learn how to run the others.
• Release Documents
• Questa Static Release Notes — Bugs fixed in the current release and support
information.
• Questa Static Release Highlights — New features; user-visible changes; support
information and installation notes.
• Quick Start Guides
• Questa AutoCheck Quick Start Guide — Tool flows and methodology for Questa
AutoCheck; syntaxes for commands and directives; and autochecks quick reference.
• Questa Formal Quick Start Guide — Tool flows and methodology for Questa
Formal; and syntaxes for commands and directives.
• Questa CDC Quick Start Guide — Tool flows and methodology for Questa CDC;
syntaxes for commands and directives; and CDC schemes quick reference.
• References
• Questa Static Command Reference — Data sheets for the Questa Static Tcl
commands and the top-level shell commands.
• Questa Static Quick Reference — Syntaxes of Tcl and shell commands for all
Questa Static analyzers.
• Questa Static Messages — Quick reference for messages issued by the Questa Static
analyzers.
• Questa Formal Assertions Quick Reference — Quick reference for OVL and QVL
checker libraries; and SVA coding style examples.
• User Guides
• Questa AutoCheck User Guide — Basics and tool flow for AutoCheck operation;
autochecks reference; and GUI reference.
• Questa Formal User Guide — Basics and tool flow for formal analysis and
assertion debug; and GUI reference.
• Questa CDC User Guide — Basics and tool flow for static CDC analysis, dynamic
CDC analysis and simulation with CDC-FX metastability injection; CDC schemes
reference; and GUI reference.
• Tutorials
• Questa Formal Tutorial User Guide — Formal analysis tutorials.
• Questa CDC Tutorial User Guide — Static and dynamic CDC analysis tutorials.
Notational Conventions
The Questa Static analyzer manuals use the notational conventions illustrated in Table 1-1.
This manual uses the conventions illustrated in Table 1-2 for syntax statements.
The following replaceable variables in directive syntax statements represent the shown object
types.
When specifying a directive from a directive syntax statement, substitute for each meta-variable
an HDL identifier, or an expression enclosed in parentheses, that evaluates to an object of the
corresponding type.
Online Help
Questa Static analyzers have several ways of getting online help:
• Hover help
When using the GUIs, placing the cursor over certain items displays pop-up text boxes
called “hover help”. This pop-up information helps you understand the GUI. For
example, hovering over an icon displays a description of the function performed by the
icon (such as zoom in and trace fanin to register or primary port).
Other types of hover help include hovering over a status flag to see the meaning of that
status and hovering over a warning message to see the full details of the message.
• Keyboard Shortcuts
When running a Questa Static analyzer GUI, select a particular window and type Ctrl-/
to display a popup frame showing the keyboard shortcuts applicable to that window.
Ctrl - /
displays
keyboard
shortcuts
• InfoHub
The Questa Static documents are available in HTML and PDF forms from the Questa
Static InfoHub. Use a web browser to open the InfoHub top page:
install_dir/share/doc/infohubs/index.html
1 Scopes
InfoHub
2
Help
3 Search
The side panel (1) selects the groups of documents (scopes) to display in the main
window. The Release Information scope shows the Release Notes and Release
Highlights. The Questa Static scope has the rest of the Questa Static documents. The
InfoHub Help quick link (2) shows how to use Mentor Graphics InfoHub viewers. Use
the Search field (3) to enter search keywords for quick lookup of various topics.
http://www.mentor.com/supportnet/options
If you have questions about this software release, please log in to SupportNet. You may search
thousands of technical solutions, view documentation, or open a Service Request online at:
http://www.mentor.com/supportnet
If your site is under current support and you do not have a SupportNet login, you may easily
register for SupportNet by filling out the short form at:
http://www.mentor.com/supportnet/quickaccess/SelfReg.do
All customer support contact information can be found on our web site at:
http://www.mentor.com/supportnet/support_offices.html
Most complex designs have more than one clock. Many of these clocks are asynchronous. For
these designs, the logic clocked by each asynchronous clock forms the clock domain for the
clock. Logic entirely inside a clock domain can be verified with the same approach as that for a
single-clock design. However, problems arise from signals that connect logic in different clock
domains. Signals that cross clock domain “boundaries” must be properly synchronized, and
they must obey all relevant transfer protocols. The process of verifying these requirements is
called clock domain crossing (CDC) analysis.
But, even properly synchronized CDC signals that obey protocol rules do not guarantee valid
functionality. If any CDC signal does not hold steady during the setup and hold time of its
receiving register, then the register can become metastable—its output can settle at random to a
value that is different from the RTL simulated value.
In effect, data values that cross clock domains can be advanced or delayed randomly relative to
RTL simulation. If the receiving logic is not specifically designed to tolerate these metastability
effects, then functional errors can occur. Unfortunately, standard simulation cannot accurately
model metastability in a design. An extension to standard functional verification is needed to
model the effects of metastability in a design. The CDC-FX product does just that; CDC-FX
runs standard simulation with metastability injected into the circuit.
This chapter describes the method of verifying CDC signals using the CDC compiler and
CDC-FX metastability injection. This method combines static CDC analysis, inference of
design intent, assertions from an assertion checker library, simulation, and CDC-FX
metastability injection for a complete CDC verification methodology.
Refer to the CDC-FX Metastability Injection Chapter starting on page 127 for additional
information.
Does my CDC synchronization logic prevent data corruption across clock domains?
Even for a design that has correct synchronizers on all signals, you must consider questions
such as:
• What happens if the CDC signals are changing when the handshake signal indicates they
are stable?
• Does the gray-code logic on a multiple bit bus using 2FF synchronization have a bug?
• Does the input to a data synchronizer change in two successive clock cycles of the
receiving domain?
• What happens when multiple CDC signals are recombined and used together in the
receiving domain?
Problems such as these often do not cause simulations to fail; instead, they commonly manifest
as intermittent post-silicon failures.
To protect against these types of failures (and ensure CDC problems are addressed early in the
design process), you can use the CDC verification methodology that consists of a three-pronged
approach as follows:
Clock Domains
A clock domain is a section of a design that has a clock asynchronous to (or which has a
variable phase relationship to) another clock in the design. For example, suppose one clock is
derived from another clock through a clock divider. These two clocks have a constant phase
relationship; therefore, the two sections of the design that use these clocks are really part of the
same clock domain (Figure 2-1A). However, suppose two clocks have frequencies of 50 MHz
and 33 MHz. These clocks’ phase relationships change over time; therefore, they clock two
different clock domains (Figure 2-1B).
clk/2 clk33
clk clk
PLL clk50
clk50
If the primary inputs to a circuit include multiple clocks, then these asynchronous clocks
determine separate clock domains (Figure 2-2A). If the inputs to a circuit are asynchronous to
the circuit itself, then these asynchronous inputs are in separate clock domains (Figure 2-2B).
Clocks are the clock signals of registers and the enable signals of latches (when properly
identified).
A clk33 B
a
clk33
b
clk50
clk50 clk clk
Asynchronous Clocks Asynchronous Inputs
Clock Groups
All the clocks that are part of the same clock domain constitute a clock group. Hence, clock
groups partition all of the clocks in the design. The clock groups identify the various clock
domains in the design.
Metastability
A clock domain crossing (CDC) signal is a signal originating in a clock domain that crosses the
boundary into another domain (whose clock is asynchronous to the original clock) and is then
sampled by a register in that asynchronous clock domain.
When the active edge of a CDC signal’s transmit clock is too close to the active edge of the
receive register’s clock, metastability occurs if data changes within the setup/hold time. With
the TX/RX clock very close, input to the RX register changes within the setup/hold window,
which causes metastability. The register’s output settles to an unpredictable value. Metastability
can occur if the clocks are asynchronous, or if they are synchronous but have unpredictable or
drifting skews. Every type of bi-stable storage element is susceptible to metastability. Logic
subject to metastability must be designed to “tolerate” its effects.
The effects of metastability are unpredictable in hardware as the output signal can settle
randomly to 1 or 0. However, RTL simulation provides predictable results. As a result, RTL
simulation does not accurately model the hardware implementation when metastability is
present. To ensure a circuit design is immune to metastability effects, functional verification
methods must incorporate technology beyond RTL simulation.
To design circuits that tolerate the effects of metastability, you must understand: How registers
in hardware exhibit metastability and how registers function in simulation when the conditions
for metastability are present.
Metastability in Hardware
Registers can go metastable in hardware. Consider the 1-bit CDC signal s that is sampled by the
flip-flop DFF in Figure 2-3 on page 22. Since s comes from a different clock domain, its value
can change at any time with respect to the DFF clock (clk). If the value of s is not held constant
at 0 or 1 during the DFF setup and hold time, then the output (q) might assume an intermediate
voltage for an indeterminate amount of time. Then, q “settles” randomly to either 0 or 1. The
flip-flop is said to be metastable for that interval.
• If the simulated input switches value before the simulated clock edge, then the simulated
output switches value at the clock edge.
• If the simulated input switches value after the simulated clock edge, then the simulated
output does not switch value.
Therefore, for both setup time and hold time violations, two results are possible as follows:
Note that metastability models can be generalized for multibit registers by treating them as
aggregate single-bit registers.
Setup time violation where the output Hold time violation where the output
settles to the simulation value. The settles to the simulation value. The
hardware transition is not advanced or hardware transition is not advanced or
delayed. delayed.
hardware rx_clk rx_clk
differs from cdc_s cdc_s
simulation q (sim) q (sim)
q (hw) q (hw)
Setup time violation where the output Hold time violation where the output
settles to the complement of the settles to the complement of the
simulation value. The hardware simulation value. The hardware
transition is delayed by one cycle. transition is advanced by one cycle.
s q1 q2 q3
R1 R2 R3
clk $random()
• It is incomplete, because it only models two of the four possible metastability scenarios.
• It models metastability only across synchronized CDC signals.
• Results are difficult to predict, because metastability is introduced into the simulation at
random.
Clock Jitter
Another method of modeling CDC metastability effects in standard RTL simulation is to jitter
the clocks in simulation and see if end-to-end functional simulation still works when the clock
phase relationships change. This method is good for verifying that the design works properly in
the presence of clock jitter and clock skews. But, this method does not completely model CDC
metastability effects.
reg
clocks clocks
monitor monitor
tx_clock rx_clock tx_clock synchronizer rx_clock
metastability metastability
injector injector
The ccl compiler generates the checker logic for running metastability injected simulation. To
do this, it adds metastability injection logic for each affected CDC signal or bus in the following
two parts:
Synchronizers
Designers generally assume signals are in-band, which means they have a value of either logic 0
or logic 1. Metastable signals can have values that are neither 0 or 1; therefore, they are
considered out-of-band signals. Out-of-band signals have unexpected effects and propagate
unpredictably. To handle CDC signals, designers fence in potentially metastable logic to ensure
logic beyond the fence only needs to handle in-band signals. The logic inside the fence is called
a synchronizer (see Figure 2-7).
tx_clk rx_clk
Designers implement various types of synchronizers as appropriate for particular situations and
design styles. Logic for each synchronizer type assumes a set of preconditions about the logic
connecting the synchronizer and about the function of the circuit during simulation. Rules for
the synchronizer’s connections can be checked during compilation before simulation. Transfer
protocols can only be checked as the circuit operates in simulation. A synchronizer type, along
with its connection rules and transfer protocol, is called a synchronization scheme as shown in
Figure 2-8.
tx_clk rx_clk
Most CDC implementations use one or more synchronizers from a set of popular, well-
characterized synchronization schemes. These structured synchronizers must follow well-
defined connection rules and should obey specific transfer protocols. CDC identifies clock
domains, CDC signals, and structured synchronizers; and it verifies that the structured
synchronizers follow their connection rules. Then, CDC promotes their transfer protocols to
CDC protocol checkers for use with assertion-based simulation and formal verification.
Any clock domain crossing that does not have a structured synchronizer must be synchronized
by custom logic or software. These ad hoc synchronizers prevent receive registers from
sampling CDC signal values when they are changing. Therefore, the receive register outputs can
never go metastable. For example, an ad hoc synchronizer might use custom logic to control its
receive register’s load enable signal, or software might control the loading of a circuit’s
configuration registers.
Connection Rules
• Logic in cdc_s path must be glitch
Tx Clock 2DFF synchronizer Rx Clock free
Domain Domain
cdc_s int_s q • No combinational logic is allowed in
R1 R2 int_s path
rx_clk
CDC Transfer Protocol
• Transmit clock domain logic must
hold cdc_s stable for at least the
following:
period rx_clk + t setup + t hold + t max_skew
rx_clk
rx_clk
cdc_s
cdc_s
int_s
int_s
q
q
DMUX Synchronizer
Select control signal from the transmit domain (synchronized by a 2DFF synchronizer) enables
a MUX when the transmit data value is available.
rx_clk
2DFF
d[2] synchronizer
rx_clk
Custom Synchronizer
Special-purpose signal or data synchronizer designed, specified, and implemented by the user.
rx_clk
Custom synchronizers can also have clock domain crossings internal to the user-defined
module.
tx_clk rx_clk
custom synchronizer
with internal crossing
Ad Hoc Synchronizers
Questa CDC reports CDC signals without structured synchronizers and promotes appropriate
CDC protocol checkers to verify ad hoc synchronization in simulation and formal verification.
Tx ad hoc synchronizer
Rx CDC Transfer Protocol
Clock Clock •
When a changing rx_int is sampled
Domain Domain by rx_clk, rx_int must be stable in
the interval from:
cdc_d rx_int q
active_rx_clk_edge – t setup
to:
active_rx_clk_edge + t hold
rx_clk
Reconvergence
Reconvergence is the utilization of separately-propagated correlated information. An example
of reconvergence is information crossing clock domain boundaries that is recombined in the
receive logic.
reconverging signals
tx_sig1 rx_sig1
tx_clk rx_clk
tx_sig2 rx_sig2
Can you assure that all of the correlated information used at the destination is
consistent with the information that was transmitted from the source?
CDC signal values might be metastable. Even when proper synchronizers are used, they are
subject to variable delays, which might cause reconverging information to be inconsistent.
An example of local reconvergence is multibit reconvergence of a CDC data bus. Here, a data
unit splits into pieces, crosses a clock domain boundary and then recombines in the receive
logic. In the following example, a reconverged word value is used as the next state of a finite
state machine. The individual bits of the word are synchronized to the receive clock domain, but
each bit is subject to variable delays. As a result, the next_state input to the FSM can represent a
command that is not consistent with the current state.
Tx Rx
Clock d[0] Clock FSM
Domain synchronizer Domain
S2
cdc_d next_state S1
synchronizer
d[1]
synchronizer S3 S4
d[2] ?
rx_clk
An example of global reconvergence is a set of data items transmitted across a clock domain
boundary through different synchronizers that are combined in the receive clock domain.
Another example of global reconvergence is the transmission of multiple items of information
across a clock domain boundary at different times using the same synchronizer.
Global and local reconvergence problems in CDC circuits are avoided by using proper
synchronizers and good reconvergence schemes. A good implementation ensures information is
always consistent. Either variable delay data cannot be sampled in the receive domain or the
receive domain logic can recover from variable delayed values. In the following example of a
good scheme, an arbiter selects a receive data value when the corresponding asynchronous
FIFO read data value is guaranteed to be ready.
Tx Clock Rx Clock
Domain Domain
rx_0
tx_0 async FIFO rx_out
synchronizer
rx_1
tx_1 async FIFO
synchronizer rdy_0 sel
arbiter rx_rdy
rdy_1
rx_clk
rx_clk
Knowing which paths are reconvergent CDC paths is important for assessing reconvergence
issues. But for many multiple-clock architectures, the number of reconvergent CDC paths can
be staggering. To help rank paths for assessment, reconvergent paths can be filtered by several
characteristics.
divergence depth reconvergence depth
synchronizer
synchronizer
synchronizer
The reconvergence depth of a group of reconvergent CDC paths is the sequential depth from the
synchronizers to the reconvergence point. Sometimes, heuristic information about the
functional characteristics of the circuit can specify a reconvergence depth limit for problems to
occur. General reconvergent CDC paths can start anywhere in the transmit domain.
Reconvergent paths that start at different points can have reconvergence problems. However,
single-source reconvergence paths—those reconvergent paths that start from the same transmit
domain source—are characteristically vulnerable to reconvergence issues. Analogous to general
reconvergent CDC paths, each group of single-source reconvergence paths has a sequential
distance (called the divergence depth) from the single source to the synchronizers.
Reconvergence Severity
The cdc report crossing -scheme reconvergence command can be specified multiple times to set
“severities” of reconverging paths to levels that are not the same. The following schematic
shows a reconvergence crossing where Path A is assigned reconvergence severity caution and
Paths B/C are assigned reconvergence severity violation.
Caution
Path A synchronizer
Violation
Violation
Path B synchronizer
Violation
Path C synchronizer
The reported crossing severity is the most severe one (here, violation). The severities of the
individual paths are reported as their reconvergence severities. For example:
Violations
=================================================================
Reconvergence of synchronizers. (reconvergence)
-----------------------------------------------------------------
rx_clk : end : dout (.../single_source_reconvergence.v : 5)
(ID:reconvergence_78116)
rx_clk : start : shift_reg_sync (.../single_source_reconvergence.v : 10)
(Synchronizer ID:shift_reg_97221)
(Reconvergence Severity:Violation)
rx_clk : start : two_dff_sync (.../single_source_reconvergence.v : 9)
(Synchronizer ID:two_dff_44733)
(Reconvergence Severity:Caution)
The same process applies to cdc report crossing -scheme single_source_reconvergence. Note
that each single-source reconvergence crossing is also reported as a reconvergence crossing.
Furthermore, crossing severities for reconvergence and single-source reconvergence are
separate. The default single-source reconvergence severity is violation. So if a single-source
crossing reconvergence crossing created the above report, the single-source reconvergence
entry has:
Violations
=================================================================
Single Source Reconvergence of synchronizers.
(single_source_reconvergence)
-----------------------------------------------------------------
rx_clk : end : dout (.../single_source_reconvergence.v : 5)
(ID:single_source_reconvergence_41397)
rx_clk : start : shift_reg_sync (.../single_source_reconvergence.v : 10)
(Synchronizer ID:shift_reg_97221)
(Reconvergence Severity:Violation)
rx_clk : start : two_dff_sync (.../single_source_reconvergence.v : 9)
(Synchronizer ID:two_dff_44733)
(Reconvergence Severity:Violation)
tx_clk : diverge : ctrl_signal (.../single_source_reconvergence.v : 8)
Verifying Reconvergence
Simulation alone is not sufficient to verify that a circuit’s hardware implementation tolerates
metastability effects and will operate correctly without reconvergence issues. Normal
simulation does not model metastability robustly and completely misses behavior that can
manifest in the circuit’s hardware implementation. A multi-faceted approach to CDC
verification is necessary for a high degree of confidence that a particular reconvergence scheme
is a good one.
CDC Schemes
The CDC compiler analyzes the design netlist and identifies logic involving CDC signals that
matches various pattern templates. Each occurrence of logic that matches a template is called a
clock domain crossing. In general, a crossing is a logic structure that spans two or more clock
domains.
A simple clock domain crossing is a path. For example, you might have a 1-bit CDC signal sig
from clock domain A being synchronized by two in-phase D flip-flops in clock domain B. A
complex clock domain crossing is one that contains other crossings. For example, a MUX
crossing is complex. The MUX crossing itself is a logic structure that spans two clock domains.
Inside the MUX crossing is a MUX select signal structure that is a simple 2DFF crossing.
The CDC compiler identifies clock domain crossings and their synchronization logic. Classes of
crossings with the same functionality are called CDC schemes. For example, the above MUX
select signal path with its synchronization logic is a “two_dff” scheme; the parent data MUX
crossing is an instance of a “dmux” scheme.
CDC Schemes starting on page 144 have the detailed data sheets for the CDC schemes.
Your initial CDC analysis runs are typically spent adjusting the attributes of CDC schemes to
fine-tune the CDC reporting for the target design characteristics. For example, a “combo_logic”
scheme in one part of the design might be acceptable, but it might be a serious concern in
another part of the design.
no no
Severity
Severity is an indicator of the seriousness of the particular logic pattern for the crossing. It also
reflects the action you are expected to take. The severity levels are:
• Violation
A violation is considered a must-fix problem. For example, an unsynchronized CDC
signal from clock domain A to clock domain B might be a concern, so you might want to
assign severity violations to all of these CDC schemes.
• Caution
A caution is considered a valid crossing, but it has an associated CDC transfer protocol
that should be verified in simulation or by formal verification. Most cautions have
designated CDC protocol checkers that the CDC compiler configures automatically and
“promotes” for assertion-based verification.
• Evaluation
An evaluation is a valid CDC scheme that uses an appropriate synchronizer. The
scheme’s CDC protocol must still be checked.
• Proven
A proven scheme is a valid CDC scheme with an associated CDC transfer protocol that
formal CDC analysis has proven cannot be violated. No CDC protocol checkers for the
scheme are “promoted” for assertion-based verification.
• Waived
A waived scheme is a CDC scheme with a CDC transfer protocol that does not require
verification. CDC data for waived schemes are included in the cdc database, but no
CDC protocol checkers for the scheme are “promoted” for assertion-based verification.
Promotion
Whenever possible, CDC creates and configures one or more CDC transfer protocol assertions
for a scheme. Most synchronizers have corresponding protocol assertions. The process of
identifying a CDC scheme and creating its protocol assertion is called checker CDC assertion
promotion. Here, a CDC scheme is deemed OK from a static perspective. The compiler does not
have enough information to determine whether or not a synchronization problem will occur.
The answer depends on the operating environment of the design.
Promoted checkers can be used during simulation to monitor CDC activity and verify proper
synchronization of CDC signals. They are also used in static and dynamic formal verification.
Use the cdc promote directives to turn off CDC checker promotion for specific CDC schemes.
Signals
Signal synchronization schemes identify single-bit CDC signals with various synchronizers. For
example, a two_dff scheme uses two in-phase D flip-flops clocked in the receive domain as a
synchronizer.
Tx Clock Domain Rx Clock Domain
tx_sig rx_sig
DFF DFF DFF
tx_clk rx_clk
Data
Data synchronization schemes identify multiple-bit CDC data buses with various synchronizers.
For example, a bus_two_dff scheme uses two in-phase D flip-flops clocked in the receive
domain as a synchronizer.
Tx Clock Domain Rx Clock Domain
tx_clk rx_clk
Such a synchronizer is typically used for single-bit signals. When used to synchronize data
buses, this synchronization scheme should only be used to synchronize data buses that are grey
coded (i.e., at most, one bit changes per clock cycle).
Signal/Data
Signal/data synchronization schemes identify CDC signals and data buses with various
synchronizers. For example, a “DMUX” scheme uses two in-phase D flip-flops clocked in the
receive domain to synchronize the select signal to a MUX that selects the CDC data. The CDC
data can be either a single-bit signal or a multiple-bit data bus.
Tx Clock Domain Rx Clock Domain
tx_clk
tx_sel
DFF DFF
rx_sel
tx_clk rx_clk
tx_data rx_data
synchronizer
tx_clk rx_clk
Tx Clock Domain Rx Clock Domain
Complex Crossings
A simple crossing has logic in two domains, but the logic that crosses the clock domain
boundary is a single net (signal or bus). The two_dff and bus_two_dff schemes are classes of
simple crossings. A complex crossing also has logic in two (or more) domains, but the logic that
crosses the clock domain boundary is an amalgamation of multiple nets. Reconvergence, FIFO
synchronization and DMUX synchronization are examples of complex crossings. All complex
crossings contain separately reported simple crossings.
wr_data
memory
rd_data
waddr rd_clock
FIFO write clock domain FIFO read clock domain
Crossing with a TX as no
Memory or Register File Memory? no_sync
MISSING SYNCHRONIZER
Synchronization of Memory Data Input is
Missing
yes
R/W Addrs no
fifo_memory_ptr_mismatch
Valid?
FIFO POINTER MISMATCH
FIFO-style Memory with Mismatching
Data/Pointer Clock Domains
yes
cdc preference no
-fifo_scheme? fifo_memory
FIFO MEMORY SYNCHRONIZER
FIFO-style Memory Synchronization
yes
yes no
fifo R/W Pointers fifo_ptr_no_sync
Synced?
FIFO MISSING FIFO POINTER SYNCHRONIZER
FIFO Synchronization Synchronization of Memory Pointer Input is
Missing
For a FIFO memory crossing to be classified as a FIFO crossing (fifo), the write address pointer
must also synchronize in the Rx domain and the read address pointer must also synchronize in
the Tx domain (Figure 2-12). You can relax these requirements with the -no_write_sync and
-no_read_sync options to cdc preference fifo.
Categorizing FIFO memory crossings between FIFO crossings and FIFO memory crossings
with missing pointer synchronization (fifo_ptr_no_sync) is an unnecessary performance
degrading step in most analysis runs. Doing so is off by default. To turn FIFO detection on:
wr_data
memory
rd_data
rd_clock
waddr write addr
synchronizer
1. Verifies synchronizers.
Static CDC analysis examines the design RTL and uses the user-specified and inferred
clock groups to find the clock trees that determine the clock domains in the design. It
then assigns each register to a clock domain. Static CDC analysis identifies the CDC
signals by finding registers that drive registers from other clock domains and verifying
that correct synchronizers are present on all CDC signals.
2. Identifies CDC schemes.
Static CDC analysis categorizes each CDC logic pattern as one of a set of predefined
CDC schemes. For example, one scheme contains all single-bit CDC signals that are
synchronized by two-register data synchronizers. Another scheme contains all multiple-
bit CDC signals that are not synchronized. Some schemes are identified as violations.
For example, the following figure shows single-bit CDC signals with combinational
logic driving, or within, the synchronizers.
combinational logic
between DFFs
tx_sig rx_sig
DFF DFF DFF
tx_clk rx_clk
tx_sig rx_sig
DFF DFF DFF
tx_clk rx_clk
You can redefine the statuses used for the different schemes. For example, you can
make latch synchronization a violation.
3. Verifies certain CDC protocols
If CDC formal verification is enabled, static CDC analysis includes static formal
analysis of certain CDC protocols.
4. Promotes CDC protocol checkers.
Static CDC analysis generates CDC protocol checkers for certain CDC schemes based
on their scheme type, transmit clock, transmit signals, receive clock and receive signals.
CDC checkers are not promoted for crossings that have severity proven or waived or for
filtered crossings. Promoted checkers represent CDC protocols that need assertion-
based analysis by the Questa Formal tools and possibly simulation.
Formal CDC
Formal CDC is an advanced option of static CDC analysis that tries to verify the CDC transfer
protocols of certain CDC schemes using a built-in formal proof engine. Formal CDC analyzes
the fanin logic of these CDC schemes. If formal CDC finds a proof that a CDC scheme’s
protocol cannot be violated, that scheme is reported as a proven scheme. Since the scheme’s
synchronization is valid, no protocol checker is promoted for the scheme. If CDC formal
analysis cannot find a proof that the protocol cannot be violated, the result is inconclusive. So,
the associated protocol checker is promoted for verification by the Questa Formal tools or by
simulation. The proportion of time formal CDC spends analyzing protocols is controlled by the
formal CDC effort level:
Caution
Setting formal CDC effort too high for some designs can significantly degrade
performance.
• dff_sync_gated_clk
• four_latch
• pulse_sync
• shift_reg
• two_dff
• two_dff_phase
Gray-Coding Protocols
Multibit CDC signals (i.e., data buses) can be synchronized by synchronizers typically used for
single-bit signals. However, such synchronization must follow a gray-coding protocol where
only one data bit changes at a time. Formal CDC tries to find proofs for the gray-coding
protocols of the following types of CDC schemes:
• bus_dff_sync_gated_clk
• bus_four_latch
• bus_shift_reg
• bus_two_dff
• bus_two_dff_phase
• reconvergence (if enabled by cdc preference -promote_reconvergence).
• The transmit signal remains stable until the synchronizer’s output register has sampled
the previous value.
This protocol can be checked with the following assertion using simulation with assertions and
formal verification:
• The transmit signal must not change for at least N consecutive transmit-clock cycles,
where N is a function of the transmit-clock and receive-clock frequencies.
If this assertion is violated, then a possible counterexample exists in which metastability on the
CDC signal can cause an incorrect result. In this case, the transmitted data is missed by the
receiver logic. In regular simulation (which is not subject to metastability unless it is a
catastrophic violation of the protocol), the signal reaches its goal and the problem is not
detected. However, when using simulation with assertions, an assertion fires. You can then
examine the conditions under which the failure occurs and correct the design problem.
scheme. If a design cannot violate any of the checker’s assertions, then the design obeys the
associated CDC synchronization scheme.
CDC protocol assertions are available for the common CDC synchronization schemes. Static
CDC analysis identifies the synchronization schemes used for the CDC signals in the design.
Based on this analysis, CDC promotes instances of CDC protocol assertions depending on the
synchronization scheme (although not all schemes have associated promoted assertions). The
promoted checkers validate CDC behavior during assertion-based verification.
• cdc.rpt
Multiple-bit signal across clock domain boundary. (multi_bits)
---------------------------------------------------------------
cpu_clk : start : crc_seed[7:1] (/CDC/SRC/demo_top.vhd : 84)
mac_clk : end : crc_1.crc_16 (/CDC/SRC/demo_top.vhd : 565)
(ID:multi_bits_76265)via : crc_1.seed
Simulation
To simulate a design with CDC checkers, use assertions in simulation and your standard HDL
simulator. During assertions in simulation, the CDC checkers verify the functionality of the
CDC protocols. A violation of a protocol assertion makes the associated CDC checker fire.
To debug assertion firings, use the qcdc viewer. Use the File >Open >Database command to
load the database from the simulation (cdc_sim.db). A new window, Simulation contains the
simulation results and the CDC Checks window, has two new columns with the simulation
results (Figure 2-13).
To invoke the waveform viewer with the assertion firing from simulation (Figure 2-14) right
click on the Firing in the Transcript window and select Show Firings to display the Firings
window. Select all firings or an individual firing to show the waveform.
View the coverage statistics for the simulation from the Design window (Figure 2-15).
Status Flags
Status flags give you a quick assessment of the results of CDC verification from the CDC GUI.
The flags help you determine which CDC issues to examine first and they highlight additional
problems you should investigate. Figure 2-16 shows a region of a CDC checks tab in the results
pane of the CDC GUI after a CDC verification session, formal verification and simulation with
the promoted CDC checkers. Entries can have Static status, Prove status and Simulation status
as described in Table 2-5.
Questa CDC is a static analysis system comprised of a clock model compiler, a CDC analysis
engine and a GUI debug environment (Figure 3-1). These functions run under the analyzer
command qcdc. The CDC analysis flow consists of running qcdc in two phases in different
modes:
qcdc Command
As shown in Figure 3-2, the Questa Formal verification flow starts with a compiled design
library (see the Compiler Commands chapter of the Questa Static Command Reference). The
analysis portion of the flow has two phases. Each phase runs the qformal command in a
different mode: batch mode and GUI mode.
design libraries
CDC Debug
Debug CDC results
qcdc cdc.db Source Code Editor
Schematics Browser
GUI Waveform Viewer
GUI Mode
The analyzer executes Tcl commands in the DO file procedurally. The DO script can include
exotic procedural features such as looping and variable substitution and it can perform several
CDC analysis runs in the same session. But a basic qcdc DO file flow has five steps (see the Tcl
Commands chapter of the Questa Static Command Reference).
1. Add directives
Use the general-purpose and cdc directives to configure the analysis run.
2. Adjust settings
Use the configure command to change basic settings for subsequent commands.
3. Run CDC analysis
Use the cdc run command to initiate a formal analysis run.
4. Run post-session analysis
Use the cdc utilities to generate reports and related files.
Steps 1 – 3 must be part of the same qcdc session. Step 4 is optional.
Design Data
Windows
Results
Windows
The GUI shows formal analysis results in various windows and GUI tools (Table 3-2).
Shows information about the compiled design and its clock domain model.
CDC Checks Window
Shows the results of CDC analysis. Each CDC scheme instance has a status
flag that indicates the status for the CDC instance (see “Status Flags” on
page 54). Right-click on a scheme instance to pop up commands for
displaying various debug windows for inspecting the crossing. Also shows
results merged from simulation and formal verification sessions.
Provides a dynamic view of the design source code for browsing. Code is
tightly linked to the GUI objects, which helps navigate the source code. For
example, right-click on various window objects to show in a source code
editor: an object’s declaration, an object’s instantiation, an erroneous
construct flagged in the source code, and other types of constructs flagged
in the source code. The source code editor is also linked to the waveform
viewer. As you move the main cursor in the waveform window, the
associated values from the waveform are annotated to the variables in the
source code.
Static CDC verification identifies the CDC signal paths (crossings) and their associated CDC
schemes. Crossings are ranked by severity, which are set by the cdc report crossing directive, or
default to the severity for the scheme. Typically, several cycles are spent adjusting the scheme
identification attributes and protocol promotion settings. Once you have properly configured
static CDC verification, you can enable the formal CDC analysis engine.
Tip: The following procedure uses the interactive OS shell to run the top-level
commands. This method makes it easier to illustrate the various steps in the procedure.
Typically, a Makefile, or other session management script is used instead. For examples
of the Makefile method of scripting analysis sessions, see the AutoCheck examples in
<install_dir>/share/examples.
Note that a copy of the system modelsim.ini file is copied to the run directory and the
local copy is modified to match the arguments of the vmap command.
4. Compile the design files.
Use vcom to compile the VHDL files and vlog to compile the Verilog/SystemVerilog
files. For example:
prompt> vcom -f pci.f
prompt> vlog dut.v
Check the warnings/errors messages and resolve any problems. To see more information
about a message use the verror command.
prompt> verror -full 2155
MSG_IDX_GLBL_VARS_IN_VERILOG
Global declarations are illegal in Verilog 2001 syntax.
The qcdc command uses a Tcl interpreter internally. For example, you can run simple Tcl
snippets with qcdc:
Although the complete versatility of the Tcl scripting language is available, you need not be
well versed in Tcl to set up and run analysis sessions. The basic flows (and the flows shown in
this manual) are simple sequential scripts with no looping or branching.
The basic analysis session orchestrated by a typical qcdc DO script follows the steps shown in
Figure 3-5.
add directives
adjust settings
1. Add directives.
Directives are Questa Static Tcl commands that configure the subsequent analysis
session. One method groups these commands in a separate DO file:
prompt> cat cdc_directives.do
# Define clocks
netlist clock cpu_clk_in -period 50
netlist clock core_clk_in -period 60
netlist clock mac_clk_in -period 50
# Define constants
netlist constant scan_mode 1’b0
# Add CDC constraints
cdc reconvergence -depth 1 -divergence_depth 1
cdc preference -fifo_scheme -handshake_scheme
netlist blackbox pci_ctrl
• netlist constant — Identify signals that should be considered constant for CDC
analysis.
• netlist memory — Identify large memories that are modeled as single sequential
elements for CDC analysis.
• cdc preference — Set the preferences for static CDC analysis.
• cdc report scheme and cdc report crossing — Set severities for CDC crossings and
schemes.
• cdc promote crossing and cdc promote scheme — Set promotion attributes for CDC
crossings and schemes.
• cdc signal — Override the classification of various signals and assign them certain
CDC properties.
2. Create the top-level DO script.
The script should run the directives, adjust the settings and execute cdc run, which
performs formal analysis.
prompt> cat cdc.do
onerror {exit 1}
do cdc_directives.do
configure error -inferred black_box
cdc run -d dut -report_clock
### cdc run -d dut
exit 0
Notice the Questa Static onerror command. This command configures the session to exit
when one of the Tcl commands encounters an error. For example, you want the session
to end before running a long analysis session whenever a typo or other error occurs
when running a directive. The last exit command is for future functionality, when a
command line interpreter (CLI) is added. It prevents the session from dropping into the
CLI at the end of a successful session.
The do cdc_directives.do command runs the directives script created in step 1 (as if it
were inline). The configure error -inferred black_box command adjusts the error
condition by returning an error whenever clock model compilation processes an inferred
black box (i.e., one without a netlist blackbox directive).
The cdc run -d dut executable runs static CDC analysis. For the initial passes, the
complete CDC analysis run is short-circuited by the -report_clock option. This CDC
analysis run type scans the design data, reports clock domain information and exits
without performing complete CDC analysis.
3. Run a batch CDC session in report clocks mode.
prompt> qcdc -c -do cdc.do -od cdc_results
The -od cdc_results option sets the initial output directory to cdc_results.
A report clocks run is a short session that lets you adjust clock definitions before
committing to a full CDC analysis run.
4. Check for errors and warnings.
Check the log file (cdc_run.log) for errors and warnings. The Error/Warning Summary
table gives the violation count of each type of error/warning.
Error/Warning Summary
-----------------------------------------------------------
Count Type Message ID Summary
-----------------------------------------------------------
1 Warning hdl-222 Possible dead end CDC paths not reported.
2 Warning hdl-41 Primary port connects to multiple clock domains.
19 Warning hdl-51 Port domain assignment inferred.
1 Warning netlist-82 Found internal reset signals.
Summary: 23 Warnings in cdc
which synchronization schemes are valid for the signals. For example, a data bus can
use a control signal synchronization scheme if it is grey-coded and a CDC signal that
is known to be stable does not require synchronization.
• Custom synchronizers must be manually identified so CDC analysis can ignore the
signals synchronized by them.
6. Change the DO script to run full CDC analysis.
Once the design is compiled and the clock domains are verified, adjust the CDC session
DO script:
prompt> cat cdc.do
onerror {exit 1}
do cdc_directives.do
configure error -inferred black_box
### cdc run -d dut -report_clock
cdc run -d dut
exit 0
Instead of running the shortened report clocks session, the script now runs full CDC
analysis. This command also generates the database (cdc.db) file read by qcdc in GUI
mode.
7. Run a full CDC analysis session.
prompt> qcdc -c -do cdc.do -od cdc_results
The cdc crossing off directive turns off CDC analysis for matching crossings, which
can improve performance. The cdc report crossing directives affect the way results
are grouped, but CDC analysis is still performed on these crossings.
Be sure to re-run the CDC session after each change to the directives.
5. Filter (waive) some static CDC results.
Waiving is the process of filtering selected CDC crossings, that is, identifying them as
OK—at least for the time being. Waived crossings are still analyzed—but they are not
displayed as part of the regular results (violation, caution, evaluation, proven). They are
grouped together in the special waived group.
Adjust the crossings selected for filtering using this form. Select a filter entry and click
on Modify. You can adjust waiver arguments from the Modify Filter dialog.
To “un-filter” a crossing entry, select any result and run Filter >By Column, which
displays the Filter CDC Checks dialog again. Select the crossing you want to restore and
then use the Delete (or Modify) button.
6. Create waivers.
Waivers are cdc report directives with -severity waived arguments. You can create
waivers from the GUI and save them to a directives file for use with subsequent CDC
analysis sessions. While you waive a crossing or group of crossings (Step 5), you can
generate a corresponding waiver by running the Create Directive command from the
Modify Filter dialog.
When you OK the dialog, the waiver directive is added to the Directives window.
After adding the waivers, save the file: File >Export >Directive File and add this file to
the session run script:
prompt> cat cdc.do
onerror {exit 1}
do cdc_directives.do
do cdc_waivers.do
configure error -inferred black_box
cdc run -d dut
exit 0
Keeping different versions of waiver files helps you organize CDC issues. You can
“filter” out extraneous information as you focus on particular hot spots in your CDC
analysis. Filtering can be a valuable tool for implementing targeting strategies in your
CDC analysis methodology.
7. Add formal protocol assertion verification to the DO script.
prompt> cat cdc.do
onerror {exit 1}
do cdc_directives.do
do cdc_waivers.do
configure error -inferred black_box
cdc run -d dut -formal
exit 0
The -formal option to cdc run turns on this capability. This is a low-level formal
analysis, but it can identify simple proofs of certain promoted CDC protocol assertions.
Results are shown in the CDC Checks window. At this point problems should be fixed,
but some violations might still be flagged. For example, a scheme might have severity
violation, but its CDC transfer protocol is expected to be valid.
Since some schemes are marked with waived severity, the Type field has a new group of
entries:
• Waived — The scheme’s severity is manually set to waived.
Schemes with protocols that formal CDC proves are valid are shown with proven status
(formal CDC does not analyze protocols of waived schemes).
9. Create additional CDC attribute profiles to address specific issues.
The default tuning of the CDC attributes provides a balance between performance and
the effort spent to provide a high level of detail. You can adjust the exact balance by
specifying a CDC attribute profile targeted to specific needs. For example, the following
directives file creates a profile that has the minimum compute time and memory
consumption. This profile is useful for very large designs, especially when working
iteratively to fine-tune results at early stages of verification.
# high_performance.do -- High-performance CDC profile
# Black box modules that are not required for CDC analysis
netlist blackbox modX
For extremely large designs, use a hierarchical CDC verification flow (see “Hierarchical
CDC Analysis” on page 100).
The following example directives file creates a profile that provides a higher level of
detail in the checking and reporting of CDC data.
# high_accuracy.do -- High-accuracy CDC profile
To test and verify the protocols for these schemes, static CDC analysis launched with the the -
compile_assertions argument “promotes” protocol checkers for CDC protocol analysis in
simulation. The CDC checkers are modules that ensure that data crossing clock domain
boundaries are transmitted and received correctly.
Once your test environment is set up to run simulations, you can add assertions for the promoted
CDC protocol checkers to the compiled DUT logic. The -compile_assertions option to the cdc
command compiles the assertions and sets up the arguments needed to run simulation with the
protocol checkers (and FX checkers if enabled), as shown in Figure 3-6.
-f cdc_sim.arg
cdc run -compile_assertions merge
-f cdc_sim_vhdl.arg
cdc_sim.db
vcom/vlog
qcdc cdc.db
GUI
debugging
testbench files
vcom/vlog environment
Results from these simulations with CDC protocol assertions can be merged back into the CDC
GUI for review and debugging.
5. Run simulation.
Specify the PLI library path for the simulator and the vsim arguments files. For example:
prompt> vsim -c tb -pli install_dir/lib/lib0InLoadMTIPLI.so \
-f cdc_sim.arg.vsim -f cdc_sim.arg.vsimrun \
-do "add log -r /*; run 1000; quit -f"
The CDC Checks window’s new Protocol field shows the status of the crossings from
simulation with CDC protocol assertions. The Type field shows the merged statuses.
The Protocol field has five types of status flags:
• Firing — Simulation violated the crossing’s protocol. The Firings field
shows the number of firings (number of times the protocol was violated) and First
Firing shows the testbench time of the first violation.
• Unevaluated — Simulation never activated the crossing’s protocol assertion.
• Evaluated (and Not Covered) — Simulation activated the crossing’s
protocol assertion. The Evaluations field shows the number of cycles the protocol
assertion activated. However, simulation did not exercise all the assertion’s cover
points.
• Covered — Simulation covered all of the crossing’s protocol assertion’s
cover points.
• Not Promoted— No protocol checker was promoted for the crossing.
Checkers are not promoted for proven crossings, some schemes that do not support
checker promotion and crossings schemes that have promotion disabled (i.e. cdc
promote crossing -off).
9. Debug protocol assertion firings.
Select the scheme and run Show >Protocol >Simulation Firings. From the Firings
dialog, select the desired firing. In the Load Waveform Database dialog, find the
generated waveform file.
Use the waveform view, the schematic view and the source code editor to track down
and fix the source of the firings.
10. Check the Simulation window.
Firings ( ) are caused by either protocol violations or incorrect setup. A protocol
violation is a bug: simulation resulted in the protocol assertion failing. Check the
waveform for the firing (Show >Simulation Firings) to see how the failure can be
produced. You should fix the causes of protocol assertion firings or turn off their
promotion.
A clock domain crossing is metastability hardened if transmit values always are held stable
around receive clock edges whenever the active edges of the transmit and receive clocks
“align.” Here, the two clocks are considered aligned if the active transmit clock edge falls in a
“metastability window” around an active receive clock edge. By default, this window is set at
25% before the receive clock edge to 10% after the edge, but the sizes and skews of
metastability windows can be adjusted to accommodate clocking and physical design
characteristics. Crossings that are guaranteed to be stable when active clock edges align, do not
produce metastable values, so these paths are simulated the same in both regular simulation and
simulation with CDC-FX injectors. The injectors on these paths are never activated and
therefore never simulate metastability.
However, clock domain crossings that can legally become metastable also can be considered
metastability hardened. In these cases, the receive logic must account properly for the random
delays and advances that can occur as a result of the metastability effects exhibited by the
crossings and their reconverging logic. For these crossings, CDC-FX simulation randomly
injects metastability by delaying or advancing various value changes that occur when transmit
and receive clocks align in their metastability window.
Simulating the design with random metastability in this way tests that all clock domain
crossings are metastability hardened. If these simulation tests adequately exercise the design to
cover the various possible signal crossing situations, a truly metastability hardened design will
pass—indicating a high level of confidence that the design’s hardware implementation will not
exhibit faults arising from metastability. Alternatively, a well-constructed test suite simulated
with metastability effects will detect unhardened CDC paths and logic by producing end-to-end
test failures. These you debug the same way as with standard simulation by analyzing backward
from the miscompared outputs using your simulation waveforms and debug environment.
4. Run simulation.
For example:
prompt> vsim -c tb -pli install_dir/lib/lib0InLoadMTIPLI.so \
-f cdc_sim.arg.vsim -f cdc_sim.arg.vsimrun \
-do "add log -r /*; run 1000; quit -f"
FX field
To show the coverage breakdown for a cdc_fx checker, select the entry and run Show
>Coverage.
In this example, the All Bits Metastable cover point shows that 0 out of 8 bits are tested
with metastability injection. Typically, you modify simulation or run additional tests to
ensure complete coverage of the CDC-FX checkers.
Simulator Arguments
Table 3-4 shows additional arguments you can include in your simulator invocation when you
run simulation with CDC protocol checkers and CDC-FX checkers.
Only paths that cross clock domain boundaries are reported as clock domain crossings and are
further analyzed. So, all expected clock domains should match all the separate clock groups. If
two expected clock domains are combined in the same group, no CDC reporting and analysis
occurs for paths between the two (which makes analysis incomplete). Similarly, if what is
expected to be a single clock domain is split into two clock groups, CDC analysis reports paths
between them as clock domain crossings and analyzes them (which adds “noise” to the results
and reduces performance). Having many more groups than expected clock domains might even
slow some GUI operations (such as expanding entries) so much that the GUI becomes unusable
(seems to “hang”).
Clocks Window
The Clocks window (Figure 3-8) in the GUI shows how CDC analysis assumes the clock
groupings specifying the clock domains are defined.
The first level is the clock group classification (the specified type or one of the inferred types,
described in subsequent sections). The second level lists the separate clock groups. The name of
the clock group (cpu_clk_in, mac_clk_in, core_clk_in and check_en in the figure) is the top-
level string. This name can be specified explicitly (using the -group <name> option of the
netlist clock directive) or it can be derived. A derived clock group name is the hierarchical name
of the originator clock in the group. If the group has multiple clock trees (and no explicit clock
group name), the derived group name is the originator clock (root) of one of the clock trees. The
third level lists the clock trees that make up the group. The remaining levels show the various
levels of the clock trees.
The clock groups are color-coded: References to objects in a particular clock group (such as
source code and schematics objects) are displayed in the same color. The Clocks window also
shows the number of register and latch bits clocked in the corresponding domains. The
Expression column shows gating expressions for gated clocks to help debug the CDC setup.
Gated clocks need to be resolved to force their interpretation as nodes in real trees (gated clocks
have multiple “roots”).
These three directives identify three trees with originator clocks cpu_clk_in, core_clk_in and
mac_clk_in. Each clock is a signal referenced hierarchically from the top level of the design.
CDC clock tree detection traces the tree down levels of hierarchy to its “leaf” clocks. For
example, the clock tree for the originator clock core_clk_in is:
core_clk_in
–>core_clk
–>fifo_1_d.wr_clk
–>fifo_1_d.u0.Wclk
–>fifo_0_h.wr_clk
–>fifo_0_h.u0.Wclk
The core_clk_in signal drives core_clk in the top module. The core_clk then drives wr_clk in
fifo_1_d, which drives Wclk in u0, and so on. When the result is unambiguous, tree detection
follows through MUXed and combinational logic. For example, core_clk is defined with this
MUX:
Clock trees rooted in lower levels of hierarchy can be specified hierarchically or with the
-module option:
or
The first directive identifies one clock tree (in the mac.u0 instance).
The second directive identifies a tree per instance of generic_fifo. For example, if fifo_1_d and
fifo_0_h are instances of generic_fifo, the two trees have roots fifo_1_d.wr_clk and
fifo_0_h.wr_clk. All trees defined by the same netlist clock directive are grouped together, so all
of the clocks in the two clock trees are in the same group. If a name for the group is not
specified (i.e., with the -group <name> option), one of the matching root clocks is selected as
the name (for example, clock group fifo_1_d.wr_clk).
A single clock tree can be split by specifying roots in separate directives, for example:
Specifying them in two directives (with the -group <name> option) is another:
Or:
hdl-77 Warnings
The required argument to a netlist clock directive is a repeatable clock name pattern, for
example:
Unused Clocks
After verifying the specified patterns match design signals, clock tree detection checks that the
signals in the tree are real clocks: they actually clock storage elements (register and latch bits).
Those that do not are classified as unused clocks.
The -group argument is the clock group name specified with a netlist clock -group <name>
directive, or an inferred name taken from one of the originator clocks in a tree in the group.
The result is a set of clock trees, called inferred clock trees. CDC analysis considers these
individual trees to be individual clock groups. Typically most (if not all) of these trees should be
grouped with some of the user-specified groups or should be grouped together. The process of
creating netlist clock directives that do so is called resolving the inferred clock trees.
Caution
You MUST resolve inferred clock trees before proceeding to full CDC static analysis.
Otherwise, the inferred clocks trees are treated as defining separate clock domains. Much
extra time is wasted analyzing “false” crossings among them and between them and the
user-defined clock groups. In extreme cases, so many innocuous violations are reported
that the GUI seems to slow down to the point of “freezing.”
To help you resolve the inferred clock trees, clock tree detection classifies inferred clock trees
into the following classes: primary, black box, gate MUX, gated combo, undriven and other
(Figure 3-8).
user-defined inferred
primary
used
black box
MUX
unused gated
combo
undriven
ignored
other
See Table 3-5 for information about how to resolve each type of inferred clock tree.
Report Modes
CDC report modes finds the design’s clock configuration registers and determines the design’s
operational modes by examining the clock multiplexing circuits. Consider the following case:
clkA
MUX X0
clkB
ctrl[0]
ctrl
ctrl[1]
MUX X1
clkC
Assume that clkA, clkB and clkC are asynchronous and X0/X1 are clock signals. Unless X0 or
X1 are grouped with clkA, clockB or clkC, regular CDC analysis considers this circuit as having
5 clock groups. CDC report clocks shows this is the case. When you examine this circuit, you
see that as a non-modal circuit, simplifying CDC analysis by grouping some of these clock
signals is not correct. Yet, regular CDC analysis results are pessimistic.
For cases such as these, you can use modal analysis to remove the pessimism. First, run CDC
report modes by specifying the -report_modes option to the cdc run command. For the above
circuit, CDC report modes finds 4 operational modes and generates the following mode
definitions in a generated Tcl file (cdc_mode_ctrl.tcl):
One important rule: when specifying cdc mode directives to define a particular mode,
the definition must be complete. Every mode possibly configured by the various
combinations of mode control signal values must be specified before the CDC report
modes step is complete. So, if you add the above directive, you must also add the
missing modes:
cdc mode mode0 -set {ctrl[0]} 1’b0 -set {ctrl[1]} 1’b0
cdc mode mode1 -set {ctrl[0]} 1’b0 -set {ctrl[1]} 1’b1
cdc mode mode3 -set {ctrl[0]} 1’b1 -set {ctrl[1]} 1’b1
Each -set argument specifies a register, port or black box output and its corresponding
constant value for the mode.
• Identify mode control signals
You can identify signals that contribute to the configuration of the design’s operational
modes with the cdc mode control directive. For example:
cdc mode control config dut/clkgen/ctrl0 dut/clkgen/ctrl1
CDC report modes uses this information to generate the cdc mode directives for the
correct operational modes. When specifying mode control signals this way, you can
mimic the behavior of the -ignore argument. The syntax for the cdc mode control
directive is:
User Modes
==========
Constants in mode0
-------------------------------------------------------------------------
Signal Value Type
-------------------------------------------------------------------------
scan_mode 1’b1 User
-------------------------------------------------------------------------
Constants in mode1
-------------------------------------------------------------------------
Signal Value Type
-------------------------------------------------------------------------
clk_config 2’b11 User
scan_mode 1’b0 User
-------------------------------------------------------------------------
. . .
Inferred Modes
==============
None
The Mode Information table shows the status of each detected mode:
Try identifying such signals with the cdc mode control directive and re-
running CDC report modes to see if additional modes are inferred.
Ignored Mode is user-defined with the -ignore option to the cdc mode directive.
Modal CDC analysis is not performed on ignored modes.
Duplicate Mode has the same control signal/value pairs as another complete or
incomplete mode. The analyzer issues a warning:
Check cdc_mode_ctrl.tcl for the cdc mode directives for missing modes.
Incomplete Mode is user-defined, but its specification is not complete. The analyzer
warns that a control signal is missing from the directive:
Modal CDC
Once the operational modes are defined, run modal CDC analysis by executing the Tcl script
created by CDC report modes:
The script executes cdc run once for each of the modes. Here, ${cdc_od} is cdc_mode in the
same output directory specified for the CDC report modes run. ${cdc_od} contains a
subdirectory for each analyzed mode (with that mode’s name). In the above example:
cdc_mode/mode0, cdc_mode/mode1 and cdc_mode/mode2.
However, you need not be concerned with these output directories. The cdc.db file created by
the CDC report modes run contains the modal analyses results for all modes collected together.
• Specify output directories mapped to the same directories used by cdc_mode.tcl. For
example:
configure output directory outdir/cdc_mode/mode1
Here, outdir is the output directory used by the -report_modes run; cdc_mode is hard
coded; and mode1 is the mode name.
• Specify the -mode argument to the cdc run executable. For example:
cdc run -d dut -mode mode1...
This database file connects to the individual database files for the separate modal CDC runs
(outdir/cdc_mode/mode1/cdc.db etc.).
Note
View combined modal CDC results from the db file created by CDC report modes. You
can leave this database displayed during the combined modal CDC run. Use File
>Reload >Database to refresh results dynamically as the individual modal analysis
sessions run.
Clocks window (Figure 3-9) and the CDC Checks window (Figure 3-10) show information
grouped by mode.
The Details window shows the mode when displaying details for crossing.
details window
shows mode
When viewing a schematic from a crossing entry, the context frame in the window footer shows
the mode.
context frame
shows mode
top-level violation
TOP LEVEL ILM V
2. Analyze top-level
design.
ILM top-level violation
Debug inter-block V ILM
and top-level issues.
ILM
CDC analysis of the hierarchical blocks relies on block-level constraints that specify the
properties of external clocks and externally-clocked signals. Questa CDC supports two separate
flows for specifying these constraints: Top-down constraints are extracted automatically by
analyzing the design from the top level downward. Bottom-up constraints are manually
specified without reference to design information at higher levels. Bottom-up constraints are
useful for modeling IP blocks (which cannot be specified in the context of the full design).
Note
Hierarchical CDC analysis is static analysis only and does not support promotion of
protocol assertions or generation of CDC-FX injectors.
Prerequisites
Before running hierarchical CDC, set up the design for CDC analysis as you would for flat CDC
analysis.
hierarchical constraints
Phase 2 do outdir/cdc_hier_constraints_blk1_ctrl.tcl
Analyze Blocks cdc run -hier_block blk1
. . .
Note
Hierarchical CDC is a bottom-up verification process where you perform full static
CDC analysis on selected lower-level blocks first, and then run static CDC analysis on
the top level plus the remaining design logic. Questa CDC does not support a top-down
verification process where you run static CDC analysis on the top level first and then run
static CDC analysis on the lower-level blocks. Hierarchical CDC does however support
both top-down and bottom-up creation of block constraints as described in “Block
Constraints” on page 105.
(and vice versa). That is, when you analyze a hierarchical block in phase 2, all of its
hierarchical references must be resolved within the block and when you analyze the top
level in phase 3, all of its hierarchical references must be resolved to objects not in any
block analyzed in phase 2.
2. Create hierarchical constraints for the blocks.
To run CDC analysis for a particular block, you must specify the hierarchical
constraints for the block. These are CDC constraints that the design imposes on the
block. “Block Constraints” on page 105 describes two methods for creating the blocks’
hierarchical constraints.
A block’s CDC constraints are specified as a set of directives in a hierarchical constraints file
associated with the block. Example 3-1 shows a hierarchical constraints file for the sample
block blk2.
#-----------------------------------------------------------------
# CDC Control File
#-----------------------------------------------------------------
# Block: blk2
# Instances:
# b2_1
# b2_2
# b2_3
# Parameters/Generics:
# sel = 3
cdc preference -promote_reconvergence -formal_add_bus_stability \
cdc preference fifo -no_read_sync
cdc preference handshake -check_mux_recirculation
netlist constant propagation -enable
cdc reconvergence -depth 4 -divergence_depth 3
netlist clock clk -module out1
netlist port domain rst -none -module increment
netlist port domain data_in1 -clock clk -module increment
netlist clock top.clk1 -virtual -module inc_2
netlist port domain data_in -clock top.clk1 -module increment
netlist port domain data_out -clock top.clk2 -module increment
To segregate the block-level analysis from that of the other blocks and from the top-
level analysis, the output is directed to a subdirectory of the outdir directory (-od
outdir/blk2). The block constraints file (cdc_hier_constraints_blk2_ctrl.tcl) was
generated in phase 1. The -hier_block argument identifies the block for the block-level
analysis.
2. Run the CDC GUI and verify the CDC analysis.
prompt> qcdc -c -do “outdir/cdc_hier/blk2/cdc.db”
Verify the CDC checks for the block. Violations represent issues within the block. You
can fix problems with the RTL source code, re-run CDC analysis for the block and
iterate. But, changes to the RTL might affect CDC analysis of other blocks or the top
level design, so use caution. If you do change the source code, you must re-generate
block constraints and re-run block analyses for all hierarchical blocks—to ensure the
results are accurate and complete—before you analyze the top-level design.
Run steps 1 and 2 for each hierarchical block.
Top-level CDC analysis builds a model of the top design from the CDC interface models for the
blocks analyzed in phase 2 and from the remaining design logic.
The -hier_cache option lists cache directories for the hierarchical blocks. The
outdir/blk1, outdir/blk2 and outdir/blk3 directories were specified as the output
directories (-od dir) during the block-level sessions. The name specified for the cache is
qcache. The top-level CDC analysis detects the crossings not covered by the block-level
runs and the crossings into the portal boundaries of the hierarchical blocks.
2. Run the CDC GUI and verify the CDC analysis results.
prompt> qcdc outdir/cdc_hier/top/cdc.db
Check the results for the design. At this point, the whole design is available to the GUI
for debugging. Results from the block-level sessions are merged into the top-level
results. However within the blocks, only partial netlist information is available (i.e., only
the level of detail retained in the CDC interface models of the blocks).
Block Constraints
You can create the hierarchical CDC block constraints two ways: propagate them from the
bottom up and propagate them from the top down.
• bottom-up constraints
You manually create the constraints for the individual blocks. Later, CDC analysis of
the top level performs consistency checks to verify that the constraints specified at the
top level do not conflict with the constraints propagated up from the lower levels.
• top-down constraints
You first run a special CDC session on the top level (report constraints) , which
generates hierarchical CDC constraints files for the block-level analyses automatically.
After analyzing the blocks and generating the ILMs, run the top level analysis session,
which performs the consistency checks. This checking provides a sanity check that no
logic or constraints are changed during the hierarchical CDC verification process.
• You are developing the design bottom up and the top level is not finalized or is
unsynthesizable. You do not have top-level constraints to push down to the lower levels.
• The top level is available, but is too large to process by automatic block-level constraint
generation.
Specify each block’s CDC constraints as a set of directives in a hierarchical constraints file for
the block. To create bottom-up constraints:
In addition to finding CDC violations at the top level (and in the remaining logic), hierarchical
CDC analysis of the top level performs consistency checks. These checks compare constraints
used for the blocks with the block constraints propagated down from the design-level
constraints.
Because top-level and block-level constraints are created manually, errors and mismatches are
more likely. You must fix these errors and mismatches for hierarchical CDC analysis to be
accurate. The types of constituency checks are:
• Clocks — Clocks connected to the block ports are the same when analyzing the top level
as they were when analyzing the blocks.
• Clock groups — Block-level clock groups are the same when analyzing the top level as
they were when analyzing the blocks.
• Constants — Constants on the block ports are the same when analyzing the top level as
they were when analyzing the blocks.
• Port domains — Domains of the block ports are the same when analyzing the top level
as they were when analyzing the blocks.
• Stable ports — Block ports marked stable at the block level are also marked stable at the
top level.
• The top level is finalized, is synthesizable and has its top-level constraints defined.
• Automatic block-level constraint generation (cdc run -report_constraints) completes
satisfactorily.
If not, you must use the bottom-up method of creating block constraints. To create top-down
constraints:
If the same module/entity is instantiated more than once, CDC constraint generation
handles variations in the top-level connectivity and parameters/generics for the different
instances.
2. Check results.
a. Fix errors and resolve warnings.
b. Check cdc_design.rpt and ensure the clock groups and port domains are identified
correctly.
c. Check the cdc_hier_constraints_*_ctrl.tcl files (if desired). For each block, check
the design unit name, instance name, parameter/generic values and the directives.
Each hierarchical constraints module for a block has two parts:
• Global CDC preferences
Design-level directives can apply to the various blocks as well as the design as a
whole. For example, cdc preference, cdc preference fifo, cdc preference handshake,
netlist constant propagation and cdc reconvergence can apply globally and can
apply to the hierarchical blocks or their sub-blocks (i.e., with the -module option).
Those directives that apply to the block are reproduced in the global CDC
preferences section so you do not need to taylor the design-level preferences to each
block.
• Block specifications
Clock domain analysis of the block’s instances determines the block instances’
clocks and clock domains of the block’s ports. These constraints are specified with
netlist clock and netlist port domain directives. Also, netlist constant and cdc signal
-stable directives are “propagated” to the block instance logic.
3. Run hierarchical CDC analysis of the blocks and their constraints.
4. Run hierarchical CDC analysis of the top level.
Before it performs static CDC analysis of the top level, the CDC analyzer performs
consistency checks of the hierarchical CDC structure. These checks compare the
(actual) block constraints propagated from the top level with those (forecast) constraints
used for the block-level analyses.
If you used the top-down method of creating block constraints, did not change the RTL
source and did not adjust the constraints, then the constraints used at the block levels
should match those used in the top-level analysis. Therefore, consistency checking acts
as a “sanity check” that the hierarchical analysis is not corrupted. Note that if you use
bottom-up constraints, the consistency checks might find various violations because the
constraints are created manually and are therefore prone to error.
cdc_hier_blk1_ctrl.tcl
cdc_hier_blk2_ctrl.tcl
cdc_hier_blk3_ctrl.tcl
Phase 2
Analyze Blocks make blk1 cdc_hier.Makefile
make blk2
blk1/qcache make blk3
blk2/qcache
blk3/qcache
Phase 3
Analyze Top make dut
Running cdc run with the -report_constraints option generates not only the block constraints,
but also a hierarchical run-control makefile called cdc_hier.Makefile. This makefile is created
so that the session output directory (-od or configure output directory) is specified as the top-
level output directory for the files generated by the scripts.
Note
You also can generate this makefile without performing constraints generation, by
running cdc run with the -report_hier_scripts option.
The makefile has a make target for each hierarchical block. Running the target for a block
performs hierarchical CDC analysis for the block. In the above example:
The makefile also has a target for the top level. Running this target performs hierarchical CDC
analysis for the top level. In the above example:
Waivers
Waivers are instances of clock-domain crossing schemes that are “waived” from reporting.
Waiving scheme instances eliminate the “noise” created by identifying all of the CDC issues
found in the design. By waiving a particular instance of a CDC scheme, you are indicating the
instance is OK (at least for the time being). For example, you might waive an instance of a
missing synchronizer because you know the crossing has no synchronization issues. Each time
you run CDC analysis with waivers identified, only relevant CDC issues are shown in the GUI
CDC Checks window by default, so you do not waste time studying CDC issues that are not
meaningful.
For example, before performing hierarchical CDC analysis, you typically run flat CDC analysis
on the various blocks as they are developed. When you view the results and debug issues, you
typically mark crossings and issues to be waived. These waivers are saved as a CDC control file
from the GUI (sometimes called a waiver file). You can specify this file during later CDC
analysis sessions, to filter out issues already considered.
In a similar way, you can incorporate waivers into the hierarchical CDC flows.
2. Import the waivers file for the block if you have one: File >Import >Directive File.
Previously-created waivers from the block development stage can be applied to the
hierarchical CDC block-level results.
3. Check the existing specifications for each waived instance of a CDC scheme and add
additional waivers as needed. Since you eventually want to roll the waivers up into top-
level analysis, you must ensure the waivers are properly formed for this purpose. To
waive a CDC scheme instance, select the instance and run Create Directive >Waived.
The Set CDC Report dialog is displayed with information pre-filled (Figure 3-14).
Ensure the following:
• The TX Clock and RX Clock fields are blank. Clock names at the block level do not
match the clock signal names at the top level. When they do not match at the top
level, a warning is reported and the waiver is ignored. So, you must leave these fields
blank.
• The Module field specifies the module/entity name of the block. This field is often
omitted when developing at the block level, but should be specified so the waiver is
recognized at the top level.
• A comment is provided (to document the reason for the waiver).
You can set the other fields as desired. When you apply the dialog, a cdc report -severity
waived directive is added to the Directives window.
Pre-filled Dialog
Fields
Add Module
Name
Add Comment
In addition:
• By “carving up” the analysis problem, memory needed for overall analysis is
significantly reduced.
• Since you can run the various block-level sessions in parallel, end-to-end analysis time
is significantly reduced.
The basic hierarchical CDC flow is based on certain assumptions.
• All instances of each hierarchical CDC block have the same clock domains, port
domains and parameter/generics settings.
• All hierarchical CDC blocks are suitable for block-level CDC analysis.
• You have a top-level design you can use to generate the CDC block constraints.
You can work around these assumptions as described in the following sections.
A variation of the basic hierarchical CDC flow is used to analyze designs whose hierarchical
CDC blocks have heterogeneous instances. When you generate block constraints (phase 1), a
hierarchical constraints file is generated for each specified hierarchical CDC block. For
example:
cdc_hier_constraints_blk1_ctrl.tcl
cdc_hier_constraints_blk2_ctrl.tcl
cdc_hier_constraints_blk3_ctrl.tcl
In this example, all instances of blk1 are homogeneous, all instances of blk2 are homogeneous,
and so on. But, if a block has heterogeneous instances, a hierarchical constraints file is
generated for each homogeneous group of instances of the block. So, if blk1 has two sets of
instances that have different configurations, two hierarchical constraints files are generated:
cdc_hier_constraints_blk1_0_ctrl.tcl
cdc_hier_constraints_blk1_1_ctrl.tcl
During block-level analysis, each of these instance groups must be analyzed separately. For
example:
In this example, blk1 has two heterogeneous groups of instances: (top.U1) and (top.U3). You
must specify the blk1 block with the -hier_block module argument in addition to specifying the
heterogeneous instances with -hier_instance instances arguments. In this example, block-level
analyses of blk1 generate two CDC interface models for use in the top-level analysis:
outdir/cdc_hier/blk1_0/qcache
outdir/cdc_hier/blk1_1/qcache
Tip: The cdc_hier.Makefile script also works for heterogeneous instances of blocks. For
example: make -f cdc_hier.Makefile blk1_0.
To generate a control file model during block-level analysis of a block, add the following
hierarchical CDC preference directive to a block-level constraints file:
CDC analysis for the block generates both an ILM model and a CFM model (named
cdc_hier_*_ctrl.v). You also can add the directive to the top-level control file in order to
propagate the directive to the block-level analyses via the hierarchical constraints files (during
the report constraints step).
previously
analyzed blocks
ILM
top-level violation
ILM interface
V
logic model CFM CFM
CFM control
model
file
ILM
For the blocks that you want to use the control file models, specify the corresponding generated
control files with the -hier_ctrl_file_model option. For example:
Here, blk1 and blk2 are modeled as ILMs and blk3 is modeled as a CFM. Never specify both an
ILM and a CFM for the same block. Table 3-6 compares the ILM and CFM models and
Table 3-7 shows the limitations of the control file models.
Then, set up and compile the FPGA source libraries as illustrated in the following examples. If
FPGA library elements are instantiated in VHDL code, you must compile a resource library for
that. The logical library name for this library has no _ver suffix. If FPGA library elements are
instantiated in Verilog code, you must compile a resource library for that. The logical library
name for this library has a _ver suffix.
Xilinx
• unisim
Used for library elements instantiated in VHDL. Compile the VHDL files containing the
component and package declarations from the standard Xilinx simulation library. Then
compile the synthesizable Verilog models of the library. The vlog -convertallparams
option is needed to convert the Verilog parameters to match the generics types in the
VHDL component definitions.
vlib qstatic_libs/unisim
vmap unisim qstatic_libs/unisim
vcom -work unisim $XILINX/vhdl/src/unisims/unisim_VCOMP.vhd
vcom -work unisim $XILINX/vhdl/src/unisims/unisim_VPKG.vhd
vlog -work unisim -convertallparams \
install_dir/share/fpga_libs/Xilinx/ISE/xeclib/unisims/*.v
• unisims_ver
Used for library elements instantiated in Verilog. Compile the synthesizable Verilog
models of the Xilinx library.
vlib qstatic_libs/unisims_ver
vmap unisims_ver qstatic_libs/unisims_ver
vlog -work unisims_ver \
install_dir/share/fpga_libs/Xilinx/ISE/xeclib/unisims/*.v
• simprim
Used for library elements instantiated in VHDL. Compile the VHDL files containing the
component and package declarations from the standard Xilinx simulation library. Then
compile the synthesizable Verilog models of the library. The vlog -convertallparams
option is needed to convert the Verilog parameters to match the generics types in the
VHDL component definitions.
vlib qstatic_libs/simprim
vmap simprim qstatic_libs/simprim
vcom -work simprim $XILINX/vhdl/src/simprims/simprim_Vcomponents.vhd
vcom -work simprim $XILINX/vhdl/src/simprims/simprim_Vpackage.vhd
vlog -work simprim -convertallparams \
install_dir/share/fpga_libs/Xilinx/ISE/xeclib/simprims/*.v
• simprims_ver
Used for library elements instantiated in Verilog. Compile the synthesizable Verilog
models of the Xilinx library.
vlib qstatic_libs/simprims_ver
vmap simprims_ver qstatic_libs/simprims_ver
vlog -work simprims_ver \
install_dir/share/fpga_libs/Xilinx/ISE/xeclib/simprims/*.v
• XilinxCoreLib
Used for library elements instantiated in VHDL. First, run xilinxcorelib_compile.do to
create a filelist (xilinxcorelib_vhdl_analyze_order.f) that specifies the synthesizable
files in the correct compilation order. This script adds $XILINX/vhdl/src/XilinxCoreLib/
to the file names in the source file compile list. Next, compile the VHDL simulation
library files.
vlib qstatic_libs/XilinxCoreLib
vmap XilinxCoreLib qstatic_libs/XilinxCoreLib
vcom -work XilinxCoreLib -f xilinxcorelib_vhdl_analyze_order.f
• XilinxCoreLib_ver
Used for library elements instantiated in Verilog. Compile the Verilog simulation library
files.
vlib qstatic_libs/XilinxCoreLib_ver
vmap XilinxCoreLib_ver qstatic_libs/XilinxCoreLib_ver
vlog -work XilinxCoreLib_ver $XILINX/verilog/src/XilinxCoreLib/*.v
Altera
If FPGA library elements are instantiated in VHDL code, you must compile a resource library
for that. The logical library name for this library has no _ver suffix. If FPGA library elements
are instantiated in Verilog code, you must compile a resource library for that. The logical library
name for this library has a _ver suffix.
• altera_mf
Used for library elements instantiated in VHDL. Compile the VHDL files containing the
component and package declarations from the standard Altera simulation library. Then
compile the synthesizable Verilog models of the library. The vlog +incdir argument is
the include directory for the source files.
vlib qstatic_libs/altera_mf
vmap altera_mf qstatic_libs/altera_mf
vcom -work altera_mf \
$QUARTUS_ROOTDIR/eda/sim_lib/altera_mf_components.vhd
vlog -work altera_mf \
install_dir/share/fpga_libs/Altera/quartus/fv_lib/verilog/*.v \
+incdir+install_dir/share/fpga_libs/Altera/quartus/fv_lib/verilog
• altera_mf_ver
Used for library elements instantiated in Verilog. Compile the synthesizable Verilog
models of the Altera library. The vlog +incdir argument is the include directory for the
source files.
vlib qstatic_libs/altera_mf_ver
vmap altera_mf_ver qstatic_libs/altera_mf_ver
vlog -work altera_mf_ver \
install_dir/share/fpga_libs/Altera/quartus/fv_lib/verilog/*.v \
+incdir+install_dir/share/fpga_libs/Altera/quartus/fv_lib/verilog
[Library]
unisim = ./qstatic_libs/unisim
XilinxCoreLib = ./qstatic_libs/XilinxCoreLib
work = ./qstatic_libs/work
With the filelists (or filelists) for your design, run the design compilation commands. The
following example compiles a VHDL-2002 design into the work library.
vlib qstatic_libs/work
vmap work qstatic_libs/work
vcom -f vhdl_files.list -work work -skipsynthoffregion
The -skipsynthoffregion argument directs the compiler to obey synthesis-off regions. These are
regions of code surrounded by synthesis_off/synthesis_on (or translate_off/translate_on)
pragmas. The compiler parses this code to pick up declarations, but otherwise ignores it. One
reason to use -skipsynthoffregion is to ignore VHDL library and use statements for libraries
needed for simulation only.
Rather than using a filelist to compile files with one invocation, you can set up a script to
compile the file one-by-one:
The following example shows the compiler invocation for a Verilog design:
Once the FPGA resource libraries and the design library have been compiled, you can compile
the CDC logic model using the cdc run command. Here are two examples:
Compiles the target design DUT_top from work using libraries mapped in ./modelsim.ini
(the default mapping file).
cdc run -d DUT_top -work top_lib -modelsimini LibraryMapping.0in
Compiles the target design DUT_top from top_lib using libraries mapped in
LibraryMapping.0in.
Tip: Running cdc run on a design can take time. Initial qcdc sessions are used only to
refine the clock domain model of the design in preparation for analyzing the CDC logic.
The cdc run command’s -report_clock option short-circuits the complete cdc run analysis
and stops after identifying the clock domain model characteristics. You use this option
initially to ensure that the clocks and clock groups are identified correctly before
performing complete compilation of the CDC logic.
In addition to standard CDC directives, the following directives are particularly useful
for CDC analysis of FPGA designs.
netlist constant
Applies a constant value to input ports (and sometimes to internal nodes) so the cdc
compiler can prune irrelevant logic from the design logic and the CDC model. This
technique makes the memory footprint smaller, improves performance and ensures
only relevant results are returned.
cdc reconvergence
Sets the sequential levels that define how deep paths diverge and reconverge to be
considered instances of reconvergence and single_source_reconvergence schemes.
The deeper the analysis, the greater the decrease in performance. Initially, set the
reconvergence depth to 1 and the divergence depth to 1.
netlist blackbox
Identifies specific modules/entities/architectures as user-defined black boxes. Use
netlist port domain directives to identify the clock domains for the black boxes’
ports (even asynchronous ones) so the logic outside the black box instances can be
analyzed properly. Fanin/fanout logic of ports of user-defined black box instances
that are not assigned port domains is ignored for CDC analysis.
cdc preference -black_box_empty_module
Turns empty modules/entities/architectures into inferred black boxes instead of
treating them as regular models. Some elements in a synthesizable FPGA library are
“stubs” containing only the port declarations. Specifying the
-black_box_empty_module option makes it easier to identify these elements so you
can add netlist port domain directives for their ports.
Tip: Hierarchical paths always appear in the report files with “.” separators (which might
be different from the path separator reported by simulation). Use these exact paths in the
control files as well. When creating control directives that refer to specific signals in the
RTL, cut and paste the exact pathnames from the report files or GUI.
The command performs clock analysis and stops. Check the results:
a. Check cdc_run.log for errors:
Error/Warning Summary
-----------------------------------------------------------
Count Type Message ID Summary
-----------------------------------------------------------
1 Error command-188 Design elaboration failed.
1 Error command-195 Design Elaboration (Child process) returned a
non zero status.
1 Error parser-284 Vopt error.
Each error/warning is explicitly described in cdc.log. Fix any issues, then rerun
design compilation (if the source code changed) and cdc -report_clock.
b. Check the clock groupings in cdc.rpt.
Clock Group Summary for 'demo_top'
==================================
Total Number of Clock Groups : 4
1. User-Specified :(3)
2. Inferred :(0)
2.1 Primary : 0
2.2 Undriven : 0
2.3 Blackbox : 0
2.4 Gated Mux : 0
2.5 Gated Combo : 0
3. Ignored :(1)
=================================================================
1. User-Specified (3)
=================================================================
Group 0(148 Register Bits, 0 Latch Bits)
-----------
mac_clk_in
Group 1(119 Register Bits, 0 Latch Bits)
-----------
core_clk_in
Group 2(0 Register Bits, 0 Latch Bits)
-----------
check_en (unused clock)
check_en_r1 (unused clock)
=================================================================
2. Inferred (0)
=================================================================
2.1 Primary (0)
-----------------------------------------------------------------
None
2.2 Blackbox (0)
-----------------------------------------------------------------
None
2.3 Undriven (0)
-----------------------------------------------------------------
None
2.4 Gated Mux (0)
-----------------------------------------------------------------
None
Check the inferred port domains (clock domains assigned to the ports). By default,
each input port is assigned to the clock domain of its first fan-in register. Any
primary inputs or outputs that connect to multiple clock domains or are not assigned
to a clock domain are listed. Use netlist port domain directives to make adjustments.
b. Check for black boxes.
Black Boxes:
------------
Module Instance Count File (Line)
-------------------------------------------------------------------
cdi_master 1 /home/cdc/blackbox/cdi_master.v (2)
Internal logic of the black boxes is unknown and in particular, the connectivity
between a black box’s inputs and outputs is unknown. So, black boxes can mask
some CDC problems. Check that the port domains of the user-defined black boxes
(black_box in the report) are all specified.
VITAL models, FPGA library elements that are not synthesizable and design blocks
with unsynthesizable constructs are inferred black boxes (inferred in the report),
unless explicitly specified with netlist blackbox directives. Check the inferred black
boxes in cdc.rpt. If an inferred black box affects CDC results, at least one associated
black box CDC scheme is reported:
Black Box Crossing. (black_box)
-----------------------------------------------------------------
tx_clk: start: tx_sig2 (/u/zin/black_box/dut.v : 25)
<clock N/A>: end: dut.Di2 (/u/zin/dut.v: 40)(ID:black_box_12944)
You can declare the black box as a user-defined black box (with netlist blackbox)
and specify the port domains for the black box’s I/O ports (with netlist port domain).
The following example directives do this for an Altera dual-port RAM block:
netlist blackbox altdpram
netlist port domain wren -clock inclock -module altdpram
netlist port domain data -clock inclock -module altdpram
netlist port domain wraddress -clock inclock -module altdpram
netlist port domain wraddressstall -clock inclock -module altdpram
netlist port domain inclocken -clock inclock -module altdpram
netlist port domain byteena -clock inclock -module altdpram
netlist port domain rden -clock outclock -module altdpram
netlist port domain rdaddress -clock outclock -module altdpram
netlist port domain rdaddressstall -clock outclock -module altdpram
netlist port domain outclocken -clock outclock -module altdpram
netlist port domain q -clock outclock -module altdpram
netlist port domain aclr -async -module altdpram
You might be able to obtain or write synthesizable models of various black boxed
elements. For example, using the Xilinx CoreGen tool: run Project >Project Options;
select the Generation tab; and set Simulation Files: Structural. Structural models are
synthesizable. Be sure to keep the structural models and behavioral models in different
locations to prevent overwriting previously-generated files.
At this point, debugging CDC issues with the CDC GUI is the same for FPGA-based design as
it is with other designs. As you analyze the CDC results, you will find RTL issues to fix, to
waive and to filter out. You might want to add or change directives in your control file to:
Metastability injected simulation is an extension to normal RTL simulation that injects random
metastability into the circuit’s behavior. CDC-FX metastability injected simulation is similar to
simulation with assertions. But, it uses special CDC-FX checkers to inject metastability into the
circuit during simulation. These checkers also monitor the metastability logic and report
coverage of metastability effects during simulation.
rx_clk
s stable
s unstable
s unstable
s stable
Metastability Windows
The setup and hold times determine receive clock cycles for which a register can become
metastable—based on the active edge of the receive clock and the value of the signal at the
input port of the register. In hardware, however, this input port switches value after the output
port driving the signal (in the transmit clock domain) switches and the new value propagates to
the input port (in the receive clock domain). This propagation delay (tprop) has the following
physical bounds:
Accounting for propagation delay identifies a metastability window relative to each active edge
of the receive clock, as shown in Figure 4-2. A metastability window defined this way assumes
the worst case events as follows:
• CDC signal propagates as slowly as possible (max tprop) and violates the setup time
(tsetup).
• CDC signal propagates as quickly as possible (min tprop) and violates the hold time
(thold).
max tprop
rx_clk
min tprop
The start value is the number of time units before the active edge of the receive clock that the
metastability window “opens.” The stop value is the number of time units after the active edge
of the receive clock that the metastability window “closes.”
• Except for the default case, the metastability windows are not set automatically by
software. The user sets up metastability windows based on the knowledge of the
hardware technology and characteristics of the design by specifying their start and stop
values. However, the user does not need to specify setup/hold times or propagation
delay ranges.
• Each pair of transmit/receive clocks has its own metastability window (either specified
or default). In particular, a receive clock might have multiple windows.
• If the duration of a metastability window is sufficiently large, then every active edge of
the corresponding transmit clock falls inside the window. In this case, simulation with
metastability injectors randomly inserts metastability effects every clock cycle the
register changes value.
• A common metastability verification methodology is to start with large metastability
windows (for example, the default case). Then, successively narrow the windows and
focus analysis on select CDC paths. This way the user can analyze the worst case
scenario (so no bugs might be missed). Then, after eliminating “false” violations, the
user can identify real problems caused by metastability intolerance.
• Metastability windows are used for metastability injected simulation. They have no
counterpart in hardware. In hardware, a changing CDC signal either does or does not
result in the receive register going metastable, and the hardware value either does or
does not agree with the value used in plain simulation.
clks_aligned[65:0]
When the assertion compiler instantiates a cdc_fx checker, it also creates clock monitor logic
that determines when the transmit clock is within the metastability window of the receive clock
(for that transmit clock). Whenever this occurs, the receive register is prone to metastability if
its input value also changes in that receive clock cycle. The clks_aligned output from the clock
monitor is used to pass this information to the cdc_fx checker.
The clks_aligned output is a 66-bit value that is 0 throughout “normal” cycles. When the clock
monitor detects an active transmit clock edge in the corresponding metastability window of the
receive clock edge, one of the clks_aligned bits asserts a pulse that begins at the second active
clock edge and stops at the first subsequent inactive clock edge (see Figure 4-3).
tx_clk
rx_clk
metastability window
Clocks aligned. Transmit clock edge before (or at) receive clock edge.
clks_aligned[0]
tx_clk
rx_clk
metastability window
rx_clk
metastability window
cdcfx fx window
The cdcfx metastability window directive specifies a metastability window for one or more
receive register clocks. This directive is used by the cdc -compile_assertions command.
cdcfx fx window
-start value -stop value [-tx_clock clock_signal] [-rx_clock clock_signal] [-percent]
Unless the directive include the -percent option, the -start and -stop values specify metastability
using directional time units as follows:
• The -start value is the number of time units before the active receive clock edge that the
associated metastability window opens.
• The -stop value is the number of time units after the active receive clock edge that the
associated metastability window closes.
If -percent is specified, the -start and -stop values instead are percentages of the receive clock
duty cycle.
If the directive specifies -tx_clock and -rx_clock, then the directive applies to cdc_fx checkers
with these clock pairs. If the directive omits -tx_clock and -rx_clock, then the directive applies
to the remaining cdc_fx checkers. It is an error to specify more than one directive without the -
tx_clock and -rx_clock arguments.
If no cdcfx metastability window directive is specified, then the special default case described in
the next section is followed. However, if at least one cdcfx metastability window directive is
specified, then the “default” metastability window configuration has a duration set to 0. In this
case, the cdc_fx checkers not covered by explicit cdcfx metastability window directives never
inject metastability. Their cdc_fx checks never fire.
• The start time is 25% of the receive clock cycle before the receive clock edge.
• The stop time is 10% of the receive clock cycle after the receive clock edge.
rx_clk
For example, if rx_clk has period 100 time units, then the default metastability window is the
same as the window set by the following:
Running CDC-FX
The metastability injectors (cdc_fx checkers and metastability detection logic) are instantiated
from cdc_fx checker directives (Figure 4-5).
0in_cdc_fx_sim_ctrl.v
edit
design checker
files control
files
ccl
Figure 4-5 also shows that part of the data preparation for the CDC-FX analysis is to set up an
optional CDC-FX control file that contains the cdcfx metastability window directives used to set
the metastability windows for the cdc_fx checkers.
cdcfx check
The cdcfx check directive turns on specified checks in corresponding cdc_fx checker directives
promoted by the cdc -fx command.
cdcfx check
[-scheme scheme] [-tx_clock clock_signal] [-rx_clock clock_signal] [-fx]
[-glitch_swallowed] [-glitch_caught]
By default, the glitch_swallowed and glitch_caught checks are off. The cdc_fx checks are on for
multi_bits, dmux, simple_dmux, multi_sync_mux_select, handshake and no_sync schemes;
cdc_fx checks are off for all other schemes.
Use the cdcfx check directive to force cdc -fx to turn on cdc_fx checkers’ checks. The user must
specify at least one check to turn on (-fx, -glitch_caught, or
-glitch_ swallowed). The -tx_clock option restricts the directive to those cdc_fx checkers with
the specified transmit clock. The -rx_clock option restricts the directive to those cdc_fx checkers
with the specified receive clock. The -scheme option restricts the directive to those cdc_fx
checkers connected to synchronizers of the specified type. The cdcfx check directive does not
support wildcards.
The following situations can cause a cdc_fx checker not to be promoted, or to be promoted with
partial information:
vcom/vlog
design
files
cdc
-compile_assertions -work library
control vsim
files -f 0in_cdc_sim.arg
-f 0in_cdc_sim_vhdl.arg
merge
vcom/vlog cdc_sim.db
qcdc
GUI
vcom/vlog debugging
testbench environment
files
Results from metastability-injected simulation can be merged back into the CDC GUI for
review and debugging. The following procedure uses the Questa vsim simulator.
5. Run simulation.
Specify the PLI library path for the simulator and the vsim arguments files. For example:
prompt> vsim -c tb -pli install_dir/lib/lib0InLoadMTIPLI.so \
-f cdc_sim.arg.vsim -f cdc_sim.arg.vsimrun \
-do "add log -r /*; run 1000; quit -f"
Simulation Arguments
The user can use simulation arguments to suppress metastability injection during simulation
(for individual CDC signals or all CDC signals) and to set the seed for random metastability
injection. The cdc_fx checkers maintain statistics, but metastability is not injected into
simulation.
+0in_suppress_fx_name+name
To suppress metastability injection during simulation for individual signals, specify them with
simulation arguments of the following form:
+0in_suppress_fx_name{+name}…
Here, name is the cdc_fx checker name. Wildcards can be used in name. For example,
+0in_suppress_fx_name+tx4_*+tx_data
+0in_disable_fx_force
To suppress metastability injection for all individual signals, specify the following argument:
+0in_disable_fx_force
Refer to “Verilog Glue Logic Option Impact” on page 138 and “VHDL Glue Logic Option
Impact” on page 139 for additional information.
+0in_random_seed+n
To set the random generator seed for random metastability injection, specify the following
simulation argument:
+0in_random_seed+n
Here, n is a positive (32-bit decimal) integer to use as the seed for the random number
generator. Default: 11449.
Note that you cannot use $0in_checker_on/$0in_checker_off or any other PLI call at time 0. In
fact, it is recommended that you do not invoke any PLI call before #100 after beginning
simulation.
$0in_always_invert_metastable_signals ();
Inverts signals when they are metastable.
Refer to “Verilog Glue Logic Option Impact” on page 138 and “VHDL Glue Logic Option
Impact” on page 139 for additional information.
$0in_never_invert_metastable_signals ();
Leaves the cdc_fx checkers active, but disables metastability injection.
Refer to “Verilog Glue Logic Option Impact” on page 138 and “VHDL Glue Logic Option
Impact” on page 139 for additional information.
$0in_randomly_invert_metastable_signals ();
Randomly injects metastability into CDC signals when they are metastable. This is the default
behavior.
Refer to “Verilog Glue Logic Option Impact” on page 138 and “VHDL Glue Logic Option
Impact” on page 139 for additional information.
• ZI_NO_CDC_FORCE
• +0in_disable_fx_force
• $0in_never_invert_metastable_signals
The Verilog glue logic is as follows:
initial
begin
`ifdef ZI_NO_CDC_FORCE
`else
if (!($test$plusargs("0in_disable_fx_force")))
begin
force `int_prefix_0in.U1.U12.dout = zin_wire_sg_0; end `endif
end
ZI_NO_CDC_FORCE Option
This option can only be used during compiling the design. It permanently removes the force
statement. For example,
or
+0in_disable_fx_force Option
This option can only be used during simulation. It disables the force statements for that specific
simulation run. For example,
% vsim tb \
+0in_disable_fx_force \
-f 0in_sim.arg.vsim \
-pli install_dir/lib/lib0InLoadMTIPLI.so
or
% ./simv +0in_disable_fx_force
$0in_never_invert_metastable_signals Option
This option does not impact the force statements. It only changes the random number generator
during simulation to always produce 0. Hence, the forced values are supposed to be identical to
the original values.
The glue logic can produce data values different from the original RTL specially for Xs. Hence,
this option can result in change in simulation behavior.
• ZI_NO_CDC_FORCE
• +0in_disable_fx_force
• $0in_never_invert_metastable_signals
The VHDL glue logic is as follows:
module zi_xmr_wrap;
`ifdef ZI_NO_CDC_FORCE
`else
zi_cdc_fx_force_sigs_0_entity #(.prefix("/tb/U1")) i1(); `endif
endmodule
ZI_NO_CDC_FORCE Option
Same behavior as Verilog (see “ZI_NO_CDC_FORCE Option” on page 138).
+0in_disable_fx_force Option
No impact for VHDL.
$0in_never_invert_metastable_signals Option
Same behavior as Verilog (see “$0in_never_invert_metastable_signals Option” on page 139).
Assertion Violations
If metastability injected simulation produces assertion violations (i.e., check firings), then you
can analyze them the same as you do firings from basic simulation with assertions (see
Figure 4-7 on page 141). Use the qcdc viewer to examine details of the check firings and to
display their waveforms. These violations are caused by design defects in the fan-outs of the
receiving registers that make the circuit intolerant of random delays in the transmission of their
driving CDC signals.
The cdc_fx checker entries in the .db database provide a variety of information about the
metastability injectors during simulation.
Each cdc_fx checker maintains coverage information about its performance during simulation.
The checker entry in the simulation database (checksim.db) has this information.
The cdc_fx checker’s cdc_fx check fires if the active edge of the transmit clock is in the
metastability window of the receive clock and the transmit data change in this window. These
cycles are candidates for metastability injection. The Metastable Cycles evaluation statistic
increments each cycle this happens. Normally, this is not problematic. The logic in the fan-out
of the receive register is expected to tolerate this situation.
Some design styles have transmitting circuitry that presumes data is stable during cycles when
both clock edges occur in the metastability window. No metastability can occur and the
receiving logic does not need to account for CDC metastability effects. In such cases, you can
use the cdc_fx check to verify the transmit data remains stable when metastability can occur.
Notice in the Checker Report that the -rx_q field identifies the register output from the original
circuit that is replaced in the new circuit (remodeled with the metastability injection logic) with
the rx_q output from the checker. When ccl compiles the design for simulation, each cdc_fx
checker is connected so the output from the transmit register is routed to the cdc_fx checker and
the rx_q output from the checker drives the load from the original receive register.
For most cycles, the transmit data is latched by the checker and passed through to the rx_q
output when the receive clock activates. This mimics the behavior of the original circuit under
normal simulation. But, when the checker determines it should inject metastability, randomly
selected bits of the rx_q output are inverted. The rx_q output reflects a corrupted value
unrelated to the original transmission. This condition emulates data transmission metastability
from crossing clock domains. The circuit must be immune to these effects.
• CDC Schemes
• Control: two_dff, two_dff_phase, four_latch, pulse_sync, shift_reg,
dff_sync_gated_clk, clock_no_sync, custom_sync, custom_sync_no_sync,
async_reset, async_reset_no_sync and no_sync.
• Data: bus_two_dff, bus_two_dff_phase, bus_four_latch, bus_dff_sync_gated_clk,
bus_shift_reg, bus_custom_sync, bus_custom_sync_no_sync and multi_bits.
• Control/data: dmux, simple_dmux, forward_simple_dmux, and_gate_dmux,
mux_lock_dmux multi_sync_mux_select, handshake, fifo, fifo_memory,
fifo_memory_ptr_mismatch,fifo_ptr_no_sync, and custom_sync_with_crossing.
• Potential problems: combo_logic, clock_no_sync, port_constraint_mismatch,
reconvergence, single_source_reconvergence, redundant, series_redundant,
fanin_different_clks and black_box.
• Protocol/FX Checkers
CDC protocol checkers: cdc_dsel, cdc_fifo, cdc_glitch, cdc_hamming_distance_one,
cdc_handshake_data, cdc_sample and cdc_sync. CDC-FX/MFX checkers: cdc_fx and
cdc_mfx.
CDC Schemes
CDC analysis identifies logic patterns relevant to CDC verification. Groups of related patterns
identify specific classes of situations called CDC schemes. Each CDC scheme represents a
specific type of CDC synchronizer architecture or a potential CDC issue. This chapter consists
of the data sheets for the various CDC schemes (see Table 5-1). Each data sheet has the
following information:
Signal Sync two_dff TWO DFF Two or more in-phase flip- evaluation
SYNCHRONIZER flops.
two_dff_phase TWO DFF Two out-of-phase flip-flops. caution
SYNCHRONIZER
OPPOSITE
POLARITY
four_latch FOUR LATCH Four or more cascaded evaluation
SYNCHRONIZER latches.
pulse_sync PULSE SYNC Pulse. evaluation
Default
Type Scheme ID Description Severity
Default
Type Scheme ID Description Severity
and_gate_dmux
AND_GATE_DMUX: AND-gate DMUX synchronization.
tx_data
rx_data
AND
tx_clk
tx_sel
synchronizer
tx_clk rx_clk
The AND-gate DMUX scheme is a restricted version of the general DMUX scheme. For the
general scheme, the fanin logic of the Rx signal can contain any logic and the synchronized
control signal can use any logic to turn off the Tx signal (not just a MUX). The control signal
can be synchronized by any of the following signal synchronizers: two_dff_phase,
dff_sync_gated_clk, four_latch. shift_reg, two_dff, pulse_sync and custom.
Note
The physical design of the select logic (that controls the path from the Tx register to the
Rx registers) must not allow glitches at the input to an Rx register when the Tx register
changes value.
Crossing Type
synchronized control signal and muxed data bus
Default Severity
caution
Promoted Checker
cdc_dsel
Examples
1. Following is an example to turn severity to evaluation:
cdc report scheme and_gate_dmux -severity evaluation
async_reset
ASYNC RESET: Signal feeds to the asynchronous reset port of the receiving register.
tx_rst
tx_sig rst rst rx_rst
1'b1 DFF DFF
tx_clk rx_clk
Crossing Type
1-bit signal
Default Severity
evaluation
Promoted Checker
cdc_sync (if enabled, see cdc preference).
Examples
1. Following is an example to turn severity to violation.
cdc report scheme async_reset -severity violation
2. ASYNC_RESET scheme that uses an asynchronous reset input to drive the reset pins of
the synchronizer. Synchronizer input is tied high.
always @(posedge rx_clk,negedge
rx domain reset
tx_sig)
if (!tx_sig) begin tx_sig rst rst
s0 <= 1’b0;
s1 <= 1’b0; 1'b1 s1
end
else begin high
s0 <= 1’b1; tx_clk rx_clk
s1 <= s0;
end
Evaluations
==============================================================
Asynchronous reset synchronization. (async_reset)
-----------------------------------------------------------------
tx_clk : start : tx_sig (async_reset1.v : 9)
rx_clk : end : s0 (async_reset1.v : 10) (ID:async_reset_95442)
3. ASYNC_RESET scheme that uses an asynchronous reset input to drive the reset pins of
the synchronizer. Synchronizer input is tied low.
always @(posedge rx_clk,negedge rx domain reset
tx_sig)
if (tx_sig) begin tx_sig rx_rst
set set
s0 <= 1’b1; s1
s1 <= 1’b1; 1'b0 s0
end
else begin low
s0 <= 1’b0; tx_clk rx_clk
s1 <= s0;
end
assign rx_rst = s1 | tx_sig;
Evaluations
==============================================================
Asynchronous reset synchronization. (async_reset)
-----------------------------------------------------------------
tx_clk : start : tx_sig (async_reset1.v : 9)
rx_clk : end : s0 (async_reset1.v : 10) (ID:async_reset_95442)
4. ASYNC_RESET scheme that uses an asynchronous reset input to drive the D input of
the first DFF in the synchronizer and the reset pins of the Rx domain registers.
rx domain reset
always @(posedge rx_clk) begin
s0 <= tx_sig; tx_sig rx_rst
s1 <= s0; s0 s1
end
assign rx_rst = s1 | tx_sig;
tx_clk rx_clk
Evaluations
==============================================================
Single-bit signal synchronized by DFF synchronizer. (two_dff)
-----------------------------------------------------------------
tx_clk : start : tx_sig (async_reset3.v : 9)
rx_clk : end : s0 (async_reset3.v : 10) (ID:two_dff_32868)
5. ASYNC_RESET scheme that uses an asynchronous reset input to drive the reset pins of
the synchronizer, the D input of the first DFF in the synchronizer and the reset pins of
the Rx domain registers.
rx domain reset
always @(posedge rx_clk,negedge tx_sig)
if (! tx_sig) tx_sig rst rst rx_rst
{s1, s0} <= 2’b00; s0 s1
else
{s1, s0} <= {s0, tx_sig};
assign rx_rst = s1 & tx_sig;
tx_clk rx_clk
Evaluations
==============================================================
Single-bit signal synchronized by DFF synchronizer. (two_dff)
-----------------------------------------------------------------
tx_clk : start : tx_sig async_reset4.v : 9)
rx_clk : end : s0 async_reset4.v : 10) (ID:two_dff_32868)
async_reset_no_sync
ASYNC RESET NO SYNC: Signal that feeds to the asynchronous reset port of the receiving
register has no synchronizer.
tx_sig ? rx_sig
DFF
1'b1
tx_sig rx_reset
DFF
1'b1 incorrect reset
synchronizer
tx_clk rx_clk
Crossing Type
1-bit signal
Default Severity
violation
Promoted Checker
none
Examples
1. Following example changes the default severity for the async_reset_no_sync scheme to
evaluation:
cdc report scheme async_reset_no_sync –severity evaluation
Violations
==============================================================
Asynchronous reset does not have proper synchronization.
(async_reset_no_sync)
-----------------------------------------------------------------
tx_clk : start : tx_sig (test.v : 9)
rx_clk : end : rx_sig (test.v : 9)
(ID:async_reset_no_sync_95911)
black_box
BLACK BOX: Crossing to or from an instance of a black box.
tx_sig
black box
tx_clk rx_clk
port domain?
path
black box
port domain?
path
black box
Crossing Type
control signal or data bus
Default Severity
caution
Promoted Checker
none
Examples
1. Following is an example to turn severity to violation:
cdc report scheme black_box –severity violation
2. Following is an example of the paths for a black box crossing (from cdc.rpt):
Cautions
=================================================================
black Box Crossing. (black_box)
-----------------------------------------------------------------
clk1 : start : u0.q (/u/black box/dut.v : 41)
<clock N/A>:end: u1.b(/u/bb/dut.v:12)(ID:black_box_5)
via: u0.q
via: u1.b
<clock N/A>: end : u1.c (/u/bb/dut.v : 12)(ID:black_box_53)
via : u0.q
via : u1.c
Following is a directive that identifies the port domains of the inferred black box:
# Black box ports
netlist port domain b c -clock clk -module black box_module
With this directive, the port domains of the black box ports are identified in cdc.rpt:
Cautions
=================================================================
Black Box Crossing. (black_box)
-----------------------------------------------------------------
clk1 : start : u0.q (/u/bb/dut.v : 41)
clk3: end : u1.b (/u/bb/dut.v : 12)(ID:black_box_52)
via: u0.q
clk3: end : u1.c (/u/bb/dut.v : 12)(ID:black_box_53)
via: u0.q
In this case, the port domain of the driver (u0.q) was set by a netlist port domain
directive:
netlist port domain q -clock clk3
3. Following example shows an instance (BB) of a module (black_box) that cdc has
inferred to be a black box.
rst
instance of an
din0 reset inferred black box
datain0
dataout dout
tx_clk datain1
BB
din1 datain2 status statout
datain3
din2
din3 clock
rx_clk
By default, the datain inputs are assumed to be in different clock domains. Similarly,
dout and stout are assumed to be in different clock domains. To make static CDC
analysis more accurate and to reduce the clock domain complexity, identify the port
domains of the black box data ports. For example:
#Input port domains
netlist port domain datain0 -async -module black_box
netlist port domain datain1 -async -module black_box
netlist port domain datain2 -clock clock -module black_box
netlist port domain datain3 -clock clock -module black_box
Note that these are the port domains (not clock domains) for the data ports. Domains are
identified according to the black box’s clock pins (not external clock signals).
Cautions
============================================================
Multiple-bit signal across clock domain boundary. (multi_bits)
-----------------------------------------------------------------
rx_clk : start : BB.dataout (black_box.v : 40)
tx_clk : end : dout (black_box.v : 21) (ID:multi_bits_47389)
Cautions
============================================================
Black Box Crossing. (black_box)
-----------------------------------------------------------------
tx_clk : start : din0 (black_box.v : 24)
<clock N/A>: end: BB.datain0 (black_box.v :40)(ID:black_box_48560)
bus_custom_sync
BUS_CUSTOM: Multiple-bit signal synchronized by custom CDC synchronizer whose input
port is identified as asynchronous.
gray tx_data async rx_data gray
encoder custom decoder
synchronizer
tx_clk rx_clk
Custom synchronizers are instances of modules declared as custom synchronizers with the cdc
synchronizer custom directive. The bus_custom_sync scheme identifies multiple-bit custom
synchronizers where the clock domain crossing is external to the synchronizer itself and the
input port is specified as asynchronous (with netlist port domain).
Crossing Type
data bus
Default Severity
evaluation
Promoted Checker
none
Examples
1. Following is an example to specify the cust_sync module with clock pin clk as a custom
synchronizer:
cdc synchronizer custom cust_sync
netlist port domain d -async -clock clk -module cust_sync
The netlist port domain directive identifies input d as an asynchronous port and directs
CDC analysis to use the clk port to identify the receive clock reported for clock domain
crossings through cust_sync.
2. Following is an example to turn severity to caution:
cdc report scheme bus_custom_sync -severity caution
Evaluations
=============================================================
Multiple-bit signal synchronized by Custom CDC Scheme: syncA
(bus_custom_sync)
-----------------------------------------------------------------
tx_clk : start : tx_data (bus_custom_sync.v : 21)
rx_clk : end : S.din (bus_custom_sync.v : 29)
(ID:bus_custom_sync_5359)
Custom synchronizers are considered inferred black boxes for CDC analysis, so you
must specify their port information:
netlist port domain -input din -async -clock rx_clk -module syncA
netlist port domain -output dout -clock rx_clock -module syncA
Potential Problem
CDC analysis does not promote a checker for this scheme. You should implement a transfer
protocol checking scheme using one or more checkers.
bus_custom_sync_no_sync
BAD CUSTOM SYNC DOMAIN MISMATCH: Multiple-bit signal synchronized by custom
CDC synchronizer whose input port’s domain is unidentified or does not match the clock
domain of the signal.
unspecified or mismatching
domain
tx_clk rx_clk
Custom synchronizers are instances of modules declared as custom synchronizers with the cdc
synchronizer custom directive. The bus_custom_sync scheme identifies multiple-bit custom
synchronizers where the clock domain crossing is external to the synchronizer itself and the
input port is specified as asynchronous (with netlist port domain).
Custom synchronizers are instances of modules declared as custom synchronizers with the cdc
synchronizer custom directive. The bus_custom_sync_no_sync scheme identifies multiple-bit
custom synchronizers where the port domain of the input port connected to the Tx signal is not
properly specified. The netlist port domain directive sets the port domains of modules. In the
above figure, the custom synchronizer’s input port domain can be:
• -async
Proper port domain specification for custom synchronizers with external crossings. The
circuit is identified as a bus_custom_sync scheme.
• -tx_clock tx_clock
Proper port domain specification for custom synchronizers with internal crossings. The
circuit is identified as a custom_sync_with_crossing scheme.
• -tx_clock other_clock_domain
Badly-connected synchronizer. The circuit is identified as a bus_custom_sync_no_sync
scheme.
• unassigned
Improperly-specified synchronizer. Custom synchronizer data input ports must have
netlist port domain specifications. The circuit is identified as a
bus_custom_sync_no_sync scheme.
Crossing Type
data bus
Default Severity
violation
Promoted Checker
none
Examples
1. Following is an example to turn severity to caution:
cdc report scheme bus_custom_sync_no_sync -severity caution
Evaluations
=============================================================
Multiple-bit signal synchronized by Custom CDC scheme does not have
proper synchronizer: syncA (bus_custom_sync_no_sync)
-----------------------------------------------------------------
tx_clk : start : R.q (demo.sv : 21)
rx_clk : end : S.din (demo.sv : 29)
(ID:bus_custom_sync_no_sync_5359)
Custom synchronizers are considered inferred black boxes for CDC analysis, so you
must specify their port information. To report this crossing as a bus_custom_sync
scheme (evaluation), assign the port domain of the syncA din port to asynchronous:
netlist port domain -input din -async -clock rx_clk -module syncA
netlist port domain -output dout -clock rx_clock -module syncA
Potential Problem
CDC analysis does not promote a checker for this scheme. You should implement a transfer
protocol checking scheme using one or more checkers.
bus_dff_sync_gated_clk
BUS DFF GATED SYNC: Multiple-bit signals synchronized with DFF synchronizer with
gated clock.
tx_data rx_data
DFF DFF
tx_clk en_rx_clk
rx_clk
Tx Clock Domain Rx Clock Domain
Synchronization using two flip-flops is a standard method of synchronizing a 1-bit signal, but
one of the flip-flops is clocked by a gated version of the receive clock.
Crossing Type
multiple-bit data bus
Default Severity
caution
Promoted Checker
cdc_hamming_distance_one (cdc_hamming1)
Examples
1. Following is an example to turn severity to evaluation:
cdc report scheme bus_dff_sync_gated_clk -severity evaluation
2. Following is an example to turn off reporting for a particular CDC source signal:
cdc crossing off -from in1 -to r1
3. Bus 2 DFF synchronizer has one FF clocked by a gated version of the Rx clock.:
//gated Rx clock
assign gclk = rx_clk & en; tx_reg sync1 sync2
Cautions
=============================================================
Multiple-bits signals synchronized with DFF synchronizer with gated
clock. (bus_dff_sync_gated_clk)
-----------------------------------------------------------------
tx_clk : start : tx_reg (test2.v : 12)
rx_clk : end : sync1 (test2.v :12)
(ID:bus_dff_sync_gated_clk_8918)
bus_four_latch
BUS SYNC: Multiple-bit signal synchronized by latch synchronizer.
tx_clk rx_clk
Gray coding (i.e., hamming distance 1) assures that only one bit of data changes in any cycle, so
a four-latch synchronizer (typically used for 1-bit signal crossings) is appropriate if the data
changes only at the frequency of the receiving domain.
Crossing Type
multiple-bit data bus
Default Severity
evaluation
Promoted Checker
cdc_hamming_distance_one (cdc_hammimg1)
Examples
1. Following is an example to turn severity to violation:
cdc report scheme bus_four_latch –severity violation
3. Example promoted transfer protocol checker for four_latch synchronization scheme (in
cdc_checker.rpt):
Type/Name : cdc_hamming_distance_one demo_top.bus_two_dff_62001
Checkerware Instance : cdc_demo_top_31c26a68_demo_top_inst_0.U0.U0
Description : Ensures that the data crossing from transmit clock
to receive clock domain changes by only one hamming
distance and that it remains stable for a specified tx_min
clock cycles.
Message : <None>
Location : File /home/cdc/src/vlog/generic_fifo_dc_gray.v,
Line 147
Directive : cdc_hamming1
-tx_var fifo_0_h.rp_gray
-tx_clock mac_clk_in
-reference bus_two_dff_62001
-name bus_two_dff_62001
-module demo_top
-inferred
Module : demo_top
Check data_stable : Off <Default Off>
Check hamming_one : On <Default On>
-tx_var : fifo_0_h.rp_gray
-tx_clock : mac_clk_in
-tx_reset : 1'b0
-areset : 1'b0
-active : 1'b1
-support : 1'b0
-nv : 1'b1
-TX_MIN : 2
-name : bus_two_dff_62001
Checker Class : CDC
Checker Internal
Potential Problem
Four-latch synchronization of a data bus assumes the bus is gray-coded. Any data buses that
cross clock domains that are not gray-coded should be identified as requiring complete data
synchronization. Any of these crossings synchronized by four-latch synchronizers should be
flagged as violations. To set these schemes to violations, use the cdc report directive.
bus_shift_reg
SHIFT REG: Multiple-bit signal synchronized by shift-register synchronization.
tx_data rx_data
shift register
tx_clk rx_clk
Crossing Type
multiple-bit data bus
Default Severity
evaluation
Promoted Checker
cdc_hamming_distance_one (cdc_hamming1)
Examples
1. Following is an example to turn severity to violation:
cdc report scheme bus_shift_reg –severity violation
-name bus_shift_reg_86219
-module dut
-inferred
Module : dut
Check data_stable : Off <Default Off>
Check hamming_one : On <Default On>
-tx_var : tx_reg
-tx_clock : tx_clk
-tx_reset : 1'b0
-areset : 1'b0
-active : 1'b1
-support : 1'b0
-nv : 1'b1
-TX_MIN : 2
-name : bus_shift_reg_86219
Checker Class : CDC
Checker Internal
tx_clk rx_clk
Evaluations
=============================================================
Multiple-bit signal synchronized by shift-register synchronizer
(bus_shift_reg)
-----------------------------------------------------------------
tx_clk : start : tx_data (bus_shift_reg.v : 10)
rx_clk : end : sync[0] (bus_shift_reg.v : 19
(ID:bus_shift_reg_99229)
bus_two_dff
BUS SYNC: Multiple-bit signal synchronized by DFF synchronizer.
gray tx_data rx_data gray
encoder DFF DFF decoder
tx_clk rx_clk
Tx Clock Domain Rx Clock Domain
Crossing Type
multiple-bit data bus
Default Severity
evaluation
Promoted Checker
cdc_hamming_distance_one (cdc_hammimg1)
Examples
1. Following is an example to turn severity to violation:
cdc report scheme bus_two_dff –severity violation
-module demo_top
-inferred
Module : demo_top
Check data_stable : Off <Default Off>
Check hamming_one : On <Default On>
-tx_var : fifo_1_d.rp_gray
-tx_clock : mac_clk_in
-tx_reset : 1'b0
-areset : 1'b0
-active : 1'b1
-support : 1'b0
-nv : 1'b1
-TX_MIN : 2
-name : bus_two_dff_94611
Checker Class : CDC
Checker Internal
Evaluations
=============================================================
Multiple-bit signal synchronized by DFF synchronizer. (bus_two_dff)
-----------------------------------------------------------------
tx_clk : start : tx_reg (bus_two_dff.v : 11)
rx_clk : end : sync1 (bus_two_dff.v : 11)
(ID:bus_two_dff_8942)
5. Bus 2 DFF synchronizer with enable. CDC analysis only recognizes this instance as a
bus_two_dff scheme if cdc preference -allow_enable_in_sync is specified.
reg [width-1:0] tx_reg, rx_reg;
reg [width-1:0] sync1, sync2; enable
tx_reg EN sync1 EN sync2
always @(posedge rx_clk)
if (enable)
begin
sync1 <= tx_reg; // 1st FF tx_clk rx_clk
sync2 <= sync1; // 2nd FF
end
Evaluations
=============================================================
Multiple-bit signal synchronized by DFF synchronizer. (bus_two_dff)
-----------------------------------------------------------------
tx_clk : start : tx_reg (bus_two_dff_en.v : 11)
rx_clk : end : sync1 (bus_two_dff_en.v : 11)
(ID:bus_two_dff_8942)
Potential Problem
The 2DFF synchronization of a data bus assumes the bus is gray-coded. Any data buses that
cross clock domains that are not gray-coded should be identified as requiring complete data
synchronization. Any of these crossings synchronized by 2DFF synchronizers should be
flagged as violations. To set these schemes to violations, use the cdc report directives.
Notes
If you use a DFF synchronization scheme that has more than two flip-flops, then you can get
CDC analysis to recognize the scheme by specifying a cdc synchronizer directive.
For example, the following global CDC directive identifies 4 DFF synchronizers as valid
“two_dff” schemes for CDC paths from the tx_clk domain to the rx_clk domain:
bus_two_dff_phase
BUS SYNC: Multiple-bit signal synchronized by DFF synchronizer and multiple-bit signal
synchronized by DFF of opposite clock polarity.
gray tx_data rx_data gray
encoder DFF DFF decoder
tx_clk
rx_clk
Tx Clock Domain Rx Clock Domain
Synchronization using two opposite polarity flip-flops reduces the time the signal takes to settle.
When using this synchronization scheme, be sure the MTBF is acceptable.
When used to synchronize a data bus, the bus should be gray-coded (i.e., have hamming
distance 1), which assures that only one bit of data changes in any cycle, and the data should
change only at the frequency of the receiving domain.
Crossing Type
multiple-bit data bus
Default Severity
caution
Promoted Checker
cdc_hamming_distance_one (cdc_hamming1)
Examples
1. Following is an example to turn severity to evaluation:
cdc report scheme bus_two_dff_phase –severity evaluation
2. Bus 2 DFF phase synchronizer has one FF clocked by a clock with the opposite polarity
of the Rx clock:
reg [width-1:0] tx_reg, rx_reg;
reg [width-1:0] sync1, sync2; tx_reg sync1 sync2
Cautions
=============================================================
Multiple-bits signal synchronized by DFF of opposite clock polarity.
(bus_two_dff_phase)
-----------------------------------------------------------------
tx_clk : start : tx_reg (test.v : 11)
rx_clk : end : sync1 (test.v : 11)
(ID:bus_two_dff_phase_57873)
3. Bus 2 DFF phase synchronizer with enables has one FF clocked by a clock with the
opposite polarity of the Rx clock. CDC analysis only recognizes this instance as a
bus_two_dff_phase scheme if cdc preference -allow_enable_in_sync is specified.
reg [width-1:0] tx_reg, rx_reg; enable
reg [width-1:0] sync1, sync2;
tx_reg EN sync1 EN sync2
always @(negedge rx_clk)
if (enable) sync1 <= tx_reg;
always @(posedge rx_clk)
if (enable) sync2 <= sync1; tx_clk rx_clk
Cautions
=============================================================
Multiple-bits signal synchronized by DFF of opposite clock polarity.
(bus_two_dff_phase)
-----------------------------------------------------------------
tx_clk : start : tx_reg (test.v : 11)
rx_clk : end : sync1 (test.v : 11)
(ID:bus_two_dff_phase_57873)
Potential Problems
1. Synchronization of a data bus using two opposite polarity DFFs assumes the bus is
gray-coded.
clock_no_sync
CLOCK DOMAIN CROSSING AT CLOCK PIN: Signal that clocks a receive register is
derived from a clock domain crossing.
data rx_data
tx_sig DFF
combo
tx_clk rx_clk
Specifying cdc preference -clock_as_rx option directs CDC static analysis to identify clock
domain crossings to a clock pin.
Crossing Type
1-bit signal
Default Severity
caution
Promoted Checker
none
Examples
1. Following is an example to turn severity to violation:
cdc preference -clock_as_rx
cdc report scheme clock_no_sync –severity violation
2. Register out2 is clocked by either clk2 or !clk2, which is selected by a signal clocked by
clk1. Since the selector is from a different clock domain than the clock, a clock_no_sync
caution is reported if cdc preference -clock_as_rx is specified.
module top(
in2 out2
input in1, in2, clk1, clk2
output reg out2);
reg out1; clk2
always @ (posedge clk1)
out1 = in1;
wire w = out1 ? !clk2 : clk2; in1 out1
always @ (posedge w)
out2 = in2;
clk1
endmodule
Cautions
=============================================================
Clock domain crossing at clock pin. (clock_no_sync)
-----------------------------------------------------------------
clk1 : start : out1 (...cdc_clock_no_sync/top.v : 2)
w : end : out2 (.../cdc_clock_no_sync/top.v : 1)
(ID:clock_no_sync_64598)
combo_logic
COMBO LOGIC: Combinational logic before synchronizer.
combinational logic
tx_data rx_data
synchronizer
tx_clk rx_clk
Tx Clock Domain Rx Clock Domain
Static CDC analysis checks for combo logic in every CDC path that has a detected
synchronizer. For some cases, this combinational logic will be constant during normal
operation, so glitches cannot be generated. For example, the combinational logic might consist
of test MUXes or configuration logic. To remove the violation, identify the signal feeding that
logic as a constant value using netlist constant.
Crossing Type
control signal or data bus
Default Severity
violation
Promoted Checker
cdc_glitch
Examples
1. Following is an example to specify that the MUX select in the combinational logic
feeding a CDC signal is constant 1'b0 (so the crossing can be checked for proper
synchronization):
netlist constant test_sel 1'b0
din
always @ (posedge rx_clk) begin s1 s2
s1 <= tx_sig & din; DFF DFF
tx_sig
s2 <= s1;
end
tx_clk rx_clk
Violations
=============================================================
Combinational logic before synchronizer. (combo_logic)
-----------------------------------------------------------------
tx_clk : start : tx_reg (combo_logic.v : 8)
rx_clk : end : sync1 (combo_logic.v : 8) (ID:combo_logic_57762)
Base Type : TWO DFF SYNCHRONIZER
The report for this violation shows the base type CDC scheme identified by CDC
analysis (TWO DFF SYNCHRONIZER). To remove this violation—and instead report
the crossing as a 2DFF scheme—you can specify that din is stable. That is, it is properly
synchronized in the Rx domain:
cdc signal din -stable
custom_sync
SINGLE-BIT CUSTOM SYNC: Single-bit signal synchronized by custom CDC synchronizer
whose input port is identified as asynchronous.
tx_sig async rx_sig
custom
synchronizer
tx_clk rx_clk
Tx Clock Domain Rx Clock Domain
Custom synchronizers are instances of modules declared as custom synchronizers with the cdc
synchronizer custom directive. The custom_sync scheme identifies single-bit custom
synchronizers where the clock domain crossing is external to the synchronizer itself and the
input port is specified as asynchronous (with netlist port domain).
Crossing Type
control signal
Default Severity
evaluation
Promoted Checker
none (or cdc_sync/cdc_hamming1 if specified with cdc protocol)
Examples
1. Following is an example to specify the cust_sync module with clock pin clk as a custom
synchronizer:
cdc synchronizer custom cust_sync
netlist port domain d -async -clock clk -module cust_sync
The netlist port domain directive identifies d as an asynchronous port and directs CDC
analysis to use the clk port to identify the receive clock reported for clock domain
crossings though cust_sync.
2. Following is an example to turn severity to caution:
cdc report scheme custom_sync -severity caution
Custom synchronizers are considered inferred black boxes for CDC analysis, so you
must specify their port information:
netlist port domain -input din -async -clock clk -module syncA
netlist port domain -output dout -clock clk -module syncA
Potential Problem
CDC analysis does not automatically promote a checker for this scheme. You can provide a
transfer protocol checking scheme using the cdc protocol directive.
custom_sync_no_sync
CUSTOM SYNC DOMAIN MISMATCH: Single-bit signal synchronized by custom CDC
synchronizer whose input port domain is not specified or does not match the clock domain of
the signal.
unspecified or mismatching
domain
tx_sig rx_sig
custom
synchronizer
tx_clk rx_clk
Tx Clock Domain Rx Clock Domain
Custom synchronizers are instances of modules declared as custom synchronizers with the cdc
synchronizer custom directive. The custom_sync_no_sync scheme identifies single-bit custom
synchronizers where the port domain of the input port connected to the Tx signal is not properly
specified. The netlist port domain directive sets the port domains of modules. In the above
figure, the custom synchronizer’s input port domain can be:
• -async
Proper port domain specification for custom synchronizers with external crossings. The
circuit is identified as a custom_sync scheme.
• -tx_clock tx_clock
Proper port domain specification for custom synchronizers with internal crossings. The
circuit is identified as a custom_sync_with_crossing scheme.
• -tx_clock other_clock_domain
Badly-connected synchronizer. The circuit is identified as a custom_sync_no_sync
scheme.
• unassigned
Improperly-specified synchronizer. Custom synchronizer data input ports must have
netlist port domain specifications. The circuit is identified as a custom_sync_no_sync
scheme.
Crossing Type
control signal
Default Severity
violation
Promoted Checker
none (or cdc_sync/cdc_hamming1 if specified with cdc protocol)
Examples
1. Following is an example to specify the cust_sync module with clock pin clk as a custom
synchronizer:
cdc synchronizer custom cust_sync
netlist port domain d -async -clock clk -module cust_sync
The netlist port domain directive identifies d as an asynchronous port and directs CDC
analysis to use the clk port to identify the receive clock reported for clock domain
crossings though cust_sync.
2. Following is an example to turn severity to caution:
cdc report scheme custom_sync_no_sync -severity caution
Custom synchronizers are considered inferred black boxes for CDC analysis, so you
must specify their port information. To report this crossing as a bus_custom_sync
scheme (evaluation), assign the port domain of the syncA din port to asynchronous:
netlist port domain -input din -async -clock clk -module syncA
netlist port domain -output dout -clock clk -module syncA
Potential Problem
CDC analysis does not automatically promote a checker for this scheme. You can provide a
transfer protocol checking scheme using the cdc protocol directive.
custom_sync_with_crossing
CUSTOM WITH CROSSING: Custom CDC synchronizer with an internal clock domain
crossing.
custom synchronizer
tx_data rx_data
tx_clk rx_clk
Tx Clock Domain internal crossing Rx Clock Domain
Custom synchronizers are instances of modules declared as custom synchronizers with the cdc
synchronizer custom directive. The custom_sync_with_crossing scheme identifies custom
synchronizers where the clock domain crossing is internal to the synchronizer itself. To identify
this type of custom synchronizer, you must identify a transmit clock port and a receive clock
port using the cdc synchronizer constraint directive for the custom synchronizer module. Every
other signal/data port must be identified with either a transmit variable clock or a receive
variable clock. If a port is identified as an -async port, the synchronizer is reported as a simple
custom_sync scheme.
Crossing Type
control signal or data bus
Default Severity
evaluation
Promoted Checker
none
Examples
1. Custom synchronizer module with crossing:
SYNC_VX
RST_A RST_B
IN OUT
CLKA CLKB
Evaluations
=============================================================
Custom synchronization with internal crossing.
(custom_sync_with_crossing)
-----------------------------------------------------------------
tx_clk: start: S.din (test2.v: 35)
rx_clk: end: S.dout (test2.v: 35)(ID:custom_sync_with_crossing_9661)
Custom synchronizers are considered inferred black boxes for CDC analysis, so you
must specify their port information:
cdc synchronizer constraint syncC -ports din -tx_var tclk
cdc synchronizer constraint syncC -ports dout -rx_var rclk
Potential Problem
CDC analysis does not promote a checker for this scheme. You should implement a transfer
protocol checking scheme using one or more checkers.
dff_sync_gated_clk
DFF GATED SYNC: DFF synchronizer with gated clock.
tx_sig rx_sig
DFF DFF
tx_clk en_rx_clk
rx_clk
Tx Clock Domain Rx Clock Domain
Crossing Type
1-bit signal
Default Severity
caution
Promoted Checker
cdc_sync
Examples
1. Following is an example to turn severity to evaluation:
cdc report scheme dff_sync_gated_clk –severity evaluation
2. Following is an example to turn off reporting for a particular source CDC signal:
cdc crossing off -from in1 -to r1
Cautions
=============================================================
DFF synchronizer with gated clock. (dff_sync_gated_clk)
-----------------------------------------------------------------
tx_clk: start: tx_reg (test4.v : 9)
rx_clk: end: sync1 (test4.v: 9)(ID:dff_sync_gated_clk_11747)
dmux
DMUX: DMUX synchronization.
tx_data rx_data
MUX
tx_clk
tx_sel
DFF DFF
rx_sel
tx_clk rx_clk
Synchronization using a DMUX scheme is a standard method of synchronizing a data bus (or a
control signal). The control signal can be synchronized by any of the following signal
synchronizers: bus_dff_sync_gated_clk, bus_four_latch, bus_shift_reg, bus_two_dff,
bus_two_dff_phase or two_dff_phase, dff_sync_gated_clk, four_latch. shift_reg, two_dff,
pulse_sync and custom.
Note
The physical design of the MUX logic (that controls the path from the Tx register to the
Rx registers) must not allow glitches at the input to an Rx register when the Tx register
changes value.
Crossing Type
synchronized control signal and data bus
Default Severity
caution
Promoted Checker
cdc_sample (if enabled, see cdc preference)
Examples
1. Following is an example to turn severity to evaluation:
cdc report scheme dmux -severity evaluation
3. Example promoted transfer protocol checker for DMUX synchronization scheme (in
cdc_checker.rpt):
Type/Name : cdc_dsel demo_top.dmux_12402
Checkerware Instance : cdc_demo_top_31c26a68_demo_top_inst_0.U0.U4
Description : Ensures that a signal between two clock
domains, where the transmitter's data select signal drives
the select input of a data multiplexor in the receiver, is
held stable enough for the signal to be sampled reliably by
the receiver and ensures that the data remains stable while
the data select signal asserts.
Message : <None>
Location : File /home/cdc_static/src/vlog/demo_top.v,
Line 336
Directive : cdc_dsel
-tx_data tx_mask_d
-tx_clock core_clk_in
-tx_data_select tx_mask_valid
-rx_data mask
-rx_clock mac_clk_in
-tx_min 1
-areset ( ! rst)
-reference dmux_12402
-name dmux_12402
-module demo_top
-inferred
Module : demo_top
Check rx_data_stable : On <Default On>
Check tx_data_stable : On <Default On>
Check tx_min : On <Default On>
-tx_data : tx_mask_d
-rx_data : mask
-tx_data_select : tx_mask_valid
-rx_data_select : (mask_pass && tx_mask_valid_r2)
-tx_clock : core_clk_in
-tx_reset : 1'b0
-rx_clock : mac_clk_in
-rx_reset : 1'b0
-areset : ( ! rst)
-active : 1'b1
-support : 1'b0
-nv : 1'b1
-TX_MIN : 1
-name : dmux_12402
Checker Class : CDC
Checker Internal
Cautions
=============================================================
DMUX synchronization. (dmux)
-----------------------------------------------------------------
tx_clk : start : tx_data (dmux.v : 9)
rx_clk : end : rx_data (dmux.v : 6) (ID:dmux_39152)
Synchronizer ID : two_dff_44468
Evaluations
=============================================================
Single-bit signal synchronized by DFF synchronizer. (two_dff)
-----------------------------------------------------------------
tx_clk : start : tx_sel (dmux.v : 10)
rx_clk : end : DMUX.s1 (dmux.v : 22) (ID:two_dff_44468)
fanin_different_clks
FANIN LOGIC FROM DIFFERENT CLOCKS: Fan-in logic from multiple clock domains.
sig_a sig_c
synchronizer
clock_a clock_c
Clock Domain B
clock_b
Fan-in logic for the input to a synchronizer must be synchronized to a single transmit clock
domain for CDC analysis to properly identify the synchronization scheme. CDC analysis
reports a FANIN LOGIC FROM DIFFERENT CLOCKS scheme if it finds two unsynchronized
signals from different clock domains in the fan-in logic of the input to a synchronizer.
For some cases, the signals from one domain are constant during normal operation. For
example, the fan-in logic from one of the domains might consist of test MUXes or configuration
logic. In some other cases, signals from one domain are marked as stable. How these cases are
handled depends on how many signals are in the fanin of the crossing:
1. Keep one signal and use netlist constant to identify the remaining signals coming from
that logic as constants. The removed signals do not appear in the CDC report.
2. Keep one signal and use cdc signal to identify the remaining signals coming from that
logic as stable. If you specify cdc preference -filtered_report, the removed signals
appear in the CDC report. The fanin_different_clks scheme is reported as the scheme
detected for the remaining signal. When setting signals stable:
• CDC analysis assumes fan-in logic from a different clock domain is combo logic if
the remaining signals are from the same domain.
• CDC analysis assumes a CDC signal has a valid synchronizer scheme if it is the only
remaining signal after filtering the stable signals. The filtered signals also are
reported as using the scheme.
• Filtered stable signals are reported as instances of the combo_logic scheme
whenever fan-in is still detected after filtering them.
• Stable signals are reported in the CDC report if you specify cdc preference
-filtered_report.
Crossing Type
control signal or data bus
Default Severity
violation
Promoted Checker
cdc_glitch
Examples
1.
clock domain A
sig_a
sig_b
MUX
synchronizer
clock_a
clock_b
clock domain B
tsel test_sel
The above logic has a fanin_different_clks violation. To remove this violation, set
test_sel in the TEST clock domain to the constant 1'b0:
netlist constant test_sel 1'b0
2. Following is an example of reporting for fan-in logic from different clock domains:
Violations (1)
-------------------------------------------
Fan-in logic from different clock domain (1)
===========================================
Fan-in logic from different clock domain
-------------------------------------------
clk3: end: u1.q(t8.v: 30)
clk1: start: u0.q(t8.v: 30)
via: u0.q
via: u1.d
clk2: u5.q(t8.v: 30)
via: u5.q
via: u1.d
fifo
FIFO: FIFO Synchronization.
read addr
synchronizer raddr
wr_clock
wr_data
memory
rd_data
rd_clock
waddr write addr
synchronizer
By default, memories with read and write clocks are reported as FIFO memories and FIFO-style
memories (see “FIFO Memory and FIFO Crossings” on page 44). Those FIFO-style crossings
that pass the criteria for FIFO memories are identified as belonging to the fifo_memory scheme.
Specifying cdc preference directive -fifo_scheme turns on FIFO detection. Here, static CDC
analysis determines whether or not what is previously a fifo_memory scheme passes the criteria
for being a crossing with true FIFO synchronization.
FIFO synchronization passes data between clock domains without synchronizing the data.
However, to prevent FIFO overflow, transmit logic must know when the FIFO is full and to
prevent FIFO underflow, the receive logic must know when the FIFO is empty. In the FIFO
synchronization scheme, the values of the address pointers are synchronized to the clock
domains of the opposite logic: read address pointer is synchronized to the transmit domain and
the write address pointer is synchronized to the receive domain.
The templates CDC static analysis uses to detect FIFO schemes can be adjusted using the cdc
preference fifo directive.
Crossing Type
data bus
Default Severity
evaluation
Promoted Checkers
• No checker is promoted for the FIFO protocol.
• A cdc_hamming_distance_one checker is promoted for each address synchronizer.
Examples
1. Following is an example to turn severity to caution:
cdc preference -fifo_scheme
cdc report scheme fifo –severity caution
fifo_full
wr_clock rd_clock
read address
synchronizer
wr_clock
FIFO write FIFO read
clock domain clock domain
3. In the following CDC report entry, the two synchronizers are the read and the write
pointer synchronizers:
Cautions
=================================================================
FIFO synchronization. (fifo)
-----------------------------------------------------------------
sys_clk : start : inst_m1dsi_al_0.crs_async_fifo_0.data_q
(/ASIC/lib/src/async_fifo_rtl.vhd : 34)
tx_byte_hs_clk : end inst_m1dsi_al_0.crs_async_fifo_0.data2_q
(/ASIC/lib/src/async_fifo_rtl.vhd : 37)
(ID:fifo_85752)
Read Synchronizer ID : bus_two_dff_48297
Write Synchronizer ID : bus_two_dff_55880
4. RAM-based FIFO synchronizer. CDC analysis only recognizes this instance as a fifo
scheme if cdc preference -fifo_scheme is specified.
reg [2:0] wr_sync1, wr_sync2,
reg [2:0] rd_sync1, rd_sync2;
reg [2:0] Mem [7:0];
full rd_sync2 rd_sync1
always @(posedge wr_clk) begin wr_clk
Mem [wr_addr] <= wr_data;
rd_sync1 <= rd_addr ; wr_data rd_addr
rd_sync2 <= rd_sync1;
full <= memory
wr_addr rd_data
((wr_addr+1)==rd_sync2)?1:0;
end
rd_clk
always @(posedge rd_clk) begin
rd_data <= Mem [rd_addr]; wr_sync1 wr_sync2 empty
wr_sync1 <= wr_addr;
wr_sync2 <= wr_sync1;
empty <=
(rd_addr == wr_sync2)? 1:0;
end
Evaluations
=============================================================
FIFO synchronization. (fifo)
-----------------------------------------------------------------
wr_clk : start : Mem (fifo1.v : 11) (ID:fifo_10640)
rd_clk : end : rd_data (fifo1.v : 6)
Read pointer synchronizer ID : bus_two_dff_18726
Write pointer synchronizer ID : bus_two_dff_646
Also, the clock domains of the address pointers are identified explicitly:
netlist port domain wr_addr -clock wr_clk
netlist port domain rd_addr -clock rd_clk
5. Register-file based FIFO synchronizer. CDC analysis only recognizes this instance as a
fifo scheme if cdc preference -fifo_scheme is specified. Also, to detect the register file:
cdc fifo Mem1 Mem2 Mem3 Mem4
Evaluations
=============================================================
FIFO synchronization. (fifo)
-----------------------------------------------------------------
wr_clk : start : Mem1[0] (fifo2.v : 11) (ID:fifo_47408)
rd_clk : end : rd_data (fifo2.v : 6)
Read pointer synchronizer ID : bus_two_dff_18726
Write pointer synchronizer ID : bus_two_dff_646
wr_clk : start : Mem1[1] (fifo2.v : 11) (ID:fifo_47412)
rd_clk : end : rd_data (fifo2.v : 6)
Read pointer synchronizer ID : bus_two_dff_18726
Write pointer synchronizer ID : bus_two_dff_646
wr_clk : start : Mem2[0] (fifo2.v : 12) (ID:fifo_12944)
rd_clk : end : rd_data (fifo2.v : 6)
Read pointer synchronizer ID : bus_two_dff_18726
Write pointer synchronizer ID : bus_two_dff_646
wr_clk : start : Mem2[1] (fifo2.v : 12) (ID:fifo_12948)
rd_clk : end : rd_data (fifo2.v : 6)
Read pointer synchronizer ID : bus_two_dff_18726
Write pointer synchronizer ID : bus_two_dff_646
wr_clk : start : Mem3[0] (fifo2.v : 13) (ID:fifo_78480)
rd_clk : end : rd_data (fifo2.v : 6)
Read pointer synchronizer ID : bus_two_dff_18726
Write pointer synchronizer ID : bus_two_dff_646
wr_clk : start : Mem3[1] (fifo2.v : 13) (ID:fifo_78484)
rd_clk : end : rd_data (fifo2.v : 6)
Read pointer synchronizer ID : bus_two_dff_18726
Write pointer synchronizer ID : bus_two_dff_646
wr_clk : start : Mem4[0] (fifo2.v : 14) (ID:fifo_19728)
rd_clk : end : rd_data (fifo2.v : 6)
Read pointer synchronizer ID : bus_two_dff_18726
Write pointer synchronizer ID : bus_two_dff_646
wr_clk : start : Mem4[1] (fifo2.v : 14) (ID:fifo_19732)
rd_clk : end : rd_data (fifo2.v : 6)
Read pointer synchronizer ID : bus_two_dff_18726
Write pointer synchronizer ID : bus_two_dff_646
fifo_memory
FIFO MEMORY: FIFO Memory Synchronization.
wr_clock
raddr
wr_data
memory
rd_data
waddr rd_clock
FIFO write clock domain FIFO read clock domain
By default, memories with read and write clocks are reported as FIFO memories and FIFO-style
memories (see “FIFO Memory and FIFO Crossings” on page 44). Those FIFO-style crossings
that pass the criteria for FIFO memories are identified as belonging to the fifo_memory scheme:
Default Severity
caution
Promoted Checkers
No checker is promoted.
Examples
1. Following is an example to turn severity to evaluation:
cdc report scheme fifo_memory –severity evaluation
endmodule
Violations
=================================================================
Single-bit signal does not have proper synchronizer. (no_sync)
-----------------------------------------------------------------
rd_clk : start : rd_addr (.../fifo_memory.v : 5)
wr_clk : end : full (.../fifo_memory.v : 7)(ID:no_sync_19228)
fifo_memory_ptr_mismatch
FIFO POINTER MISMATCH: FIFO-style Memory with Mismatching Data/Pointer Clock
Domains.
FIFO pointer domains
waddr raddr
wr_data
memory
rd_data
wr_clock rd_clock
FIFO write clock domain FIFO read clock domain
By default, memories with read and write clocks are reported as FIFO memories and FIFO-style
memories (see “FIFO Memory and FIFO Crossings” on page 44). A
fifo_memory_ptr_mismatch scheme is a FIFO-style memory crossing that fails the following
criterion, so it cannot be a true FIFO memory crossing (fifo_memory):
Write address pointer must be in the same clock domain as the memory write address
input. Similarly, the read address pointer must be in the same clock domain as the
memory read address input.
The clock domains of the pointers and data mismatch (or cannot be detected).
Crossing Type
data bus
Default Severity
violation
Promoted Checkers
No checker is promoted.
Examples
1. Following is an example to turn severity to caution:
cdc report scheme fifo_memory_ptr_mismatch –severity caution
endmodule
Violations
=================================================================
FIFO pointer mismatch. (fifo_memory_ptr_mismatch)
-----------------------------------------------------------------
wr_clk : start : Mem (.../fifo_bad_ptr.v : 10)
(ID:fifo_memory_ptr_mismatch_3670)
rd_clk : end : rd_data (.../fifo_bad_ptr.v : 6)
<clock N/A> : write pointer : wr_addr
fifo_ptr_no_sync
MISSING FIFO POINTER SYNCHRONIZER: Synchronization of Memory Pointer Input is
Missing.
?
missing raddr
wr_clock synchronizer
wr_data
memory
rd_data
missing rd_clock
waddr synchronizer
?
FIFO write clock domain FIFO read clock domain
By default, memories with read and write clocks are reported as FIFO memories and FIFO-style
memories (see “FIFO Memory and FIFO Crossings” on page 44). Those FIFO-style crossings
that pass the criteria for FIFO memories are identified as belonging to the fifo_memory scheme.
Specifying cdc preference -fifo_scheme turns on FIFO detection. Here, static CDC analysis
determines whether or not what is previously a fifo_memory scheme passes the criteria for being
a crossing with true FIFO synchronization. The fifo_ptr_no_sync scheme is a FIFO memory
crossing that fails the following criterion, so it cannot be a true FIFO crossing (fifo):
Write address pointer must synchronize in the Rx domain and the read address pointer
must synchronize in the Tx domain.
You can relax these requirements with the -no_write_sync and -no_read_sync options to the cdc
preference fifo directive.
Crossing Type
data bus
Default Severity
violation
Promoted Checkers
No checker is promoted.
Examples
1. Following is an example to turn severity to caution:
cdc preference -fifo_scheme
cdc report scheme fifo_ptr_no_sync –severity caution
endmodule
Violations
=================================================================
Single-bit signal does not have proper synchronizer. (no_sync)
-----------------------------------------------------------------
rd_clk : start : rd_addr (.../fifo_memory.v : 5)
wr_clk : end : full (.../fifo_memory.v : 7)(ID:no_sync_19228)
forward_simple_dmux
FORWARD_SIMPLE_DMUX: Forward Simple DMUX synchronization..
tx_clk
tx_sel
synchronizer
tx_clk rx_clk
The forward simple DMUX scheme is a restricted version of the general DMUX scheme. For
the general scheme, the fanin logic of the Rx signal can contain any logic and the synchronized
control signal can use any logic to turn off the Tx signal (not just a MUX). The control signal
can be synchronized by any of the following signal synchronizers: two_dff_phase,
dff_sync_gated_clk, four_latch. shift_reg, two_dff, pulse_sync and custom.
Note
The physical design of the MUX logic (that controls the path from the Tx register to the
Rx registers) must not allow glitches at the input to an Rx register when the Tx register
changes value.
Crossing Type
synchronized control signal and muxed data bus
Default Severity
caution
Promoted Checker
cdc_dsel
Examples
1. Following is an example to turn severity to evaluation:
cdc report scheme forward_simple_dmux -severity evaluation
four_latch
FOUR LATCH SYNCHRONIZER: Single-bit signal synchronized by latch synchronizer.
tx_sig rx_sig
latch latch latch latch
tx_clk rx_clk
Synchronization using four latches is a standard method of synchronizing a 1-bit signal. Here,
the latch enables are of alternating polarity. The end Rx signal for the synchronizer is the first
latch in the synchronizer.
Crossing Type
control signal
Default Severity
evaluation
Promoted Checker
cdc_sync
Examples
1. Following is an example to turn severity to caution:
cdc report scheme four_latch -severity caution
3. Example promoted transfer protocol checker for four_latch synchronization scheme (in
cdc_checker.rpt):
Type/Name : cdc_hamming_distance_one demo_top.bus_two_dff_62001
Checkerware Instance : cdc_demo_top_31c26a68_demo_top_inst_0.U0.U0
Description : Ensures that the data crossing from transmit
clock to receive clock domain changes by
only one hamming distance and that it
remains stable for a specified tx_min clock
cycles.
Message : <None>
Location : File
/home/cdc/src/vlog/generic_fifo_dc_gray.v,
Line 147
Directive : cdc_hamming1
-tx_var fifo_0_h.rp_gray
-tx_clock mac_clk_in
-reference two_dff_62001
-name bus_two_dff_62001
-module demo_top
-inferred
Module : demo_top
Check data_stable : Off <Default Off>
Check hamming_one : On <Default On>
-tx_var : fifo_0_h.rp_gray
-tx_clock : mac_clk_in
-tx_reset : 1'b0
-areset : 1'b0
-active : 1'b1
-support : 1'b0
-nv : 1'b1
-TX_MIN : 2
-name : two_dff_62001
Checker Class : CDC
Checker Internal
4. Four-latch synchronizer:
always @ (*)
if (rx_clk) begin
sync1 <= tx_sig;// 1st latch tx_sig rx_sig
sync3 <= sync2; // 3rd latch
end
else begin tx_clk rx_clk
sync2 <= sync1; // 2nd latch
rx_sig <= sync3;// 4th latch
end
Evaluations
=============================================================
Single-bit signal synchronized by latch synchronizer. (four_latch)
-----------------------------------------------------------------
tx_clk : start : tx_sig (four_latch.v : 8)
rx_clk : end : sync1 (four_latch.v : 8) (ID:four_latch_51294)
via : sync1
handshake
HANDSHAKE: Handshake synchronization.
MUX recirculation
Tx Clock Domain Rx Clock Domain
ack-tx path en
DEST FSM
SRC FSM
rx_clk
tx_clk
handshake loop
Specifying the cdc preference directive with the -handshake_scheme option directs CDC static
analysis to identify DMUX synchronization schemes like that shown above as HANDSHAKE
CDC schemes. Like DMUX synchronization, handshake synchronization uses a synchronized
select signal to enable a data MUX to pass through data to the receive clock domain. Handshake
synchronization has additional synchronization of the receive data MUX select signal back to
the transmit clock domain as feedback into the select logic. This “round-trip” synchronizer
circuit automatically resets the receive domain MUX select signal. The enable signal to the
transmit data MUX select also activates the receive data MUX select via the round-trip
synchronizer.
Crossing Type
data bus
Default Severity
evaluation
Promoted Checkers
• No checker is promoted for the handshake protocol.
• A cdc_dsel checker is promoted for the DMUX synchronization.
• Two cdc_sync checkers are promoted for the round-trip synchronizer.
Examples
1. Following is an example to turn severity to caution:
cdc preference -handshake_scheme
cdc report scheme handshake -severity caution
2. In the following CDC report entry, the two synchronizers are the two 2DFF
synchronizers in the round-trip synchronizer circuit.
Cautions
=================================================================
Handshake synchronization. (handshake)
-----------------------------------------------------------------
ClkO : start : DMUXInLtch (Sync_ReqAck.v: 107)
ClkR : end : DMUXOutLtch (Sync_ReqAck.v: 114)(ID:handshake_21466)
Synchronizer ID : two_dff_17913
Synchronizer ID : pulse_sync_28075
Request Signal: ReqInO
Acknowledge Signal: AckIn
// generate request
always @ (posedge tx_clk) req <= (req | enable) & !ack_synced;
// generate acknowledge
always @ (posedge rx_clk) ack <= req_synced;
ack_synced
req ack
req_synced
enable
data flow
tx_clk rx_clk
multi_bits
MULTIPLE BITS: Multiple-bit signal across clock domain boundary.
additional logic
driven by signal
tx_data rx_data
DFF DFF
tx_clk rx_clk
Tx Clock Domain Rx Clock Domain
tx_data ? rx_data
An unsynchronized CDC data bus in most cases should be a static violation. Similarly, a CDC
data bus synchronized using a 2DFF synchronizer should not drive any logic from the wire
connecting the two flip-flops. However, some data buses from test or configuration logic might
be constant or ad hoc synchronous with the receive clock domain. Similarly, test or
configuration logic driven by the wire connecting the two flip-flops of a 2DFF synchronizer
might also be constant or ad hoc synchronous with the receive clock domain. The severity of
these crossing schemes are typically set to caution.
Crossing Type
multibit data bus
Default Severity
violation
Promoted Checker
cdc_sample
Examples
1. Following is an example to turn reporting off for the status_test signal in module dut:
cdc crossing off -from status_test -module dut
tx_clk rx_clk
Violations
==============================================================
Multiple-bit signal across clock domain boundary. (multi_bits)
-----------------------------------------------------------------
tx_clk : start : tx_bus (multi_bits.v : 11)
rx_clk : end : rx_bus (multi_bits.v : 11) (ID:multi_bits_2760)
multi_sync_mux_select
MULTIPLE SYNCHRONIZERS AT DMUX: MUX select fan-in contains more than one
synchronizer.
tx_data rx_data
MUX DFF
rx_sel
tx_sel1
DFF DFF
tx_clk rx_clk
tx_sel2
DFF DFF
In most cases, if a MUX select is used to synchronize a signal or data bus, then the MUX select
fan-in should not have more than one synchronizer. However, some synchronization schemes
are tolerant of this type of synchronization scheme. In this case, the two synchronizers
reconverge at the MUX select. So, a reconvergence scheme is reported in addition to the
multi_sync_mux_select scheme.
This crossing type is also reported for multiply-synchronized signals in the fanin of an enable.
Crossing Type
control signal or data bus
Default Severity
caution
Promoted Checker
cdc_dsel
Examples
1. Following is an example to turn severity to evaluation:
cdc report scheme multi_sync_mux_select -severity evaluation
tx_clk rx_clk
tx_sel2 s_sel2[1]
shift register
MUX rx_data
tx_data
mux_lock_dmux
MUX_LOCK_DMUX: MUX lock enable.
The mux-lock DMUX scheme is a restricted version of the general DMUX scheme. For the
general scheme, the fanin logic of the Rx signal can contain any logic and the synchronized
control signal can use any logic to turn off the Tx signal (not just a MUX). The control signal
can be synchronized by any of the following signal synchronizers: two_dff_phase,
dff_sync_gated_clk, four_latch. shift_reg, two_dff, pulse_sync and custom.
• Logic between the enabled Tx signal and the Rx signal has a MUX.
• Rx output feeds back to the MUX input.
• Logic between the Tx signal and the enabled Tx signal has a MUX and a second Tx
register.
• Tx register output feeds back to the MUX input.
• First Tx register clock is inverted to clock the second Tx signal.
• First Tx, second Tx and Rx drivers are registers.
• A cdc dmux directive is used to specify the Tx lock signal (–tx_enable) and Rx lock
signal (–rx_enable).
Note
The physical design of the MUX logic (that controls the path from the Tx register to the
Rx registers) must not allow glitches at the input to an Rx register when the Tx register
changes value.
Crossing Type
synchronized control signal and muxed data bus
Default Severity
caution
Promoted Checker
cdc_dsel
Examples
1. Following is an example to turn severity to evaluation:
cdc report scheme mux_lock_dmux -severity evaluation
no_sync
MISSING SYNCHRONIZER: Single-bit signal does not have proper synchronizer.
additional logic
driven by signal
tx_sig rx_sig
DFF DFF
tx_clk rx_clk
Tx Clock Domain Rx Clock Domain
tx_sig ? rx_sig
An unsynchronized CDC signal is typically a static violation, but if such a crossing terminates
at a black box module or RAM, the default severity is reported as caution (because
synchronization might occur in the black box). Similarly, a CDC signal synchronized using a
2DFF synchronizer that drives logic from the wire connecting the two flip-flops is reported as a
static violation by default.
Some signals from test or configuration logic might be constant or ad hoc synchronous with the
receive clock domain. Also, test or configuration logic driven by the wire connecting the two
flip-flops of a 2DFF synchronizer might also be constant or ad hoc synchronous with the
receive clock domain. The severity of these crossing schemes are typically set to caution.
Crossing Type
1-bit signal
Default Severity
violation or caution
Promoted Checker
cdc_sample
Examples
1. Following is an example to turn severity to caution for the write_test signal in the
module dut:
cdc report crossing -severity caution -scheme no_sync \
-from write_test -module dut
Violations
==============================================================
Single-bit signal does not have proper synchronizer. (no_sync)
-----------------------------------------------------------------
tx_clk : start : tx_sig (no_sync.v : 9)
rx_clk : end : rx_sig (no_sync.v : 9) (ID:no_sync_59042)
port_constraint_mismatch
PORT CONSTRAINT MISMATCH: Signal connected to a port of a custom synchronizer is in
a clock domain that is not allowed by the custom synchronizer’s port constraints.
illegal Tx clock domain for port
tx_sig rx_sig
custom
port synchronizer
constraint
tx_clk rx_clk
Tx Clock Domain Rx Clock Domain
illegal Rx clock domain for port
tx_sig rx_sig
custom synchronizer
port with crossing port
constraint constraint
tx_clk rx_clk
Tx Clock Domain Rx Clock Domain
A CDC port constraint identifies all clock domains allowed for signals connected to instances of
the port. A port constraint is specified using the netlist port constraint directive. Currently port
constraints are supported only for design units that are custom synchronizers (i.e., identified
with the cdc synchronizer custom directive).
Custom Synchronizer
For a standard custom synchronizer, you can specify a CDC port constraint on any of its signal
and data bus input ports. The constraint can specify allowed clock domains for signals
connected to it, allowed clock domains for the signal that clocks the port, or both. You also can
specify allowed pairs of clock domains for instances of the port: one for the signal connected to
the port and one for signal that clocks the port. A constrained port of an instance of the design
unit has a port constraint mismatch if one of the following holds:
• The signal connected to the port is not from an allowed transmit clock domain for the
port.
• The signal clocking the port is not from an allowed receive clock domain for the port.
• The domain of the transmit signal and the domain of the receive clock signal are not an
allowed clock domain pair for the port.
Custom Synchronizer with Crossing
For a custom synchronizer with crossing, you can specify CDC port constraints on its signal and
data bus ports. These identify the allowed clock domains for signals connected to them.
Crossing Type
control signal or data bus
Default Severity
violation
Promoted Checker
none
Examples
1. Following is an example to turn severity to evaluation for port constraint mismatches for
custom synchronizers in module prk:
cdc report crossing -severity evaluation \
-scheme port_constraint_mismatch -from write_test -module prk
To ensure instances of cust_sync are properly connected, the following port constraints
are defined:
cdc port constraint cust_sync -ports din1 \
-clock_group_pair tx_clk rx_clk
cdc port constraint cust_sync -ports din2 -rx_clock_groups tx_clk
But, the following top module instantiates cust_sync in a way that obeys the first
constraint (reported as a custom_sync crossing), but violates the second constraint
(reported as a port_constraint_mismatch).
module dut(
input tx_clk, rx_clk, din1
input din1, din2,
output reg dout); tx_clk dout
cust_sync1
reg tx_sig1, tx_sig2, rx_sig; din2
rx_clk
// Transmit register
always @ (posedge tx_clk) begin
tx_sig1 <= din1;
tx_sig2 <= din2;
end
// Custom synchronizer
cust_sync cust_sync1 (rx_clk, tx_sig1, tx_sig2, rx_sig);
endmodule
Violations
=================================================================
Port constraints mismatch: cust_sync (port_constraint_mismatch)
-----------------------------------------------------------------
tx_clk : start : tx_sig2 (.../port_constraint_mismatch.v : 21)
rx_clk : end : cust_sync1.din2 (...constraint_mismatch.v : 32)
(ID:port_constraint_mismatch_18308)
Evaluations
=================================================================
Single-bit signal synchronized by Custom CDC scheme: cust_sync
(custom_sync)
-----------------------------------------------------------------
tx_clk : start : tx_sig1 (.../port_constraint_mismatch.v : 21)
rx_clk : end : cust_sync1.din1 (...constraint_mismatch.v : 32)
(ID:custom_sync_53909)
pulse_sync
PULSE SYNC: Pulse Synchronization.
rx_sig
tx_sig
DFF DFF DFF
tx_clk rx_clk
tx_clk rx_clk
Crossing Type
1-bit signal
Default Severity
evaluation
Promoted Checker
cdc_sync
Examples
1. Following is an example to turn severity to caution:
cdc report scheme pulse_sync –severity caution
3. Example promoted transfer protocol checker for the pulse_sync synchronization scheme
(in cdc_checker.rpt):
Type/Name : cdc_sync dut.pulse_sync_1845
Checkerware Instance : cdc_dut_c9d7a0_dut_inst_0.U0.U0
Description : Ensures that a clock domain crossing signal
from a faster clock to a slower clock is
held stable long enough for the signal to be
sampled reliably by the receiver.
Message : <None>
Location : File .../pulse_sync.v, Line 8
Directive : cdc_sync
-tx_var tx_sig
-tx_clock tx_clk
-tx_min 2
-reference pulse_sync_1845
-name pulse_sync_1845
-module dut
-inferred
Module : dut
Check stable : On <Default On>
-tx_var : tx_sig
-tx_clock : tx_clk
-tx_reset : 1'b0
-active : 1'b1
-areset : 1'b0
-support : 1'b0
-nv : 1'b1
-TX_MIN : 2
-name : pulse_sync_1845
Checker Class : CDC
Checker Internal
Evaluations
=============================================================
Pulse Synchronization. (pulse_sync)
-----------------------------------------------------------------
tx_clk: start: tx_sig (pulse_sync.v : 8)
rx_clk: end: PULSE_SYNC.p0 (pulse_sync.v :16)
(ID:pulse_sync_1845)
reconvergence
RECONVERGENCE: Reconvergence of synchronizers.
reconverging signals
tx/rx_clk
sig2 tx_sig2
Reconvergence occurs when the fan-in of a flip-flop includes two separately synchronized CDC
signals from a different clock domain. The synchronizers can be any of the following:
bus_dff_sync_gated_clk, bus_four_latch, bus_shift_reg, bus_two_dff, bus_two_dff_phase or
two_dff_phase, dff_sync_gated_clk, four_latch. shift_reg, two_dff, pulse_sync and custom.
Reconvergence of two signals might result in synchronization problems. When multiple bits
reconverge, their relative timing is unpredictable. Logic that receives these signals should
account for potential cycle skew—for example, by using a hamming encoding scheme for
signals in the receiving domain. For signals that have large guard times between changes, this
encoding happens naturally.
If it is not feasible to either design receiving logic that accounts for the potential cycle skew or
encode the signals, then you should group the signals and transfer them as a group using a
synchronized MUX enable (as used for multiple-bit data signals). To force CDC analysis to
recognize reconvergence schemes that start from a dmux, simple_dmux or
multi_sync_mux_select scheme, specify cdc preference reconvergence -dmux_as_recon_start.
Crossing Type
multiple control signals or data buses
Default Severity
caution
Promoted Checker
cdc_hamming1 (if enabled, see cdc preference).
Examples
1. Following is an example to change the reconvergence depth to 4:
cdc preference reconvergence -depth 4
tx_clk rx_clk
Cautions
=================================================================
Reconvergence of synchronizers. (reconvergence)
-----------------------------------------------------------------
rx_clk : end : dout (reconvergence.v : 5) (ID:reconvergence_78116)
rx_clk : start : shift_reg_sync (reconvergence.v : 10)
(Synchronizer ID:shift_reg_39969)
(Reconvergence Severity:Caution)
rx_clk : start : two_dff_sync (reconvergence.v : 9)
(Synchronizer ID:two_dff_74368)
(Reconvergence Severity:Caution)
The following code shows the reconvergence point and the two synchronizers on the
reconverging paths.
// Tx signals
always @ (posedge tx_clk) begin
tx_data1 <= din1;
tx_data2 <= din2;
end
// bus two_dff synchronizer
always @ (posedge rx_clk) begin: two_dff
reg [3:0] temp;
temp <= tx_data1;
two_dff_sync <= temp;
end
// shift_reg synchronizer
always @ (posedge rx_clk) begin: shift_reg
shift_reg_sync <= {shift_reg_sync[3:0], tx_data2};
end
// reconvergence point (depth 1)
always @ (posedge rx_clk) begin
rx1 <= two_dff_sync;
rx2 <= shift_reg_sync[7:4];
dout <= rx1 - rx2;
end
shift_reg_sync[3:0]
[7:4]
shift_reg_sync[7:4] rx2
in1 tx_data1 shift register
reconvergence point
rx_clk
tx_clk
temp two_dff_sync rx1 dout
–
in2 tx_data2 DFF DFF
Cautions
=================================================================
Reconvergence of synchronizers. (reconvergence)
-----------------------------------------------------------------
rx_clk : end : dout (test4.v : 5) (ID:reconvergence_78116)
rx_clk : start : shift_reg_sync (test4.v : 10)
(Synchronizer ID:bus_shift_reg_96629)
(Reconvergence Severity:Caution)
rx_clk : start : two_dff_sync (test4.v : 9)
(Synchronizer ID:bus_two_dff_9116)
(Reconvergence Severity:Caution)
redundant
REDUNDANT: Redundant synchronization.
rx_sig1
synchronizer
tx_sig
rx_clk
tx_clk
synchronizer rx_sig2
Redundant synchronizers are multiple synchronizers in the same clock domain that synchronize
the same CDC signal. The values of the rx_sig1 and rx_sig2 signals might not match, because
of metastability. If these separately synchronized signals are in the fan-in of the same flip-flop,
then a reconvergence problem might exist. But, even if they are not, redundant synchronizers
create extra logic that can be eliminated by splitting the signals after they are synchronized.
Crossing Type
multiple control signals or data buses
Default Severity
caution
Promoted Checker
none
Example
1. Following is an example to disable reporting of redundant synchronizers on *_en
signals:
cdc crossing off -from *_en
redundantly synchronized
signals
tx_clk rx_clk
DFF twc_dff.s0 DFF two_dff.s1
Violations
=================================================================
Redundant synchronization. (redundant)
-----------------------------------------------------------------
tx_clk: start: tx_sig (redundant.v: 4) (ID:redundant_87696)
rx_clk: end: shift_reg.sh_reg (redundant.v : 20)
(Synchronizer ID:shift_reg_71323)
rx_clk: end: two_dff.s1 (redundant.v: 12)
(Synchronizer ID:two_dff_17946)
series_redundant
SERIES REDUNDANT: Custom synchronizers connected in series.
Tx synchronizer Rx synchronizer
tx_sig rx_sig
custom custom
synchronizer synchronizer
tx_clk rx_clk
CDC analysis does not report custom synchronizers in series as series redundant if one of the
synchronizers’ ports is specified as asynchronous. However, series redundant synchronizers are
reported even if they are not used in a clock domain crossing. Use the
-print_detailed_custom_sync CDC preference to report custom synchronizers that are not used
in a clock domain crossing. Series-redundant synchronizers do not indicate CDC problems, but
they do indicate a waste of logic and power consumption.
Note
Series redundant scheme detection is off by default. Use cdc preference
-series_redundant_scheme to turn on detection of this scheme.
Crossing Type
multiple control signals or data buses
Default Severity
caution
Promoted Checker
none
Examples
1. Following is an example to disable reporting of series redundant synchronizers on *_en
signals from the tx_clk domain:
cdc crossing off -from *_en
rx_clk
tx_clk
shift_reg
SHIFT REG: Shift-register synchronization.
tx_sig rx_sig
shift register
tx_clk rx_clk
Tx Clock Domain Rx Clock Domain
Crossing Type
1-bit signal
Default Severity
evaluation
Promoted Checker
cdc_sync
Examples
1. Following is an example to turn severity to caution:
cdc report scheme shift_reg –severity caution
3. Example promoted transfer protocol checker for shift_reg synchronization scheme (in
cdc_checker.rpt):
Type/Name : cdc_sync dut.shift_reg_99229
Checkerware Instance : cdc_dut_c9d7a0_dut_inst_0.U0.U0
Description : Ensures that a clock domain crossing signal
from a faster clock to a slower clock is
held stable long enough for the signal to be
sampled reliably by the receiver.
Message : <None>
Location : File .../cdc_shift_reg/shift_reg.v, Line 10
Directive : cdc_sync
-tx_var tx_sig
-tx_clock tx_clk
-tx_min 2
-reference shift_reg_99229
-name shift_reg_99229
-module dut
-inferred
Module : dut
Check stable : On <Default On>
-tx_var : tx_sig
-tx_clock : tx_clk
-tx_reset : 1'b0
-active : 1'b1
-areset : 1'b0
-support : 1'b0
-nv : 1'b1
-TX_MIN : 2
-name : shift_reg_99229
Checker Class : CDC
Checker Internal
tx_clk rx_clk
Evaluations
=============================================================
Shift-register synchronization. (shift_reg)
-----------------------------------------------------------------
tx_clk : start : tx_sig (shift_reg.v : 10)
rx_clk : end : shift_reg.shift_reg_sync[1] (shift_reg.v : 19)
(ID:shift_reg_99229)
simple_dmux
SIMPLE_DMUX: Simple MUX enable.
tx_clk
tx_sel
DFF DFF
rx_sel
tx_clk rx_clk
The simple DMUX scheme is a restricted version of the general DMUX scheme. For the
general scheme, the fanin logic of the Rx signal can contain any logic and the synchronized
control signal can use any logic to turn off the Tx signal (not just a MUX). The control signal
can be synchronized by any of the following signal synchronizers: two_dff_phase,
dff_sync_gated_clk, four_latch. shift_reg, two_dff, pulse_sync and custom.
Note
The physical design of the MUX logic (that controls the path from the Tx register to the
Rx registers) must not allow glitches at the input to an Rx register when the Tx register
changes value.
Crossing Type
synchronized control signal and muxed data bus
Default Severity
caution
Promoted Checker
cdc_dsel
Examples
1. Following is an example to turn severity to evaluation:
cdc report scheme simple_dmux -severity evaluation
Cautions
=============================================================
Simple DMUX synchronization. (simple_dmux)
-----------------------------------------------------------------
tx_clk : start : tx_data (simple_dmux.v : 9)
rx_clk : end : rx_data (simple_dmux.v : 6) (ID:simple_dmux_44768)
Synchronizer ID : two_dff_44468
single_source_reconvergence
SSR: Single-source reconvergence of synchronizers.
single source reconverging signals
tx/rx_clk
clk
Reconvergence occurs when the fan-in of a flip-flop includes two separately synchronized CDC
signals from a different clock domain. Single-source reconvergence is the special case where
reconverging signals in the receive domain originate from the same signal in the transmit
domain. Reconvergent signals might result in synchronization problems, but large designs can
have large numbers of reconvergence paths. Single-source reconvergence paths are more likely
to cause design problems than reconvergence paths from unrelated sources, so they can be given
a higher priority when resolving issues of reconvergence.
Static CDC analysis reports single-source reconvergence paths as both reconvergence violations
and SSR violations. The cdc preference reconvergence directive adjusts two parameters used to
determine how extensive static CDC analysis of reconvergence paths should be:
• depth
Maximum number of sequential levels in the receive domain from the synchronizers to
the reconverging paths. The depth is used to limit analysis of reconverging paths (both
single-source and separate-source).
• divergence depth
Maximum number of sequential levels in the transmit domain from the flip-flops driving
the synchronizers backwards to the single source. The depth is used to limit analysis of
single-source reconverging paths.
By default, instances of single-source reconvergence are reported only as instances of the
reconvergence scheme. Specifying cdc preference reconvergence -divergence_depth <depth>
enables SSR reporting for matching divergence/reconvergence paths (a divergence_depth of 0
turns on single-source reconvergence reporting from divergence points with no sequential levels
before the synchronizers).
Crossing Type
multiple control signals or data buses
Default Severity
violation
Promoted Checker
cdc_hamming1 (if enabled, see cdc preference).
Examples
1. Following is an example to disable reporting of single-source reconvergence points
originating in the tx_clk domain:
cdc crossing off -scheme single_source_reconvergence \
-tx_clock tx_clk
2
0
3 1 synchronizer
2
0
1 synchronizer
synchronizer
synchronizer
The following code shows the divergence and reconvergence points and the two
synchronizers on the reconverging paths.
// divergence point
always @ (posedge tx_clk)
ctrl <= ci0 | ci1 ;
// two_dff synchronizer
always @ (posedge rx_clk) begin: two_dff
reg temp;
temp <= ctrl;
two_dff_sync <= temp;
end
// shift_reg synchronizer
always @ (posedge rx_clk) begin: shift_reg
shift_reg_sync <= {shift_reg_sync[0], ctrl};
end
// reconvergence point
always @ (posedge rx_clk)
dout <= two_dff_sync ^ shift_reg_sync[1];
tx_clk rx_clk
The following code shows the divergence and reconvergence points and the two
synchronizers on the reconverging paths.
// divergence point
always @ (posedge tx_clk) begin
diverge <= diverge + 1; // 1 level to sync
tx_data1 <= din + diverge; // 0 levels to sync
tx_data2 <= ~diverge; // 0 levels to sync
end
// two_dff synchronizer
always @ (posedge rx_clk) begin: two_dff
reg [3:0] temp;
temp <= tx_data1;
two_dff_sync <= temp;
end
// bus_shift_reg synchronizer
always @ (posedge rx_clk) begin: shift_reg
shift_reg_sync <= {shift_reg_sync[3:0], tx_data2};
end
// reconvergence point
always @ ( posedge rx_clk )
dout <= two_dff_sync - shift_reg_sync[7:4];
din +
tx_data1 two_dff_sync
DFF DFF
divergence depth = 1
two_dff
TWO DFF SYNCHRONIZER: Single-bit signal synchronized by DFF synchronizer.
tx_sig rx_sig
DFF DFF
tx_clk rx_clk
Tx Clock Domain Rx Clock Domain
Crossing Type
1-bit signal
Default Severity
evaluation
Promoted Checker
cdc_sync
Examples
1. Following is an example to turn severity to caution:
cdc report scheme two_dff –severity caution
3. Example promoted transfer protocol checker for the two_dff synchronization scheme (in
cdc_checker.rpt):
Type/Name : cdc_sync dut.two_dff_32868
Checkerware Instance : cdc_dut_c9d7a0_dut_inst_0.U0.U0
Description : Ensures that a clock domain crossing signal
from a faster clock to a slower clock is
held stable long enough for the signal to be
sampled reliably by the receiver.
Message : <None>
Location : File .../two_dff.v, Line 9
Directive : cdc_sync
-tx_var tx_sig
-tx_clock tx_clk
-tx_min 2
-reference two_dff_32868
-name two_dff_32868
-module dut
-inferred
Module : dut
Check stable : On <Default On>
-tx_var : tx_sig
-tx_clock : tx_clk
-tx_reset : 1'b0
-active : 1'b1
-areset : rst
-support : 1'b0
-nv : 1'b1
-TX_MIN : 2
-name : two_dff_32868
Checker Class : CDC
Checker Internal
Evaluations
=================================================================
Single-bit signal synchronized by DFF synchronizer. (two_dff)
-----------------------------------------------------------------
tx_clk : start : tx_sig (two_dff.v : 9)
rx_clk : end : s0 (two_dff.v : 10) (ID:two_dff_32868)
tx_clk rx_clk
Evaluations
=============================================================
Single-bit signal synchronized by DFF synchronizer. (two_dff)
-----------------------------------------------------------------
tx_clk : start : tx_sig (two_dff.v : 9)
rx_clk : end : s0 (two_dff.v : 10) (ID:two_dff_32868)
Notes
If you use a DFF synchronization scheme that has more than two flip-flops, then you can get
CDC analysis to recognize the scheme by specifying a cdc synchronizer directive. For example,
the following CDC directive identifies 4 DFF synchronizers as valid “two_dff” schemes for
CDC paths from the tx_clk domain to the rx_clk domain:
two_dff_phase
TWO DFF SYNCHRONIZER OPPOSITE POLARITY: Single-bit signal synchronized by DFF
of opposite clock polarity.
tx_sig rx_sig
DFF DFF
tx_clk rx_clk
Tx Clock Domain Rx Clock Domain
Synchronization using two opposite polarity flip-flops has a reduced time for rx_sig to settle.
When using this synchronization scheme, be sure the MTBF is acceptable.
Crossing Type
1-bit signal
Default Severity
caution
Promoted Checker
cdc_sync
Example
1. Following is an example to turn severity to caution:
cdc report scheme two_dff_phase -severity caution
2. 2DFF phase synchronizer has one FF clocked by a clock with the opposite polarity of
the Rx clock:
always @(negedge rx_clk)
tx_sig sync1 sync2
sync1 <= tx_sig; // 1st FF
always @(posedge rx_clk)
sync2 <= sync1; // 2nd FF tx_clk rx_clk
Cautions
=============================================================
Single-bit signal synchronized by DFF of opposite clock polarity.
(two_dff_phase)
-----------------------------------------------------------------
tx_clk : start : tx_sig (two_dff_phase.v : 9)
rx_clk : end : s0 (two_dff_phase.v : 10)
(ID:two_dff_phase_42446)
Protocol/FX Checkers
Each checker type has a data sheet that provides the specification for checkers of that type. Data
sheets contain the following information:
• Symbolic Representation
Symbolic representation of a generic checker of that type.
• Description
Description of the properties checked by checkers of the checker type.
• Syntax
Syntax statement for the checker directive.
• Corner Cases
Names of the corner case counts maintained by the checker.
• Statistics
Names of statistics maintained by these checkers, with explanations of each. One
statistic is designated as the evaluation statistic (evals), which typically corresponds to
the number of times the checker evaluated.
• Notes
Notes describing any special features or requirements of these checkers.
• Examples
Examples of directives and checker applications.
Standard Options
One group of options (Table 5-3) is included in every syntax statement (except for certain
special checker types that do not support some of the options). These options are called
standard options and are indicated in syntax statements as:
[standard_option…]
These options are universal—they have the same meaning for each checker type.
cdc_dsel
default name:
active tx_data_var_tx_data_var
tx_clock tx_data_stable_fire
rx_data_stable_fire firings
checks:
tx_reset
tx_data_select tx_min_fire tx_data_stable (On)
signals rx_data_stable (On)
rx_clock
rx_reset corner tx_min (On)
asserted_for_tx_min cases
rx_data_select
dsel tx_clock, tx_reset, areset:
inferable from
transfers_checked evals tx_data_variable
tx_data longest_assertion
variables
rx_data shortest_assertion statistics rx_clock, rx_reset:
constants tx_min longest_receive_period
shortest_receive_period
inferable from
areset rx_data_variable
vacuity property:
!tx_reset && !rx_reset &&
!areset && active &&
tx_dsel_signal === 0
Description
Ensures that a signal between two clock domains, where the transmitter’s data select signal
drives the select input of a data multiplexor in the receiver, is held stable enough for the signal
to be sampled reliably by the receiver and ensures that the data remains stable while the data
select signal asserts.
Syntax
[<] {cdc_dsel | dsel}
-tx_data tx_data_variable -rx_data rx_data_variable
{-tx_data_select tx_dsel_signal | -tx_data_stable off}
{-rx_data_select rx_dsel_signal | -rx_data_stable off}
[-tx_min tx_min_constant | -tx_min_check off ]
[-tx_clock tx_clock] [-tx_reset tx_reset ] [-rx_clock rx_clock] [-rx_reset rx_reset]
[-assume [all | {txdata | rxdata | txdsel}…]] [standard_option…]
Required Arguments
• -tx_data tx_data_variable
Variable with the transmit data in the transmit clock domain.
• -rx_data rx_data_variable
Variable with the receive data in the receive clock domain.
Inferable Options
• [-tx_clock tx_clock] [-tx_reset tx_reset]
Transmit clock and synchronous reset. If unspecified, each is inferable from
tx_data_variable.
• [-rx_clock rx_clock] [-rx_reset rx_reset]
Receive clock and synchronous reset. If unspecified, each is inferable from
rx_data_variable.
Checks and Related Options
• Tx_data_stable check, default On
{-tx_data_select tx_dsel_signal | -tx_data_stable off}
The tx_data_variable value must not change while the data select signal tx_dsel_signal
asserts in the transmit clock domain. This check requires tx_dsel_signal. This check occurs
at the active transmit clock edge. The checker fires each time tx_data_variable improperly
changes. The -tx_data_stable off option turns off this check.
Firing message: ’tx_data_variable’ changed from last_tx_data to current_tx_data in the
data transfer window.
• Rx_data_stable check, default On
{-rx_data_select rx_dsel_signal | -rx_data_stable off}
The rx_data_variable value must not change while the data select signal rx_dsel_signal
asserts in the receive clock domain. This check requires rx_dsel_signal. This check occurs
at the active receive clock edge. The checker fires each time rx_data_variable improperly
changes. The -rx_data_stable off option turns off this check.
Firing message: ’rx_data_variable’ changed from last_rx_data to current_rx_data in the
data transfer window.
• Tx_min check, default On
[-tx_min tx_min_constant | -tx_min_check off ]
The tx_dsel_signal signal must not assert for fewer than tx_min_constant cycles of the
transmit clock. This check requires tx_dsel_signal. This check occurs at the active transmit
clock edge. The checker fires each time tx_dsel_signal improperly deasserts. The
-tx_min_check off option turns off this check. If -tx_min is unspecified, the default
tx_min_constant is 2.
Firing message: ’tx_dsel_signal’ was asserted for number cycles, but the specified
minimum assertion time is tx_min cycles.
Other Options
• [-assume [all {txdata | rxdata | txdsel}…]]
Sets the following checks to formal assumptions:
o all (default) — all enabled checks
o txdata — tx_data_stable
o rxdata — rx_data_stable
o txdsel — tx_min
Corner Cases
• Asserted for ’tx_min’ Cycles — number of times tx_dsel_signal asserted for exactly
tx_min_constant cycles. Reported only if the tx_min check is enabled.
Statistics
• Transfers Checked (Evals) — number of data transfers checked.
• Longest Assertion — maximum number of transmit clock cycles tx_dsel_signal remained
active.
• Shortest Assertion — minimum number of transmit clock cycles tx_dsel_signal remained
active.
• Longest Receive Period— maximum number of receive clock cycles tx_dsel_signal
remained active.
• Shortest Receive Period — minimum number of receive clock cycles tx_dsel_signal
remained active.
Notes
The following block diagram shows a typical implementation of a cdc_dsel checker:
TX Module RX Module
tx_dsel rx_dsel
tx_data_select SYNC
cdc_dsel
checker rx_data
MUX
tx_data
tx_data
1. This is a dual-clock checker, in which the transmit data are based upon -tx_clock
tx_clock (inferable from -tx_data tx_data_variable) and the receive data are based on -
rx_clock rx_clock (inferable from -rx_data rx_data_variable). The standard -clock
option should not be specified.
2. Asynchronous reset for this checker can be specified using the standard -areset option. If
this option is not specified, then the asynchronous reset is inferred from -tx_data
tx_data_variable. In either case, the reset applies to the entire checker, including logic
on both clocks.
3. This checker is synchronous with respect to each clock, so it responds only to behavior
that is observable at the active edge of the transmit or receive clock.
Examples
/* 0in cdc_dsel -tx_data tx_data -rx_data rx_data -tx_min 3
-rx_data_stable_off -tx_data_select tx_dsel
-tx_min_fire tx_min_fire */
Checks that tx_dsel does not assert for fewer than 3 cycles of the transmitting domain
clock.
tx_clk
tx_dsel
tx_min_fire
Checks that the value of tx_data does not change while tx_dsel asserts.
tx_clk
tx_data AF FF
tx_dsel
tx_data_stable_fire
Checks that the value of rx_data does not change while rx_dsel asserts.
rx_clk
tx_clk
tx_data AF 00 FF
rx_dsel
tx_data_stable_fire
cdc_fifo
default name:
active wr_ptr_fire enq_var_deq_var
tx_clock rd_ptr_fire
firings
tx_reset enqueue_fire checks:
enq dequeue_fire wr_ptr (On)
signals
rx_clock rd_ptr (On)
rx_reset full_count corner
deq empty_count cases enqueue (On)
cdcf dequeue (On)
enqueues_and_dequeues evals
wr_ptr
variables enqueues tx_clock, tx_reset, areset:
rd_ptr
dequeues statistics
maximum_fifo_entries
inferable from enq_signal
constants depth
current_fifo_entries rx_clock, rx_reset:
areset inferable from deq_signal
vacuity property:
!tx_reset && !rx_reset &&
!areset && active &&
enq_signal === 0
Description
Ensures that the write and read pointers of an asynchronous FIFO change by hamming distance
one, and ensures that the FIFO does not overflow or underflow.
Syntax
[<] {cdc_fifo | cdcf}
-enq enq_signal -deq deq_signal -depth depth_constant
[-tx_clock tx_clock] [-tx_reset tx_reset] [-rx_clock rx_clock] [-rx_reset rx_reset]
{-wr_ptr write_pointer_variable | -wr_ptr_check off}
{-rd_ptr read_pointer_variable | -rd_ptr_check off}
[-enqueue off] [-dequeue off] [-assume [all | {wptr | rptr | ptr | enq | deq}…]]
[standard_option…]
Required Arguments
• -enq enq_signal
FIFO enqueue signal. This signal indicates that the current FIFO entries should increase by
one.
• -deq deq_signal
FIFO dequeue signal. This signal indicates that the current FIFO entries should decrease by
one.
• -depth depth_constant
FIFO depth, where depth_constant is an HDL constant. The depth must be greater than 1.
Inferable Options
• [-tx_clock tx_clock] [-tx_reset tx_reset]
Transmit clock and synchronous reset. If unspecified, each is inferable from enq_signal.
• [-rx_clock rx_clock] [-rx_reset rx_reset]
Receive clock and synchronous reset. If unspecified, each is inferable from deq_signal.
Checks and Related Options
• Wr_ptr check, default On
{-wr_ptr write_pointer_variable | -wr_ptr_check off}
When the value of write_pointer_variable changes, the hamming distance between the
previous and the new values must be 1. This check occurs at the active transmit clock edge.
The checker fires each time write_pointer_variable improperly changes. The -wr_ptr_check
off option disables this check.
Firing message: The value (write_pointer) has a distance more than one from the previous
value (previous_write_pointer).
• Rd_ptr check, default On
{-rd_ptr read_pointer_variable | -rd_ptr_check off}
When the value of read_pointer_variable changes, the hamming distance between the
previous and the new values must be 1. This check occurs at the active receive clock edge.
The checker fires each time read_pointer_variable improperly changes. The -rd_ptr_check
off option disables this check.
Firing message: The value (read_pointer) has a distance more than one from the previous
value (previous_read_pointer).
• Enqueue check, default On
[-enqueue off]
An enqueue should not occur while the FIFO is full. This check occurs at the active transmit
clock edge. The checker fires each time the FIFO improperly enqueues. The -enqueue off
option disables this check.
Firing message: An enqueue occurred while the FIFO was full.
• Dequeue check, default On
[-dequeue off]
A dequeue should not occur while the FIFO is empty. This check occurs at the active
receive clock edge. The checker fires each time the FIFO improperly dequeues. The
-dequeue off option disables this check.
Firing message: A dequeue occurred while the FIFO was empty.
Other Options
• [-assume [all | {wptr | rptr | ptr | enq | deq}…]]
Sets the following checks to formal assumptions:
o default — enqueue, dequeue
o all — all enabled checks
o wptr — wr_ptr
o rptr — rd_ptr
o ptr — wr_ptr, rd_ptr
o enq — enqueue
o deq — dequeue
Corner Cases
• FIFO Is Full — number of times the FIFO was full.
• FIFO Is Empty — number of times the FIFO was empty.
Statistics
• Enqueues and Dequeues (Evals) — number of times the FIFO enqueued or dequeued a
value.
• Enqueues — number of times the FIFO enqueued a value.
• Dequeues — number of times the FIFO dequeued a value.
• Maximum FIFO Entries — maximum number of values held in the FIFO at one time.
• Current FIFO Entries* — number of values currently held in the FIFO.
* Cannot accumulate across multiple simulations.
Notes
The following block diagram shows a typical implementation of a cdc_fifo checker:
TX Module RX Module
cdc_fifo
checker
1. This is a dual-clock checker, in which the transmit data are based upon -tx_clock
tx_clock (inferable from -enq enq_signal) and the receive data are based on -rx_clock
rx_clock (inferable from -deq deq_signal). The standard -clock option should not be
specified.
2. Asynchronous reset for this checker can be specified using the standard -areset option. If
this option is not specified, then the asynchronous reset is inferred from -enq
enq_signal. In either case, the reset applies to the entire checker, including logic on both
clocks.
3. This checker is synchronous with respect to each clock, so it responds only to behavior
that is observable at the active edge of the transmit or receive clock.
Examples
/* 0in cdc_fifo -enq enq -deq deq -depth 8
-wr_ptr_check off -rd_ptr_check off
-enq_fire enq_fire */
Checks that the values of write_ptr and read_ptr do not change by more than a
hamming distance of 1.
rx_clk
tx_clk
write_ptr 3 5
enq
write_ptr_fire
rx_clk
tx_clk
read_ptr 5 3 4
deq
read_ptr_fire
cdc_glitch
default name:
active var_signal
signals var cdc_glitch_fire firings
checks:
cglt glitch (On)
flags used
cycles_checked evals statistics
clock, reset, areset:
clock reset areset inferable from var_signal
vacuity property:
!reset && !areset && active
=== 0
Description
Ensures that the input signal to a specified register does not change more than once within a
clock period.
Syntax
[<] {cdc_glitch | cglt}
[-var var_signal] [-glitch off] [-used] [-clock signal] [-reset signal] [-areset signal]
[standard_option…]
Inferable Options
• [-var var_signal]
Register driven by the signal to be checked. If unspecified, it is inferred from the declaration
or assignment in the most recent HDL statement on the same line as the beginning of the
0-In comment.
Checks and Related Options
• Glitch check, default On
[-glitch off]
The value driving the var_signal register should not change more than once in a clock cycle.
The active edges of the clock input define checking windows for this check (each active
clock edge marks the beginning of a new clock cycle window). The checker monitors the
wire driving var_signal combinationally and fires if var_signal changes value two or more
times in a window (indicating a signal glitch). The firing output asserts at the start of the
next cycle and is held asserted for the duration of the clock cycle.
Firing message: The input signal to the specified register changed more than once within
the clock period.
Other Options
• [-used]
The checker fires only if var_signal is used (that is, loaded into a destination register).
Statistics
• Cycles Checked (Evals) — number of cycles checked (i.e., the number of cycles that the
signal driving var_signal changed value at least once).
Notes
1. This is an asynchronous checker that responds to combinational behavior. The clock
signal’s active edges are used to define time windows for the checker’s glitch detection
logic.
2. Whereas the glitch checker checks for glitches on the specified -var signal, the
cdc_glitch checker infers the driving logic to the specified -var register and checks for
glitches on the inferred driving signal (connected to the var_d port of the cdc_glitch
checker).
inferred
connection
var_d
cdc_glitch //0in cdc_glitch -var var
checker checks
for glitch on var_d var
Examples
// 0in cdc_glitch -var reg
Checks that the input (var_d) to the reg register does not glitch.
clk
var_d
glitch
glitch_fire
cdc_hamming_distance_one
default name:
active hamming_one_fire tx_variable
firings
tx_clock stable_fire
signals corner checks:
tx_reset value_changed_at_tx_min cases
hamming_one (On)
cdc_hamming1
variables tx_var values_checked evals
data_stable (Off)
constants tx_min lontgest_stable_time statistics tx_clock,tx_reset, areset:
shortest_stable_time
areset inferable from tx_variable
vacuity property:
!tx_reset && !areset &&
active === 0
Description
Ensures that the data crossing from transmit clock to receive clock domain changes by only one
hamming distance and that it remains stable for a specified tx_min clock cycles.
Syntax
[<] {cdc_hamming_distance_one | cdc_hamming1}
[-tx_var tx_variable] [-tx_clock tx_clock] [-tx_reset tx_reset ]
[-tx_min tx_min_constant] [-hamming_one off] [-assume [all | {dist | stable}…]]
[standard_option…]
Inferable Options
• [-tx_var tx_variable]
Variable with the transmit data in the transmit clock domain. If unspecified, it is inferred
from the declaration or assignment in the most recent HDL statement on the same line as the
beginning of the 0-In comment.
• [-tx_clock tx_clock][-tx_reset tx_reset]
Transmit clock and synchronous reset. If unspecified, each is inferable from tx_variable.
Checks and Related Options
• Hamming_one check, default On
[-hamming_one off]
The transmit data should only change by a hamming distance of 1. This check occurs at the
active transmit clock edge whenever the value of tx_variable changes. The checker fires
each time the hamming distance between the previous and the new tx_variable value is
greater than 1. The -hamming_one off option disables this check.
Firing message: The value (tx_variable_value) has a distance more than one from the
previous value (previous_tx_variable_value).
Examples
/* 0in cdc_hamming_distance_one -tx_var tx_var
-hamming_one_fire hamming_one_fire */
tx_clk
hamming_one_fire
Checks that each time the value of tx_var changes, the data remains stable for at least
3 cycles of the transmit domain clock.
rx_clk
tx_clk
stable_fire
cdc_handshake_data
default name:
active
tx_invalid_handshake_fire tx_valid_sig_tx_done_si
rx_invalid_handshake_fire g
data_stable_fire checks:
tx_valid_assert_until_done_assert_fire
cdc_handshake (On)
tx_done_assert_until_valid_deassert_fire
data_stable (On)
tx_valid_deassert_until_done_deassert_fire
firings tx_valid_assert_until_tx_
rx_valid_assert_until_done_assert_fire
done_assert (On)
rx_done_assert_until_valid_deassert_fire
tx_valid_stable_fire
tx_done_assert_until_tx_
tx_clock
rx_done_stable_fire
valid_deassert (On)
tx_reset
turnaround_max_fire
tx_valid_deassert_until_t
tx_valid
signals turnaround_min_fire
x
tx_done
rx_clock
_done_deassert (On)
cdc_hsd rx_valid_assert_until_rx_
rx_reset
rx_valid
done_assert (On)
turnaround_at_max corner rx_done_assert_until_rx_
rx_done turnaround_at_min cases
valid_deassert (On)
tx_valid_stable (Off)
variables
tx_data handshake_cycles_started evals rx_done_stable (Off)
handshake_cycles_compeleted statistics turnaround_max (Off)
handshake_turnaround_time_max turnaround_min (Off)
tx_min handshake_turnaround_time_min
constants rx_min clock, reset, areset:
turnaround_max inferable from
turnaround_min tx_valid_signal
areset vacuity property:
!tx_reset && !rx_reset
&&
!areset && active &&
tx_valid_signal === 0
Description
Ensures that the handshaking protocol between transmitter and receiver is correctly followed,
and ensures that the transmit data remains stable in data transfer window.
Syntax
[<] {cdc_handshake_data | cdc_hsd}
[-tx_data tx_data_variable] [-tx_clock tx_clock] [-tx_reset tx_reset]
[-rx_clock rx_clock] [-rx_reset rx_reset] [-tx_valid tx_valid_signal]
[-tx_min tx_min_constant] [-rx_min rx_min_constant]
[-turnaround_max turnaround_max_constant][-turnaround_min turnaround_min_constant]
[-cdc_handshake off] [-data_stable off] [-tx_valid_assert_until_tx_done_assert off]
[-tx_done_assert_until_tx_valid_deassert off]
[-tx_valid_deassert_until_tx_done_deassert off]
Each data handshake protocol cycle must not complete in more than
turnaround_max_constant transmit clock cycles. This check requires tx_data_variable,
tx_valid_signal, tx_done_signal, rx_valid_signal and rx_done_signal and is turned on by
the -turnaround_max turnaround_max_constant option. This check occurs at the active
transmit clock edge. The checker fires each cycle the data transfer lasts more than
turnaround_min_constant transmit clock cycles.
Firing message: Data transfer handshake cycle completed in number_of_cycles cycles, but
the specified maximum turnaround time is turnaround_max cycles.
Other Options
• [-tx_done tx_done_signal]
Signal that indicates data transmission is complete. This signal is required for the
cdc_handshake, data_stable, tx and turnaround checks.
• [-rx_valid rx_valid_signal]
Signal that indicates the receive data in the receive clock domain is valid. This signal is used
with the cdc_handshake, data_stable, rx and turnaround checks.
• [-rx_done rx_done_signal]
Signal that indicates data reception is complete. This signal is required for the
cdc_handshake, data_stable, rx and turnaround checks.
Note
Important: If the rx_valid and rx_done signals are not available, you must turn off the
cdc_handshake, rx_valid_assert_until_rx_done_assert and
rx_done_assert_until_rx_valid_deassert checks.
Corner Cases
• Turnaround Cycles Completed at ’turnaround_max’— number of times a data transfer
completed in exactly turnaround_max_constant transmit clock cycles.
• Turnaround Cycles Completed at ’turnaround_min’— number of times a data transfer
completed in exactly turnaround_max_constant transmit clock cycles.
Statistics
• Total Tx_valid (Evals) — number of times tx_valid_signal was asserted, starting a new data
transfer cycle.
• Total Turnaround Cycles — number of data transfer cycles completed.
• Maximum Turnaround Cycles — maximum number of transmit clock cycles taken for a
complete data transfer cycle.
• Minimum Turnaround Cycles — minimum number of transmit clock cycles taken for a
complete data transfer cycle.
Notes
The following block diagram shows a typical implementation of a cdc_handshake_data
checker:
cdc_handshake_data
TX Module checker RX Module
1. This is a dual-clock checker, in which the transmit data are based upon -tx_clock
tx_clock (inferable from -tx_valid tx_valid_signal) and the receive data are based on
-rx_clock rx_clock (inferable from -rx_done rx_done_signal). The standard -clock
option should not be specified.
2. Asynchronous reset for this checker can be specified using the standard -areset option. If
this option is not specified, then the asynchronous reset is inferred from -tx_valid
tx_valid_signal. In either case, the reset applies to the entire checker, including logic on
both clocks.
3. This checker is synchronous with respect to each clock, so it responds only to behavior
that is observable at the active edge of the transmit or receive clock.
Examples
/* 0in cdc_handshake_data -tx_data tx_data
-tx_valid tx_valid -tx_done tx_done
-rx_valid rx_valid -rx_done rx_done
-tx_invalid_handshake_fire tih_fire
-rx_invalid_handshake_fire rih_fire
-data_stable_fire ds_fire*/
Checks that the handshake protocol between transmitter and receiver is correctly
followed and the value of tx_data remains unchanged during the data transfer.
Checks that the handshaking protocol between the transmit and receive valid/done
signal pairs is obeyed for each data transfer window.
rx_clk
tx_clk
tx_valid
tx_done
tvauda_fire
rx_clk
tx_clk
tx_valid
tx_done
tdauvd_fire
rx_clk
tx_clk
tx_valid
tx_done
tvdudd_fire
rx_clk
tx_clk
rx_valid
rx_done
rvauda_fire
rx_clk
tx_clk
rx_valid
rx_done
rdauvd_fire
/* 0in cdc_handshake_data
-tx_valid tx_valid -tx_min 5 -rx_done rx_done -rx_min3
-cdc_handshake off -data_stable off
-tx_valid_assert_until_done_assert_fire off
-tx_done_assert_until_valid_deassert_fire off
-tx_valid_deassert_until_done_deassert_fire off
-rx_valid_assert_until_done_assert_fire off
-rx_done_assert_until_valid_deassert_fire off
-tx_valid_stable_fire tvs_fire
-rx_done_stable_fire rds_fire */
Checks that tx_valid is held constant for at least 4 transmit clock cycles and that
rx_done is held constant for at least 2 receive clock cycles.
rx_clk
tx_clk
tx_valid
rx_done
tvs_fire
rds_fire
Checks that the handshake protocol between transmitter and receiver is correctly
followed and the value of tx_data remains unchanged during the data transfer. Also
checks that the handshaking protocol between the transmit and receive valid/done
signal pairs is obeyed for each data transfer window. Also checks that every data
transfer cycle lasts at least 10, but no more than 16, transmit clock cycles.
cdc_sample
default name:
active setup_fire tx_var_rx_var
firings
hold_fire
tx_clock all_one checks:
tx_reset all_zero setup (On)
signals corner
rx_clock cases
rx_reset
all_zero_to_one hold (On)
all_one_to_zero
sample tx_clock, tx_reset, areset:
values_sampled evals
tx_var sample_zero_bitmap inferable from tx_variable
variables sample_one_bitmap statistics
rx_var rx_clock, rx_reset:
one_to_zero_transition_bitmap
zero_to_one_transition_bitmap inferable from rx_variable
areset
vacuity property:
!tx_reset && !rx_reset &&
!areset && active &&
rx_enable_signal === 0
Description
Ensures that transmit data between two clock domains remain stable in the following intervals:
• From one rx_clock cycle before, to one rx_clock cycle after being sampled (in the
rx_clock domain).
• From one tx_clock cycle before, to one tx_clock cycle after being sampled (in the
rx_clock domain).
That is: the receive domain should sample at least twice for each transmit signal so that the
correct value is sampled.
Syntax
[<] {cdc_sample | sample}
-tx_var tx_variable -rx_var rx_variable [-tx_clock tx_clock] [-tx_reset tx_reset]
[-rx_clock rx_clock] [-rx_reset rx_reset] [-setup off] [-hold off] [-assume]
[standard_option…]
Required Arguments
• -tx_var tx_variable
Source variable in the transmit clock domain.
• -rx_var rx_variable
Destination variable in the receive clock domain.
Inferable Options
• [-tx_clock tx_clock] [-tx_reset tx_reset]
Transmit clock and synchronous reset. If unspecified, each is inferable from tx_variable.
• Sample One Bitmap — bit vector representing which bits of rx_variable were sampled
as 1.
• One to Zero Transition Bitmap — bit vector representing which bits of rx_variable were
sampled transitioning from 1 to 0.
• Zero to One Transition Bitmap — bit vector representing which bits of rx_variable were
sampled transitioning from 0 to 1.
If more than 32 bits are specified, the bitmaps are displayed as hexadecimal values.
Notes
The following block diagram shows a typical implementation of a cdc_sample checker:
1. This is a dual-clock checker, in which the transmit data are based upon -tx_clock
tx_clock and the receive data are based on -rx_clock rx_clock. The standard -clock
option should not be specified.
2. Asynchronous reset for this checker can be specified using the standard -areset option. If
this option is not specified, then the asynchronous reset is inferred from -tx_var
tx_variable. In either case, the reset applies to the entire checker, including logic on both
clocks.
3. The cdc_sample checker has an rx_enable port with an inferred connection to the
sampling condition used to sample tx_variable in the receive clock domain. If the
rx_enable connection cannot be inferred, the checker is excluded (directive-166
warning).
Examples
/* 0in cdc_sample
-tx_var tx_var -tx_clock tx_clk
-rx_var rx_var -rx_clock rx_clk
-setup_fire setup_fire -hold_fire hold_fire */
Checks that tx_var remains stable for the tx_clk cycle preceding, and for the tx_clk
cycle after, each rx_clk edge at which rx_var is sampled.
rx_clk
tx_clk
tx_var AA A5 C5
rx_enable
(inferred)
setup_fire
hold_fire
cdc_sync
default name:
active tx_variable
stable_fire firings
tx_var[n]* corner checks:
signals tx_clock value_changed_at_tx_min cases
stable (On)
tx_reset sync
values_checked evals tx_clock, tx_reset, areset:
constants tx_min shortest_stable_time statistics inferable from tx_variable
longest_stable_time
areset
vacuity property:
!tx_reset && !areset &&
active === 0
* one checker is instantiated for each tx_var bit
Description
Ensures that a clock domain crossing signal from a faster clock to a slower clock is held stable
long enough for the signal to be sampled reliably by the receiver.
Syntax
[<] {cdc_sync | sync}
[-tx_var tx_variable] [-tx_clock tx_clock] [-tx_reset tx_reset] [-stable off]
[-tx_min tx_min_constant] [-assume] [standard_option*…]
Inferable Options
• [-tx_var tx_variable]
Variable with the transmit data in the transmit clock domain. If unspecified, it is inferred
from the declaration or assignment in the most recent HDL statement on the same line as the
beginning of the 0-In comment.
• [-tx_clock tx_clock] [-tx_reset tx_reset]
Transmit clock and synchronous reset. If unspecified, each is inferable from tx_variable.
Checks and Related Options
• Stable check, default On
[-stable off]
The transmit data should remain stable for at least tx_min_constant cycles of the transmit
clock. This check occurs at the active transmit clock edge whenever the value of tx_variable
changes. The checker fires each time the value of tx_variable changes before
tx_min_constant cycles have elapsed. The -stable off option disables this check.
Firing message: ’tx_var’ changed after number_of_cycles cycles, but the specified
minimum time to remain constant is tx_min_constant cycles.
Other Options
• [-tx_min tx_min_constant]
Minimum number of transmit clock cycles that the value of tx_variable should remain
stable. Default: 2 cycles.
• [-assume]
Sets the stable check to a formal assumption, if it is on.
Corner Cases
• Value Changed at ’tx_min’ — number of times tx_variable changed at tx_min_constant
cycles. Reported only if the stable check is enabled.
Statistics
• Values Checked (Evals) — number of values checked.
• Longest Stable Time — most number of cycles tx_variable remained stable.
• Shortest Stable Time — fewest number of cycles tx_variable remained stable.
Notes
The following block diagram shows a typical implementation of a cdc_sync checker:
tx_var SYNC
(double ff)
tx_clk cdc_sync
checker
1. This is a dual-clock checker, in which the transmit data are based upon -tx_clock
tx_clock (inferable from -tx_var tx_variable) and the receive clock is unused. The
standard -clock option should not be specified.
2. Asynchronous reset for this checker can be specified using the standard -areset option. If
this option is not specified, then the asynchronous reset is inferred from -tx_var
tx_variable. In either case, the reset applies to the entire checker, including logic on both
clocks.
3. This checker is synchronous with respect to the transmit clock, so it responds only to
behavior that is observable at the active edge of the transmit clock.
Examples
/* 0in cdc_sync -tx_var tx_var
-tx_min 3 -stable_fire data_stable_fire */
Checks that each time the value of tx_var changes, the data remains stable for at least
3 cycles of the transmit domain clock.
rx_clk
tx_clk
tx_var 5 3 4
stable_fire
cdc_fx
default name:
active
cdc_fx_fire
rx_reg
glitch_swallowed_fire firings
checks:
cfx glitch_caught_fire
cdc_fx (Off)
signals all_bits_inverted corner
tx_clock cases
glitch_swallowed (Off)
loading_while_clocks_aligned glitch_caught (Off)
rx_clock
evals
rx_reset clocks_aligned_cycles
rx_areset
tx_clock, tx_reset, areset:
metastable_cycles
loading_while_rx_clock_before_tx_clock
inferable from rx_reg
loading_while_tx_clock_before_rx_clock vacuity property:
rx_clock_before_tx_clock
!tx_reset && !areset &&
tx_clock_before_rx_clock statistics
rx_load_enable
delayed_transitions
active === 0
clks_aligned[65:0] advanced_transitions
bits_inverted
inverted_bits_bitmap
rx_reg
tx_reg
rx_q
clocks
monitor rx_reg
value
tx_clock rx_clock
tx_reg rx_reg
Description
Injects metastability at the output of a receive register.
Syntax
[<] {cdc_fx | cfx}
-rx_reg rx_register_variable -tx_reg tx_register_variable
[-rx_clock rx_clock] [-tx_clock tx_clock] [-rx_reset rx_reset] [-rx_areset rx_areset]
[-rx_load_enable value] [-cdc_fx] [-glitch_caught] [-glitch_swallowed][standard_option…]
Required Arguments
• -rx_reg rx_register_variable
Receiving register in the receive clock domain.
• -tx_reg tx_register_variable
Transmitting register in the transmit clock domain. The tx_register_variable can be a
concatenation of source registers for the receiving register (for example, {tx_reg3, tx_reg2,
tx_reg1}).
Inferable Options
• -rx_clock rx_clock
Receive clock. If unspecified, then it is inferred from rx_register_variable.
• -tx_clock tx_clock
Transmit clock. If unspecified, then it is inferred from tx_register_variable.
• -rx_reset rx_reset
Receive synchronous reset. If unspecified, then it is inferred from rx_register_variable.
• -rx_areset rx_areset
Receive asynchronous reset. If unspecified, then it is inferred from rx_register_variable.
• -rx_load_enable value
Asserted when rx_reg is loaded with valid data. If unspecified, then it is inferred from
rx_register_variable.
Checks and Related Options
• cdc_fx Check, Default On for multi_bits, dmux, simple_dmux, multi_sync_mux_select,
handshake and no_sync
-cdc_fx
Ensures the data output of the transmitting register is stable in the receiving register’s
metastability window. Typically, the data output of the transmit register can change value in
the receive register’s metastability window. This change can cause metastability of the
receiving register’s output, but the circuit is hopefully tolerant of this effect. However, an ad
hoc synchronizer might presume the transmit logic prevents the transmitting register from
changing value in the receiving register’s metastability window. Therefore, the ad hoc
synchronizer logic assumes the receiving register cannot become metastable. In this case,
the cdc_fx check can be used to verify the transmit value is held stable whenever the
transmit/receive clocks are aligned. Here, the cdc_fx check is a transmit protocol check for
the ad hoc synchronizer.
This check fires when any of the bits in the receive register is metastable. Default: fx checks
are on for multi_bits, dmux, simple_dmux, multi_sync_mux_select, handshake and no_sync
schemes; fx checks are off for all other schemes.
Firing message: Data changed in metastability window.
• glitch_caught Check, Default Off
-glitch_caught
Ensures metastability injection does not cause a glitch at the rx_reg input to be reflected as a
pulse at the rx_reg output unless the glitch is also caught in simulation (see Figure 5-1 on
page 275). The check fires at the second active receive clock edge after the glitch. The
check reports a bitmap showing those rx_reg bits that had a glitch caught.
Firing message: Glitch detected at the receiver output. Glitched output bitmap:
glitch_caught_bitmap.
cdc_fx checker
rx_q
d q_sim
tx_reg rx_reg
tx_clock rx_clock
Glitch_caught Check
tx_clk
rx_clk
d glitch
metastability metastability
injected not injected
rx_q
q_sim
glitch_caught_fire
Glitch_swallowed Check
tx_clk
rx_clk
d glitch
metastability metastability
injected not injected
rx_q
q_sim
glitch_swallowed_fire
Corner Cases
• All Bits Inverted — nonzero if every output bit of the receive register has had metastability
inserted.
Statistics
• Clocks Aligned Cycles (Evals) — number of clocks aligned cycles in which
tx_register_variable is changing.
• Loading While Clocks Aligned — number of clocks aligned cycles in which
rx_register_variable is loading.
• Metastable Cycles — number of clocks aligned cycles in which tx_register_variable is
changing and rx_register_variable is loading.
• Rx_clock Before Tx_clock — number of receive clocks cycles in which rx_clock goes
active before tx_clock and tx_register_variable is changing.
• Tx_clock Before Rx_clock — number of clocks aligned cycles in which tx_clock goes
active before rx_clock and tx_register_variable is changing.
• Loading While Rx_clock Before Tx_clock — number of clocks aligned cycles in which
rx_clock goes active before tx_clock, tx_register_variable is changing and
rx_register_variable is loading.
• Loading While Tx_clock Before Rx_clock — number of clocks aligned cycles in which
tx_clock goes active before rx_clock, tx_register_variable is changing and
rx_register_variable is loading.
• Delayed Transitions — number of times metastability injection delayed a transition until the
next cycle.
• Advanced Transitions — number of times metastability injection advanced a transition to
the current cycle.
• Bits Inverted — number of bits of the receive register output that had metastability inserted
(that is, the number of 1s in the inverted bits bitmap).
• Inverted Bits Bitmap — bitmap of the bits that had metastability injected.
Notes
1. The following statistics and corner case are updated each cycle: Clocks Aligned Cycles,
Tx_clock Before Rx_clock, Rx_clock Before Tx_clock, and Loading While Clocks
Aligned. The other statistics and corner case are updated only if the rx_register_variable
is loaded.
cdc_mfx
default name:
active rx_reg
tx_clocks[n-1:0] cdc_mfx_fire firings
clock
checks:
rx_reset clocks_aligned_cycles
evals
statistics cdc_mfx (Off)
rx_areset
cmfx inject_metastability rx_reset, rx_areset,
rx_load_enable specified_window rx_load_enable,
rx_async_data[w-1:0] window_start rx_async_data, rx_data:
rx_data[w-1:0]
rx_reg[w-1:0]
inferable from rx_reg
rx_q[w-1:0]
rx_reg vacuity property:
value
n = number of clocks !tx_reset && !areset &&
w = variable width
active === 0
Description
Injects metastability at the output of a receive register driven by transmit registers from multiple
transmit clock domains.
Syntax
[<] {cdc_mfx | cmfx}
-rx_reg rx_register_variable -tx_clocks tx_clocks -clock rx_clock
[-rx_reset rx_reset] [-rx_areset rx_areset] [-rx_load_enable value] [-cdc_mfx]
[standard_option…]
Required Arguments
• -rx_reg rx_register_variable
Receiving register in the receive clock domain.
• -tx_clocks tx_clocks
Clock bus where the bits are clocks from the transmit clock domains.
• -clock rx_clock
Receive clock.
Inferable Options
• -rx_reset rx_reset
Receive synchronous reset. If unspecified, it is inferred from rx_register_variable.
• -rx_areset rx_areset
Receive asynchronous reset. If unspecified, it is inferred from rx_register_variable.
• -rx_load_enable value
Asserted when rx_reg is loaded with valid data. If unspecified, it is inferred from
rx_register_variable.
GUI Windows
Menus Toolbar Debugging Windows
Design Data
Windows
Analysis
Windows
The Static field of a scheme is the scheme’s status reported by static CDC analysis. If a Prove
database is merged, a Prove field shows the formal analysis results for the associated protocol
check. If a database generated by simulation with the promoted protocol checkers is merged, a
Simulation field shows the simulation results. The Type field shows the merged results form all
these analyses. See “Status Flags” on page 54 for an explanation of the status flags used to show
the status of these field entries.
• Check — Type of CDC scheme (for example: Two DFF Bus Sync, Combo Logic,
DMUX).
• Mode — User or inferred mode.
• Tx Signal — Tx signal in the HDL.
• Rx Signal — Rx signal in the HDl.
• Tx Clock — Tx clock in the HDL.
• Rx Clock — Rx clock in the HDL.
• Tx Module — Module containing the tx signal driver.
• Rx Module — Module containing the rx signal receiver.
• Tx File — File containing the tx module and file line number of the tx signal.
• Rx File —File containing the rx module and file line number of the rx signal.
• ID — ID that identifies the scheme and the design objects associated with it. The name
of the promoted checker includes this ID so simulation and formal results can be merged
into the static CDC results (see “Path and Protocol ID” on page 50).
If a simulation database (created by simulating the CDC protocol checkers) is merged in, each
entry has the following additional information:
• Covered — Whether or not the checker’s corner cases were covered in simulation.
• Firings — Number of times the checker fired in simulation..
• First Firing — Testbench time of the first firing, if the checker fired.
Right-click on an entry to pop up a menu:
• Show
• Source — view the declaration of the TX signal driver or the RX signal receiver.
• Schematic — view the CDC path in a schematic window and highlight the TX or
RX signal.
• Simulation Firings — view a firings waveform for the protocol check promoted for
the selected CDC scheme (if the check fired).
• Coverage — view simulation coverage data for the protocol check promoted for the
selected CDC scheme in the details window.
• Details — view details of the selected schemes in the details window.
• Filter – set and manage filter lists that hide groups of CDC scheme entries based on
various criteria. Also used to create cdc report directives from filtered elements:
• From Instance — hide schemes on paths that originate from specified design
instances.
• To Instance — hide schemes on paths that end at specified design instances.
• By Column — view Filter CDC Checks dialog for filtering entries based on their
CDC checks tab field values.
• Selected — add the currently selected schemes to the filtered list.
• Clear All — clear the filtered list.
• Import — clear the current filtered list and load a previously-saved filtered list.
• Export — save the current filtered list.
• Reset Columns — redisplay hidden columns and display columns in the default order.
• Create Directive — view Set Cdc Report dialog for creating cdc report directives.
Dialog fields are pre-filled with information extracted from the selected scheme.
• Find — view Search CDC Checks View dialog for searching for specified text in
column entries.
Help – invoke HTML help for the selected CDC scheme type.
Index
—C—
Index
—A— CDC, 37
ad hoc synchronizer, 28
promotion, 76
assertion defined, 49
schemes, 37, 144
assertion-based verification, 49
schemes with potential errors, 43
-assume, 271
CDC checks window, 279
Assumption groups
cdc_dsel, 245
data, 262
cdc_fifo, 249
deq, 251
cdc_glitch, 253
dist, 256
cdc_hamming_distance_one, 255
enq, 251
-cdc_handshake, 259
max, 262
cdc_handshake_data, 258
min, 262
cdc_sample, 266
ptr, 251
cdc_sync, 270, 273, 277
rptr, 251
CDC-FX
rxdata, 247
cdc_fx checker, 141
rxdone, 262
metastability injected simulation, 26
rxval, 262
Checker
stable, 256
promotion, 50
txdata, 247
checker
txdone, 262
cdc_fx, 127
txdsel, 247
promotion, 39
txval, 262
protocol, 49
wptr, 251
simulate a design, 51
async_reset scheme, 149
Checker types
async_reset_no_sync scheme, 152, 172
cdc_dsel, 245
asynchronous
cdc_fifo, 249
clocks, 21
cdc_glitch, 253
inputs, 21
cdc_hamming_distance_one, 255
—B— cdc_handshake_data, 258
black_box scheme, 154 cdc_sample, 266
Block specifications, 107 cdc_sync, 270, 273, 277
Block-level constraints, 100 clock
bus_dff_sync_gated_clk scheme, 161 asynchronous, 21
bus_four_latch scheme, 163 domain crossing, 22
bus_shift_reg scheme, 165 domains, 21
bus_two_dff scheme, 167 group, 21
bus_two_dff_phase scheme, 170 jitter, 25
Clock domain crossing, 37
Clocks, 21
• This software application may include google hash table version 1.9 third-party software, which is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. google hash table version 1.9 may be
subject to the following copyrights:
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL,
Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appears in all copies and that both that copyright notice and this
permission notice appear in supporting documentation. Silicon Graphics makes no representations about the suitability of
this software for any purpose. It is provided "as is" without express or implied warranty.
Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appears in all copies and that both that copyright notice and this
permission notice appear in supporting documentation. Hewlett-Packard Company makes no representations about the
suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
• This software application may include Aiger third-party software, which is distributed on an "AS IS" basis, WITHOUT
WARRANTY OF ANY KIND, either express or implied. Aiger may be subject to the following copyrights:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to
whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
• This software application may include minisat version 2.0 third-party software, which is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. minisat version 2.0 may be subject to the
following copyrights:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to
whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
• This software application may include Open Source SDC Parser version SDC1.8 third-party software. Open Source SDC
Parser version SDC1.8 is distributed under the terms of the Synopsys Open Source License version 1.0 and is distributed
on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the license for the
specific language governing rights and limitations under the license. You can view a copy of the license at:
<your_Mentor_Graphics_documentation_directory>/legal/synopsys_open_source_1.0.pdf.
• This software application may include mpich2 version 1.4 third-party software. Portions of mpich2 version 1.4 may be
subject to the Perl Artistic and is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
express or implied. See the license for the specific language governing rights and limitations under the license. You can
view a copy of the license at: <your_Mentor_Graphics_documentation_directory>/legal/perl_artistic_2.0.pdf. mpich2
version 1.4 may be subject to the following copyrights:
Permission is hereby granted to use, reproduce, prepare derivative works, and to redistribute to others.
LICENSE
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
disclaimer listed in this license in the documentation and/or other materials provided with the distribution.
Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written permission.
The copyright holders provide no reassurances that the source code provided does not infringe any patent, copyright, or
any other intellectual property rights of third parties. The copyright holders disclaim any liability to any recipient for
claims brought against recipient by any third party for infringement of that parties intellectual property rights.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
End-User License Agreement
The latest version of the End-User License Agreement is available on-line at:
www.mentor.com/eula
IMPORTANT INFORMATION
USE OF ALL SOFTWARE IS SUBJECT TO LICENSE RESTRICTIONS. CAREFULLY READ THIS LICENSE
AGREEMENT BEFORE USING THE PRODUCTS. USE OF SOFTWARE INDICATES CUSTOMER’S
COMPLETE AND UNCONDITIONAL ACCEPTANCE OF THE TERMS AND CONDITIONS SET FORTH IN
THIS AGREEMENT. ANY ADDITIONAL OR DIFFERENT PURCHASE ORDER TERMS AND CONDITIONS
SHALL NOT APPLY.
This is a legal agreement concerning the use of Software (as defined in Section 2) and hardware (collectively “Products”)
between the company acquiring the Products (“Customer”), and the Mentor Graphics entity that issued the
corresponding quotation or, if no quotation was issued, the applicable local Mentor Graphics entity (“Mentor
Graphics”). Except for license agreements related to the subject matter of this license agreement which are physically
signed by Customer and an authorized representative of Mentor Graphics, this Agreement and the applicable quotation
contain the parties’ entire understanding relating to the subject matter and supersede all prior or contemporaneous
agreements. If Customer does not agree to these terms and conditions, promptly return or, in the case of Software
received electronically, certify destruction of Software and all accompanying items within five days after receipt of
Software and receive a full refund of any license fee paid.
2. GRANT OF LICENSE. The software installed, downloaded, or otherwise acquired by Customer under this Agreement,
including any updates, modifications, revisions, copies, documentation and design data (“Software”) are copyrighted, trade
secret and confidential information of Mentor Graphics or its licensors, who maintain exclusive title to all Software and retain
all rights not expressly granted by this Agreement. Mentor Graphics grants to Customer, subject to payment of applicable
license fees, a nontransferable, nonexclusive license to use Software solely: (a) in machine-readable, object-code form (except
as provided in Subsection 5.2); (b) for Customer’s internal business purposes; (c) for the term of the license; and (d) on the
computer hardware and at the site authorized by Mentor Graphics. A site is restricted to a one-half mile (800 meter) radius.
Customer may have Software temporarily used by an employee for telecommuting purposes from locations other than a
Customer office, such as the employee’s residence, an airport or hotel, provided that such employee’s primary place of
employment is the site where the Software is authorized for use. Mentor Graphics’ standard policies and programs, which vary
depending on Software, license fees paid or services purchased, apply to the following: (a) relocation of Software; (b) use of
Software, which may be limited, for example, to execution of a single session by a single user on the authorized hardware or for
a restricted period of time (such limitations may be technically implemented through the use of authorization codes or similar
devices); and (c) support services provided, including eligibility to receive telephone support, updates, modifications, and
revisions. For the avoidance of doubt, if Customer provides any feedback or requests any change or enhancement to Products,
whether in the course of receiving support or consulting services, evaluating Products, performing beta testing or otherwise, any
inventions, product improvements, modifications or developments made by Mentor Graphics (at Mentor Graphics’ sole
discretion) will be the exclusive property of Mentor Graphics.
3. ESC SOFTWARE. If Customer purchases a license to use development or prototyping tools of Mentor Graphics’ Embedded
Software Channel (“ESC”), Mentor Graphics grants to Customer a nontransferable, nonexclusive license to reproduce and
distribute executable files created using ESC compilers, including the ESC run-time libraries distributed with ESC C and C++
compiler Software that are linked into a composite program as an integral part of Customer’s compiled computer program,
provided that Customer distributes these files only in conjunction with Customer’s compiled computer program. Mentor
Graphics does NOT grant Customer any right to duplicate, incorporate or embed copies of Mentor Graphics’ real-time operating
systems or other embedded software products into Customer’s products or applications without first signing or otherwise
agreeing to a separate agreement with Mentor Graphics for such purpose.
4. BETA CODE.
4.1. Portions or all of certain Software may contain code for experimental testing and evaluation (which may be either alpha or
beta, collectively “Beta Code”), which may not be used without Mentor Graphics’ explicit authorization. Upon Mentor
Graphics’ authorization, Mentor Graphics grants to Customer a temporary, nontransferable, nonexclusive license for
experimental use to test and evaluate the Beta Code without charge for a limited period of time specified by Mentor
Graphics. This grant and Customer’s use of the Beta Code shall not be construed as marketing or offering to sell a license
to the Beta Code, which Mentor Graphics may choose not to release commercially in any form.
4.2. If Mentor Graphics authorizes Customer to use the Beta Code, Customer agrees to evaluate and test the Beta Code under
normal conditions as directed by Mentor Graphics. Customer will contact Mentor Graphics periodically during Customer’s
use of the Beta Code to discuss any malfunctions or suggested improvements. Upon completion of Customer’s evaluation
and testing, Customer will send to Mentor Graphics a written evaluation of the Beta Code, including its strengths,
weaknesses and recommended improvements.
4.3. Customer agrees to maintain Beta Code in confidence and shall restrict access to the Beta Code, including the methods and
concepts utilized therein, solely to those employees and Customer location(s) authorized by Mentor Graphics to perform
beta testing. Customer agrees that any written evaluations and all inventions, product improvements, modifications or
developments that Mentor Graphics conceived or made during or subsequent to this Agreement, including those based
partly or wholly on Customer’s feedback, will be the exclusive property of Mentor Graphics. Mentor Graphics will have
exclusive rights, title and interest in all such property. The provisions of this Subsection 4.3 shall survive termination of
this Agreement.
5. RESTRICTIONS ON USE.
5.1. Customer may copy Software only as reasonably necessary to support the authorized use. Each copy must include all
notices and legends embedded in Software and affixed to its medium and container as received from Mentor Graphics. All
copies shall remain the property of Mentor Graphics or its licensors. Customer shall maintain a record of the number and
primary location of all copies of Software, including copies merged with other software, and shall make those records
available to Mentor Graphics upon request. Customer shall not make Products available in any form to any person other
than Customer’s employees and on-site contractors, excluding Mentor Graphics competitors, whose job performance
requires access and who are under obligations of confidentiality. Customer shall take appropriate action to protect the
confidentiality of Products and ensure that any person permitted access does not disclose or use Products except as
permitted by this Agreement. Customer shall give Mentor Graphics written notice of any unauthorized disclosure or use of
the Products as soon as Customer becomes aware of such unauthorized disclosure or use. Except as otherwise permitted for
purposes of interoperability as specified by applicable and mandatory local law, Customer shall not reverse-assemble,
reverse-compile, reverse-engineer or in any way derive any source code from Software. Log files, data files, rule files and
script files generated by or for the Software (collectively “Files”), including without limitation files containing Standard
Verification Rule Format (“SVRF”) and Tcl Verification Format (“TVF”) which are Mentor Graphics’ proprietary
syntaxes for expressing process rules, constitute or include confidential information of Mentor Graphics. Customer may
share Files with third parties, excluding Mentor Graphics competitors, provided that the confidentiality of such Files is
protected by written agreement at least as well as Customer protects other information of a similar nature or importance,
but in any case with at least reasonable care. Customer may use Files containing SVRF or TVF only with Mentor Graphics
products. Under no circumstances shall Customer use Software or Files or allow their use for the purpose of developing,
enhancing or marketing any product that is in any way competitive with Software, or disclose to any third party the results
of, or information pertaining to, any benchmark.
5.2. If any Software or portions thereof are provided in source code form, Customer will use the source code only to correct
software errors and enhance or modify the Software for the authorized use. Customer shall not disclose or permit disclosure
of source code, in whole or in part, including any of its methods or concepts, to anyone except Customer’s employees or
on-site contractors, excluding Mentor Graphics competitors, with a need to know. Customer shall not copy or compile
source code in any manner except to support this authorized use.
5.3. Customer may not assign this Agreement or the rights and duties under it, or relocate, sublicense or otherwise transfer the
Products, whether by operation of law or otherwise (“Attempted Transfer”), without Mentor Graphics’ prior written
consent and payment of Mentor Graphics’ then-current applicable relocation and/or transfer fees. Any Attempted Transfer
without Mentor Graphics’ prior written consent shall be a material breach of this Agreement and may, at Mentor Graphics’
option, result in the immediate termination of the Agreement and/or the licenses granted under this Agreement. The terms
of this Agreement, including without limitation the licensing and assignment provisions, shall be binding upon Customer’s
permitted successors in interest and assigns.
5.4. The provisions of this Section 5 shall survive the termination of this Agreement.
6. SUPPORT SERVICES. To the extent Customer purchases support services, Mentor Graphics will provide Customer with
updates and technical support for the Products, at the Customer site(s) for which support is purchased, in accordance with
Mentor Graphics’ then current End-User Support Terms located at http://supportnet.mentor.com/about/legal/.
7. LIMITED WARRANTY.
7.1. Mentor Graphics warrants that during the warranty period its standard, generally supported Products, when properly
installed, will substantially conform to the functional specifications set forth in the applicable user manual. Mentor
Graphics does not warrant that Products will meet Customer’s requirements or that operation of Products will be
uninterrupted or error free. The warranty period is 90 days starting on the 15th day after delivery or upon installation,
whichever first occurs. Customer must notify Mentor Graphics in writing of any nonconformity within the warranty period.
For the avoidance of doubt, this warranty applies only to the initial shipment of Software under an Order and does not
renew or reset, for example, with the delivery of (a) Software updates or (b) authorization codes or alternate Software under
a transaction involving Software re-mix. This warranty shall not be valid if Products have been subject to misuse,
unauthorized modification, improper installation or Customer is not in compliance with this Agreement. MENTOR
GRAPHICS’ ENTIRE LIABILITY AND CUSTOMER’S EXCLUSIVE REMEDY SHALL BE, AT MENTOR
GRAPHICS’ OPTION, EITHER (A) REFUND OF THE PRICE PAID UPON RETURN OF THE PRODUCTS TO
MENTOR GRAPHICS OR (B) MODIFICATION OR REPLACEMENT OF THE PRODUCTS THAT DO NOT MEET
THIS LIMITED WARRANTY. MENTOR GRAPHICS MAKES NO WARRANTIES WITH RESPECT TO:
(A) SERVICES; (B) PRODUCTS PROVIDED AT NO CHARGE; OR (C) BETA CODE; ALL OF WHICH ARE
PROVIDED “AS IS.”
7.2. THE WARRANTIES SET FORTH IN THIS SECTION 7 ARE EXCLUSIVE. NEITHER MENTOR GRAPHICS NOR
ITS LICENSORS MAKE ANY OTHER WARRANTIES EXPRESS, IMPLIED OR STATUTORY, WITH RESPECT TO
PRODUCTS PROVIDED UNDER THIS AGREEMENT. MENTOR GRAPHICS AND ITS LICENSORS
SPECIFICALLY DISCLAIM ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NON-INFRINGEMENT OF INTELLECTUAL PROPERTY.
10. INDEMNIFICATION. CUSTOMER AGREES TO INDEMNIFY AND HOLD HARMLESS MENTOR GRAPHICS AND
ITS LICENSORS FROM ANY CLAIMS, LOSS, COST, DAMAGE, EXPENSE OR LIABILITY, INCLUDING
ATTORNEYS’ FEES, ARISING OUT OF OR IN CONNECTION WITH THE USE OF MENTOR GRAPHICS PRODUCTS
IN OR FOR HAZARDOUS APPLICATIONS. THE PROVISIONS OF THIS SECTION 10 SHALL SURVIVE THE
TERMINATION OF THIS AGREEMENT.
11. INFRINGEMENT.
11.1. Mentor Graphics will defend or settle, at its option and expense, any action brought against Customer in the United States,
Canada, Japan, or member state of the European Union which alleges that any standard, generally supported Product
acquired by Customer hereunder infringes a patent or copyright or misappropriates a trade secret in such jurisdiction.
Mentor Graphics will pay costs and damages finally awarded against Customer that are attributable to such action.
Customer understands and agrees that as conditions to Mentor Graphics’ obligations under this section Customer must:
(a) notify Mentor Graphics promptly in writing of the action; (b) provide Mentor Graphics all reasonable information and
assistance to settle or defend the action; and (c) grant Mentor Graphics sole authority and control of the defense or
settlement of the action.
11.2. If a claim is made under Subsection 11.1 Mentor Graphics may, at its option and expense: (a) replace or modify the Product
so that it becomes noninfringing; (b) procure for Customer the right to continue using the Product; or (c) require the return
of the Product and refund to Customer any purchase price or license fee paid, less a reasonable allowance for use.
11.3. Mentor Graphics has no liability to Customer if the action is based upon: (a) the combination of Software or hardware with
any product not furnished by Mentor Graphics; (b) the modification of the Product other than by Mentor Graphics; (c) the
use of other than a current unaltered release of Software; (d) the use of the Product as part of an infringing process; (e) a
product that Customer makes, uses, or sells; (f) any Beta Code or Product provided at no charge; (g) any software provided
by Mentor Graphics’ licensors who do not provide such indemnification to Mentor Graphics’ customers; or
(h) infringement by Customer that is deemed willful. In the case of (h), Customer shall reimburse Mentor Graphics for its
reasonable attorney fees and other costs related to the action.
11.4. THIS SECTION 11 IS SUBJECT TO SECTION 8 ABOVE AND STATES THE ENTIRE LIABILITY OF MENTOR
GRAPHICS AND ITS LICENSORS, AND CUSTOMER’S SOLE AND EXCLUSIVE REMEDY, FOR DEFENSE,
SETTLEMENT AND DAMAGES, WITH RESPECT TO ANY ALLEGED PATENT OR COPYRIGHT
INFRINGEMENT OR TRADE SECRET MISAPPROPRIATION BY ANY PRODUCT PROVIDED UNDER THIS
AGREEMENT.
13. EXPORT. The Products provided hereunder are subject to regulation by local laws and United States (“U.S.”) government
agencies, which prohibit export, re-export or diversion of certain products, information about the products, and direct or indirect
products thereof, to certain countries and certain persons. Customer agrees that it will not export or re-export Products in any
manner without first obtaining all necessary approval from appropriate local and U.S. government agencies. If Customer wishes
to disclose any information to Mentor Graphics that is subject to any U.S. or other applicable export restrictions, including
without limitation the U.S. International Traffic in Arms Regulations (ITAR) or special controls under the Export
Administration Regulations (EAR), Customer will notify Mentor Graphics personnel, in advance of each instance of disclosure,
that such information is subject to such export restrictions.
14. U.S. GOVERNMENT LICENSE RIGHTS. Software was developed entirely at private expense. The parties agree that all
Software is commercial computer software within the meaning of the applicable acquisition regulations. Accordingly, pursuant
to U.S. FAR 48 CFR 12.212 and DFAR 48 CFR 227.7202, use, duplication and disclosure of the Software by or for the U.S.
government or a U.S. government subcontractor is subject solely to the terms and conditions set forth in this Agreement, which
shall supersede any conflicting terms or conditions in any government order document, except for provisions which are contrary
to applicable mandatory federal laws.
15. THIRD PARTY BENEFICIARY. Mentor Graphics Corporation, Mentor Graphics (Ireland) Limited, Microsoft Corporation
and other licensors may be third party beneficiaries of this Agreement with the right to enforce the obligations set forth herein.
16. REVIEW OF LICENSE USAGE. Customer will monitor the access to and use of Software. With prior written notice and
during Customer’s normal business hours, Mentor Graphics may engage an internationally recognized accounting firm to
review Customer’s software monitoring system and records deemed relevant by the internationally recognized accounting firm
to confirm Customer’s compliance with the terms of this Agreement or U.S. or other local export laws. Such review may include
FlexNet (or successor product) report log files that Customer shall capture and provide at Mentor Graphics’ request. Customer
shall make records available in electronic format and shall fully cooperate with data gathering to support the license review.
Mentor Graphics shall bear the expense of any such review unless a material non-compliance is revealed. Mentor Graphics shall
treat as confidential information all information gained as a result of any request or review and shall only use or disclose such
information as required by law or to enforce its rights under this Agreement. The provisions of this Section 16 shall survive the
termination of this Agreement.
17. CONTROLLING LAW, JURISDICTION AND DISPUTE RESOLUTION. The owners of certain Mentor Graphics
intellectual property licensed under this Agreement are located in Ireland and the U.S. To promote consistency around the
world, disputes shall be resolved as follows: excluding conflict of laws rules, this Agreement shall be governed by and construed
under the laws of the State of Oregon, U.S., if Customer is located in North or South America, and the laws of Ireland if
Customer is located outside of North or South America. All disputes arising out of or in relation to this Agreement shall be
submitted to the exclusive jurisdiction of the courts of Portland, Oregon when the laws of Oregon apply, or Dublin, Ireland when
the laws of Ireland apply. Notwithstanding the foregoing, all disputes in Asia arising out of or in relation to this Agreement shall
be resolved by arbitration in Singapore before a single arbitrator to be appointed by the chairman of the Singapore International
Arbitration Centre (“SIAC”) to be conducted in the English language, in accordance with the Arbitration Rules of the SIAC in
effect at the time of the dispute, which rules are deemed to be incorporated by reference in this section. Nothing in this section
shall restrict Mentor Graphics’ right to bring an action (including for example a motion for injunctive relief) against Customer in
the jurisdiction where Customer’s place of business is located. The United Nations Convention on Contracts for the
International Sale of Goods does not apply to this Agreement.
18. SEVERABILITY. If any provision of this Agreement is held by a court of competent jurisdiction to be void, invalid,
unenforceable or illegal, such provision shall be severed from this Agreement and the remaining provisions will remain in full
force and effect.
19. MISCELLANEOUS. This Agreement contains the parties’ entire understanding relating to its subject matter and supersedes all
prior or contemporaneous agreements. Some Software may contain code distributed under a third party license agreement that
may provide additional rights to Customer. Please see the applicable Software documentation for details. This Agreement may
only be modified in writing, signed by an authorized representative of each party. Waiver of terms or excuse of breach must be
in writing and shall not constitute subsequent consent, waiver or excuse.