- MACRO_GROUP: XPM
- MACRO_SUBGROUP: XPM_CDC
Introduction
This macro synchronizes a binary input from the source clock domain to the destination clock domain using gray code. For proper operation, the input data must be sampled two or more times by the destination clock.
This module takes the input binary signal, translates it into Gray code and registers it, synchronizes it to the destination clock domain, and then translates it back to a binary signal. You can define the number of register stages used in the synchronizers. You can also enable a simulation feature to generate messages to report any potential misuse of the macro.
Because this macro uses Gray encoding, the binary value provided to the macro must only increment or decrement by one to ensure that the signal being synchronized has two successive values that only differ by one bit. This ensures lossless synchronization of a Gray coded bus. If the behavior of the binary value is not compatible with Gray encoding, use the XPM_CDC_HANDSHAKE macro or an alternate method of synchronizing the data to the destination clock domain.
report_cdc
is run, the synchronizer in this module
is reported as a warning of type CDC-6, Multi-bit synchronized with ASYNC_REG
property. This warning is safe to ignore because the bus that is synchronized is
gray-coded. Starting in 2018.3, this warning has been suppressed by adding a
CDC-6 waiver to the Tcl constraint file.You should run report_cdc
to make
sure the CDC structure is identified and that no critical warnings are generated,
and also verify that dest_clk
can sample src_in_bin[n:0]
two or more times.
Port Descriptions
Port | I/O | Width | Domain | Sense | Handling if Unused | Function |
---|---|---|---|---|---|---|
dest_clk | I | 1 | N/A | EDGE _RISING | Active | Destination clock. |
dest_out_bin | O | WIDTH | dest_clk | N/A | Active | Binary input bus (src_in_bin) synchronized to destination clock domain. This output is combinatorial unless REG_OUTPUT is set to 1. |
src_clk | I | 1 | N/A | EDGE _RISING | Active | Source clock. |
src_in_bin | I | WIDTH | src_clk | N/A | Active | Binary input bus that will be synchronized to the destination clock domain. |
Design Entry Method
Design Entry | Yes/No |
---|---|
Instantiation | Yes |
Inference | No |
IP and IP Integrator Catalog | Yes |
Available Attributes
Attribute | Type | Allowed Values | Default | Description |
---|---|---|---|---|
DEST_SYNC_FF | DECIMAL | 2 to 10 | 4 | Number of register stages used to synchronize signal in the destination clock domain. |
INIT_SYNC_FF | DECIMAL | 0, 1 | 0 |
|
REG_OUTPUT | DECIMAL | 0, 1 | 0 |
|
SIM_ASSERT_CHK | DECIMAL | 0, 1 | 0 |
|
SIM_LOSSLESS _GRAY_CHK | DECIMAL | 0, 1 | 0 |
|
WIDTH | DECIMAL | 2 to 32 | 2 | Width of binary input bus that will be synchronized to destination clock domain. |