Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

verilog code about shift phase 0, 90, 180, 270

I have 4 signals come high at the same time and also go low at the same. Now I want to shift the 2nd, 3rd, and 4th signals out to 90, 180, and 270 degree. Does anybody has any good pointers or how to do this? I have only one clock.

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    If this is a homework problem and you are truly limited to one clock, they may be looking for you to derive your own clocks using a single clock at a rate 4x what you need.

    If this is a real application, then the answer is you probably want to feed your one clock into an ALTPLL to produce at least two clocks (for 0 and 90 degree phase shift) and then use both edges of each of those clocks to produce the 180 and 270 degree transitions.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks ted,

    This is for my real application. I am doing DC-DC converter. Where can I find sample in verilog to apply this? I have one clock and have 4 signals output at the same time. I want to phase them out equally.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The question refers to your PWM generation method. Multiphase PWM signals can be generated the same way as single phase, involving a system clock, a counter respectively multiple counters and comparators.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks FvM,

    You're right on it. I think I get the counter and comparator to work for each signal. Now, I need to shift them out 90, 180, 270 degree to get full power of the system. Do you know how to do that?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    As said, depends on the PWM generation details.

    May be an offset added to the counter or different synchronization of the zero startpoint of each counter.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    FvM,

    Do you have any sample in Verilog? I like the offset added to the counter.