Why is there so little RAM inside the microcontroller?
You are here: Home » News » Why is there so little RAM inside the microcontroller?

Why is there so little RAM inside the microcontroller?

Views: 2411     Author: Site Editor     Publish Time: 2022-02-12      Origin: TsinghuaJoking

Inquire

facebook sharing button
twitter sharing button
line sharing button
wechat sharing button
linkedin sharing button
pinterest sharing button
whatsapp sharing button
sharethis sharing button

Maybe everyone has noticed that in the past 20 years, microcontrollers (MCUs) have undergone leapfrog development, which is reflected in many aspects, such as higher system clocks, more peripheral modules, more convenient debugging means, 32-bit kernel, etc. However, the data memory space inside the MCU is always around a dozen K (16~32KB). While some Cortex M4 core-based microcontrollers have models with up to 265kB of RAM, they are few and far between in the array of many microcontroller models.

So, what is the reason that makes it easy for a microcontroller to have up to several MB of program Flash space, while the data memory is only so small?

picture▲Small package MCU

In a blog post "Why do microcontrollers have so little RAM?[1] ", everyone gave many reasons for the small RAM capacity of the microcontroller.

Among all the reasons that affect the increase of RAM in the microcontroller, a basic problem is that RAM will occupy a lot of silicon chip area, which will also directly lead to an increase in chip prices. This is because on the same silicon wafer, the number of MCUs occupied by the silicon wafer area will be reduced, especially in the boundary part of the wafer, which will cause greater waste. Misfortunes do not come singly, and ICs with a large area will also produce defects, which will reduce the yield.

The second reason is that the process of making RAM is complicated. The RAM production process can be optimized by different means, but in the process of making the MCU, the same chip cannot go through too many processes. Some chip processing service manufacturers specialize in the production of DRAM, which uses special semiconductor capacitor technology to greatly reduce the silicon area occupied by RAM, but DRAM needs to keep its internal data through constant refresh. In order to delay the DRAM cell's ability to hold data, transistor leakage current is required to be low, which also causes the transistor to operate at a slower speed. This requires a trade-off between speed and quantity, but this trade-off process is not conducive to making high-speed logic circuits.

图片▲IC and chip

In addition, the large-capacity RAM circuit also consumes a lot of time in the later testing stage, thereby increasing the time cost of production. Therefore, economic reasons have led to the rise of specialized manufacturers of RAM.

Power consumption is another limiting factor. The MCU system usually has a limit on power consumption. In many cases, the MCU reduces power consumption by entering a sleep state. Ordinary SRAM consumes very little power and can often work for many years with a battery backup. But DRAM needs to maintain the stored data through constant refresh. Once the refresh is stopped, the contents of the DRAM disappear in less than a second due to leakage current. Therefore, DRAM cannot be used in a single-chip microcomputer, but only SRAM, which occupies a larger silicon area, can be used.

In modern CPU technology, a small amount of SRAM is often reserved as a cache (Cache) in new products, and a large-capacity DRAM is used as a data storage space outside the CPU.

There are some very cool ways to integrate RAM and MCU production processes of different production processes, such as Multi-Chip Package, which puts new RAM products on top of MCU chips and stacks them together for packaging. The integration of RAM and MCU on the board saves the system volume and improves the data transmission rate.

图片▲AMD's MCU with stacked package

The last reason is that the capacity of RAM required in most applications of single-chip microcomputers is relatively small. For example, in the field of embedded control, many sensor information can be represented by very few bytes of data, and the parameters and control logic used for control occupy very little data space.

Therefore, when an application requiring a large amount of RAM appears, a circuit board integrated with a large-capacity DRAM is often used directly to work. By integrating a large-capacity RAM chip externally, it is far more economical than the RAM integrated inside the MCU.

In addition to the previous reasons, the microcontroller instruction set also limits the RAM access space. For example, Microchip's microcontroller, PIC10LF320, is a 12-bit instruction, which can only range from 128 bytes of RAM space. For the 8031 microcontroller, the directly addressed RAM space is only 128 bytes. If you access larger external storage space, you need to resort to indirect instructions that execute less efficiently.

The MCU bus structure is divided into Harvard structure and Von Neumann structure, in the latter, the program and data storage space are in the same access space. If a large number of Flash areas are integrated into the microcontroller, there will be less access addresses left for the data RAM space.

In addition, an efficient C language compiler can effectively reuse the limited RAM space to complete the required tasks. In complex applications, multiple single-chip microcomputers are often used in coordination, which greatly improves the real-time characteristics of the system. Clever design solutions will avoid the need for large-capacity RAM in embedded systems. Therefore, some people think that it is precisely because there is not a large number of application requirements that require high RAM capacity, that is the real reason for the lack of RAM in the current microcontroller.

Don't forget, those early video games that fascinated us, although they have cool graphical interfaces, they only have a total of 8k bytes of storage space including programs and data, such as Pacman games, space invasion games, etc. Let's pay tribute to these early minimalist embedded programmers.

图片▲Pacman game


QUICK LINKS
PRODUCT CATEGORY
Copyright@2023 Hetianpuda.Supported By Leadong. Sitemap
CONTACT US 
Phone : +86-755-8320-7242