A data efficient access method for a RAM array laid out in horizontal and vertical directions
By arranging the RAM array in a rectangular pattern and establishing a mapping relationship, efficient utilization of RAM modules is achieved, solving the problem of some modules in the RAM array not being accessed, and improving data throughput and processing capabilities.
Patent Information
- Application Number
- CN202311296408.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-08
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-10-08
AI Technical Summary
In existing RAM arrays, it cannot be guaranteed that every RAM module will be accessed, leading to resource waste and performance degradation.
By using a horizontal and vertical address placement method, 2^n RAMs are arranged into a rectangular array and a mapping relationship is established. Control signals are used to perform horizontal or vertical storage within one RAM clock cycle to ensure that each RAM module can be accessed.
It improves the utilization of the RAM array, reduces the RAM distribution area, and enhances data throughput and concurrent processing capabilities.
Smart Images

Figure CN117348810B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital circuit design technology, and in particular to a method for efficient data access in a RAM array with addresses arranged horizontally and vertically. Background Technology
[0002] RAM is an internal memory that can directly exchange data with the CPU. It is typically used as temporary data storage for the operating system or running programs because RAM enables high-speed, on-demand read and write operations. It has unique storage cells whose contents can be retrieved or stored as needed, and the access speed is not affected by the location of the storage cell. In ASIC development, RAM is often used for temporary data storage and caching, as well as for constructing FIFOs, etc.
[0003] A RAM array is a storage structure that combines multiple RAM modules. By connecting multiple RAM modules together, a RAM array can provide larger storage capacity and higher data throughput. However, in a RAM array, it is not guaranteed that every RAM module will be used for every access. A RAM array consists of multiple RAM modules, each with its own address space and storage capacity. When data is read or written, the control logic selects the appropriate RAM module to perform the operation based on the address of the access request. However, in some cases, data access may only involve some RAM modules in the RAM array, while other unused RAM modules remain idle. Therefore, it is not guaranteed that every RAM module in a RAM array will be used for every access. Summary of the Invention
[0004] This invention provides an efficient data access method for RAM arrays with horizontally and vertically arranged addresses. It solves the problem in the prior art that when accessing the requested address and control logic, it cannot guarantee that every RAM module in the RAM array will be accessed, resulting in wasted RAM resources and performance degradation. This method achieves RAM modules without idle states, avoids wasted RAM resources, and can store data both horizontally and vertically during read operations, while reducing the distributed area of the RAM.
[0005] In a first aspect, the present invention provides a method for efficient data access in a RAM array with addresses arranged horizontally and vertically, the method comprising:
[0006] 2 n The RAMs are arranged in a rectangular RAM array, and a mapping relationship is established between the data to be stored and each RAM in the rectangular RAM array, wherein the mapping relationship includes positional relationship and address relationship;
[0007] Within one RAM clock cycle, the data to be stored is stored horizontally or vertically in the rectangular RAM array using the mapping relationship and control signals, thus completing the storage of the data to be stored.
[0008] Read the data from each RAM in the rectangular RAM array to complete the temporary storage of the data to be stored in the rectangular RAM array.
[0009] In conjunction with the first aspect, in one possible implementation, establishing the mapping relationship between the data to be stored and each RAM in the rectangular RAM array specifically includes:
[0010] The data width of the data to be stored is evenly divided into m storage data blocks, where m = 2. n *2 n ;
[0011] The RAM arrangement in the rectangular RAM array is designed to be the same as the location of the storage data blocks, thus obtaining the mapping relationship between each storage data block and its corresponding RAM address.
[0012] In conjunction with the first aspect, in one possible implementation, dividing the data width of the data to be stored into m storage data blocks evenly includes:
[0013] Obtain the bit width of the data to be stored and the total bit width of the m RAMs, respectively;
[0014] The bit width of the data to be stored is evenly divided according to the total bit width of m RAMs.
[0015] In conjunction with the first aspect, in one possible implementation, the bit width of the data to be stored is less than or equal to the total bit width of the m RAMs.
[0016] In conjunction with the first aspect, in one possible implementation, the step of using the mapping relationship and control signals to store the data to be stored horizontally or vertically in the rectangular RAM array to complete the storage of the data to be stored specifically includes:
[0017] The control signal is used to receive the address of the RAM, query the mapping relationship, and store the data to be stored horizontally or vertically in the rectangular RAM array according to the mapping relationship, thereby completing the storage of the data to be stored.
[0018] In conjunction with the first aspect, in one possible implementation, reading data from each RAM in the rectangular RAM array to complete the temporary storage of the data to be stored in the rectangular RAM array specifically includes:
[0019] Using the control signal, the data to be stored in the rectangular RAM array is read horizontally or vertically within one RAM clock cycle.
[0020] In a second aspect, the present invention provides a high-efficiency data access device for a RAM array with addresses arranged horizontally and vertically, the device comprising:
[0021] The mapping establishment module is used to map 2 n The RAMs are arranged in a rectangular RAM array, and a mapping relationship is established between the data to be stored and each RAM in the rectangular RAM array, wherein the mapping relationship includes positional relationship and address relationship;
[0022] The data storage module, within one RAM clock cycle, uses the mapping relationship and control signals to store the data to be stored horizontally or vertically in the rectangular RAM array, thereby completing the storage of the data to be stored;
[0023] The data reading module reads data from each RAM in the rectangular RAM array, completing the temporary storage of the data to be stored in the rectangular RAM array.
[0024] Thirdly, the present invention provides a high-efficiency data access server for a RAM array with horizontally and vertically arranged addresses, the server including a memory and a processor;
[0025] The memory is used to store computer-executable instructions;
[0026] The processor is used to execute the computer-executable instructions to implement the efficient data access method for the RAM array with horizontal and vertical address layout.
[0027] Fourthly, the present invention provides a computer-readable storage medium having executable instructions, wherein when a computer executes the executable instructions, it can realize the efficient data access method for the RAM array with horizontally and vertically arranged addresses.
[0028] One or more technical solutions provided in this invention have at least the following technical effects or advantages:
[0029] This invention employs a method for efficient data access in a RAM array with horizontally and vertically arranged addresses. The beneficial effects of this method include:
[0030] (1) By using the mapping relationship to design the relationship between the data to be stored and the RAM in advance, the RAM in each rectangular RAM array can be accessed, which improves the utilization rate of the rectangular RAM array, and the pre-designed rectangular RAM array greatly reduces the area of the RAM.
[0031] (2) By using mapping relationships and control signals to store the data to be stored horizontally or vertically in a rectangular RAM array, it is possible to achieve parallel access and processing of multiple data requests, improve the concurrent processing capability of data, process more data in a unit of time, thereby increasing the data throughput and improving the performance of RAM. Attached Figure Description
[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments of the present invention or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 A flowchart of a method for efficient data access in a RAM array with horizontally and vertically arranged addresses provided in an embodiment of the present invention;
[0034] Figure 2 A specific rectangular RAM array schematic diagram provided for an embodiment of the present invention;
[0035] Figure 3 A schematic diagram illustrating the writing of horizontal data provided in an embodiment of the present invention;
[0036] Figure 4 This is a schematic diagram illustrating the writing of vertical data according to an embodiment of the present invention. Detailed Implementation
[0037] 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 some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0038] This invention provides an efficient data access method for RAM arrays with horizontally and vertically arranged addresses, such as... Figure 1 As shown, the method includes steps S101 to S103.
[0039] S101, will 2 n The RAMs are arranged into a rectangular RAM array, and a mapping relationship is established between the data to be stored and each RAM in the rectangular RAM array. The mapping relationship includes positional relationship and address relationship, where n>1.
[0040] In step S101, a mapping relationship is established between the data to be stored and each RAM in the rectangular RAM array, specifically including the following steps S1011 to S1012.
[0041] S1011, the data width of the data to be stored is evenly divided into m storage data blocks, where m = 2. n *2 n Specifically, this includes: (1) obtaining the bit width of the data to be stored and the total bit width of m RAMs respectively, wherein the bit width of the data to be stored is less than or equal to the total bit width of m RAMs. (2) dividing the bit width of the data to be stored evenly according to the total bit width of m RAMs.
[0042] For example, such as Figure 2 The figure shown is a specific embodiment provided by the present invention. n = 2, therefore there are a total of 2 2 = 4 RAM, divide the 4 RAM according to Figure 2 They are arranged in a rectangular pattern. The horizontal and vertical axes are RAM0 to RAM3. For example... Figure 2 The storage address allocation method shown allows RM0, RAM1, RAM2, and RAM3 to be accessed simultaneously, both horizontally and vertically, during a single RAM array storage process, ensuring that no RAM is left unused. Furthermore, data write / read operations performed by RM0, RAM1, RAM2, and RAM3 can be completed within one RAM clock cycle, processing more data per unit time and thus increasing data throughput.
[0043] S1012, design the RAM arrangement position in the rectangular RAM array to be the same as the position of the storage data block, and obtain the mapping relationship between each storage data block and the corresponding RAM address.
[0044] The rectangular RAM array provided by this invention greatly reduces the area of RAM and improves the concurrent data processing capability.
[0045] S102, within one RAM clock cycle, uses mapping relationships and control signals to store the data to be stored horizontally or vertically in a rectangular RAM array, thus completing the storage of the data to be stored.
[0046] In step S102, the data to be stored is stored horizontally or vertically in a rectangular RAM array using mapping relationships and control signals, thus completing the storage of the data to be stored. Specifically, this includes:
[0047] The control signal is used to receive the address of the RAM and query the mapping relationship. Based on the mapping relationship, the data to be stored is stored horizontally or vertically in the rectangular RAM array to complete the storage of the data to be stored.
[0048] Based on the control signal, multiple data requests can be accessed and processed in parallel in the RAM each time, and horizontal or vertical data storage can be performed each time.
[0049] S103: Read the data from each RAM in the rectangular RAM array to complete the temporary storage of the data to be stored in the rectangular RAM array.
[0050] Step S103 specifically includes: using a control signal to read the data to be stored in the rectangular RAM array horizontally or vertically within one RAM clock cycle.
[0051] For example, in a specific embodiment provided by the present invention, the data to be stored is an image. The RAM is designed according to the method provided by the present invention before access, resulting in a designed rectangular RAM array.
[0052] During the first horizontal data write or read operation, an external control signal sequentially writes or reads the corresponding data from the shaded address areas in RAM0, RAM1, RAM2, and RAM3, such as... Figure 3 As shown.
[0053] The second horizontal data write or read operation, the first horizontal data write or read operation, the external control signal controls the sequential writing or reading of the corresponding data from the address areas corresponding to RAM1, RAM2, RAM3, and RAM0.
[0054] The third horizontal data write or read operation, the first horizontal data write or read operation, the external control signal controls the sequential writing or reading of the corresponding data from the address areas corresponding to RAM2, RAM3, RAM0, and RAM1.
[0055] The fourth horizontal data write or read operation, the first horizontal data write or read operation, is controlled by external control signals to sequentially write or read the corresponding data from the address areas corresponding to RAM3, RAM0, RAM1, and RAM2.
[0056] For the first vertical data write or read operation, an external control signal sequentially writes or reads the corresponding data from the shaded address areas in RAM0, RAM1, RAM2, and RAM3, such as... Figure 4 As shown.
[0057] The second vertical data write or read operation is controlled by an external control signal to sequentially write or read the corresponding data from the address areas of RAM1, RAM2, RAM3, and RAM0.
[0058] The third vertical data write or read operation is controlled by an external control signal to sequentially write or read the corresponding data from the address areas of RAM2, RAM3, RAM0, and RAM1.
[0059] The fourth vertical data write or read operation is controlled by an external control signal to sequentially write or read the corresponding data from the address areas of RAM3, RAM0, RAM1, and RAM2.
[0060] The method provided by this invention uses the bit width of the externally input data to be stored to pair 2 n The address of a RAM array consisting of 1 RAM is divided into m storage addresses. This allows for writing or reading data within one RAM clock cycle. Furthermore, this address division method satisfies the requirement of allowing data to be stored from 2 RAM addresses both horizontally and vertically. n Data can be read / written from each RAM in the RAM array, and access to all RAMs in the RAM array can be completed within one RAM clock cycle, thereby improving the data throughput of RAM.
[0061] The present invention provides a high-efficiency data access device for a RAM array with addresses arranged horizontally and vertically. The device includes a mapping establishment module, a data storage module, and a data reading module.
[0062] The mapping establishment module is used to map 2 n The RAMs are arranged into a rectangular RAM array, and a mapping relationship is established between the data to be stored and each RAM in the rectangular RAM array. The mapping relationship includes positional relationship and address relationship.
[0063] The data storage module, within one RAM clock cycle, uses mapping relationships and control signals to store the data to be stored horizontally or vertically in a rectangular RAM array, thus completing the storage of the data to be stored.
[0064] The data reading module reads data from each RAM in the rectangular RAM array, completing the temporary storage of the data to be stored in the rectangular RAM array.
[0065] For example, the data to be stored is input into the mapping establishment module to obtain the mapping relationship between the data to be stored and each RAM in the rectangular RAM array; then, the data storage module uses the mapping relationship and control signals to store the data to be stored horizontally or vertically in the rectangular RAM array to complete the storage of the data to be stored; when data is read, the data in each RAM in the rectangular RAM array is read in the data reading module.
[0066] At this point, all RAM in the rectangular RAM array is in an empty state, and the next round of data reading and writing can be performed.
[0067] The device provided by this invention enables each RAM module in the rectangular RAM array to be accessed in each read operation, thereby achieving efficient utilization of RAM in the rectangular RAM array.
[0068] The apparatus or module described in the above embodiments can be implemented by a computer chip or physical entity, or by a product with a certain function. For ease of description, the above apparatus is described by dividing it into various modules according to their functions. In implementing this invention, the functions of each module can be implemented in one or more software or hardware. Of course, a module that implements a certain function can also be implemented by combining multiple sub-modules or sub-units.
[0069] The methods, apparatus, or modules described in this invention can be implemented in a computer-readable program code manner. The controller can be implemented in any suitable manner, for example, as a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of a memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code manner, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included within it for implementing various functions can also be considered as structures within the hardware component. Alternatively, the device used to implement various functions can be viewed as either a software module implementing the method or a structure within a hardware component.
[0070] Some modules in the apparatus described in this invention can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc., that perform a specific task or implement a specific abstract data type. This invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0071] This invention provides a high-efficiency data access server for a RAM array with horizontally and vertically arranged addresses. The server includes a memory and a processor. The memory stores computer-executable instructions, and the processor executes the computer-executable instructions to implement a high-efficiency data access method for the RAM array with horizontally and vertically arranged addresses.
[0072] This invention provides a computer-readable storage medium having executable instructions, and a method for efficient data access of a RAM array with horizontally and vertically arranged addresses that can be implemented when a computer executes the executable instructions.
[0073] While this invention provides the method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-inventive labor. The order of steps listed in this embodiment is merely one possible execution order among many and does not represent the only possible execution order. In actual device or client product execution, the methods shown in this embodiment or the accompanying drawings can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment).
[0074] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus necessary hardware. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, or it can be embodied in the process of data migration. The computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, mobile terminal, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.
[0075] The various embodiments described in this specification are presented in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. All or part of this invention can be used in numerous general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, mobile communication terminals, multiprocessor systems, microprocessor-based systems, programmable electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices, etc.
[0076] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the present invention.
Claims
1. A method for efficient data access in a RAM array with addresses arranged horizontally and vertically, characterized in that, include: Will The RAMs are arranged in a rectangular RAM array, and a mapping relationship is established between the data to be stored and each RAM in the rectangular RAM array. This mapping relationship includes both positional and address relationships. The step of establishing the mapping relationship between the data to be stored and each RAM in the rectangular RAM array specifically includes: uniformly dividing the data bit width of the data to be stored into... One storage data block, of which The RAM arrangement in the rectangular RAM array is designed to be the same as the location of the storage data blocks, thus obtaining the mapping relationship between each storage data block and its corresponding RAM address. Within one RAM clock cycle, the data to be stored is stored horizontally or vertically in the rectangular RAM array using the mapping relationship and control signals, thus completing the storage of the data to be stored. Read the data from each RAM in the rectangular RAM array to complete the temporary storage of the data to be stored in the rectangular RAM array.
2. The method for efficient data access of a RAM array with horizontally and vertically arranged addresses according to claim 1, characterized in that, The data bit width of the data to be stored is evenly divided into... Each storage data block specifically includes: Obtain the bit width and bit width of the data to be stored respectively. The total bit width of the RAM; The bit width of the data to be stored is determined according to... The total bit width of each RAM is evenly divided.
3. The method for efficient data access of a RAM array with horizontally and vertically arranged addresses according to claim 2, characterized in that, The bit width of the data to be stored is less than or equal to the bit width of the data to be stored. The total bit width of the RAM.
4. The method for efficient data access of a RAM array with horizontally and vertically arranged addresses according to claim 1, characterized in that, The process of storing the data to be stored horizontally or vertically in the rectangular RAM array using the mapping relationship and control signals to complete the storage of the data to be stored specifically includes: The control signal is used to receive the address of the RAM, query the mapping relationship, and store the data to be stored horizontally or vertically in the rectangular RAM array according to the mapping relationship, thereby completing the storage of the data to be stored.
5. The method for efficient data access of a RAM array with horizontally and vertically arranged addresses according to claim 1, characterized in that, The step of reading data from each RAM in the rectangular RAM array to complete the temporary storage of the data to be stored in the rectangular RAM array specifically includes: Using the control signal, the data to be stored in the rectangular RAM array can be read horizontally or vertically within one RAM clock cycle.
6. A high-efficiency data access device for a RAM array with addresses arranged horizontally and vertically, characterized in that, For implementing any one of the methods as claimed in claims 1 to 5, comprising: The mapping establishment module is used to... The RAMs are arranged in a rectangular RAM array, and a mapping relationship is established between the data to be stored and each RAM in the rectangular RAM array, wherein the mapping relationship includes positional relationship and address relationship; The data storage module, within one RAM clock cycle, uses the mapping relationship and control signals to store the data to be stored horizontally or vertically in the rectangular RAM array, thereby completing the storage of the data to be stored; The data reading module reads data from each RAM in the rectangular RAM array, completing the temporary storage of the data to be stored in the rectangular RAM array.
7. A high-efficiency data access server for a RAM array with horizontally and vertically arranged addresses, characterized in that, Including memory and processor; The memory is used to store computer-executable instructions; The processor is used to execute the computer-executable instructions to implement the efficient data access method for the RAM array with horizontal and vertical address layout as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium has executable instructions, which, when executed by a computer, enable efficient data access methods for a RAM array with horizontally and vertically arranged addresses as described in any one of claims 1-5.
Citation Information
Patent Citations
Multi-granularity parallel storage system and storage
US20140082282A1
Ultra-deep compute static random access memory with high compute throughput and multi-directional data propagation
US20200258890A1
