cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
haint161308
Visitor
Visitor
595 Views
Registered: ‎01-12-2021

How to reconfiguration Phase in MMCME3 without reset_mmcm signal

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

0 Kudos
5 Replies
avrumw
Guide
Guide
563 Views
Registered: ‎01-23-2009

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.

Avrum

haint161308
Visitor
Visitor
457 Views
Registered: ‎01-12-2021

Firstly, I really thank you for your answer. I just need to control phase shift with 32 steps from 0 to 360, equivalent 22.5 45 67.5 90 112.5 .... 337.5 360. One step = 22.5. But I don't know how I can do that. I hope you can give me more detail do that. I really appreciate that.
0 Kudos
avrumw
Guide
Guide
423 Views
Registered: ‎01-23-2009

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.

Avrum

haint161308
Visitor
Visitor
330 Views
Registered: ‎01-12-2021

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.  

Capture2.PNG
0 Kudos
avrumw
Guide
Guide
278 Views
Registered: ‎01-23-2009

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.

Avrum

 

0 Kudos