Forum Discussion

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

two edges entity

hi,

I write an entity with two different process, one works at the falling edge of clk and the second works at the rising edge of the same clk.

is this kind of working is recommend or is it a big NO NO?

thanks,

omri

1 Reply

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

    Its not a big no-no, but its generally not necessary unless you're trying to do something very specific, eg., for a data path that goes from an FPGA to an off-chip device.

    The Altera tools include a tool called the TimeQuest Timing Analyzer. Read the documentation for that tool.

    An FPGA design consists of your HDL, the pin assignments for the design, and the timing constraints for the design.

    Normally you would write your HDL so that it all uses rising-edges of the clock. However, after you have performed a timing analysis, it might be necessary to perform some "tricks" to meet timing at the FPGA I/O. One of those tricks is to invert the clock, another is to use a PLL to phase-shift the clock. The default trick of letting the FPGA synthesis tool program the I/O cell programmable delays is generally sufficient, so you should start by using that, i.e., use a rising-edge in all of your design and apply timing constraints, and see how you do.

    Cheers,

    Dave