An asymmetric memory configuration method and apparatus

By obtaining the configuration information of the memory ports, determining the number of address concatenations and data concatenations, establishing bit mapping relationships, and allocating data, the problem of inconsistent address bit width and data bit width in asymmetric double-ended memory is solved, achieving efficient utilization of memory resources and simplified design.

CN120491898BActive Publication Date: 2026-11-27GOWIN SEMICON CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510565121.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2026-11-27
Estimated Expiration
2045-04-29

AI Technical Summary

Technical Problem

Existing technologies cannot effectively handle situations where the address bit width and data bit width are inconsistent in asymmetric double-ended memories, leading to increased resource consumption and design complexity.

Method used

By obtaining the configuration information of the memory ports, the number of address concatenations and data concatenations are determined, bit mapping relationships are established, and data allocation is performed to optimize the configuration of the asymmetric dual-ended memory.

Benefits of technology

It simplifies the design complexity of asymmetric dual-ended memory, improves memory resource utilization, and avoids chip resource occupation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120491898B_ABST
    Figure CN120491898B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides an asymmetric memory configuration method and device, relates to the technical field of memory, and the method comprises the following steps: obtaining configuration information of each memory port under a current memory; for any memory port, determining the corresponding address cascade number and data cascade number of each memory port according to the configuration information; then determining data allocation according to the data bit width of each memory port and the corresponding data cascade number thereof; and finally distributing initial values to each cascade memory according to the corresponding address cascade number, so that an optimized asymmetric dual-end memory is obtained. Based on this, the present application can simplify the design complexity of the asymmetric dual-end memory, complete the configuration of the address cascade number and the data cascade number required by the two ends of the asymmetric dual-end memory, overcome the problem that the existing technology cannot effectively handle the inconsistent address bit width and data bit width of multiple ends, improve the memory resource utilization, and avoid the occupation of chip resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of memory technology, and more specifically, to an asymmetric memory configuration method and apparatus. Background Technology

[0002] Field-Programmable Gate Array (FPGA) chips contain a large number of logic cells, digital signal processing (DSP) units, and memory resources. These memory resources can be used to implement various storage functions, such as First-In-First-Out (FIFO), caching, and register files. In FPGA design, Random Access Memory (RAM) is the core resource for implementing data caching and storage. FPGA chips typically incorporate fixed-size RAM blocks with fixed capacity and port configurations (e.g., 36Kb single-port / dual-port RAM).

[0003] Typically, when users design memory requiring larger capacities or more complex structures, multiple random access memory (RAM) blocks are cascaded. Simultaneously, with increasing demands for performance ratios, the need for asymmetric dual-ended RAM (ADM) is also growing. However, existing memory cascading technologies primarily target symmetric dual-ended RAM, where the address and data bit widths are the same at both ends. Due to the different number of address and data cascades required at each end of an asymmetric dual-ended RAM, as well as the differences in address partitioning, data allocation, and access control operations, existing cascading schemes cannot reliably implement the functionality of ADM.

[0004] Therefore, there is an urgent need for a cascaded configuration scheme for asymmetric dual-ended memory to overcome the inability of existing technologies to effectively handle situations where the address bit width and data bit width at both ends are inconsistent. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide an asymmetric memory configuration method and device. Taking an asymmetric dual-ended memory as an example, the present invention can configure the number of address concatenations and data concatenations required at both ends of the asymmetric dual-ended memory, while simplifying the design complexity of the asymmetric dual-ended memory. This overcomes the inability of the prior art to effectively handle the situation where the address bit width and data bit width of multiple ends are inconsistent, improves the utilization rate of memory resources, and avoids the occupation of chip resources.

[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows:

[0007] In a first aspect, the present invention provides an asymmetric memory configuration method, wherein for any asymmetric memory, the configuration method includes:

[0008] Obtain the configuration information of each memory port under the current memory; wherein, the configuration information includes multiple data pairs, and each data pair includes an address configuration and a data configuration;

[0009] For any memory port, determine the number of address concatenations and the number of data concatenations corresponding to each memory port based on the configuration information;

[0010] The bit mapping relationship between memory ports is determined based on the data bit width of each memory port and the number of data concatenations corresponding to it, and data is allocated according to the bit mapping relationship;

[0011] The initial value is allocated to each cascaded memory based on the number of addresses corresponding to each memory port, resulting in an optimized asymmetric dual-ended memory.

[0012] Optionally, the steps of determining the number of address concatenations and data concatenations corresponding to each memory port based on the configuration information include:

[0013] Obtain the initial information of each memory port under the current memory; where the initial information includes the address bit width and the data bit width;

[0014] For any memory port, based on its own address width, determine the target data pair that matches the current memory port from multiple data pairs;

[0015] Based on the target data pairs of each memory port and its own initial information, calculate the number of initial address concatenations and the number of initial data concatenations required for each memory port;

[0016] Adjust the initial number of address concatenations and the initial number of data concatenations for each memory port to obtain the final number of address concatenations and the final number of data concatenations, so that the effective storage capacity corresponding to each memory port is consistent.

[0017] Optionally, the step of determining the target data pair that matches the current memory port from multiple data pairs based on its own address bit width includes:

[0018] Sort each memory port in descending order of its address width and assign each memory port a number.

[0019] Sort each data pair from largest to smallest according to the value configured at its own address, and number each data pair.

[0020] Select the data pair with the same label as the memory port from each data pair and use it as the target data pair for the current memory port.

[0021] Optionally, when the asymmetric memory includes two data ports, namely a first data port and a second data port; wherein the address width of the first data port is greater than the address width of the second data port; the steps of calculating the number of initial address concatenations and the number of initial data concatenations required for each memory port based on the target data pair of each memory port and its own initial information include:

[0022] Based on the initial information of the first data port itself and the corresponding target data pair, determine the number of initial address concatenations and the number of initial data concatenations;

[0023] Based on the initial information of the second data port itself and the corresponding target data pair, determine the number of initial address concatenations and the number of initial data concatenations.

[0024] Optionally, the step of calculating the number of initial address concatenations and the number of initial data concatenations required for each memory port, based on the target data pair of each memory port and its own initial information, further includes:

[0025] The initial number of addresses concatenated at the first data port is used as the final number of addresses concatenated.

[0026] Adjust the initial number of addresses concatenated in the second data port so that the final number of addresses concatenated in the second data port is equal to the final number of addresses concatenated in the first data port;

[0027] The effective capacity of the second data port is determined based on the final number of address concatenations of the second data port.

[0028] The number of data cascades corresponding to the first data port is adjusted according to the effective capacity of the second data port to obtain the final number of data cascades for the first data port.

[0029] Optionally, the initial number of cascaded addresses for the first data port is calculated in a manner that satisfies:

[0030] A = 2 |a-b| ;

[0031] Where A is the initial number of address concatenations for the first data port; a is the address width of the first data port itself; b is the address configuration corresponding to the first data port; |.| is the absolute value operator;

[0032] The initial number of data concatenations at the first data port is calculated in a way that satisfies:

[0033] B = c / d;

[0034] Where B is the initial number of data concatenations for the first data port; c is the data bit width of the first data port itself; and d is the data configuration corresponding to the first data port.

[0035] Optionally, the step of calculating the number of initial address concatenations and the number of initial data concatenations required for each memory port, based on the target data pair of each memory port and its own initial information, further includes:

[0036] The external chip select address of the first data port is determined based on its own address bit width and the corresponding address configuration.

[0037] The external chip select address of the second data port is determined based on the external chip select address of the first data port, so that the number of addresses cascaded by the first data port and the second data port is the same.

[0038] Optionally, the step of determining the external chip select address of the first data port based on its own address bit width and corresponding address configuration includes:

[0039] Determine the difference between the address bit width of the first data port and the corresponding address configuration;

[0040] Following the order of high addresses from top to bottom, and using the difference as the number of filters, select the same number of high address bits from the first data port as the external chip select address of the first data port.

[0041] Optionally, when the configuration information includes two sets of matching data pairs, and the two sets of matching data pairs include a first matching data pair and a second matching data pair, the steps for obtaining the configuration information of each memory port under the current memory include:

[0042] The upper and lower limits of the address width and the upper and lower limits of the data width are determined based on the current storage capacity of the memory.

[0043] The upper limit of the address width is matched with the lower limit of the data width to obtain the first matching data pair;

[0044] The lower limit of the address width is matched with the upper limit of the data width to obtain the second matching data pair.

[0045] In a second aspect, the present invention also provides an electronic device, including a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the asymmetric memory configuration method described in any of the first aspects above.

[0046] The asymmetric memory configuration method and device provided in this invention have the following beneficial effects:

[0047] This invention provides an asymmetric memory configuration method, comprising: acquiring configuration information of each memory port under the current memory; for any memory port, determining the number of address concatenations and the number of data concatenations corresponding to each memory port based on the configuration information; determining the bit mapping relationship between the data bit widths of each memory port and the corresponding number of data concatenations, and allocating data according to the bit mapping relationship; and allocating initial values ​​to each concatenated memory according to the number of address concatenations corresponding to each memory port, thereby obtaining an optimized configuration of the asymmetric dual-ended memory. Based on this, taking an asymmetric dual-ended memory as an example, this invention can configure the number of address concatenations and the number of data concatenations required at both ends of the asymmetric dual-ended memory, simplifying the design complexity of the asymmetric dual-ended memory, overcoming the inability of existing technologies to effectively handle situations where the address bit widths and data bit widths of multiple ends are inconsistent, while improving memory resource utilization and avoiding chip resource occupation.

[0048] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0049] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 A flowchart illustrating the steps of an asymmetric memory configuration method provided in an embodiment of the present invention is shown.

[0051] Figure 2 A step-by-step flowchart of step 100 in an embodiment of the present invention is shown;

[0052] Figure 3 A step-by-step flowchart of step 200 in an embodiment of the present invention is shown;

[0053] Figure 4 A step-by-step flowchart of step 202 in an embodiment of the present invention is shown;

[0054] Figure 5 This shows one of the step-by-step flowcharts of step 203 in an embodiment of the present invention;

[0055] Figure 6 This is the second step-by-step flowchart of step 203 in an embodiment of the present invention;

[0056] Figure 7A step-by-step flowchart of step 2033 in an embodiment of the present invention is shown;

[0057] Figure 8 A schematic diagram of the server structure provided in an embodiment of the present invention is shown.

[0058] Icon: 10 - Server. Detailed Implementation

[0059] 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 embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0060] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0061] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0062] As described in the background section, existing memory cascading technologies are mainly designed for symmetric address dual-ended RAM. For example, since the address and data bit widths are the same at both ends of a symmetric address dual-ended RAM, the number of RAM blocks required for cascading can be calculated based on the configuration of the address and data bit widths of the chip RAM. However, for asymmetric dual-ended RAM, the number of address cascading blocks and the number of data cascading blocks required at both ends are different, and the operations of address partitioning, data allocation, and access control are also different. Existing cascading technologies simply cannot meet the cascading needs of asymmetric address dual-ended RAM.

[0063] While existing technologies can implement the functionality of asymmetric dual-ended RAM using logic circuits, this leads to increased resource consumption and design complexity.

[0064] Based on this, please refer to Figure 1 , Figure 1 The present invention provides a flowchart of an asymmetric memory configuration method, wherein for any asymmetric memory, the method includes steps 100 to 400.

[0065] Step 100: Obtain the configuration information of each memory port under the current memory.

[0066] The configuration information is used to characterize the threshold number of data lines and address lines corresponding to the current memory. In this embodiment, the configuration information includes multiple data pairs, and each data pair includes one address configuration and one data configuration.

[0067] Step 200: For any memory port, determine the number of address concatenations and the number of data concatenations corresponding to each memory port based on the configuration information.

[0068] Step 300: Determine the bit mapping relationship between the data bit widths of each memory port based on the data bit width of each memory port and the number of corresponding data concatenations, and allocate data according to the bit mapping relationship.

[0069] Step 400: Allocate the initial value to each cascaded memory according to the number of addresses corresponding to each memory port, and obtain the optimized configuration of the asymmetric dual-ended memory.

[0070] In this embodiment, the asymmetric memory configuration method performs threshold configuration based on the threshold number of data lines and address lines corresponding to the current memory, obtaining the configuration information of each memory port under the current memory. Then, based on this configuration information, the initial address bit width and initial data bit width corresponding to each memory port are adjusted so that the effective capacity corresponding to each memory port is the same. After obtaining the corresponding number of address cascades and the number of data cascades, data allocation is performed based on the bit correspondence of the data bit width corresponding to each memory port, and the initial value is allocated to different RAM blocks based on the external chip select signal and the allocation of data bit width, ensuring data consistency, thereby obtaining an optimized configuration of the asymmetric dual-ended memory. Based on this, the present invention provides an asymmetric memory configuration method that can meet the cascading requirements of asymmetric address dual-ended RAM and overcomes the problem that although the existing technology can implement the function of asymmetric dual-ended RAM through logic circuits, it will lead to increased resource consumption and increased design complexity.

[0071] In one possible implementation, since the chip memory capacity is fixed, both the address bit width configuration and the data bit width configuration have upper and lower limits. Based on this, please... Figure 1 Based on, refer to Figure 2 , Figure 2The flowchart of step 100 in this embodiment is shown; step 100 in this embodiment includes steps 101 to 103.

[0072] Step 101: Determine the upper and lower limits of the address width and the upper and lower limits of the data width based on the current storage capacity of the memory.

[0073] Step 102: Match the upper limit of the address width with the lower limit of the data width to obtain the first matching data pair.

[0074] Step 103: Match the lower limit of the address width with the upper limit of the data width to obtain the second matching data pair.

[0075] It should be noted that in this embodiment, the upper limit of the address width corresponds to the lower limit of the data width, and the upper limit of the data width corresponds to the lower limit of the address width. Based on this, the upper and lower limits of the address width and the upper and lower limits of the data width can be determined according to the current storage capacity of the memory. The upper limit of the address width and the lower limit of the data width can be configured to obtain the first matching data pair. Similarly, the lower limit of the address width and the upper limit of the data width can be configured to obtain the second matching data pair.

[0076] This embodiment takes an asymmetric dual-ended memory as an example, setting the upper limit of the address bit width to 14 and the lower limit to 10; the upper limit of the data bit width to 16 and the lower limit to 1; correspondingly, the first matching data pair can be represented as (14, 1) and the second matching data pair can be represented as (10, 16). After obtaining the above first matching data pair and second matching data pair, the data bit width and address bit width of the corresponding memory port can be adjusted according to the configuration constraints in the matching data pair.

[0077] After obtaining the configuration information of each memory port under the current memory, please... Figure 1 Based on, refer to Figure 3 , Figure 3 The flowchart of step 200 in this embodiment is shown, which includes steps 201 to 204.

[0078] Step 201: Obtain the initial information of each memory port under the current memory.

[0079] The initial information includes the address bit width and the data bit width.

[0080] Step 202: For any memory port, determine the target data pair that matches the current memory port from multiple data pairs based on its own address width.

[0081] Step 203: Based on the target data pairs of each memory port and its own initial information, calculate the number of initial address concatenations and the number of initial data concatenations required for each memory port.

[0082] Step 204: Adjust the initial number of address concatenations and the initial number of data concatenations corresponding to each memory port to obtain the final number of address concatenations and the final number of data concatenations, so that the effective storage capacity corresponding to each memory port is consistent.

[0083] To facilitate understanding of the setup process in this embodiment, an asymmetric dual-ended memory is used as an example. For clarity, it is assumed that the asymmetric dual-ended memory includes a first data port A and a second data port B. The initial information of each memory port under the current memory described in step 201 is the address width and data width corresponding to the first data port A, and the address width and data width corresponding to the second data port B. In this embodiment, the address width ADDR_A corresponding to the first data port A is set to 16 and the data width DATA_A is set to 2; the address width ADDR_B corresponding to the second data port B is set to 11 and the data width DATA_B is set to 64.

[0084] Based on this, please Figure 3 Based on, refer to Figure 4 , Figure 4 The flowchart of step 202 in this embodiment is shown. Step 202 in this embodiment includes steps 2021 to 2023.

[0085] Step 2021: Sort each memory port in descending order according to the numerical value of its own address width, and number each memory port.

[0086] Step 2022: Sort each data pair from largest to smallest according to the value configured in its own address, and number each data pair.

[0087] Step 2023: Select the data pairs with the same label as the memory port from each data pair and use them as the target data pairs for the current memory port.

[0088] For any memory port, this embodiment can match it with the data pairs under the above configuration information by comparing its corresponding address width. For example, in the above asymmetric dual-ended memory, the address width ADDR_A corresponding to the first data port A is greater than the address width ADDR_B corresponding to the second data port B. At this time, the first data port A can be matched with the data pair with the larger corresponding address in the configuration information. That is, the first data port A corresponds to the first matching data pair; the second data port B corresponds to the second matching data pair, thereby obtaining the target data pair corresponding to each memory port.

[0089] At this time, the address width ADDR_A corresponding to the first data port A is 16, the data width DATA_A is 2, the address configuration CONFIG_ADDR_A is 14, and the data configuration CONFIG_DATA_A is 1; the address width ADDR_B corresponding to the second data port B is 11, the data width DATA_B is 64, the address configuration CONFIG_ADDR_B is 10, and the data configuration CONFIG_DATA_B is 16.

[0090] After matching the corresponding target data pair, please Figure 3 Based on, refer to Figure 5 , Figure 5 The flowchart of step 203 in this embodiment is shown; step 203 in this embodiment includes steps 2031 to 2032.

[0091] Step 2031: Determine the initial address concatenation number and the initial data concatenation number based on the initial information of the first data port itself and the corresponding target data pair.

[0092] Step 2032: Determine the initial address concatenation number and the initial data concatenation number based on the initial information of the second data port itself and the corresponding target data pair.

[0093] In this embodiment, please Figure 5 Based on, refer to Figure 6 , Figure 6 The flowchart of another sub-step of step 203 in this embodiment is shown; step 203 also includes steps 2033 and 2034.

[0094] Step 2033: Determine the external chip select address of the first data port based on its own address bit width and corresponding address configuration.

[0095] Step 2034: Determine the external chip select address of the second data port based on the external chip select address of the first data port, so that the number of addresses cascaded between the first data port and the second data port is the same.

[0096] In one possible implementation, the execution order of steps 2031, 2032 and 2033 in step 203 above can be parallel, while the execution order of steps 2033 and 2034 can be sequential.

[0097] In this embodiment, please refer to Figure 6 Based on, refer to Figure 7 , Figure 7 The flowchart of step 2033 in this embodiment is shown; step 2033 also includes steps 2033-1 and 2033-2.

[0098] Step 2033-1: Determine the difference between the address width of the first data port and the corresponding address configuration.

[0099] Step 2033-2: Following the order of high addresses from top to bottom, and using the difference as the number of filters, select the corresponding number of high address bits with the same difference from the address bit width of the first data port, and use them as the external chip select address of the first data port.

[0100] In this embodiment, the execution method described above is as follows:

[0101] Taking the asymmetric dual-ended memory in the above embodiment as an example, and taking the first data port as an example, the address width ADDR_A in this port is 16 and the data width DATA_A is 2; the corresponding configuration information is (14, 1). At this time, due to the difference between the address width corresponding to the first data port and the address width in the configuration information, the two high-order bits of the address corresponding to the difference value can be used to construct the external chip select structure. That is, from the first data port, in order of high address from top to bottom, the difference value is used as the number of filters, and the corresponding number of high-order address bits with the same value as the difference value are filtered from the address width of the first data port as the external chip select address of the first data port. The above calculation process is expressed as: ADDR_A - CONFIG_ADDR_A = 16 - 14 = 2.

[0102] Furthermore, in this embodiment, the calculation method for the initial number of cascaded addresses of the first data port satisfies:

[0103] A = 2 |a-b| ;

[0104] Where A is the initial number of address concatenations for the first data port; a is the address width of the first data port itself, i.e., ADDR_A mentioned above; b is the address configuration corresponding to the first data port, i.e., CONFIG_ADDR_A mentioned above; and |.| is the absolute value operator.

[0105] The initial number of data concatenations at the first data port is calculated in a way that satisfies:

[0106] B = c / d;

[0107] Where B is the initial number of data concatenations for the first data port; c is the data bit width of the first data port itself, i.e., DATA_A mentioned above; and d is the data configuration corresponding to the first data port, i.e., CONFIG_DATA_A mentioned above.

[0108] Based on this, in this embodiment, the calculation process of the number A (or ADDR_CASC_A) of the first data port address concatenations satisfies: ADDR_CASC_A = 2 16-14=4; Correspondingly, the calculation process of the number of data concatenations B (or DATA_CASC_A) satisfies: DATA_CASC_A = 2 / 1 = 2.

[0109] To ensure that the effective capacity of the first data port and the second data port is consistent, the number of address concatenations between the first data port and the second data port can be the same. It should be noted that in this case, the high two bits of the second data port address must also be used to construct the external chip select structure. Based on the above formula, the number of address concatenations (ADDR_CASC_B) and the number of data concatenations (DATA_CASC_B) of the second data port can be calculated as 4. The aforementioned number of address concatenations and data concatenations refer to the initial number of address concatenations and the initial number of data concatenations for the first data port itself, as described in this embodiment; and the initial number of address concatenations and the initial number of data concatenations for the second data port itself.

[0110] After obtaining the initial number of data concatenations and the number of address concatenations corresponding to the first data port and the second data port, the number of address concatenations and the final number of data concatenations corresponding to each data port can be further adjusted to make the effective storage capacity corresponding to each memory port consistent.

[0111] Specifically, after determining the number of address concatenations corresponding to the first data port and the second data port respectively (i.e., according to the above setting method, in this embodiment, the ADDR_CASC_A and ADDR_CASC_B corresponding to the number of address concatenations of the first data port and the second data port of the asymmetric dual-ended memory are both 4), since the current configuration of the second data port in the memory is (10, 16), according to the above calculation equation for the number of address concatenations, the actual address configuration of the second data port should be (9, 16). At this time, the effective storage capacity of the second data port is only half of the storage capacity. In order to ensure that the effective storage capacity corresponding to each memory port is consistent, this embodiment can compare the initial number of data concatenations calculated in the first data port and the second data port, and take the initial number of data concatenations corresponding to the largest value as the final number of data concatenations at both ends, that is, change the number of data concatenations DATA_CASC_A of the first data port from 2 to 4.

[0112] Furthermore, to ensure consistent effective storage capacity across all memory ports, a corresponding address bit can be selected from the high address range as a control signal to adjust the writing of the two data input bits of the first data port. In this embodiment, the formula for confirming the address bit L of the control signal can be expressed as: L = log2(DATA_B / (DATA_CASC_B / DATA_CASC_A)). Based on this, in this embodiment, the 5th bit of address A in the first data port can be used as the control position to control the writing of the first data port.

[0113] In summary, in this embodiment, the final number of address concatenations and the final number of data concatenations corresponding to the first data port are both 4; the final number of address concatenations and the final number of data concatenations corresponding to the second data port are both 4. At this time, the total number of concatenations in the current memory is 16.

[0114] In addition, this embodiment also provides a method for obtaining control bits:

[0115] Determine the data expansion factor M of the first data port. In this embodiment, the ratio between the final number of data concatenations and the initial number of data concatenations of the first data port can be used as the corresponding data expansion factor. Based on this, the data expansion factor of the first data port is 2.

[0116] At this time, the formula for calculating the start bit of the write control signal of the first data port satisfies: The number of bits satisfies the calculation formula: log2M. Substituting the values, we know that the start bit of the write control signal for the first data port is 5 bits, with a total bit depth of 1. Based on this, the write control signal satisfies: That is, addr_A[4].

[0117] After determining the number of data concatenations and address concatenations corresponding to each memory port, data allocation is required. In this embodiment, step 300 is implemented as follows:

[0118] In this embodiment, the data width of the second data port is 64 bits, and the data width of the first data port is 2 bits. Since the number of cascaded connections corresponding to the first and second data ports is 4 each, the RAMs of each cascade can be named as: R0 / RAM0, R0 / RAM1, R0 / RAM2, and R0 / RAM3, respectively. Taking R0 / RAM0 as an example, it represents the first address cascade position / the first data cascade position. It should be noted that in this embodiment, data allocation and address cascading do not have a corresponding relationship; the connection relationship between each level of address cascade is the same.

[0119] In one possible implementation, the bit mapping relationship between the data bit widths of each memory port can be determined as follows:

[0120] The mapping relationship of the first data port is represented as follows:

[0121] The i-th data bit data_A[i] under the first data port corresponds to [RAM] iM RAM (i+1)M-1 ], M represents the data expansion factor.

[0122] Understandably, the second data bit data_A[1] under the first data port corresponds to the third data concatenation position RAM2 and the fourth data concatenation position RAM3, that is, it is expressed as: data_A[1]→[RAM2,RAM3]).

[0123] Similarly, the first data bit data_A[0] under the first data port corresponds to the first data concatenation position RAM0 and the second data concatenation position RAM1, that is, it is represented as: data_A[1]→[RAM0,RAM1]).

[0124] The mapping relationship between the second data port and the first data port satisfies:

[0125] The sequence number corresponding to the data bit under the second data port is modulo the data bit width under the first data port. Then, the modulo value is divided by the data configuration value corresponding to the first data port. Based on this quotient, the RAM sequence number in the first data port that needs to be connected is determined.

[0126] For example, data bit 15 under the second data port, i.e., data_B

[15] , corresponds to data bit 1 under the first data port, i.e., data_A[1], and is connected to the third data cascade position RAM2 and the fourth data cascade position RAM3.

[0127] In this embodiment, step 400 is implemented as follows:

[0128] The initial value of the original asymmetric double-ended memory is represented as INITVAL[2]. 16 *2-1:0] Since the number of address cascades is 4, the initial value can be divided into 4 parts to correspond to 4 sets of address cascades. Take one end to allocate the initial value, for example, the first data port. At this time, the initial value corresponding to the Nth bit (data_A[N] bit) in the first data port can be expressed as: INITVAL[n:0]%DATA_A; where % is the modulo calculation formula. Based on this, each RAM allocates the initial value at the original data_A position according to the data input of the connected first data port A.

[0129] Based on this, the present invention provides an asymmetric memory configuration method, relating to the field of memory technology. The method includes: acquiring configuration information of each memory port under the current memory; for any memory port, determining the number of address concatenations and the number of data concatenations corresponding to each memory port based on the configuration information; then determining data allocation based on the data bit width of each memory port and its corresponding number of data concatenations; finally, allocating initial values ​​to each concatenated memory based on the corresponding number of address concatenations, obtaining an optimized configuration of the asymmetric dual-ended memory. Based on this, the present invention simplifies the design complexity of asymmetric dual-ended memories, completes the configuration of the required number of address concatenations and data concatenations at both ends of the asymmetric dual-ended memory, overcomes the inability of existing technologies to effectively handle situations where the address bit width and data bit width of multiple ends are inconsistent, improves memory resource utilization, and avoids the occupation of chip resources.

[0130] Similar to the previous embodiment, the present invention also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the asymmetric memory configuration method described in any of the first aspects above, namely: obtaining configuration information of each memory port under the current memory; for any memory port, determining the number of address concatenations and the number of data concatenations corresponding to each memory port based on the configuration information; then determining data allocation based on the data bit width of each memory port and its corresponding number of data concatenations; finally, allocating initial values ​​to each concatenated memory according to the corresponding number of address concatenations to obtain an optimized asymmetric dual-end memory.

[0131] The same idea applies as the previous embodiment; please refer to [the previous embodiment]. Figure 8 , Figure 8 The diagram shows a block illustration of the server in this embodiment. The server includes a memory, a processor, and a communication module. The memory, processor, and communication module are electrically connected to each other directly or indirectly to enable data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.

[0132] The memory is used to store programs or data. The memory may be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc.

[0133] The processor is used to read / write data or programs stored in memory and to perform the corresponding functions.

[0134] The communication module is used to establish communication connections between the server and other communication terminals through the network, and to send and receive data through the network.

[0135] It should be understood that, Figure 8 The structure shown is only a schematic diagram of the server structure; the server may also include components such as... Figure 8 The more or fewer components shown, or having the same Figure 8 The different configurations shown. Figure 8 The components shown can be implemented using hardware, software, or a combination thereof.

[0136] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0137] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0138] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) 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.

[0139] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An asymmetric memory configuration method, characterized in that, For any asymmetric memory, the asymmetric memory configuration method includes: Obtain the configuration information of each memory port under the current memory; wherein, the configuration information includes multiple data pairs, and any data pair includes an address configuration and a data configuration; For any memory port, the number of address concatenations and the number of data concatenations corresponding to each memory port are determined based on the configuration information; The bit mapping relationship between each memory port is determined based on the data bit width of each memory port and the number of data concatenations corresponding to it, and data is allocated according to the bit mapping relationship; The initial value is allocated to each cascaded memory according to the number of addresses corresponding to each memory port, resulting in an optimized configuration of the asymmetric dual-ended memory. The steps of determining the number of address concatenations and the number of data concatenations corresponding to each memory port based on the configuration information include: Obtain the initial information of each memory port under the current memory; wherein, the initial information includes the address bit width and the data bit width; For any memory port, a target data pair matching the current memory port is determined from the plurality of data pairs based on its own address bit width; Based on the target data pairs of each memory port and its own initial information, calculate the number of initial address concatenations and the number of initial data concatenations required for each memory port; Adjust the initial number of address concatenations and the initial number of data concatenations corresponding to each memory port to obtain the final number of address concatenations and the final number of data concatenations, so that the effective storage capacity corresponding to each memory port is consistent.

2. The asymmetric memory configuration method according to claim 1, characterized in that, The step of determining the target data pair that matches the current memory port from the plurality of data pairs based on its own address bit width includes: The memory ports are sorted from largest to smallest according to their address width, and each memory port is numbered. Sort each data pair from largest to smallest according to the numerical value configured in its own address, and number each data pair. Select the data pair with the same label as the memory port from each of the data pairs, and use it as the target data pair corresponding to the current memory port.

3. The asymmetric memory configuration method according to claim 1 or 2, characterized in that, When the asymmetric memory includes two data ports, the data ports include a first data port and a second data port; wherein the address width of the first data port is greater than the address width of the second data port; the steps of calculating the initial number of address concatenations and the initial number of data concatenations required for each memory port based on the target data pairs of each memory port and its own initial information include: Based on the initial information of the first data port itself and the corresponding target data pair, determine the number of initial address concatenations and the number of initial data concatenations; Based on the initial information of the second data port itself and the corresponding target data pair, determine the number of initial address concatenations and the number of initial data concatenations.

4. The asymmetric memory configuration method according to claim 3, characterized in that, The step of calculating the number of initial address concatenations and the number of initial data concatenations required for each memory port, based on the target data pairs of each memory port and their own initial information, further includes: The initial number of address concatenations for the first data port is taken as the final number of address concatenations. Adjust the initial number of addresses concatenated in the second data port so that the final number of addresses concatenated in the second data port is equal to the final number of addresses concatenated in the first data port; The effective capacity of the second data port is determined based on the final number of address concatenations of the second data port. The number of data cascades corresponding to the first data port is adjusted according to the effective capacity corresponding to the second data port to obtain the final number of data cascades for the first data port.

5. The asymmetric memory configuration method according to claim 3, characterized in that, The calculation method for the initial number of cascaded addresses of the first data port satisfies: ; in, The initial number of cascaded addresses for the first data port; The address width of the first data port itself; Configure the address corresponding to the first data port; It is the absolute value operator; The initial number of data concatenations at the first data port is calculated in a manner that satisfies: ; in, This represents the initial number of data cascades for the first data port; This refers to the data bit width of the first data port itself. Configure the data for the first data port.

6. The asymmetric memory configuration method according to claim 3, characterized in that, The step of calculating the number of initial address concatenations and the number of initial data concatenations required for each memory port, based on the target data pairs of each memory port and their own initial information, further includes: The external chip select address of the first data port is determined based on the address bit width of the first data port itself and the corresponding address configuration; The external chip select address of the second data port is determined based on the external chip select address of the first data port, so that the number of addresses cascaded by the first data port and the second data port is the same.

7. The asymmetric memory configuration method according to claim 6, characterized in that, The steps for determining the external chip select address of the first data port based on its own address bit width and corresponding address configuration include: Determine the difference between the address bit width of the first data port itself and the corresponding address configuration; Following the order of high addresses from top to bottom, and using the difference as the number of filters, select the same number of high address bits from the first data port as the external chip select address of the first data port.

8. The asymmetric memory configuration method according to claim 1, characterized in that, When the configuration information includes two sets of matching data pairs, and the two sets of matching data pairs include a first matching data pair and a second matching data pair, the step of obtaining the configuration information of each memory port under the current memory includes: The upper and lower limits of the address width and the upper and lower limits of the data width are determined based on the current storage capacity of the memory. The upper limit of the address width is matched with the lower limit of the data width to obtain the first matching data pair; The lower limit of the address width is matched with the upper limit of the data width to obtain the second matching data pair.

9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the asymmetric memory configuration method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Implementing an asymmetric memory with random port ratios using dedicated memory primitives

    US11416659B1