Reading and writing from a flip flop

Thread Starter

vraghavan3

Joined Sep 30, 2007
1
Hi,

I need to read and write from a flip flop in one clock cycle. That is I need to be able to read at the positive edge of the clock and write at the negative edge of the same clock cycle. I have a master slave flip flop to which I feed (WriteEnable), datain and the clk as the input to the master and pass the output of this to the slave along with the negative edge of the clock cycle. But when I do this, I'm only able to read during the postive edge of one clock cycle and write during the negative edge of the next clock cycle. Can someone please suggest a way of getting this done in one clock cycle?

Thank You
 

beenthere

Joined Apr 20, 2004
15,819
That is no problem. latch the state of the FF into another device (7475??)on the positive edge, and write the new state into it as the same signal drops.

As a flip flop is usually used as a data retention device, the process you describe escapes me. The output state of the flip flop is always available, so having to explicitly read it out seems strange.
 

hgmjr

Joined Jan 28, 2005
9,027
Here is a link to a site with the various flip-flop configurations. If you scroll down to the section on master/slave flip-flops you will see that the solution that you seek involves an inversion of the clock to accomplish the edge relationship you need.

hgmjr
 
Top