After four years of graduation, although the driver of embedded real-time software systems has been working for some time, the title of "Hardware Engineer" has always been available. In fact, it is a bit embarrassing, not to mention the depth of the hardware, in addition to a considerable amount of time to design the hardware circuit, more importantly, the PCB layout. Think about the circuit board, from the single panel on the front panel of the simple digital TV set-top box, to the dual panel of the industrial control class with the AT89C51 as the core, and the baseband dual panel of the wireless spread spectrum radio station, there are no more than 20 Application boards of High-Speed FPGA with complicated four layers including DDR memery bus. Fortunately, there are still eight layers of mobile phone circuits, there are some ideas about PCB layout. An idea or experience is worth mentioning. As long as it can be helpful to readers, it will achieve the purpose of writing this article.
In addition to implementing circuit principles and functions, an excellent circuit board also needs to consider electrical characteristics such as EMI, EMC, ESD, and signal integrity, as well as the heat dissipation of mechanical structures and high-power chips, on this basis, consider the appearance of the circuit board. Therefore, PCB layout is an art, specifically an art of door compromise. Before learning to explore PCB wiring, you may see a variety of PCB wiring rules in a variety of reference books, even if many rules have the same meaning to a certain extent, however, different actual layout practices have different focuses, and even conflicts may occur between rules. For example, rule 1: The shorter the signal transmission path, the better. Rule 2 requires impedance matching in high-frequency cabling. When considering the DDR memory bus, the memery chip encapsulated by SOP cannot implement rule 1 for all tracks, the correct method is to achieve the shortest of all tracks under the overall consideration of impedance matching. Therefore, the unavailability of rules in the actual cabling will lead to various doubts when readers consciously and effectively use these rules during the Cabling Process, they are even overwhelmed by general rules like this or that. In this case, we need to emphasize that various wiring rules are only instructive. We need to combine the actual wiring process to constantly compromise to maximize the effectiveness. I think that as long as you pay attention to these rules in the actual wiring, it will be more or less helpful to the wiring effect.
1. modular and structured ideas should be reflected not only in the design of hardware principles, but also in the layout and wiring effects.
Nowadays, the integration of hardware platforms is getting higher and higher, and the system is becoming more and more complex. Naturally, modular and structured design methods are required in both the design of hardware schematics and PCB cabling. If you have been familiar with large-scale FPGA or CPLD, you will know that the design of complex IC must adopt a modular design method from top to bottom. Therefore, as a hardware engineer, when understanding the overall architecture of the system, we should first consciously integrate the modular design idea in the schematic diagram and PCB wiring design. For example, the main IC-QAMI5516 of the hardware platform of the digital TV set-top box has the following modules:
St20: 32-bit CPU with a clock speed of MHz
PTI: processing unit of transport stream
Display: MPEG-2 decoding, display Processing Unit
Demodulator: QAM Modem
Memory interface: different memory interfaces are required for different application systems.
Stbus: data communication bus of each module
Peripherals: UART, smartcard, IIC, gpio, PWM and other common peripherals
Audio: audio output interface
Vedio: video output interface
Qami5516 modular design process, although not necessarily require hardware engineers to understand all aspects of the system, but must be in the design of the hardware platform, the interface parts of different IC modules used in practical use are treated as a sub-system: for example, some audio and video circuits should be laid out and laid out in a whole area. This not only continues the idea of IC modular design, but also facilitates physical separation of PCB boards, reducing electrical coupling between different modules and facilitating debugging of the entire system. We know that hardware debugging is the easiest way to check, and the way to handle errors in circuit principle design is "headache and headache", that is, if there is a problem with the audio circuit on the above qami5516 platform, the first thing to do is check and verify the audio module.
The idea of modularization is also embodied in the cabling of the system bus. Generally, the bus is divided into three types: concrol bus, data bus, and ADDR bus. For example, in qami5516 above, SMI uses a 16 m sdram with a working frequency of 100 MHz, this requires that the group of buses should be unified into a whole during the Cabling Process to consider impedance matching. In the actual wiring process, it is impossible to deploy these cables in seven or eight ways.
The idea of modularization is also conducive to the layout of PCB.
The idea of modularization is also conducive to the expansion or modification of hardware system functions.
2. From the perspective of the entire system, analyze the signal nature of each module to determine its position in the entire system, so as to determine the priority of the module in layout and wiring.
Layout is of great significance to the entire system, which requires that specific processing of each module should be prioritized during the actual wiring process. The general layout rules require distinguishing whether a module is a analog circuit, a digital circuit, a high-frequency circuit, a low-frequency circuit, a major interference source, or a sensitive key signal. Therefore, before the layout, we must carefully analyze the signal properties of each module, including the module attributes, functions, power supply, specific signal frequency, current flow direction, and current intensity, to determine the module layout on the PCB. Generally, when the mechanical structure is determined, there are n different layout methods for complex systems, from the system perspective, we need to find the optimal layout and wiring according to the compromise of some rules.
Clock is used in digital modules, such as the clock of SDRAM, and the clock circuit is the main factor affecting EMC. Most of the noise of an integrated circuit is related to the clock frequency and its harmonic. If the clock signal is in the form of a sine wave, if improperly processed, the system will "Contribute" an interference source of the current frequency or frequency doubling. If the clock signal is in the form of a square wave, then, the system will "Contribute" A stray frequency interference source. At the same time, clock is a signal that is easily disturbed. If clock is disturbed, the impact on the digital system can be imagined. Therefore, the clock circuit module is a key module. In the layout and wiring process, the layout and wiring are prioritized by various rules.
Similarly, there are various interrupt modules in many embedded hardware systems. The interrupt trigger includes Level Trigger and edge trigger. Once upon a time, an interruption triggered by the rising edge is constantly triggered due to external interference, leading to the blocking of RTOS due to processing failures.
According to this principle, two simple circuit la s are analyzed. In a mobile phone hardware platform I have come into contact with, the brightness circuit of the display screen is achieved through different pulse width signals produced by a PWM, and different backlight voltages are established through an RC integral circuit. Compared with clock, PWM signals have the same effect on EMI of the entire system. However, if you analyze it carefully, you should know that when wiring, the PWM signal of the IC is transmitted on the PCB only after the analog level is set up in the shortest path, that is to say, the resistor and capacitor are placed as close as possible to the PWM pin, which can minimize the interference of PWM on the system. In the design of the mobile phone hardware platform, the RF part and the audio part are the core of the system. The wiring of these two parts occupies the absolute core position and is given priority during cabling. Therefore, in the actual layout and wiring, the signal lines of the two modules are separately arranged in the middle layer, and the power layer and formation are used in the adjacent layer to shield them, at the same time, other modules should try to stay away from these two modules to avoid interference. In addition, we try to consider the following details: MIC input requires a small audio signal to be amplified to a certain extent before entering it into the audio ADC. We know that in the abstract sense, the signal-to-noise ratio of channel transmission is a measure of the impact of noise on the system. For mutual reference, the effect of a small noise on the channel before the audio signal is amplified is the same as that on the audio signal after the audio signal is amplified. If the path of this channel cannot pass through some areas with strong interference sources, we recommend that the audio signal be amplified before transmission.
For example, on the bus of a complex system, a device of the type is usually mounted. For example, the I2C bus can mount 127 slave devices, and demodulator, tuner, and E2PROM are usually mounted on some set-top box hardware platforms. This also requires that different devices be differentiated for the frequency of the shared bus, and devices with high usage frequency should be placed in relatively important positions. For example, the EMI interface on the above qami5516 platform uses both the SDRAM and flash devices. Based on the understanding of the system, SDRAM stores the Running code of the real-time operating system, and Flash is a storage medium, when the software system is running, SDRAM has more read and write operations than Flash. Therefore, you should first consider the location of SDRAM during the wiring process.
3. Focus on power integrity, and prioritize power supply and ground line handling in layout and wiring
In any electronic system, the interference of the interference source to the system is essentially two ways: one is transmission through a conductor, and the other is space coupling through electromagnetic radiation. In a low-frequency system, it is mainly the first path. In a high-frequency system, a considerable amount of interference is caused by the transmission of conductors, it is obvious that the noise produced by the IC interferes with the whole system through power supply and ground. Therefore, the integrity of the power supply or the quality of the power supply is of critical significance to the entire system's anti-interference ability. Power integrity is actually part of signal integrity, but is listed here separately considering the importance of power to all systems. It should be declared that in the actual system, it is not easy to achieve this, there will always be various frequencies of noise in the system. In circuit design and PCB layout, the system only tries its best to reduce the noise of various frequencies, thus improving the overall performance of the system against noise. At the same time, in a complex system, reducing the noise of the system is not only possible by changing the value of one or two capacitors. Instead, you must pay attention to the accumulation of the power filter effect. In the design of mobile phone hardware, a dedicated PMU is used to supply power to each module. However, PMU is from vbat. It cannot be imagined that if the power supply of the Sensitive Audio Op Amplifier is not filtered, it is directly taken from vbat, or, for example, the circuit that powers the SDRAM is not filtered, what are the consequences of letting the switch noise of this digital circuit pollute the entire vbat?
If you have paid enough attention to the power supply integrity, and combined with the modular model described above and the careful analysis of each module, this part is relatively better. For IC power supply VCC, the common rules are generally to use the bypass capacitor and decoupling capacitor for processing, and when the layout is as close as possible to the IC power input. In demanding systems, lccl circuits can also be used for different sensitivity frequencies (concatenating an inductor or magnetic beads, an electrolytic capacitor, and a porcelain chip capacitor, A small inductance is added, and the specific value must be determined according to the corresponding frequency. Once a complex system was built, because no bypass capacitor was used on the core power supply of the system's demodulator, the error rate after demodulator's demodulation was intolerable. For the processing of various Gnd in the system, it is generally necessary to analyze the reflux path of the current. The current always selects the least impedance reflux path. This is a core principle and can be understood through the fact that there is a "copper" pattern in PCB wiring. "Copper" is often used on the network Gnd. All digital signals can be abstracted into a most basic gate circuit, And Gnd is part of the signal reflux path. Gnd reduces the total impedance of the signal path through copper spreading. This is also the reason for "grounding nearby" and "minimizing Grounding Impedance.
The above is just a story about some of the deep feelings of the monks in the PCB over the past few years. With these three guiding principles, combined with many specific wiring rules, the rest is your attitude. Of course, after all, the capabilities and insights are limited, which will inevitably be biased. please correct me if you have any shortcomings.