02-01-2021 06:05 PM
Hi everyone! When I reference a project MMCM (XAPP888). I have a problem when I try to dynamic config phase through module mmcme3_drp.v. Every time I need the new value of phase shift I must send the reset signal (reset_mmcm) to module mmcme3_avd.v. The config value is stored in ROM. I discover that I must send the reset signal to mmcme3_avd.v for recalculation. If don't, the value of phase shift does not change. But I think the reset signal just need when I change clk_in. Why clk_in not change but I must still send the reset signal to mmcm3_adv. Everyone, you can tell me how to recalculation in mmcme3_adv without sending the reset signal
02-01-2021 08:56 PM
If you are only changing clock phase shift (and not frequency) then you can use the Dynamic Phase Shift interface of the MMCM (see the Clocking User Guide for the family you are using). With the dynamic phase shift interface you can change the phase while the MMCM is running - you do not need to reset the MMCM between shifts. The disadvantage is that you can only shift the MMCM phase one step at a time, where each step is 1/56 of your VCO period. Each shift only takes a few clock cycles, so you can do them fairly quickly, but if you want to make large changes you need to have a state machine issue the correct number of increment/decrement operations.
02-02-2021 07:36 PM
02-03-2021 05:36 AM
There are 56*O (where O is the output divider of the MMCM for this output) fine phase steps in an output clock period. You want 32? phase increments (1/32 of a clock period is 11.25 degrees - do you want 1/16 of a clock period or 1/32?) in your system. Therefore each of your increments is 56*O/32 fine phase steps. You need to design a counter and a state machine that steps through the 56*O/32 fine phase steps each time you want to change your increments, with each iteration of your state machine asking the MMCM to increment (or decrement) one fine phase step. The interface for the fine phase shift (PSEN, PSINCDEC, PSDONE) is pretty simple - a state machine and counter to control it isn't that hard to design.
02-04-2021 09:01 AM
Yes, But I have a problem when I try to control value at any clock out. For example, I want to have clock out0 shift 22.5 but clock out1 45, clock out2 67.5 .... I don't know how to control phase shift at any clock output.
02-05-2021 10:23 AM
Sorry - I interpreted your question as being that you wanted a single MMCM output that could be dynamically changed between the different phases.
Statically setting the phase of an MMCM output should be very easy. If you use the clocking wizard, there is a column for specifying the desired phase (in degrees) of each output. If you are manually instantiating the MMCM there is the CLKOUTx_PHASE attribute for each output - again, settable in degrees. If you want different phase shifts for each output, then they are settable in increments of 1/8 of the VCO period - therefore 8*Ox discrete phases, or 360/(8*Ox) degree granularity for the phase.