Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussions

race: enable vs. clk in a FF

Altera_Forum
Honored Contributor II
1,453 Views

Hello, 

 

Once again me with a dummie question. 

 

Is about the correct way to manage the enable signal of a Flip Flop in VHDL. 

 

 

If the generation of the signal enable is managed with the same clock of the FLIP FLOP that this signal is going to control, how I know which one arrives first? 

 

Do I must manage the generation of the enable with the falling edge and then the flip flops that receives this signal with the rising edge?. 

 

Quartus reports this kind of conditions? 

 

Thanks.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
696 Views

You don't have to worry about it at all. Both the enable and the data input to the flip flop are treated as part of the data path when it comes to timing analysis. You should control both with the same clock edge. The timing analyzer and fitter will take care of the rest. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
696 Views

The problem would arise, if you use an edge aligned PLL clock itself as enable signal. A clock enable usually is the output from another FF. So it's perfectly delayed to act as an enable for the next clock edge. The timing analyzer and timing driven place and route has only to maintain this natural register timing.

0 Kudos
Altera_Forum
Honored Contributor II
696 Views

FvM is correct. From your description it sounded to me like you were generating the enable signal from the same clock domain as the data but not using the clock itself as the enable. 

 

However, TimeQuest should perform clock-as-data analysis if you were using the clock as an enable signal.
0 Kudos
Reply