How does Tieba Master make his own CPU?

When the CPU is too expensive to buy, some people choose to make a CPU.

If someone tells you to “hand rub” a CPU, I think the first reaction of most friends who know about the CPU industry is “what are you dreaming about?”. Because even the lowest-cost chips currently use micron -level processes, both design and production require the assistance of professional machines, and it is almost impossible to manufacture them with original tools.

However, if it is an antique CPU, there is still the possibility of artificial self-made success. After all, the first computer of mankind was built by a group of engineers and scientists with bare hands, at most using tools such as welding torches. If it can be done by people decades ago, then under the guidance of modern and more advanced microelectronics engineering, making an antique-grade processor is not a difficult task.

For example, a Tieba master made a CPU and successfully ran his own handwritten binary program. Netizens called him “a man on his liver” and “Welding Wudi”. If you are curious about how he made a CPU by himself, Xiao Lei I will take you to see it today.

How to rub a CPU by hand?

Before rubbing the CPU by hand, you must first understand the basic structure of the CPU. Although after decades of development, modern CPUs have been greatly different from the earliest CPUs in technology, but the basic structure is still roughly the same. For example, arithmetic logic components used for logic calculations, register components used to temporarily store instructions, data and addresses, and control components used to control and analyze instructions, ranging from ordinary light control chips to the processor core of supercomputers , Basically follow this design.

How does Tieba Master make his own CPU?

After figuring out the main structure of the CPU, the first obstacle in front of you is the circuit design. Otherwise, even how to wire and where to connect will become a problem, let alone building a processor. There are a lot of software that can be used for CPU design. The Quartus used by this hand-wrapped CPU is a design software launched by Intel with powerful auxiliary functions.

How does Tieba Master make his own CPU?

After turning out the schematics designed with Quartus a few years ago, naiweide (the ID of the great god of Tieba hand rubbing CPU) began to build a shift register, which is one of the key components of the CPU we mentioned above. The input data will pass by and be assigned to the location where it should go. According to naiweide’s description, “just like the traffic police in the middle of the road, directing the data when and where to go.”

It can be said that if there is a problem with the shift register, then the data will not be input to the correct position, resulting in the inability to execute the instructions correctly, just like a “car accident” and impassable.

You can feel the size of this shift register.

How does Tieba Master make his own CPU?

How does Tieba Master make his own CPU?

Basically, the parts used are mainly diodes, transistors and resistors. In addition, there are also gate circuits as the foundation. In fact, the following parts basically only need these parts, but the number is different.

After completing the production of the register, naiweide began to produce the program counter, which is the arithmetic logic component mentioned above. This module can be said to be the most difficult stage of the entire first stage, and to some extent it is also the most “persuaded” stage. (Naiweide claims to have consumed half of his head’s hair, and mourns for his hair).

How does Tieba Master make his own CPU?

The number of parts involved in the program counter far exceeds the registers. As long as one of the parts has a problem, the entire system will be affected. Moreover, it lacks an effective debug mechanism, and it is quite difficult to find the fault location. In the actual welding process, affected by the amount of solder, welding time and other factors, unexpected problems may occur in various parts that seem to be normal in actual operation.

For example, after a successful operation, although everything is normal to the naked eye, when naiweide uses the mobile phone to record and slow down the video, it quickly finds that the execution speed of the program counter is fast and slow, and the execution speed should be constant under normal circumstances. Yes, the sudden speed and slowness indicate that one of the hardware has a problem.

After a week of debugging, I finally found a diode that was soldered upside down deep in the hardware. In addition to dealing with various other problems, it took more than a month for the program counter to finally be made successfully. It is just the first step. After combining it with the register, it is still unknown whether it can operate normally.

In order to show you the complexity of the program counter more intuitively, you can take a look at the partial details shot by naiweide.

How does Tieba Master make his own CPU?

How does Tieba Master make his own CPU?

How does Tieba Master make his own CPU?

How does Tieba Master make his own CPU?

Final version

Moreover, in the process to build the program counter, naiweide also found serious problems in their schematics, unable to properly control and analysis instructions, while ultimately only be able to debug the side of the electrical circuit diagram modified, hard work pays off, the ultimate success of lights All indicator lights have received feedback from normal operation.

After the register and the program counter are completed, an instruction set is to be created next , which is used to parse and execute the input instructions, that is, the control unit. To some extent, the advanced level of the instruction set will directly affect the performance of the CPU, but for this antique CPU built by naiweide, it is successful to run normally.

How does Tieba Master make his own CPU?

Compared with the program counter, the design and production of the instruction set part is not difficult, but it will also encounter many problems, because at this step, the three major components need to be combined for testing. As long as one of the links conflicts, then Wrong information and results will be fed back.

How does Tieba Master make his own CPU?

How does Tieba Master make his own CPU?

After soldering the corresponding hardware, naiweide successfully made this antique CPU successfully run the 00H and 01H instructions. Strictly speaking, he has successfully built a real CPU. The next goal is to use this CPU to achieve Water lamp effect.

Even before this, the program counter was damaged again. After a detailed inspection, it was found that a diode was broken down by current during operation and was completely damaged. It finally started normally after being replaced.

Really write code

Flowing water lighting effect, in simple terms, is that the lights turn on and off in sequence. It is one of the most common lighting effects in our daily life. Under normal circumstances, only a small fingernail-sized chip can be realized, including the water lighting effect. A variety of lighting effects control.

It seems that it is not difficult? After all, it’s just light control. Any toy may have this function. However, don’t forget that this CPU is completely hand-built, which is equivalent to a completely self-developed instruction set and architecture, so there is no way to get help from the existing information, and even the supporting programming language is lacking.

So, how does naiweide solve programming problems? It’s very simple, using the most primitive mechanical language-binary, which is a long string of digital codes composed of 0 and 1. For the average person, maybe just looking at that large string of codes is already dizzy, and think that humans can really understand it? In fact, it is not a whimsical thing to compile it, and some commonly used codes can be easily memorized.

How does Tieba Master make his own CPU?

If you use some existing programming software, you can actually write this code easily, but naiweide still uses the most primitive handwritten code method to create the first complete program of this CPU. As for the method of inputting the program, it is also quite hard-core, the “button” button is pressed on an 8-bit instruction input board according to the sequence of the binary code, and then the second code is input after the input is completed.

After completing the instruction input, naiweide found that the program was not running normally. In the subsequent inspection, it was found that the connection was accidentally disconnected, and there were some problems in the program design. Finally, it was reprogrammed to successfully run a complete set of pipelines. Lighting effect.

How does Tieba Master make his own CPU?

Does it make sense to rub the CPU by hand?

The CPU made by naiweide may not be as good as a processor bought by Taobao for a few dollars in terms of performance and functionality. According to the author’s description, at the initial startup, the main frequency was only a poor 1Hz, and after many improvements, it only increased to 100kHz.

For comparison, Taobao’s 5 yuan G620 processor has a main frequency of 2.6GHz, which is 2600MHz, which is equal to 2600000KHz, which is 26,000 times that of a self-made CPU. Considering the richer and more complete instruction set and architecture, the actual gap is still Will be bigger. As for the process that everyone often mentions when talking about CPU, the CPU is probably 2.54mm process, which is hundreds of thousands of times the current 5nm advanced process.

Of course, it is definitely meaningless to look at performance alone. The original intention of naiweide to make a CPU is to personally verify the execution process of the binary code, and to figure out the operating logic of the CPU from scratch, and to learn from practice, only if it has been done. In order to better understand the operation process of the whole system and hardware in the subsequent work.

Therefore, from a practical point of view, it does not make much sense, but for naiweide it is a very good process of learning and accumulating experience.

Although many reviews say that only university-level knowledge can make the same work, few people have the perseverance and patience, and these are the prerequisites for success, so Xiao Lei is looking forward to this. Bit UP will be able to make greater contributions in this field in the future.

Posted by:CoinYuppie,Reprinted with attribution to:
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2021-07-27 04:20
Next 2021-07-27 04:21

Related articles