Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

This guy on the motherboard wants to be a middleman between CPU and memory.

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > IT Information >

Share

Shulou(Shulou.com)11/24 Report--

This article comes from the official account of Wechat: programming Technology Universe (ID:xuanyuancoding), author: Xuanyuan Wind O

I am a stick of memory, which has just been produced from a factory in Shenzhen. Along with me, there are a group of friends who look exactly like me. After getting off the assembly line, we were thrown into a dark corner.

"where is this? it's dark," said one of his buddies.

"this is the memory warehouse." someone was talking in the dark, with a slight twist of vicissitudes in his voice, like an old man.

"who? who's there?"

"Don't worry, I'm also a memory stick, and I was produced a few months before you," the old man said.

"what, you've been locked up here for months, and it's over." my friend is in a hurry.

"No, I went out, and later it was found that it was defective and was recycled and locked up here. Unlike me, you have just been produced, and you should be able to go out soon and be installed on the computer motherboard to realize your value."

"computer motherboard? what is that place?" Oh, I asked curiously.

The voice continued, "that's the core of the computer, a huge circuit board with CPU, hard drives, network cards, graphics cards, sound cards and, of course, our memory strips. The computer must have us to function properly, because the instructions and data needed for CPU to work are stored in our memory."

As soon as we finished, the lights lit up around us, and at this time, we saw clearly what my friends and I looked like.

"what are those black things on us? it's really a bit of a shame!"

"Don't underestimate them. That's the core memory chip of our memory stick. Our data is all in it. One of them is 1GB, a total of 16, which is the space of 16GB." Well, the old man said again.

The strange thing is, we still can't see him.

"where are you? why can't you be seen when the light is on?" Well, a little friend asked.

"I'm in the locker next door, and defective products like me probably won't get a chance to go out."

"you just said there are 16 memory chips, but isn't that obviously only eight?"

"turn around and have a look. There are still eight on your back."

All of us turned around and looked, and sure enough.

The old man continued: "in addition to the memory chip, there are PCB circuit boards and Goldfinger, these three parts together make up our bodies."

"what is Goldfinger?"

"it's the rich gold color part of the row under our feet, and that's the contact point where we connect the motherboard slot. There are 120 contacts on one side and 240 on both sides. Because each point looks like a finger, people call it Goldfinger."

"then why is there a gap in the middle?"

"each of our golden fingers has different functions, and we can't confuse the pros and cons. In order to prevent stupid humans from inserting us incorrectly, there is a gap in the middle, which can't be plugged in if it's reversed. Through the circuit on the motherboard, we can connect to the computer's bus system and talk to CPU."

I see. We all nodded thoughtfully.

Data storage next, the old man also told a lot of stories about the ancestors of our memory sticks.

It turns out that we also have a more professional name: RAM, random access memory, because we can read and write data at any location.

The old man also said that computers are basically binary nowadays, and no matter what kind of data or code instructions they are, they are all strings of 0 and 1 bits here.

Our forefathers did a lot of work to store this bit.

There were two circuit schemes in front of our ancestors. The first is the static scheme.

Isn't it complicated? Me, too. The advantage of this circuit scheme is that it can stably maintain a certain state between 0 and 1, so it is called static SRAM.

But need to use too many transistors, a bit to use several transistors, 16GB that how much to use ah, the cost is too high, to build us will certainly be very large, the motherboard space is so cramped, how can it fit?

Our ancestors did not choose this scheme, but used the second one:

Look, isn't it a lot easier? Whether this is a 1 or a 0 can be determined by the charge of a capacitor.

In every memory chip we have, there are many such bit memory cells:

If you zoom out again, they are arranged densely, and each bit is determined by the row address and the column address:

Tu Yuan Zhi Hu @ Lao Wolf but there is a problem with this circuit scheme, that is, the capacitor inside will be "leaking", the charge in the capacitor will gradually disappear, and the voltage will become smaller, so there is no way to tell whether this is a 1 or 0. In order to solve this problem, we have to charge them periodically in order to maintain the stability of the data, which is called dynamic data refresh, so this scheme is called dynamic DRAM.

The old man was telling us about the rise of memory addressing when suddenly someone packed us up and all our little friends were separated.

After a long period of darkness and loneliness, that day suddenly clicked, my golden finger and card slot connected, is this the legendary motherboard?

"you are the memory. We have been waiting for you for a long time. Now that you are here, we can finally get to work!" Oh, the guy next to me said hello to me.

"who are you?"

"Hello, I'm Ah Q from CPU. Look, it's right next door to you. We have to deal with each other every day. By the way, tell me, how much storage space do you have?"

I checked and replied, "I have 16GB space, that is, 137438953472 bits!"

"Wow, so much! that's awesome! but how can I use you to store data?"

"it's simple. Which bit bit do you want to visit? tell me the chip number, bank number, row address, column address, and I'll just get the data to you."

"Why are you so troublesome? if you don't talk about martial arts, these internal details should be encapsulated and provide me with a simple interface," Ah Q complained.

"two eldest brothers, look here", at this time, not far from the motherboard, another guy opened his mouth.

"who are you?" Ah Q and I asked in unison.

The guy squinted and said, "I'm a memory controller for both of you."

"what, you want to control me?"

"Don't get me wrong, I'm just an intermediary, providing services for both of you."

Seeing that we were confused, the guy went on to say, "Brother memory, does the capacitor in your data storage circuit unit often leak and need to be refreshed regularly? and according to the regulations, the 64ms has to be refreshed at most? don't worry, I'll do the data refresh later."

"how do you know that?"

The guy smiled and continued, "what is this? I also know that your data is stored on every memory chip on your body, each chip is divided into many chips, and each chip has a lot of bit storage cells." if you want to access which bit, you have to specify the corresponding chip, the corresponding shard, the row address and the column address of the corresponding grid. Am I right? "

Tuyuan network I nodded, did not expect this guy to know me so well.

"Ah Q, you CPU want to access data, I'm sure you don't want to bother so much, do you?" Well, the guy asked with a smile.

"of course!"

"so, I came in handy. It's too troublesome to use bits as reading and writing units. Let's divide the eight bits into a group, called one byte. Your CPU side addresses the memory space of the memory brothers. When you want to read the data in the future, give it to me. I will tell the memory brothers to read and write which chip, which chip, which location, how about? Has it solved the big trouble for you? " With that, the memory controller smiled proudly.

"that sounds good. Let's get started!"

"not yet, there's no electricity yet!"

But we didn't wait long when we heard a hiss and electricity!

Then we began to work together. When we met for the first time, the cooperation went very smoothly. CPU addressed all my storage bits according to bytes. After that, only one address was needed, and the memory controller was converted into a specific data storage location to me, and then I completed the read and write operation.

Later, I saw that the memory controller performed very well. Under the influence of Ah Q, I also integrated him into CPU, and now I have become one of them!

CPU and I have been getting along well, but before long, they began to think that I am slow, to speak slowly, the hard drive guy is much slower than me!

They found that there was nothing they could do with me, so they made another cache inside CPU. They didn't have to ask me for data every time, but it saved me a lot of work.

I lived my life like this. I thought I was going to work on this motherboard until I retired. Unexpectedly, one day, a browser program told me, "Brother memory, you are finished. Just now I saw that the owner bought a new DDR4 memory stick online. You are going to be eliminated."

Am I going to be in the dark room, too?

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

IT Information

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report