On-chip memory access control structure and method supporting multi-body concurrent access, SoC chip and readable storage medium

By adopting a dual-body RAM control structure and a parallel access detection mechanism in the SoC chip, the problem of low concurrent bus utilization of the on-chip memory access control structure of the SoC chip is solved, and efficient parallel memory access and atomic access of multi-core processors are achieved, improving Improves the bus efficiency of the system.

CN118568022APending Publication Date: 2024-08-30XIAN MICROELECTRONICS TECH INST

Patent Information

Application Number
CN202410738897.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In the existing technology, the on-chip memory access control structure of the SoC chip has the problem of low concurrent bus utilization, especially in a multi-core processor environment, causing the serial access timing of the memory bank to become an important limiting factor for system bus efficiency.

Method used

Dual RAM control structure is adopted. Each single RAM control part includes the access control structure and parallel access detection structure of the single RAM. Through the address detection mechanism and the read and write conflict detection mechanism, it is possible to achieve non-conflict in address and non-conflict in read and write. In case of concurrent access to two single RAMs, the arbitration component and the atomic access component work together to ensure safe parallel access.

Benefits of technology

It effectively improves the bandwidth utilization of storage access, realizes the parallel read and write access of the AXI bus to the single on-chip RAM, reduces the switching delay caused by serial access, supports atomic access of multi-core processors, and improves the memory efficiency. Concurrent access efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568022A
    Figure CN118568022A
Patent Text Reader

Abstract

The invention belongs to the technical field of memories, and relates to an on-chip memory access control structure supporting multi-body concurrent access, double-body RAM control is adopted, and each single RAM control part comprises a single RAM access control structure and a parallel access detection structure; the parallel access detection structure comprises an address detection mechanism and a read-write conflict detection mechanism, and can realize multi-body concurrent access for the access control structures of the two single RAMs on the premise of no address conflict and no read-write conflict. A single RAM is divided into double RAMs, the increased storage bandwidth can be matched with bandwidth matching brought by bus parallel read-write, and only address space hit judgment and read-write mutual exclusion need to be increased. The scheme has the characteristic of low resource overhead, can be applied to the on-chip RAM design of the current AXI interface, and has relatively high application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of memory technology, and in particular relates to an on-chip memory access control structure, method, SoC chip, and readable storage medium that support multi-body concurrent access. Background Art

[0002] In today's complex SoCs, not only is the number of processor cores increasing, but high-speed interfaces such as PCIe, SRIO, and Ethernet have also become essential components. Both the processing core and the communication interface require a high-speed, low-latency storage area on the chip to quickly cache data and serve as an intermediate storage component with external DDR and FLASH devices. This requires the SoC to integrate larger capacity and higher-speed on-chip RAM, especially with the rise of current artificial intelligence technology, which highlights the severe challenge of the storage wall problem. However, large capacity and high speed are a contradiction for RAM. Larger capacity is bound to bring greater delays in readout logic, especially for advanced nanotechnology. Line delay has replaced device delay and has become an important factor affecting chip timing convergence. More importantly, even if a large-capacity RAM is integrated, the serial access timing of the storage body becomes an important limiting factor affecting the efficiency of the system bus because the corresponding access controller does not have a good scheduling mechanism.

[0003] After searching, the patent document with application number 202210510935.9 discloses an on-chip SRAM array storage device and an AI neural network image data storage method, and proposes a storage form of changing a single storage body into multiple parallel bank blocks. Compared with the access bandwidth of a single storage body, it is improved by N times in disguise. The invention is aimed at SIMD instructions of AI images, and its data flow characteristics are stored continuously in multiple banks, and its reading process is also parallel and continuous, so it is more efficient. However, this method is not universal. For example, the data accessed by a general-purpose CPU does not have obvious continuity, and it also does not consider the balance between bus bandwidth and memory access bandwidth in the system chip.

[0004] The paper "Storage Controller Interface Design Based on AMBA Bus" published in Computer Research and Development in 2015 focuses on the conversion efficiency of the access of the system chip bus AXI to other buses on the chip, including APB and NIF protocols. The NIF protocol only supports 256b-bit read and write requests, so the paper mainly studies how to convert the bit width of non-256b-bit read and write access requests. However, the paper still does not discuss the scheduling strategy between the AXI bus and the storage body, and still implements a serialized access control mechanism. Summary of the invention

[0005] The purpose of the present invention is to provide an on-chip memory access control structure, method, SoC chip, and readable storage medium that support multi-body concurrent access, thereby solving the problem of low concurrent bus utilization caused by multi-body concurrent access.

[0006] The present invention is achieved through the following technical solutions:

[0007] The present invention discloses an on-chip memory access control structure supporting multi-body concurrent access, adopting dual-body RAM control, each single-body RAM control part includes a single-body RAM access control structure and a parallel access detection structure;

[0008] The parallel access detection structure includes an address detection mechanism and a read-write conflict detection mechanism, which can realize multi-body concurrent access to the access control structure of two single RAMs under the premise of no address conflict and no read-write conflict.

[0009] Further, the access control structure of the single RAM includes a write address self-increment component, a read address self-increment component, an arbitration component, an atomic access component, a write data component, a wait count component, a chip select generation component and a read response component;

[0010] The write operation includes a write address channel, a write data channel, and a write response channel, and the read operation includes a read address channel and a read response channel;

[0011] The write address auto-increment component is used to automatically calculate the new address for each transmission based on the first address, access length and access size of the write address channel;

[0012] The read address auto-increment component is used to automatically calculate the new address for each transmission based on the first address, access length and access size of the read address channel;

[0013] An arbitration component, used for determining whether to output a write address or a read address to a storage body according to requests of a read address channel and a write address channel and a count value sent by a waiting count component;

[0014] The atomic access component is used to monitor the write address channel and the read address channel. When an atomic access is found, it acts on the chip select generation component to achieve safe access and outputs the monitoring results through the write response channel.

[0015] A write data component, used for determining when to send write data to the storage body according to the count value of the wait count component;

[0016] A read response component, used to return the read data and response signal of the storage body to the read response channel;

[0017] A chip select generating component, used for generating chip select and write enable signals under the joint action of an arbitration component, an atomic access component and a wait counting component;

[0018] The wait counting component is used to send a wait delay of a control signal to a write data component, an arbitration component and a chip select generating component.

[0019] Furthermore, the arbitration component includes a register, a multiplexer MUX and a logic gate; the output end of the multiplexer MUX is connected to the register;

[0020] The read / write access request determines that the multiplexer MUX selects one of the four inputs to output to the register, which formally becomes the read / write selection flag after being latched by the register;

[0021] If there are read and write access requests at the same time, and the multiplexer MUX input is "11", the arbitration result is opposite to the previous selection, indicating that read and write are authorized in turn;

[0022] Among them, the read-write selection flag is fed back to the 11 input terminal of the multiplexer MUX through the NOT gate, indicating that the read-write access requires round-robin arbitration;

[0023] The write address invalid signal and the last write data signal are ANDed with the read / write select signal output by the register through the OR gate, and the read transfer proceed signal is ANDed with the read / write select signal output by the register. After the two AND gates are ORed, they become the arbitration enable signal to drive the enable terminal EN of the register.

[0024] Furthermore, the selection result of the multiplexer MUX needs to be started under the action of the arbitration enable signal. There are two conditions for arbitration enable:

[0025] (1) The current transfer is a write transfer, and the write address is invalid or the last write data has been completed;

[0026] (2) The current transfer is a read transfer and the transfer is still in progress.

[0027] Furthermore, the atomic access component includes a plurality of monitors, each monitor corresponding to a processor core;

[0028] When an atomic read request arrives, it starts from monitor i and queries which monitor outputs an exclusive flag of 0, then its read latch is enabled to latch the current read request; if the output exclusive flag is 1, it continues to query the next monitor, and so on;

[0029] When an atomic write access request arrives, all monitors with an exclusive flag of 1 make the match enable valid, and compare the write address with the read address latched inside the monitor, the write ID and the read ID latched inside the monitor. As long as one of the monitors matches successfully, the output match indication signal is 1, and the final write response is 1, indicating that the exclusive access is locked successfully.

[0030] Further, the monitor includes register reg1, register reg2 and register reg3;

[0031] When the exclusive flag is 0, indicating that the current monitor is idle, register reg1 is allowed to latch the atomic read access request, and the read valid signal will change the exclusive flag to 1 through register reg3, indicating that the current monitor has been used;

[0032] Afterwards, when an atomic write access request arrives, under the match enable control, the write address is matched with the read address, and the write ID is matched with the read ID. If they are equal, the exclusive flag is reversely released, and at the same time, the match indication signal is output as 1 through register reg2, indicating that the exclusive access is locked successfully.

[0033] Further, the access control structures of the two single RAMs are named as storage body access control A and storage body access control B respectively; the address detection mechanism is an address comparison module;

[0034] The read-write conflict detection mechanism is a set of combinational logic gates, including an XOR gate, an OR gate, a NOT gate a, a NOT gate b, and an AND gate; the access read-write type is input into the XOR gate, the XOR gate is connected to the OR gate, the OR gate is connected to a NOT gate a, the NOT gate a is connected to the access control structure of another single RAM, and the address comparison module and the NOT gate b are connected to the AND gate together;

[0035] The access read / write type and the in-transmission read / write type of the storage access control A are inputted into the exclusive OR gate on the storage access control B side, and the access read / write type and the in-transmission read / write type of the storage access control B are inputted into the exclusive OR gate on the storage access control A side; the NOT gate a on the storage access control A side is connected to the NOT gate b on the storage access control B side, and the NOT gate a on the storage access control B side is connected to the NOT gate b on the storage access control A side;

[0036] The signal generated by the combinational logic gate is a comparison enable, which acts on the address comparison module to control whether the address comparison module is enabled;

[0037] Only when an address comparison module receives the address comparison enable, the address comparison module determines whether it belongs to the address range of the address comparison module based on the current access address and the access read / write type. Only when the address range hits and there is no ongoing access to the address comparison module, will the final access enable signal be generated to the address comparison module.

[0038] The present invention also discloses a control method for the on-chip memory access control structure supporting multi-body concurrent access, wherein the access control structures of two single RAMs are respectively named as memory body access control A and memory body access control B;

[0039] The process includes:

[0040] Each single RAM outputs a flag signal indicating whether a transfer is in progress and the type of read or write being transferred;

[0041] When a new access request is sent by the AXI bus, the access read / write type is firstly checked with the read / write type being transmitted by the storage access control A through the read / write conflict detection mechanism on the storage access control B side to see if they are the same. If they are different, the comparison of the effective storage access control B is enabled; if they are the same, the access is blocked until the read / write operation being transmitted is completed.

[0042] Or if the storage bank access control A is not transmitted, the comparison of the effective storage bank access control B is enabled;

[0043] After the comparison enable of storage access control B is valid, the access address is compared with the address range of storage access control B through the address detection mechanism to see if there is a hit. Only when there is a hit and there is no transmission of storage access control B, can access to storage access control B be allowed. At this time, storage access control A and storage access control B work at the same time to ensure that AXI read and write can be accessed in parallel.

[0044] The present invention also discloses a SoC chip, on which the on-chip memory access control structure supporting multi-body concurrent access is configured.

[0045] The present invention also discloses a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the steps of the control method.

[0046] Compared with the prior art, the present invention has the following beneficial technical effects:

[0047] The invention discloses an on-chip memory access control structure supporting multi-body concurrent access, and proposes a control interface for multi-body concurrent access. First, the efficient support of a single memory body for an AXI bus is completed, and atomic access support between multiple cores is realized. The memory body is further divided into two, and an address detection mechanism and a read-write conflict detection mechanism are added on the single body control, so that the read-write access of non-conflicting addresses can be changed from serial to parallel, and the bandwidth utilization of storage access is effectively improved. The scheme can greatly improve the bus utilization rate without adding a bus interface, and the structure is simple and easy to implement, and has high practical value for on-chip RAM integration. It realizes the outstanding read-write access of the AXI bus to the single on-chip RAM, effectively reduces the switching delay caused by serialized access, and can maximize the efficiency of the single RAM; further realizes the atomic access of the multi-core processor to the on-chip RAM, and the synchronous operation between the multi-core processors can be realized through a simple atomic instruction monitoring mechanism; in order to further give play to the bandwidth advantage brought by the decoupling of the AXI read-write channel, it is considered that by splitting the single RAM into a dual RAM, the increased storage bandwidth can match the bandwidth matching brought by the parallel read-write of the bus, and only the address space hit judgment and the read-write mutual exclusion need to be added. This solution has the characteristics of low resource overhead and can be applied to the on-chip RAM design of the current AXI interface, with great application value.

[0048] The present invention designs an on-chip storage access control structure that supports multi-body concurrent access. Based on the single-body serial minimum delay access control, it accelerates the outstanding access of the on-chip high-performance host through the AXI bus by reading and writing multi-body cross-connection, and supports atomic access of multi-core processors. The effects achieved are as follows:

[0049] 1) Aiming at the access requirements of current SoC systems for large-capacity and high-speed on-chip memory, a storage access structure with high bandwidth utilization suitable for the AXI bus is proposed, which can quickly convert the read and write access of AXI into the access timing of single-port RAM and achieve outstanding access, thereby maximizing the storage bandwidth utilization.

[0050] 2) A monitoring mechanism that supports atomic access of multi-core processors is proposed, which can implement atomic instruction exception response with less overhead and achieve the purpose of synchronous access.

[0051] 3) Based on the above single-body access, a multi-body concurrent control structure is proposed, which can realize multi-body concurrent access under the premise of no address conflict and no read-write conflict, eliminate the underutilization of AXI read-write bandwidth caused by the serial read and write of RAM, and give full play to the bandwidth advantage of AXI's read-write channel decoupling. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1This is the logical framework diagram of the read and write access control of a single RAM;

[0053] Figure 2 This is a framework diagram of the read-write arbitration logic component;

[0054] Figure 3 A framework diagram for atomic access components;

[0055] Figure 4 This is the framework diagram of the monitor;

[0056] Figure 5 A storage access control structure that is separate for reading and writing. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the present invention more clear, the following is further described in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention, that is, the embodiments described are only part of the embodiments of the present invention, not all embodiments.

[0058] The components described and shown in the drawings and embodiments of the present invention may be arranged and designed in various configurations. Therefore, the detailed description of the embodiments of the present invention provided in the following drawings is not intended to limit the scope of the claimed invention, but merely represents a selected embodiment of the present invention. Based on the drawings and embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0059] It should be noted that the terms "comprises", "includes" or any other variations are intended to cover non-exclusive inclusion, so that a process, element, method, article or equipment that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to the process, element, method, article or equipment.

[0060] First, the AXI bus access control structure of the single RAM is given, such as Figure 1 As shown. The AXI bus decouples read and write. The write operation includes the write address channel, the write data channel, and the write response channel. The read operation includes the read address channel and the read response channel. Read and write are independent of each other. The key part of the entire control structure includes 8 main components, namely, the write address self-increment component, the read address self-increment component, the arbitration component, the atomic access component, the write data component, the wait count component, the chip select generation component, and the read response component.

[0061] The write address auto-increment component and the read address auto-increment component automatically calculate the new address for each transmission according to the first address, access length and access size of the write address channel and the read address channel respectively; the arbitration component decides whether to authorize read access or write access according to the request of the read address channel and the write address channel and the count value issued by the wait count component, and its output arbitration signal acts on the MUX selector to decide whether to output the write address or the read address to the storage body; the atomic access component monitors the write address channel and the read address channel. Once an atomic access is found, it acts on the chip select generation component to achieve safe access and outputs the monitoring result through the write response channel; the write data channel decides when to send write data to the storage body according to the count value of the wait count component; the read response component returns the read data and response signal of the storage body to the read response channel of AXI; the chip select generation component generates chip select and write enable signals under the joint action of the arbitration component, the atomic access component and the wait count component; the wait count component realizes the waiting delay of sending control signals such as address, write data, chip select, etc. to the storage body to meet the timing constraint requirements of special storage bodies.

[0062] exist Figure 1 Among the eight components, the design logic of the arbitration component and the atomic access component need to be emphasized. Figure 2 The detailed structure of the arbitration component is given, including a multiplexer MUX, a register, and a logic gate; the output end of the multiplexer MUX is connected to the register; the logic gate includes a first NOT gate, a second NOT gate, a first OR gate, a second OR gate, a first AND gate, and a second AND gate; the output end of the first NOT gate is connected to the 11 input end of the multiplexer MUX, and the input end is connected to the output end of the register;

[0063] One input end of the first AND gate is connected to the output end of the register, and the other input end is connected to the output end of the first OR gate;

[0064] One input of the second AND gate is connected to the output of the second NOT gate, and the input of the second NOT gate is connected to the output of the register;

[0065] The outputs of the first AND gate and the second AND gate are used as inputs of the second OR gate, and the output of the second OR gate is connected as the EN terminal of the register.

[0066] The read / write access request determines that the multiplexer MUX selects one of the four inputs to output to the register, which becomes the read / write selection flag after being latched by the register; the read / write selection signal it outputs selects the type of access that the next storage body needs to make through the arbitration algorithm in the current read access request and write access request. The arbitration algorithm is: if there is no read / write request (i.e., the MUX selector input is "00"), it means that there is no transmission request, and the arbitration result maintains the last selection; if there is only a read access request (i.e., the MUX selector input is "01"), the output '0' means that read access will be authorized; if there is only a write access request (i.e., the MUX selector input is "10"), the output '1' means that write access will be authorized; if there are both read and write access requests (i.e., the MUX selector input is "11"), the arbitration result is opposite to the last selection, which means that read and write are authorized in turn.

[0067] However, the selection result of the arbitration algorithm also needs to be truly effective under the action of the arbitration enable signal. The conditions for arbitration enable are: (1) the current transfer is a write transfer, and the write address is invalid or the last write data has been performed; (2) the current transfer is a read transfer, and the transfer is still in progress.

[0068] like Figure 2 As shown, the register has an enable terminal EN, which is connected to the arbitration enable signal. Only when the arbitration enable signal is '1' can the register latch the value of the input D terminal to the Q terminal output, otherwise the Q terminal remains unchanged. The write address invalid signal and the last write data signal are ANDed with the read / write selection signal output by the register through the OR gate, and the read transfer proceed signal is ANDed with the read / write selection signal output by the register. After the two AND gates are ORed, they become the arbitration enable signal driving the enable terminal EN of the register.

[0069] Figure 3This is the structure diagram of the atomic access component, in which the core is the monitor. Here, four monitors are given, corresponding to the four processor cores in the system. The characteristic of atomic access is to perform uninterruptible read-before-write on the same address, that is, by locking a certain address, other processors are shielded from locking the address again, so as to achieve synchronization of all processors. The read operation is to try to lock the address, and the write operation is to determine whether the locking operation is completed. If the locking cannot be completed, it is marked by a write response signal. When an atomic read request (read address, read ID, read valid) arrives, start from monitor 0 to query which monitor outputs the exclusive flag of 0, which means that the monitor is currently idle. For example, if the exclusive flag of monitor 0 is 0, then its read latch enable can latch the current read request. If the exclusive flag is 1, continue to query monitor 1, and so on. Next, when an atomic write access request (write address, write ID) arrives, all monitors with an exclusive flag of 1 make the match enable effective, that is, compare the write address with the write ID, and compare the read address latched inside the monitor with the read ID. As long as one of the monitors matches successfully, the output match indication signal is 1, and the final write response is 1, indicating that the exclusive access is locked successfully.

[0070] Figure 4 This is the internal structure diagram of the monitor. The monitor includes three registers, namely register reg1, register reg2 and register reg3. When the exclusive flag is 0, indicating that the current monitor is idle, register reg1 is allowed to latch the atomic read access request (read address, read ID), and the read valid signal will change the exclusive flag signal to 1 through register reg3 to indicate that the current monitor has been used. Afterwards, when the atomic write access request (write address, write ID) arrives, under the control of the match enable (actually the exclusive flag), the write address is matched with the read address, and the write ID is matched with the read ID. If they are equal, on the one hand, the exclusive flag is reversed and the match indication signal is output as 1 through register reg2, indicating that the exclusive access is locked successfully.

[0071] The above single RAM control structure can realize the read and write access of AXI bus, but because the RAM storage body can only serve one request at a time, for AXI, a bus whose read channel and write channel are decoupled and can be concurrent, it is actually not possible to effectively exert the concurrent performance of AXI. Therefore, it is considered to replace the single RAM control with dual RAM control, that is, to copy a set of the above single RAM control structure and add a read and write parallel access detection structure on top of them. Once mutually exclusive access is found during a read and write access, both can be allowed to proceed at the same time. The specific structure is shown in Figure 5 .

[0072] Figure 5The structure diagram of the storage access control for read-write separation is given. Storage access control A and storage access control B are both the aforementioned complete single RAM access control mechanisms, with functions such as atomic access and read-write arbitration.

[0073] The address detection mechanism is an address comparison module, which is used to compare the input access address to determine whether the access address is the same. First, there are two conditions to determine whether one of the address comparison modules (such as A) is enabled: (1) the current access read / write type is different from the read / write type being transmitted output by the storage access control B (marked by the XOR gate output), and (2) there is no ongoing access to the storage access control B. These two conditions are operated by the OR gate to determine whether the address comparison module of the storage access control A is enabled. Only when the address comparison of the address comparison module on the storage access control A side is enabled, the address comparison module determines whether it belongs to the address range of the storage access control A based on the current access address and read / write type. Only when the address range is hit and there is no ongoing access to the storage access control A, will the final access enable signal be generated to the storage access control A. The process for the storage access control B is the same as above.

[0074] Figure 5 The read-write conflict detection mechanism is a set of combinational logic gates, including XOR gate, OR gate, NOT gate a, NOT gate b and AND gate; the access read-write type is input into the XOR gate, the XOR gate is connected to the OR gate, the OR gate is connected to the NOT gate a, the NOT gate a is connected to the access control structure of another single RAM, and the address comparison module and the NOT gate b are connected to the AND gate;

[0075] The access read / write type and the in-transmission read / write type of the storage access control A are inputted into the exclusive OR gate on the storage access control B side, and the access read / write type and the in-transmission read / write type of the storage access control B are inputted into the exclusive OR gate on the storage access control A side; the NOT gate a on the storage access control A side is connected to the NOT gate b on the storage access control B side, and the NOT gate a on the storage access control B side is connected to the NOT gate b on the storage access control A side;

[0076] The signal generated by the combinational logic gate is a comparison enable, which acts on the address comparison module and is used to control whether the address comparison module is enabled.

[0077] Figure 5 The two gray parts in the middle are the single RAM control mechanism, and the logic outside is the read-write detection mechanism. The read-write detection mechanism determines whether the two single control mechanisms can work at the same time or not.

[0078] The present invention adds an address detection mechanism and a read-write conflict detection mechanism on top of the two. Each single RAM needs to output a flag signal indicating whether there is a transmission in progress and the read-write type being transmitted. When a new access request is sent by the AXI bus, the access read-write type is first determined to be the same as the read-write type being transmitted by a single (such as A) through an XOR gate. If they are different, the comparison enable of another single (such as B) is valid, or if the previous single (such as A) has not transmitted, the comparison enable of another single (such as B) is also valid. Only after the comparison enable (such as B) is valid, can the access address be further compared with the address range of the next single (such as B) to see if it hits. Only when it hits and the single (such as B) has not transmitted, can the single (such as B) be allowed to be accessed. At this time, A and B will work simultaneously, thereby ensuring that the read and write of AXI can be accessed in parallel.

[0079] The control method of the on-chip memory access control structure supporting multi-body concurrent access disclosed in the present invention can be implemented in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention can be implemented in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0080] If the control method of the on-chip memory access control structure supporting multi-body concurrent access disclosed in the present invention is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals. Among them, the computer storage medium can be any available medium or data storage device that can be accessed by the computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

[0081] In an exemplary embodiment, a SoC chip is further provided, on which the on-chip memory access control structure supporting multi-body concurrent access is configured.

[0082] The present invention has been applied to a SoC system based on AXI bus, in which an on-chip large-capacity RAM controller is integrated, and the controller adds the structure described in the present invention. It has been verified that the proposed invention structure can effectively realize the basic read, basic write and outstanding concurrent read and write access of AXI. The design structure is simple, the resource overhead is low, and it is transparent to the software, with high use value and versatility. The access control interface has completed the hardware design and has been verified by system simulation, and has high application maturity and reusability.

[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. An on-chip memory access control structure supporting multi-body concurrent access, characterized in that: Adopting dual RAM control, each single RAM control part includes single RAM access control structure and parallel access detection structure; The parallel access detection structure includes an address detection mechanism and a read-write conflict detection mechanism, which can realize multi-body concurrent access to the access control structure of two single RAMs under the premise of no address conflict and no read-write conflict.

2. The on-chip memory access control structure supporting multi-body concurrent access according to claim 1, characterized in that: The access control structure of the single RAM includes a write address auto-increment component, a read address auto-increment component, an arbitration component, an atomic access component, a write data component, a wait count component, a chip select generation component and a read response component; The write operation includes a write address channel, a write data channel, and a write response channel, and the read operation includes a read address channel and a read response channel; The write address auto-increment component is used to automatically calculate the new address for each transmission based on the first address, access length and access size of the write address channel; The read address auto-increment component is used to automatically calculate the new address for each transmission based on the first address, access length and access size of the read address channel; An arbitration component, used for determining whether to output a write address or a read address to a storage body according to requests of a read address channel and a write address channel and a count value sent by a waiting count component; The atomic access component is used to monitor the write address channel and the read address channel. When an atomic access is found, it acts on the chip select generation component to achieve safe access and outputs the monitoring results through the write response channel. A write data component, used for determining when to send write data to the storage body according to the count value of the wait count component; A read response component, used to return the read data and response signal of the storage body to the read response channel; A chip select generating component, used for generating chip select and write enable signals under the joint action of an arbitration component, an atomic access component and a wait counting component; The wait counting component is used to send a wait delay of a control signal to a write data component, an arbitration component and a chip select generating component.

3. The on-chip memory access control structure supporting multi-body concurrent access according to claim 2, characterized in that: The arbitration component includes a register, a multiplexer MUX and a logic gate; the output end of the multiplexer MUX is connected to the register; The read / write access request determines that the multiplexer MUX selects one of the four inputs to output to the register, which formally becomes the read / write selection flag after being latched by the register; If there are read and write access requests at the same time, and the multiplexer MUX input is "11", the arbitration result is opposite to the previous selection, indicating that read and write are authorized in turn; Among them, the read-write selection flag is fed back to the 11 input terminal of the multiplexer MUX through the NOT gate, indicating that the read-write access requires round-robin arbitration; The write address invalid signal and the last write data signal are ANDed with the read / write select signal output by the register through the OR gate, and the read transfer proceed signal is ANDed with the read / write select signal output by the register. After the two AND gates are ORed, they become the arbitration enable signal to drive the enable terminal EN of the register.

4. The on-chip memory access control structure supporting multi-body concurrent access according to claim 3, characterized in that: The selection result of the multiplexer MUX needs to be started under the action of the arbitration enable signal. There are two conditions for arbitration enable: (1) The current transfer is a write transfer, and the write address is invalid or the last write data has been completed; (2) The current transfer is a read transfer and the transfer is still in progress.

5. The on-chip memory access control structure supporting multi-body concurrent access according to claim 2, characterized in that: The atomic access component includes multiple monitors, each corresponding to a processor core; When an atomic read request arrives, it starts from monitor i and queries which monitor outputs an exclusive flag of 0, then its read latch is enabled to latch the current read request; if the output exclusive flag is 1, it continues to query the next monitor, and so on; When an atomic write access request arrives, all monitors with an exclusive flag of 1 make the match enable valid, and compare the write address with the read address latched inside the monitor, the write ID and the read ID latched inside the monitor. As long as one of the monitors matches successfully, the output match indication signal is 1, and the final write response is 1, indicating that the exclusive access is locked successfully.

6. The on-chip memory access control structure supporting multi-body concurrent access according to claim 5, characterized in that: The monitor includes register reg1, register reg2 and register reg3; When the exclusive flag is 0, indicating that the current monitor is idle, register reg1 is allowed to latch the atomic read access request, and the read valid signal will change the exclusive flag to 1 through register reg3, indicating that the current monitor has been used; Afterwards, when an atomic write access request arrives, under the match enable control, the write address is matched with the read address, and the write ID is matched with the read ID. If they are equal, the exclusive flag is reversely released, and at the same time, the match indication signal is output as 1 through register reg2, indicating that the exclusive access is locked successfully.

7. The on-chip memory access control structure supporting multi-body concurrent access according to claim 1, characterized in that: The access control structures of the two single RAMs are named as storage access control A and storage access control B respectively; the address detection mechanism is an address comparison module; The read-write conflict detection mechanism is a set of combinational logic gates, including an XOR gate, an OR gate, a NOT gate a, a NOT gate b, and an AND gate; the access read-write type is input into the XOR gate, the XOR gate is connected to the OR gate, the OR gate is connected to a NOT gate a, the NOT gate a is connected to the access control structure of another single RAM, and the address comparison module and the NOT gate b are connected to the AND gate together; The access read / write type and the in-transmission read / write type of the storage access control A are inputted into the exclusive OR gate on the storage access control B side, and the access read / write type and the in-transmission read / write type of the storage access control B are inputted into the exclusive OR gate on the storage access control A side; the NOT gate a on the storage access control A side is connected to the NOT gate b on the storage access control B side, and the NOT gate a on the storage access control B side is connected to the NOT gate b on the storage access control A side; The signal generated by the combinational logic gate is a comparison enable, which acts on the address comparison module to control whether the address comparison module is enabled; Only when an address comparison module receives the address comparison enable, the address comparison module determines whether it belongs to the address range of the address comparison module based on the current access address and the access read / write type. Only when the address range hits and there is no ongoing access to the address comparison module, will the final access enable signal be generated to the address comparison module.

8. The control method of an on-chip memory access control structure supporting multi-body concurrent access according to any one of claims 1 to 7, characterized in that: The access control structures of the two single RAMs are named as storage body access control A and storage body access control B respectively; include The following process: Each single RAM outputs a flag signal indicating whether a transfer is in progress and the type of read or write being transferred; When a new access request is sent by the AXI bus, the access read / write type is first compared with the read / write type being transmitted by the storage access control A through the read / write conflict detection mechanism on the storage access control B side to determine whether they are the same. If they are different, the comparison of the effective storage access control B is enabled; If they are the same, the access is blocked until the read and write operations being transmitted are completed; Or if the storage bank access control A is not transmitted, the comparison of the effective storage bank access control B is enabled; After the comparison enable of storage access control B is valid, the access address is compared with the address range of storage access control B through the address detection mechanism to see if there is a hit. Only when there is a hit and there is no transmission of storage access control B, can access to storage access control B be allowed. At this time, storage access control A and storage access control B work at the same time to ensure that AXI read and write can be accessed in parallel.

9. A SoC chip, characterized in that: The SoC chip is configured with an on-chip memory access control structure supporting multi-body concurrent access as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is executed by a processor to implement the steps of the control method according to claim 8.

Citation Information

Patent Citations

  • On-chip SRAM array storage device and AI neural network image data storage method

    CN114860169A

Cited By

  • Control circuit for avoiding read-write conflict of RAM (Random Access Memory) of display driver

    CN119296598A

  • A control circuit for avoiding RAM read-write conflicts in display drivers

    CN119296598B

  • Image data processing device and method, equipment and storage medium

    CN120976005A

  • Address lock structure, multi-core processor system and electronic equipment

    CN121681419A

  • Address lock structure, multi-core processor system and electronic device

    CN121681419B