This website uses cookies. By using this site, you consent to the use of cookies. For more information, please take a look at our Privacy Policy.
Home > Wiki encyclopedia > Sequential logic

Sequential logic

According to the different characteristics of logic functions, digital circuits can be divided into two categories, one is called combinational logic circuit (referred to as combined circuit), and the other is called sequential logic circuit (referred to as sequential circuit). The logic function of the combinational logic circuit is that the output at any time depends only on the input at that time, regardless of the original state of the circuit. The characteristic of the sequential logic circuit in terms of logic function is that the output at any time depends not only on the input signal at the time, but also on the original state of the circuit, or it is also related to the previous input.

Sequential logic


Sequential logic circuits are an important part of digital logic circuits. Sequential logic circuits, also known as sequential circuits, are mainly composed of memory circuits and combinational logic circuits. It is different from other circuits we are familiar with. Its output state at any moment is determined by the input signal at that time and the original state of the circuit, and its state is mainly memorized and expressed by the storage circuit. At the same time, the particularity of the structure and function of sequential logic circuits is often more difficult, complicated and has a wide range of applications compared to other types of digital logic circuits.

Digital circuits are usually divided into two categories: combinational logic circuits and sequential logic circuits. The relevant contents of combinational logic circuits have been introduced in the previous chapters. The characteristic of combinational logic circuits is that changes in input directly reflect changes in output. The state of the output depends only on the current state of the input, and has nothing to do with the original state of the input and output, and the sequential circuit is a kind of output not only related to the current input, but also related to the original state of its output state, which is equivalent to the combinational logic A feedback input is added to the input end of the, and there is a storage circuit in its circuit, which can maintain the state of the output. We can use the block diagram below to describe the composition of the sequential circuit.

It can be seen from the above figure that the output is a function of the state of the input and the time before the output. At this time, the output function expression cannot be expressed by the function expression method of the combinational logic circuit. The concepts of Present state and Next State, when the present state represents the current state (usually represented by Qn), and the second state represents the state of its output after the input changes (usually represented by Qn 1) , Then the output state after the input change is expressed as

Qn 1=f(X,Qn)

Among them: X is the input variable.

The following uses two waveforms to help establish the concept of memory in sequential circuits:

It can be seen from the figure a above that there are four cases where the input RS is 0, but the state of its output Q is different, which depends on the original state of the output; and the input in the figure b is the same as the figure a , But there is one more CP, then the output Q depends not only on the original state of the input RS and output Q, but also on the state of the CP. Only when the CP is high, the state of the input can affect the state of the output. Generally, the above two types are divided into two forms of memory circuits: latches and flip-flops. The difference between the two is whether their output state changes depend on CP (clock pulse clock) Pulse). All the circuits in Figure a are called latches, and the circuits shown in Figure b are called flip-flop circuits.

Features of sequential logic circuits: The output at any time depends not only on the input at that time, but also on the original state of the circuit, so the sequential circuit has a memory function.

Three logic devices

Sequential logic circuits are widely used, and are divided according to the different logic functions required, and there are many types. In the specific lectures, three logic devices with wide application and typical sequential logic circuit characteristics are selected for detailed introduction.

1. Counter

Generally speaking, the counter is mainly composed of triggers, used to count the number of input count pulse CP. The output of the counter is usually a function of the current state. The maximum number of accumulated input pulses of the counter is called the "modulo" of the counter, which is denoted by M. Such as M=6 counter, also known as hexadecimal counter. Therefore, the "modulo" of the counter is actually the number of valid states of the circuit.

There are many types of logic graph counters for synchronous hexadecimal addition counters with different characteristics. The main classification is as follows: according to the counting system, it can be divided into: binary counter, decimal counter, and arbitrary counter. According to the count increase and decrease can be divided into: addition counter, subtraction counter, up/down counter, also known as reversible counter. According to whether the flip-flop in the counter is synchronized, it can be divided into: asynchronous counter and synchronous counter.

2. Register

The register is a circuit that stores numbers, operation results or instructions. The shift register can not only store numbers, but under the action of a shift pulse, the numbers in the register can be shifted to the left or right as needed. Registers and shift registers are basic logic components commonly used in digital systems and computers, and are widely used. One flip-flop can store one bit of binary code, and n flip-flops can store n-bit binary code. Therefore, flip-flops are an important part of registers and shift registers. The flip-flops in the register only require that they have the function of setting 0 or 1, and whether it is a trigger with a synchronous structure, or a trigger with a master-slave structure or an edge trigger, they can form a register.

3. Sequential pulse generator

Sequential pulse refers to the pulse signals arranged in a certain order in time in each cycle period. The circuit that generates a sequential pulse signal is called a sequential pulse generator. In digital systems, it is commonly used to control certain devices to perform calculations or operations in the order specified in advance.


The output of a sequential logic circuit at any time depends not only on the input at that time, but also depends on the input at various times in the past. Common sequential logic circuits include flip-flops, counters, and registers. Because the sequential logic circuit has the function of storage or memory, it is more complicated to repair.

Analysis of the main faults of digital circuits with sequential logic circuits:

1. Clock: The clock is the synchronous signal of the entire system. When the clock fails, it will bring about overall functional failure. Loss of the clock pulse will cause the system data bus, address bus or control bus to be inactive. Changes in the rate, amplitude, width, shape, and phase of clock pulses can cause malfunctions.

2. Reset: Devices containing a microprocessor (MPU), even the smallest system, generally have a reset function. The reset pulse is loaded on the MPU when the system is powered on, or returns the program to its original state under certain circumstances (for example, the watchdog program). When the reset pulse cannot occur, the signal is too narrow, the signal amplitude is incorrect, there is interference in the conversion, or the conversion is too slow, the program may start at the wrong address, causing the program to be chaotic.

3. Bus: The bus transfers instruction series and control events, generally there are address bus, data bus and control bus. Even if only one bit of an error occurs on the bus, it will seriously affect the system functions, such as wrong addressing, wrong data, or wrong operation. Bus errors can occur in the bus driver or other components that receive data bits.

4. Interruption: Systems with a microprocessor (MPU) are generally able to respond to interruption signals or device requests, generate control logic to temporarily interrupt program execution, go to special programs, service interruption devices, and then automatically return to the main program. The interruption error is mainly to interrupt the line adhesion (at this time the system operation is very slow) or to be disturbed (the system error responds to the interruption request).

5. Signal attenuation and distortion: Long parallel buses and control lines may have crosstalk and transmission line failures, which are manifested by spikes on adjacent signal lines (interactive crosstalk), or reduced amplitude oscillations on the drive line (equivalent to logic Multiple conversions of levels), which may add erroneous data or control signals. There are many possible causes of signal attenuation. Common ones include high humidity environment, long transmission line, and high rate conversion. Large electronic interference sources can produce electromagnetic interference (EMI), which can cause signal distortion and circuit malfunction.

Inspection method

Before overhauling sequential logic circuits, you should be familiar with the structural principles and circuits of the system as much as possible, and then analyze the characterization characteristics of the fault to narrow the scope of the fault as much as possible. Higher-grade medical equipment generally has a self-diagnostic program that can make full use of it to find faults and locate faults to a smaller range.

Check the power supply

Sequential logic circuits often use ±5V, ±15V, and ±12V power supplies. When the power supply is short-circuited to the ground or the power supply is poorly stable, it may cause system failure, which is manifested as system unresponsiveness and system program disorder. In general, the short circuit of the power supply to ground is caused by the short circuit of the capacitor (decoupling capacitor). The best way to find the fault capacitor is to use the current tracker to track the short circuit current. If there is no current tracker, the circuit must be searched and replaced.

Check the clock

The clock circuit is generally composed of a quartz crystal circuit (there is also an RC oscillator circuit). According to experience, quartz crystals are more susceptible to damage. You can use an oscilloscope to test the frequency, amplitude, and phase of the clock signal, or simply use a logic probe to detect the presence or absence of clock pulses. The clock of each unit circuit should be detected to prevent the clock pulse from being incorrect due to disconnection, loosening, and interference.

Check the bus

Use a logic probe to check for pulse activity on the bus. If there is no pulse activity on the bus, you can continue to check whether there is a pulse signal at the input end of the bus driver, whether the driver is in the allowed state, whether the driver responds to excitation, etc., to determine whether the failure is caused by the bus driver, and then check each bus receiver in turn . In addition, you can turn off the power and use a multimeter to check the resistance of each line of the bus to ground. If the resistance of all lines is the same, then the bus is estimated to be normal; if the resistance of one or more lines is different from the rest, then the line is worth Doubt; if there are two wires with the same resistance, but higher or lower than the other wires, then the two wires may be shorted to each other.

Check critical pulse signals

Using logic probes, oscilloscopes, or logic analyzers to observe control signals such as reset, enable, strobe, read, write, interrupt, and memory reads can determine whether the integrated circuit (IC) is working properly. When the reset signal is valid, the IC output should be cleared or set, and the program should return to the initial state to run; when the enable signal is valid and the clock pulse is normal, there should be pulse activity on the IC data line; when the logic probe is connected to Reading the memory line, and the indicator light does not flash (that is, there is no pulse activity on the reading memory line), indicating that the microprocessor may be stuck somewhere in the program, because each instruction reads the memory at the address, reading the memory line Normally, there should be a pulse signal; for the interrupt signal, a logic probe can be used to observe whether the adhesion of the interrupt line occurs, and the interruption under test can also be controlled (allowed or prohibited) by applying a DC voltage or a low level.

Check the interface

When the interface card, printed board and socket are plugged in, they may loosen or deviate from the center, causing poor contact and causing faults. In fact, many faults are indeed caused by this. You can use clean alcohol to wipe the clean interface and then plug in and fix it. In addition, digital systems are often connected to other systems through external communication lines (RS232, MODEM, IEEE-488, etc.), and the connection lines are usually very long, and may be exposed to electronic interference sources, such as relays, motors, transformers, large X-rays Devices, rainy days, lightning, etc., poor connection interface and electromagnetic interference (EMI) from electronic interference sources may cause erroneous data transmission and even damage related components. For electromagnetic interference, it is best to find the source of interference and eliminate it. Second, it can improve the working environment (such as humidity and temperature, etc.), strengthen the shield, or use a cable with good shielding performance.

There are many methods and skills for the maintenance of sequential logic circuits. It is necessary to sum up experience through long-term practical work to better diagnose, find, and eliminate faults, and improve the maintenance technical level of sequential logic circuits.


  • XC3S700A-4FGG400C


    FPGA Spartan-3A Family 700K Gates 13248 Cells 667MHz 90nm Technology 1.2V 400-Pin FBGA

  • XC3S700A-4FTG256I


    FPGA Spartan-3A Family 700K Gates 13248 Cells 667MHz 90nm Technology 1.2V 256-Pin FTBGA

  • XC2V1000-5FFG896C


    FPGA Virtex-II Family 1M Gates 11520 Cells 750MHz 0.15um Technology 1.5V 896-Pin FCBGA

  • XC5406-6TQ100C


    Xilinx TQFP

  • XC3S700A-5FG484C


    FPGA Spartan-3A Family 700K Gates 13248 Cells 770MHz 90nm Technology 1.2V 484-Pin FBGA

FPGA Tutorial Lattice FPGA
Need Help?


If you have any questions about the product and related issues, Please contact us.