Skip to main content

Sequential logic

Sequential logic

From Wikipedia, the free encyclopedia
In digital circuit theory, sequential logic is a type of logic circuit whose output depends not only on the present value of its input signals but on the sequence of past inputs, the input history.[1][2][3][4] This is in contrast to combinational logic, whose output is a function of only the present input. That is, sequential logic has state (memory) while combinational logic does not. Or, in other words, sequential logic is combinational logic with memory.
Sequential logic is used to construct finite state machines, a basic building block in all digital circuitry, as well as memory circuits and other devices. Virtually all circuits in practical digital devices are a mixture of combinational and sequential logic.
A familiar example of a device with sequential logic is a television set with "channel up" and "channel down" buttons.[1]Pressing the "up" button gives the television an input telling it to switch to the next channel above the one it is currently receiving. If the television is on channel 5, pressing "up" switches it to receive channel 6. However if the television is on channel 8, pressing "up" switches it to channel "9". In order for the channel selection to operate correctly, the television must be aware of which channel it is currently receiving, which was determined by past channel selections.[1] The television stores the current channel as part of its state. When a "channel up" or "channel down" input is given to it, the sequential logic of the channel selection circuitry calculates the new channel from the input and the current channel.
Digital sequential logic circuits are divided into synchronous and asynchronous types. In synchronous sequential circuits, the state of the device changes only at discrete times in response to a clock signal. In asynchronous circuits the state of the device can change at any time in response to changing inputs.

Synchronous sequential logic

Nearly all sequential logic today is clocked or synchronous logic. In a synchronous circuit, an electronic oscillator called aclock (or clock generator) generates a sequence of repetitive pulses called the clock signal which is distributed to all the memory elements in the circuit. The basic memory element in sequential logic is the flip-flop. The output of each flip-flop only changes when triggered by the clock pulse, so changes to the logic signals throughout the circuit all begin at the same time, at regular intervals, synchronized by the clock.
The output of all the storage elements (flip-flops) in the circuit at any given time, the binary data they contain, is called thestate of the circuit. The state of a synchronous circuit only changes on clock pulses. At each cycle, the next state is determined by the current state and the value of the input signals when the clock pulse occurs.
The main advantage of synchronous logic is its simplicity. The logic gates which perform the operations on the data require a finite amount of time to respond to changes to their inputs. This is called propagation delay. The interval between clock pulses must be long enough so that all the logic gates have time to respond to the changes and their outputs "settle" to stable logic values, before the next clock pulse occurs. As long as this condition is met (ignoring certain other details) the circuit is guaranteed to be stable and reliable. This determines the maximum operating speed of a synchronous circuit.
Synchronous logic has two main disadvantages:
  • The maximum possible clock rate is determined by the slowest logic path in the circuit, otherwise known as the critical path. Every logical calculation, from the simplest to the most complex, must complete in one clock cycle. So logic paths that complete their calculations quickly are idle much of the time, waiting for the next clock pulse. Therefore synchronous logic can be slower than asynchronous logic. One way to speed up synchronous circuits is to split complex operations into several simple operations which can be performed in successive clock cycles, a technique known as pipelining. This technique is extensively used in microprocessor design, and helps to improve the performance of modern processors.
  • The clock signal must be distributed to every flip-flop in the circuit. As the clock is usually a high-frequency signal, this distribution consumes a relatively large amount of power and dissipates much heat. Even the flip-flops that are doing nothing consume a small amount of power, thereby generating waste heat in the chip. In portable devices which have limited battery power, the clock signal goes on even when the device is not being used, consuming power.

Asynchronous sequential logic

Asynchronous sequential logic is not synchronized by a clock signal; the outputs of the circuit change directly in response to changes in inputs. The advantage of asynchronous logic is that it can be faster than synchronous logic, because the circuit doesn't have to wait for a clock signal to process inputs. The speed of the device is potentially limited only by thepropagation delays of the logic gates used.
However, asynchronous logic is more difficult to design and is subject to problems not encountered in synchronous designs. The main problem is that digital memory elements are sensitive to the order that their input signals arrive; if two signals arrive at a logic gate at almost the same time, which state the circuit goes into can depend on which signal gets to the gate first. Therefore the circuit can go into the wrong state, depending on small differences in the propagation delays of the logic gates. This is called a race condition. This problem is not as severe in synchronous circuits because the outputs of the memory elements only change at each clock pulse. The interval between clock signals is designed to be long enough to allow the outputs of the memory elements to "settle" so they are not changing when the next clock comes. Therefore the only timing problems are due to "asynchronous inputs"; inputs to the circuit from other systems which are not synchronized to the clock signal.
Asynchronous sequential circuits are typically used only in a few critical parts of otherwise synchronous systems where speed is at a premium, such as parts of microprocessors and digital signal processing circuits.
The design of asynchronous logic uses different mathematical models and techniques from synchronous logic, and is an active area of research.

Comments

Popular posts from this blog

Compatibility of C and C++

Compatibility of C and C++ From Wikipedia, the free encyclopedia This article  needs additional citations for  verification .  Please help  improve this article  by  adding citations to reliable sources . Unsourced material may be challenged and removed.   (August 2013)   ( Learn how and when to remove this template message ) Programming language comparisons General comparison Basic syntax Basic instructions Exception handling Enumerated types Anonymous functions Conditional expressions Functional instructions Arrays Associative arrays String operations String functions List comprehension Object-oriented programming Object-oriented constructors While loops For loops Evaluation strategy List of "Hello World" programs Languages with dependent types Comparison of type systems Comparison of individual languages [show] v t e The  C  and  C++   programming languages ...

History of C++

History Edit Bjarne Stroustrup , the creator of C++ In 1979,  Bjarne Stroustrup , a Danish computer scientist, began work on the predecessor to C++, " C with  Classes ". [8]  The motivation for creating a new language originated from Stroustrup's experience in programming for his Ph.D. thesis. Stroustrup found that  Simula  had features that were very helpful for large software development, but the language was too slow for practical use, while  BCPL  was fast but too low-level to be suitable for large software development. When Stroustrup started working in  AT&T Bell Labs , he had the problem of analyzing the  UNIX   kernel  with respect to  distributed computing . Remembering his Ph.D. experience, Stroustrup set out to enhance the  C language with  Simula -like features. [9]  C was chosen because it was general-purpose, fast, portable and widely used. As well as C and Simula's influences, other ...

Manchester Small-Scale Experimental Machine

Manchester Small-Scale Experimental Machine Replica of the Small-Scale Experimental Machine (SSEM) at the  Museum of Science and Industry  in Castlefield ,  Manchester The  Manchester Small-Scale Experimental Machine  ( SSEM ), nicknamed Baby , was the world's first  stored-program computer . It was built at the  Victoria University of Manchester , England, by  Frederic C. Williams ,  Tom Kilburn  and Geoff Tootill , and ran its first program on 21 June 1948. [1] The machine was not intended to be a practical computer but was instead designed as a  testbed  for the  Williams tube , an early form of computer memory. Although considered "small and primitive" by the standards of its time, it was the first working machine to contain all the elements essential to a modern electronic computer. [2]  As soon as the SSEM had demonstrated the feasibility of its design, a project was initiated at the university ...