-1

My understanding is that there will be setup time violation. As setup time is defined as minimum time the data input must the stable before applying clock. But what will be the output if we violate setup time?

new_ecl
  • 71
  • 1
  • 7

2 Answers2

1

Data changing too late prior to the clock edge is a setup time violation. Data changing too soon after the clock edge is a hold time violation. You are proposing to change the data simultaneously with the clock edge, so it is unclear which without looking at the innards of the flip-flop. In any case the result is undefined.

Neil_UK
  • 166,079
  • 3
  • 185
  • 408
Entrepreneur
  • 600
  • 3
  • 5
  • 3
    Some flops have negative setup time or negative hold time, and on such a flop the behavior would be defined in the presence of a simultaneous clock and data event. – supercat Jun 22 '17 at 15:34
1

You need to examine the data sheet to see what it says.

Most discrete D flip-flops have positive setup and hold times, which means a simultaneous transition of both clock and D will violate both. In this case, you can say nothing definite about the output. It may go high, it may go low, it may become metastable, in which case there is no guarantee that it will settle to high or low in any finite time. In practice, for any given flip-flop, it's likely to settle in the same state each time.

Some D flip-flops, especially those in the I/O of FPGAs, may have a negative setup time, or a negative hold time, in which case the behaviour is defined by the data sheet, and you can rely on it to always do that.

Neil_UK
  • 166,079
  • 3
  • 185
  • 408