Forum Discussion

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

lpm_ff megafunction

I am analyzing an old design of an FPGA that looks like it is clocking data in with the lpmFF megafunction set up as a D flip flop. But looking at the input data with an analyzer, the input data goes valid after the rising edge of the clock input to the megawizard flip flop so it seems like a D flip flop would not work properly. Typically a D flipflop sets the output to the input on the rising edge of the input clock. Just wondering if there is a way to set up the lpm_FF megafunction to have the output follow the input when the clock signal is high and then latch the output when clock goes low as perhaps this is what is going on? Also is there a way to simulate what the design will do by entering simulated input signals?

14 Replies

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

    I was looking into the lpm_shiftreg megafunction and am a little confused.

    I basically want to delay a 16-bit input to a multiplier by 5 clock periods. I did not find any option in the MegaWizard for lpm_shiftreg to set the desired time delay. Any help will be appreciated.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Yeah I cascaded a few flip-flops together and my design is working. I also read in the User Guide for lpm_shiftreg that this megafunction is not supported by the device I am implementing on; hence I will go with the cascade.

    Thanks.