A memory particle capacity identification method and device, electronic equipment and storage medium

By acquiring and parsing the bit field values ​​of the EMI register and combining them with the extended capacity register value, the problem of inconsistent memory chip capacities across different logical storage units was solved, enabling accurate identification of memory chip capacities.

CN121455774BActive Publication Date: 2026-04-07SHENZHEN JINGCUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing technologies cannot properly identify the capacity of memory chips when the capacities of memory chips in different logical storage units are inconsistent.

Method used

By obtaining the EMI register value in the system chip, parsing the bit field values ​​in the EMI register value, using logical operations on the bit field values ​​to determine the memory chip capacity, and combining the extended capacity register value to determine the capacity.

Benefits of technology

Even when memory chips in different logical storage units have different capacities, the capacity of the memory chips can be correctly identified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121455774B_ABST
    Figure CN121455774B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, electronic device, and storage medium for identifying memory chip capacity. The method includes: acquiring the EMI register value in a system-on-a-chip; parsing the EMI register value to obtain a first field value, a second field value, a third field value, and a fourth field value; if the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value, then determining the capacity of the memory chip corresponding to the first logical storage unit based on the EMI register value; if the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value, then determining the capacity of the memory chip corresponding to the second logical storage unit based on the value of an extended capacity register. This method can correctly identify the capacity of memory chips even when the capacities of memory chips in different logical storage units are different.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of memory chip technology, and in particular to a method, apparatus, electronic device, and storage medium for identifying the capacity of memory chips. Background Technology

[0002] Memory chips are primarily composed of DRAM (Dynamic Random Access Memory). In modern computing devices, especially those employing hybrid configurations to balance cost and performance, it's possible to encounter situations where memory chips of different ranks (logical storage units) have varying capacities; for example, Rank 0 might use 4GB chips, while Rank 1 might use 8GB chips. Traditional capacity detection methods often assume that all memory chips are symmetrical and have the same capacity. When this assumption is broken, the capacity cannot be correctly identified. Summary of the Invention

[0003] The purpose of this invention is to provide a method, apparatus, electronic device, and storage medium for identifying the capacity of memory chips, so as to solve the technical problem that the capacity cannot be properly identified when the memory chips of different logical storage units have different capacities in the prior art.

[0004] The technical solution of the present invention is as follows: a method for identifying the capacity of memory chips is provided, comprising:

[0005] Obtain the EMI register value in the system's single chip;

[0006] The EMI register value is parsed to obtain the first bit field value corresponding to the first channel and the first logical storage unit, the second bit field value corresponding to the first channel and the second logical storage unit, the third bit field value corresponding to the second channel and the first logical storage unit, and the fourth bit field value corresponding to the second channel and the second logical storage unit.

[0007] Based on the first bit field value and the third bit field value, determine whether the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value. If the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to the preset capacity value, then determine the capacity of the memory chip corresponding to the first logical storage unit based on the EMI register value.

[0008] Based on the second bit value and the fourth bit value, determine whether the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value. If the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value, then determine the capacity of the memory chip corresponding to the second logical storage unit based on the value of the extended capacity register.

[0009] Further, determining whether the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value based on the first bit field value and the third bit field value includes:

[0010] The first bit value is shifted right by a preset first number of bits, and the shifted first bit value is ANDed with 0xF to obtain the ANDed first bit value. It is then determined whether the ANDed first bit value is non-zero. The third bit value is shifted right by a preset second number of bits, and the shifted second bit value is ANDed with 0xF to obtain the ANDed third bit value. It is then determined whether the ANDed third bit value is non-zero. If both the ANDed first bit value and the ANDed third bit value are non-zero, then the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value.

[0011] Further, the first bit field value is the bit field value corresponding to the 19th to 16th bit fields of the EMI register value, and the third bit field value is the bit field value corresponding to the 27th to 24th bit fields of the EMI register value.

[0012] Further, determining the capacity of the memory chip corresponding to the first logical memory unit based on the EMI register value includes:

[0013] The EMI register value is shifted right by a preset first number of bits, and the shifted EMI register value is ANDed with 0xF to obtain the ANDed EMI register value, thereby determining the capacity of the memory chip corresponding to the first logical storage unit.

[0014] Further, determining whether the capacity of the memory chip corresponding to the second logical storage unit is greater than a preset capacity value based on the second bit value and the fourth bit value includes:

[0015] The second bit value is shifted right by a preset third number of bits, and the shifted second bit value is ANDed with 0xF to obtain the ANDed second bit value. It is then determined whether the ANDed second bit value is 0. The fourth bit value is shifted right by a preset fourth number of bits, and the shifted fourth bit value is ANDed with 0xF to obtain the ANDed fourth bit value. It is then determined whether the ANDed fourth bit value is 0. If both the ANDed second bit value and the ANDed fourth bit value are 0, then the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value.

[0016] Furthermore, the second bit field value is the bit field value corresponding to the 23rd to 20th bit fields of the EMI register value, and the fourth bit field value is the bit field value corresponding to the 31st to 28th bit fields of the EMI register value.

[0017] Further, determining the capacity of the memory chip corresponding to the second logical storage unit based on the value of the extended capacity register includes:

[0018] The value of the extended capacity register is shifted right by a preset fourth number of bits. The shifted value of the extended capacity register is then ANDed with 0xF to obtain the value of the extended capacity register after the AND operation, thereby determining the capacity of the memory chip corresponding to the second logical storage unit.

[0019] Another technical solution of the present invention is as follows: an electronic device is provided, including a memory and a processor. The memory stores a computer program that can be executed by the processor. When the processor executes the computer program, it implements the memory chip capacity identification method as described in any of the above technical solutions.

[0020] Another technical solution of the present invention is as follows: a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, implements the memory chip capacity identification method as described in any of the above technical solutions.

[0021] The beneficial effects of this invention are as follows: It obtains the EMI register value in a single system chip; parses the EMI register value to obtain the first bit field value corresponding to the first channel and the first logical storage unit, the second bit field value corresponding to the first channel and the second logical storage unit, the third bit field value corresponding to the second channel and the first logical storage unit, and the fourth bit field value corresponding to the second channel and the second logical storage unit; and determines whether the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity based on the first bit field value and the third bit field value. If the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value, then the capacity of the memory chip corresponding to the first logical storage unit is determined according to the EMI register value; the capacity of the memory chip corresponding to the second logical storage unit is determined according to the second bit field value and the fourth bit field value, and if the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value, then the capacity of the memory chip corresponding to the second logical storage unit is determined according to the value of the extended capacity register; through the above technical solution, the capacity of the memory chip can be correctly identified when the memory chip capacities of different logical storage units are different. Attached Figure Description

[0022] Figure 1 This is a flowchart illustrating the memory chip capacity identification method provided in an embodiment of the present invention.

[0023] Figure 2 This is a schematic diagram of the memory chip capacity identification device provided in an embodiment of the present invention.

[0024] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.

[0027] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0028] Figure 1 This is a flowchart illustrating the memory chip capacity identification method according to an embodiment of the present invention. It should be noted that if substantially the same result is obtained, the memory chip capacity identification method of the present invention does not necessarily reflect the actual memory chip capacity. Figure 1 The illustrated process sequence is limited. For example... Figure 1 As shown, this memory chip capacity identification method mainly includes the following steps:

[0029] S101, obtain the EMI register value in the system single chip;

[0030] In one specific embodiment, the EMI register value in the system-on-a-chip (SoC) is the EMI register value (EMI-CONH) of the SoC, which is a 32-bit value. The EMI register value can be obtained through the SoC firmware (such as the bootloader) during the power-on initialization phase.

[0031] S102, the EMI register value is parsed to obtain the first bit field value corresponding to the first channel and the first logical storage unit in the EMI register value, the second bit field value corresponding to the first channel and the second logical storage unit in the EMI register value, the third bit field value corresponding to the second channel and the first logical storage unit in the EMI register value, and the fourth bit field value corresponding to the second channel and the second logical storage unit in the EMI register value.

[0032] In some embodiments, the first bit field value is the bit field value corresponding to the 19th to 16th bit fields of the EMI register value, and the third bit field value is the bit field value corresponding to the 27th to 24th bit fields of the EMI register value.

[0033] In one specific embodiment, the first bit value is the bit field value corresponding to bits 19 to 16 of the EMI register value, which corresponds to the first channel (channel A) and the first logical memory unit (chip select Rank 0). The third bit value is the bit field value corresponding to bits 27 to 24 of the EMI register value, which corresponds to the second channel (channel B) and the first logical memory unit (chip select Rank 0).

[0034] In some embodiments, the second bit field value is the bit field value corresponding to the 23rd to 20th bit fields of the EMI register value, and the fourth bit field value is the bit field value corresponding to the 31st to 28th bit fields of the EMI register value.

[0035] In one specific embodiment, the second bit field value is the bit field value corresponding to bits 23 to 20 of the EMI register value, which corresponds to the first channel (channel A) and the second logical memory unit (chip select Rank 1). The fourth bit field value is the bit field value corresponding to bits 31 to 28 of the EMI register value, which corresponds to the second channel (channel B) and the second logical memory unit (chip select Rank 1).

[0036] S103, determine whether the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value based on the first bit field value and the third bit field value. If the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to the preset capacity value, then determine the capacity of the memory chip corresponding to the first logical storage unit based on the EMI register value.

[0037] In some embodiments, determining whether the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value based on the first bit field value and the third bit field value includes:

[0038] The first bit value is shifted right by a preset first number of bits, and the shifted first bit value is ANDed with 0xF to obtain the ANDed first bit value. It is then determined whether the ANDed first bit value is non-zero. The third bit value is shifted right by a preset second number of bits, and the shifted second bit value is ANDed with 0xF to obtain the ANDed third bit value. It is then determined whether the ANDed third bit value is non-zero. If both the ANDed first bit value and the ANDed third bit value are non-zero, then the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value.

[0039] In one specific embodiment, the first bit value is shifted right by a preset first number of bits, and the shifted first bit value is ANDed with 0xF to obtain the ANDed first bit value, for example, 1001. This ANDed first bit value corresponds to the capacity of the first channel and the first logical memory unit. The third bit value is shifted right by a preset second number of bits, and the shifted second bit value is ANDed with 0xF to obtain the ANDed third bit value, for example, 1100. This ANDed third bit value corresponds to the capacity of the second channel and the first logical memory unit.

[0040] In some embodiments, determining the capacity of the memory chip corresponding to the first logical memory unit based on the EMI register value includes:

[0041] The EMI register value is shifted right by a preset first number of bits, and the shifted EMI register value is ANDed with 0xF to obtain the ANDed EMI register value, thereby determining the capacity of the memory chip corresponding to the first logical storage unit.

[0042] In one specific embodiment, if both the first and third field values ​​after the AND operation are non-zero, it indicates that the corresponding memory chip has capacity, and the capacity of the memory chip is less than or equal to a preset capacity value (e.g., 4GB). In this case, the capacity of the memory chip can be determined based on the EMI register value. Specifically, the EMI register value is shifted right by a preset first number of bits, and the right-shifted EMI register value is ANDed with 0xF to obtain the EMI register value after the AND operation. The capacity of the memory chip corresponding to the first logical storage unit can then be determined.

[0043] S104, determine whether the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value based on the second bit field value and the fourth bit field value. If the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value, determine the capacity of the memory chip corresponding to the second logical storage unit based on the value of the extended capacity register.

[0044] In some embodiments, determining whether the capacity of the memory chip corresponding to the second logical storage unit is greater than a preset capacity value based on the second bit field value and the fourth bit field value includes:

[0045] Shift the second bit value to the right by a preset third number of bits, and then perform a right-shifted second bit value and 0xF.

[0046] A bitwise AND operation is performed to obtain the second bit value after the AND operation. It is then determined whether the second bit value after the AND operation is 0. The fourth bit value is shifted right by a preset fourth number of bits. The right-shifted fourth bit value is then ANDed with 0xF to obtain the fourth bit value after the AND operation. It is then determined whether the fourth bit value after the AND operation is 0. If both the second bit value and the fourth bit value after the AND operation are 0, then the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value.

[0047] In one specific embodiment, the second bit value is shifted right by a preset third number of bits, and then a bitwise AND operation is performed between the shifted second bit value and 0xF to obtain a bitwise ANDed second bit value, for example, 0000. This bitwise ANDed second bit value corresponds to the capacity of the first channel and the second logical memory unit. The fourth bit value is then shifted right by a preset fourth number of bits, and then a bitwise AND operation is performed between the shifted fourth bit value and 0xF to obtain a bitwise ANDed fourth bit value, for example, 0000. This bitwise ANDed fourth bit value corresponds to the capacity of the second channel and the second logical memory unit.

[0048] In some embodiments, determining the capacity of the memory chip corresponding to the second logical memory unit based on the value of the extended capacity register includes:

[0049] The value of the extended capacity register is shifted right by a preset fourth number of bits. The shifted value of the extended capacity register is then ANDed with 0xF to obtain the value of the extended capacity register after the AND operation, thereby determining the capacity of the memory chip corresponding to the second logical storage unit.

[0050] In one specific embodiment, if both the second and fourth bit values ​​after the AND operation are 0, then the capacity of the corresponding memory chip is greater than a preset capacity value (e.g., 4GB). In this case, the capacity of the memory chip needs to be determined based on the value of the extended capacity register (EMI-CONK). The value of the extended capacity register is shifted right by a preset fourth number of bits, and then an AND operation is performed between the shifted extended capacity register value and 0xF to obtain the value of the extended capacity register after the AND operation. Based on the value of the extended capacity register after the operation, the capacity of the memory chip corresponding to the second logical storage unit can be determined.

[0051] In one specific embodiment, if both the second bit value and the fourth bit value after the AND operation are not 0, then the capacity of the memory chip is not greater than a preset capacity value. The capacity of the memory chip corresponding to the second logical storage unit can be determined based on the EMI register value after the AND operation.

[0052] The memory chip capacity identification method provided in this embodiment of the invention obtains the EMI register value in a system single chip; parses the EMI register value to obtain the first bit field value corresponding to the first channel and the first logical storage unit, the second bit field value corresponding to the first channel and the second logical storage unit, the third bit field value corresponding to the second channel and the first logical storage unit, and the fourth bit field value corresponding to the second channel and the second logical storage unit; determines whether the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value based on the first bit field value and the third bit field value; if the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to the preset capacity value, then the capacity of the memory chip corresponding to the first logical storage unit is determined based on the EMI register value; determines whether the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value based on the second bit field value and the fourth bit field value; if the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value, then the capacity of the memory chip corresponding to the second logical storage unit is determined based on the value of the extended capacity register; the memory chip capacity can be correctly identified even when the memory chip capacities of different logical storage units are different.

[0053] Figure 2 This is a schematic diagram of the memory chip capacity identification device according to an embodiment of the present invention, as shown below. Figure 2 As shown, the memory chip capacity identification device 20 includes a register value acquisition module 21, a parsing module 22, a first capacity determination module 23, and a second capacity determination module 24;

[0054] The register value acquisition module 21 is used to acquire the EMI register value in the system single chip;

[0055] The parsing module 22 is used to parse the EMI register value to obtain the first bit field value corresponding to the first channel and the first logical storage unit in the EMI register value, the second bit field value corresponding to the first channel and the second logical storage unit in the EMI register value, the third bit field value corresponding to the second channel and the first logical storage unit in the EMI register value, and the fourth bit field value corresponding to the second channel and the second logical storage unit in the EMI register value.

[0056] The first capacity determination module 23 is used to determine whether the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value based on the first bit field value and the third bit field value. If the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to the preset capacity value, the capacity of the memory chip corresponding to the first logical storage unit is determined based on the EMI register value.

[0057] The second capacity determination module 24 is used to determine whether the capacity of the memory chip corresponding to the second logical storage unit is greater than a preset capacity value based on the second bit field value and the fourth bit field value. If the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value, the capacity of the memory chip corresponding to the second logical storage unit is determined based on the value of the extended capacity register.

[0058] In some embodiments, the first capacity determination module 23 determines whether the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value based on the first bit field value and the third bit field value, including:

[0059] The first bit value is shifted right by a preset first number of bits, and the shifted first bit value is ANDed with 0xF to obtain the ANDed first bit value. It is then determined whether the ANDed first bit value is non-zero. The third bit value is shifted right by a preset second number of bits, and the shifted second bit value is ANDed with 0xF to obtain the ANDed third bit value. It is then determined whether the ANDed third bit value is non-zero. If both the ANDed first bit value and the ANDed third bit value are non-zero, then the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value.

[0060] In some embodiments, the first bit field value is the bit field value corresponding to the 19th to 16th bit fields of the EMI register value, and the third bit field value is the bit field value corresponding to the 27th to 24th bit fields of the EMI register value.

[0061] In some embodiments, the first capacity determination module 23 determines the capacity of the memory chip corresponding to the first logical storage unit based on the EMI register value, including:

[0062] The EMI register value is shifted right by a preset first number of bits, and the shifted EMI register value is ANDed with 0xF to obtain the ANDed EMI register value, thereby determining the capacity of the memory chip corresponding to the first logical storage unit.

[0063] In some embodiments, the second capacity determination module 24 determines whether the capacity of the memory chip corresponding to the second logical storage unit is greater than a preset capacity value based on the second bit field value and the fourth bit field value, including:

[0064] Shift the second bit value to the right by a preset third number of bits, and then perform a right-shifted second bit value and 0xF.

[0065] A bitwise AND operation is performed to obtain the second bit value after the AND operation. It is then determined whether the second bit value after the AND operation is 0. The fourth bit value is shifted right by a preset fourth number of bits. The right-shifted fourth bit value is then ANDed with 0xF to obtain the fourth bit value after the AND operation. It is then determined whether the fourth bit value after the AND operation is 0. If both the second bit value and the fourth bit value after the AND operation are 0, then the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value.

[0066] In some embodiments, the second bit field value is the bit field value corresponding to the 23rd to 20th bit fields of the EMI register value, and the fourth bit field value is the bit field value corresponding to the 31st to 28th bit fields of the EMI register value.

[0067] In some embodiments, the second capacity determination module 24 determines the capacity of the memory chip corresponding to the second logical storage unit based on the value of the extended capacity register, including:

[0068] The value of the extended capacity register is shifted right by a preset fourth number of bits. The shifted value of the extended capacity register is then ANDed with 0xF to obtain the value of the extended capacity register after the AND operation, thereby determining the capacity of the memory chip corresponding to the second logical storage unit.

[0069] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 3 As shown, the electronic device 30 includes a processor 31 and a memory 32 communicatively connected to the processor 31.

[0070] The memory 32 stores program instructions for implementing the memory chip capacity identification method of any of the above embodiments.

[0071] The processor 31 is used to execute program instructions stored in the memory 32 to identify the capacity of memory chips.

[0072] The processor 31 can also be referred to as a CPU (Central Processing Unit). The processor 31 may be an integrated circuit chip with signal processing capabilities. The processor 31 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.

[0073] This invention provides a storage medium that stores program instructions capable of implementing all the methods described above. The storage medium can be non-volatile or volatile. These program instructions can be stored in the storage medium as a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.

[0074] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0075] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0076] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0077] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0078] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0079] The technical solutions provided in this application have been described in detail above. Specific examples have been used in this application to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

[0080] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0081] This application is described with reference to flowchart illustrations and / or block diagrams of the methods, apparatus, and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0082] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0083] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0084] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for identifying the capacity of memory chips, characterized in that, include: Obtain the EMI register value in the system's single chip; The EMI register value is parsed to obtain the first bit field value corresponding to the first channel and the first logical storage unit, the second bit field value corresponding to the first channel and the second logical storage unit, the third bit field value corresponding to the second channel and the first logical storage unit, and the fourth bit field value corresponding to the second channel and the second logical storage unit. Based on the first bit field value and the third bit field value, determine whether the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value. If the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to the preset capacity value, then determine the capacity of the memory chip corresponding to the first logical storage unit based on the EMI register value. Based on the second bit value and the fourth bit value, determine whether the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value. If the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value, then determine the capacity of the memory chip corresponding to the second logical storage unit based on the value of the extended capacity register.

2. The memory chip capacity identification method according to claim 1, characterized in that, Determining whether the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value based on the first bit field value and the third bit field value includes: The first bit value is shifted right by a preset first number of bits, and the shifted first bit value is ANDed with 0xF to obtain the ANDed first bit value. It is then determined whether the ANDed first bit value is non-zero. The third bit value is shifted right by a preset second number of bits, and the shifted second bit value is ANDed with 0xF to obtain the ANDed third bit value. It is then determined whether the ANDed third bit value is non-zero. If both the ANDed first bit value and the ANDed third bit value are non-zero, then the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value.

3. The memory chip capacity identification method according to claim 2, characterized in that, The first bit field value is the bit field value corresponding to the 19th to 16th bit fields of the EMI register value, and the third bit field value is the bit field value corresponding to the 27th to 24th bit fields of the EMI register value.

4. The memory chip capacity identification method according to claim 2, characterized in that, Determining the capacity of the memory chip corresponding to the first logical memory unit based on the EMI register value includes: The EMI register value is shifted right by a preset first number of bits, and the shifted EMI register value is ANDed with 0xF to obtain the ANDed EMI register value, thereby determining the capacity of the memory chip corresponding to the first logical storage unit.

5. The memory chip capacity identification method according to claim 1, characterized in that, Determining whether the capacity of the memory chip corresponding to the second logical storage unit is greater than a preset capacity value based on the second bit value and the fourth bit value includes: Shift the second bit value to the right by a preset third number of bits, and then perform a right-shifted second bit value and 0xF. A bitwise AND operation is performed to obtain the second bit value after the AND operation. It is then determined whether the second bit value after the AND operation is 0. The fourth bit value is shifted right by a preset fourth number of bits. The right-shifted fourth bit value is then ANDed with 0xF to obtain the fourth bit value after the AND operation. It is then determined whether the fourth bit value after the AND operation is 0. If both the second bit value and the fourth bit value after the AND operation are 0, then the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value.

6. The memory chip capacity identification method according to claim 5, characterized in that, The second bit field value is the bit field value corresponding to the 23rd to 20th bits of the EMI register value, and the fourth bit field value is the bit field value corresponding to the 31st to 28th bits of the EMI register value.

7. The memory chip capacity identification method according to claim 5, characterized in that, Determining the capacity of the memory chip corresponding to the second logical storage unit based on the value of the extended capacity register includes: The value of the extended capacity register is shifted right by a preset fourth number of bits. The shifted value of the extended capacity register is then ANDed with 0xF to obtain the value of the extended capacity register after the AND operation, thereby determining the capacity of the memory chip corresponding to the second logical storage unit.

8. A memory chip capacity identification device, characterized in that, It includes a register value acquisition module, a parsing module, a first capacity determination module, and a second capacity determination module; The register value acquisition module is used to acquire the EMI register value in the system single chip; The parsing module is used to parse the EMI register value to obtain the first bit field value corresponding to the first channel and the first logical storage unit in the EMI register value, the second bit field value corresponding to the first channel and the second logical storage unit in the EMI register value, the third bit field value corresponding to the second channel and the first logical storage unit in the EMI register value, and the fourth bit field value corresponding to the second channel and the second logical storage unit in the EMI register value. The first capacity determination module is used to determine whether the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to a preset capacity value based on the first bit field value and the third bit field value. If the capacity of the memory chip corresponding to the first logical storage unit is less than or equal to the preset capacity value, the capacity of the memory chip corresponding to the first logical storage unit is determined based on the EMI register value. The second capacity determination module is used to determine whether the capacity of the memory chip corresponding to the second logical storage unit is greater than a preset capacity value based on the second bit field value and the fourth bit field value. If the capacity of the memory chip corresponding to the second logical storage unit is greater than the preset capacity value, the capacity of the memory chip corresponding to the second logical storage unit is determined based on the value of the extended capacity register.

9. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program executable by the processor, characterized in that, When the processor executes the computer program, it implements the memory chip capacity identification method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the memory chip capacity identification method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Memory capacity identification method and device, intelligent equipment and storage medium

    CN116244119A

  • EMI value test method, system and device of LPDDR chip and storage medium

    CN119517132A