Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
3
CDC Structural Rules....................................................................................3
Scheme Detection Flow................................................................................7
User Defined Synchronization Scheme......................................................8
User defined Tcl Command.....................................................................8
Pre-defined synchronizer templates.......................................................9
NDFF...................................................................................................9
NDFF_BUS.........................................................................................10
Pulse (Fast to Slow)...........................................................................11
Edge..................................................................................................12
MUX_NDFF.........................................................................................14
MUX_PULSE.......................................................................................16
Handshake........................................................................................18
FIFO...................................................................................................20
Automatic Scheme Detection..................................................................22
Automatic Scheme Detection Tcl Command.........................................22
Automatic Scheme Detection Flow.......................................................22
Manual Scheme Detection.......................................................................23
Functional Phase............................................................................................24
Protocol Checks TCL Commands.................................................................24
NDFF Protocol Checks.................................................................................25
Data Stability...........................................................................................25
Old Property Template for Data Stability..............................................25
New Property Template for Data Stability.............................................25
Pulse (Fast to Slow) Protocol Checks...........................................................27
Data Stability...........................................................................................27
Input Pulse Width.....................................................................................27
Output Pulse Width..................................................................................27
MUX_NDFF Protocol Checks........................................................................28
Control Path Stability...............................................................................28
Data Path Stability During Transfer.........................................................28
Old Property Template for Data Stability During Transfer.....................28
MUX Stability Protocol Problem............................................................29
New Property Template for Data Stability During Transfer...................29
MUX_PULSE Protocol Checks.......................................................................30
Control Path Stability...............................................................................30
Data Path Stability During Transfer.........................................................30
Input Pulse Width.....................................................................................31
Output Pulse Width..................................................................................31
Handshake Protocol Checks........................................................................32
Ack and Req Stability...............................................................................32
Data Stability During Transfer...............................................................321
Handshake Protocol.................................................................................33
FIFO Protocol Checks..................................................................................34
Read and Write Stability..........................................................................34
No Load on Full and No Read on Empty...................................................34
Read and Write Pointers Gray Coding......................................................35
Structural Phase
This section describes the structural phase of the JG-CDC app,
presenting the structural rules that are considered on the analysis and the
synchronizer scheme detection flow.
The user can define rules that the schemes must comply with. It is
possible to have different rules for the same design, for example:
different rules for different clock domains. If the user does not create
any rule a default rule is used.
The rules must be configured on SETUP phase.
CDC Path:
The user specifies a module that defines a scheme. During automatic scheme
detection the module is mapped to all its instances and one scheme to each
instance is automatically added and associated to the CDC Pairs.
The configuration of user defined schemes must be done on SETUP phase.
The User Defined Scheme can be a well-known and defined pattern (NDFF,
NDFF_BUS, Pulse, Edge, MUX_NDFF, MUX_PULSE, Handshake or FIFO) or even
a different custom pattern.
For user defined schemes added using a pattern the tool is able to generate protocol
checks properly, for custom schemes the tool wont generate any protocol check.
NDFF Parameters:
Name
Type
Mandatory
data
signal
true
dout
signal
true
drst*
signal
false
dclk*
signal
false
* If the tool could not infer, the user has to provide these
parameters.
10
NDFF_BUS
This type of synchronizer is used to synchronize a wide signal from the
source domain to the destination domain.
NDFF_BUS Parameters:
Name
Type
Mandatory
data
signal
true
dout
signal
true
drst*
signal
false
dclk*
signal
false
* If the tool could not infer, the user has to provide these
parameters.
11
Pulse Parameters:
Name
Type
Mandatory
data
signal
true
dout
signal
true
enable
signal
true
sclk*
signal
false
srst*
signal
false
* If the tool could not infer, the user has to provide these
parameters.
12
Edge
This type of synchronizer is used to detect a change on a single bit pulse
signal that comes from a slower source domain to a faster destination
domain.
13
Name
Type
Mandatory
data
signal
true
dout
signal
true
sclk*
signal
false
srst*
signal
false
drst*
signal
false
dclk*
signal
false
Edge
Parameters:
* If the tool could not infer, the user has to provide these
parameters.
14
MUX_NDFF
This type of synchronizer is used to synchronize a wide data path using a
NDFF to synchronize the single bit control signal. This control signal can be
the selector pin of a MUX gate or can be the enable condition of a clock
gating.
15
Name
Type
Mandatory
data
Signal
true
dout
Signal
true
sready
signal
true
dready
signal
true
drst*
signal
false
dclk*
signal
false
MUX
_ND
FF
Parameters:
* If the tool could not infer, the user has to provide these
parameters.
16
MUX_PULSE
This type of synchronizer is used to synchronize a wide data path using a
Pulse to synchronize the single bit control signal. This control signal can be
the selector pin of a MUX gate or can be the enable condition of a clock
gating.
17
MUX_PULSE Parameters:
Name
Type
Mandatory
data
signal
true
dout
signal
true
sready
signal
true
dready
signal
true
sreday_in (enable)
signal
true
drst*
signal
false
dclk*
signal
false
* If the tool could not infer, the user has to provide these
parameters.
18
Handshake
This synchronizer is used to synchronize a wide data from the source
domain to the destination domain using the well-defined handshake protocol.
19
Handshake Parameters:
Name
Type
Mandatory
data
signal
true
dout
signal
true
sreq
signal
true
dack
signal
true
dreq
signal
true
sack
signal
true
dCtrl
signal
false
sCtrl
signal
false
srst*
signal
false
sclk*
signal
false
drst*
signal
false
dclk*
signal
false
* If the tool could not infer, the user has to provide these
parameters.
20
FIFO
This synchronizer is used to synchronize a wide data from the source
domain to the destination domain using the well-defined FIFO protocol.
21
Name
Type
Mandatory
rdata
signal
true
wptr
signal
true
rptr
signal
true
wfull
signal
true
rempty
signal
true
winc
signal
true
rinc
signal
true
wdata
signal
false
srst*
signal
false
sclk*
signal
false
drst*
signal
false
dclk*
signal
false
FIFO Parameters:
22
* If the tool could not infer, the user has to provide these
parameters.
23
Run automatic
Pulse and Edge
detection
Run automatic
NDFF detection for
single bit pairs
Run automatic
Handshake
detection
Run automatic
NDFF detection for
wide pairs
24
25
Functional Phase
This section describes the functional phase of the JG-CDC app,
presenting the protocol checks that are generated for each type of
synchronizer scheme.
Generates and verify protocol checks for all CDC Schemes already
detected
Only Schemes that passed through Structural Analysis without
violations
Based on property templates
26
Data Stability
Functionally checks if the signal from the source clock domain remains stable
long enough to be captured properly in the destination clock domain.
This doesnt work if clk2 is the fastest clock in the system, as no $rose
is detected. In that case, it is sufficient to guarantee that that d1 is
stable for at least one more cycle.
assert @(posedge clk2) disable iff (r1) ##1 !$stable(d1) |=>
$stable(d1)
27
Which means:
Once the data d1 changes, it must not change for at least one
more cycle in the destination domain.
The same way, the data must stay stable during at least one
setup-hold time on the destination.
Example 1: Destination clock slower than the source clock
property p_stability
disable iff (drst)
@(posedge :global_clock) !stable(data) |=> $stable(data)
until_with $rose(dclk)
endproperty
property p_stability_fastest (case the destination clock is
fastest)
@(posedge :global_clock) disable iff (drst) ##1 !
stable(data) |=> $stable(data)
endproperty
28
Data Stability
Functionally checks if the signal from the source clock domain remains stable
long enough to be captured properly in the destination clock domain.
property p_stability
disable iff (drst)
@(posedge :global_clock) !stable(sready) |=> $stable(sready)
until_with $rose(dclk)
endproperty
Toggle Circuit
Functionally checks if the toggle circuit works properly.
property p_toggle_circuit
@(posedge sclk) disable iff (srst)
sready_in |=> $changed(sready);
Endproperty
29
30
The protocol check for data stability was not guaranteeing that after a
change, data remains stable until data transfer phase was
complete, i.e., a sampling edge of destination clock, respecting hold
time.
This is shown in the trace, where a simple design with a MUX
synchronizer from the crossing from Data (clk1) to mux.Dout(clk2,
twice as slow) , although respection data transfer property, still
suffers from metastability propagation in mux.Dout, when we inject
The trace shows that we allow Dready to be enabled and at the same
time Data changes. At this point, raising edge from cycle 7 to cycle 8,
we allow metastability to happen and PROPAGATES in mux.Dout
The protocol check should require that Data is stable also in cycle 8
hold period of Dout this does not happen.
31
32
Toggle Circuit
Functionally checks if the toggle circuit works properly.
property p_toggle_circuit
@(posedge sclk) disable iff (srst)
sready_in |=> $changed(sready);
Endproperty
33
34
Handshake Protocol
The sender should continue to assert the Sreq signal until Sack is
asserted at the source clock (Sclk) domain.
The sender should not assert a new request Sreq until Sack for the
previous transfer is de-asserted in the source clock (Sclk) domain.
(src_req): Functionally checks if that the sender continues to assert the
request signal until it receives an acknowledgement from the receiver.
(src_req_new): Functionally checks if that the sender should not send a new
request until the acknowledgement for the previous transfer has been deasserted.
property p_src_conformance_req (Pclk, Prst, Pssig, Pdsig);
disable iff (Prst)
@(posedge Pclk) Pssig && !Pdsig |=> Pssig;
endproperty
src_req: p_src_conformance_req (Sclk, Srst, Sreq, Sack);
src_req_new: p_src_conformance_req (Sclk, Srst,!Sreq,!Sack);
The receiver should continue to assert the Dack signal till Dreq is
asserted at the destination clock (Dclk) domain.
The receiver should not assert a new acknowledgement Dack until a
new request is received in the destination clock (Dclk) domain.
(dest_conformance_req): Functionally checks if the receiver continues to
assert the acknowledgement till the request is asserted at the destination
clock domain.
(dest_conformance_new_req): Functionally checks if the receiver does not
assert a new acknowledgement until a new request is received.
property p_dest_conformance_req (Pclk, Prst, Pssig, Pdsig);
disable iff (Prst)
@(posedge Pclk) Pssig |=> Pdsig;
endproperty
dest_conformance_req: p_dest_conformance_req (Dclk, Drst,
Dreq, Dack);
dest_conformance_new_req: p_dest_conformance_req (Dclk, Drst, !
Dreq, !Dack);
35
36
37