designing a sequential circuit by having it's value table?

when learning about combinational circuits we could draw the truth table and construct a circuit by the help of min/MAX terms . and we could further simplify it with Karnaugh maps .

BUT how we do this in a combinational circuit .

lets say i have a table like below . now how can i make a circuit out of this table

the problem is both in a K-map and truth table the only meaning full states for a bit (like the clock in here) are 0 and 1.

SO we cannot Do any thing about the rising or falling edges .

PS.( this example is a D flip flop that is transparent both in rising and falling edges ) BUT i want a method (algorithm) like the Min/Max term (or Karnaugh maps) to solve ANY question not just this one !

I believe you are missing some basic concepts about sequential circuits. First of all, while combinational circuits are stateless, sequential circuits are defined by the fact of having some kind of inner state that can be changed either in precise instants of time (synchronous circuits) or when a certain condition is true (asynchronous circuits).

The cool thing about synchronous sequential circuits is that they can be realized by combining only two different ingredients:

• combinational logic, which might be the 2-level logic that can be realized with Karnaugh maps or more complex multi-level logic;
• flip flops, similar to the one you asked about (though most of the time you use a single-edge-triggered flip flop).

So basically to design a generic synchronous circuit you divide it in a combinational part and in registers (flip flops). To do this you must have a model of what you're doing; an example of a simple and useful one is that of Moore finite state machines in which you have a state $S$, an input $x$ and an output $y$. A combinational circuit $C_s$ is used to compute the new state as $S'=f_{C_s}(S, x)$, a second combinational circuit $C_y$ is used to compute the new output from the current state as $y=g_{C_y}(S)$ and the state is memorized in flip flops. Many other models exists apart from this one (e.g. Mealy finite state machines) but the constant is that your problem is always decomposed in a designing/synthesizing a set of combinational circuits and using flip flops. This can be done very efficiently by automatic synthesis tools from an RTL input such as Verilog, SystemVerilog or VHDL code.

But one problem remains: how to design flip flops then? Flip-flops themselves are neither synchronous circuits nor combinational circuits. They are the most famous representative of the category of asynchronous circuits. The most famous type of flip flop, the master-slave edge triggered one, is a relatively complex circuit composed by a sequence of two set-reset latches that are transparent on opposite phases of the clock. Each latch is composed by two simple gates in a feedback chain (see Wikipedia for details). In any case, the flip flop has to be designed very carefully so that it behaves as the ideal edge-triggered flip flop, sampling the input exactly at the clock edge (real flip flops have a setup time constraint, during which the input datum must be stable before sampling, and a hold time one during which the datum must be kept stable after sampling).

Unfortunately, there are no simple general methods for designing asynchronous circuits; in fact, such methods are a somewhat active field of research in the electronic design automation community.

• perfect explanation non of the books i read explained the last two paragraphs . now i understand the matter much better . – kiyarash Apr 11 '15 at 7:42
• Mmm, unfortunately I never read a good introductory book in English on the subject that I can suggest (I studied this years ago, in Italian). However, "Digital Fundamentals" by Floyd seems to have excellent reviews on Amazon, and should be covering exactly this. – Francesco Conti Apr 11 '15 at 7:53
• How can a D flip flop be an asynchronous circuit when it changes its state in precise instants of time - a definition of synchronous circuits your answers gives? – Dmitry Grigoryev Apr 18 '15 at 18:56
• @DmitryGrigoryev the point is that the flip flop does NOT change its internal state in a precise instant. The internal state of the flip flop is defined by the state of its two internal latches (master & slave in the most common FF design). That state does not change only on clock edge, in fact it changes during the whole cycle time. In a synchronous circuit output and state change synchronously to the clock. – Francesco Conti Apr 18 '15 at 19:02
• This is of course makes sense only if you want to look inside a FF. what you usually do is abstracting this away, making the FF a primitive of your model. – Francesco Conti Apr 18 '15 at 19:10