Non-blocking processing system for non-cacheable memory accesses

By introducing an instruction processing pipeline and related units, non-blocking processing of non-cacheable memory access is achieved, solving pipeline blocking and write path contention, improving throughput and response speed, and supporting flexible sorting and accurate error detection.

CN123137584APending Publication Date: 2026-11-20SHANGHAI SUIYUAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611526866.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-29
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

In existing technologies, pipeline congestion, write path contention, and rigid sorting strategies caused by non-cacheable storage access reduce the throughput and response speed of the processing system in scenarios with intensive non-cacheable storage access, and also lack flexibility and reliability.

Method used

The system employs an instruction processing pipeline, an instruction reordering buffer, an unbufferable read buffer unit, a write buffer, an unbufferable write queue, an incomplete transaction information record table, a storage access sorting control unit, a transaction identifier management unit, and an error aggregation unit to achieve ordered instruction submission and non-blocking storage access.

Benefits of technology

It improves the throughput, response speed and reliability of the processing system in scenarios with intensive access to non-cacheable storage, solves pipeline blocking and write path contention problems, supports flexible adjustment of sorting strategies by the software, and achieves accurate error detection and diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123137584A_ABST
    Figure CN123137584A_ABST
Patent Text Reader

Abstract

The application discloses a non-blocking processing system for non-cacheable memory access. The non-blocking processing system for non-cacheable memory access comprises: an instruction processing pipeline for processing an instruction sequence; an instruction reordering buffer for tracking execution states of emitted instructions and controlling ordered submission of the instructions in program order; a non-cacheable read cache unit for temporarily storing non-cacheable read instruction information to be submitted; a write buffer for temporarily storing submitted on-chip memory write operations; a non-cacheable write queue for temporarily storing submitted non-cacheable write operations; an uncompleted transaction information record table for recording instruction source information corresponding to each uncompleted write transaction; and a memory access ordering control unit for controlling ordering strategies between non-cacheable memory accesses. The application solves the problems of pipeline blocking, write path contention and ordering strategy rigidity, and improves the throughput, response speed and reliability of the processing system in a non-cacheable memory access intensive scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of processor storage technology, and more particularly to a non-blocking processing system for non-cacheable storage access. Background Technology

[0002] In the field of embedded processors and microcontrollers, processors frequently need to access external peripheral registers or system control registers. These accesses are typically mapped to non-cacheable address spaces, i.e., memory-mapped input / output regions. Because non-cacheable memory accesses have side effects—such as clearing interrupt flags when reading and triggering hardware actions when writing—these operations are irreversible. The processor must ensure that the instruction is confirmed and committed before initiating a request to the external bus to avoid erroneous side effects caused by speculative execution.

[0003] In the process of developing this invention, the inventors discovered the following defects in the prior art: Uncacheable reads require waiting for submission confirmation before initiating a bus request. During the waiting period, the storage access pipeline is occupied, and subsequent unrelated instructions cannot enter, causing the pipeline to be blocked for a long time, which seriously reduces throughput in scenarios such as peripheral polling and interrupt querying; all writes enter the same write buffer, but the response latency of uncacheable writes is much higher than that of on-chip writes. Incomplete transactions will fill the write buffer, preventing subsequent fast on-chip writes from being submitted, causing write path blocking; sorting control also lacks flexibility, either by purely hardware-forced strict sequential execution at the expense of throughput, or by relying on complex address matching circuits to detect dependencies, resulting in high hardware overhead and high power consumption, and neither supports flexible software adjustment strategies, and the detection of anomalies in uncacheable writes lacks accuracy. Summary of the Invention

[0004] This invention provides a non-blocking processing system for non-cacheable storage access to achieve high throughput, response speed, and reliability in scenarios with intensive non-cacheable storage access.

[0005] According to one aspect of the present invention, a non-blocking processing system for non-cacheable memory access is provided, wherein the non-blocking processing system for non-cacheable memory access includes: an instruction processing pipeline, an instruction reordering cache, a non-cacheable read cache unit, a write cache, a non-cacheable write queue, an incomplete transaction information record table, a memory access sorting control unit, a transaction identifier management unit, an error aggregation unit, and a system bus interface. The instruction processing pipeline is used to perform instruction fetch, decode, issue, execute, and write-back processing on the instruction sequence. The instruction reordering buffer is coupled to the instruction processing pipeline to track the execution status of issued instructions and control the orderly submission of instructions according to the program sequence. The non-cacheable read cache unit is coupled to the execution stage of the instruction processing pipeline and is used to temporarily store non-cacheable read instruction information to be submitted. The write buffer is used to temporarily store submitted on-chip memory write operations, thereby decoupling the write operation from the memory port. The non-cacheable write queue is set up independently of the write cache and is used to temporarily store submitted non-cacheable write operations. The incomplete transaction information record table is coupled with the non-cacheable write queue and the write cache to record the instruction source information corresponding to each incomplete write transaction; The storage access sorting control unit includes software-configurable control registers for controlling the sorting strategy among non-cacheable storage accesses; The transaction identifier management unit includes a software-configurable identifier register for dynamically controlling the bus transaction identifier value used for non-cacheable storage access. The error aggregation unit is coupled to the incomplete transaction information record table and is used to aggregate and store access error events and provide interrupt reporting to the processor. The system bus interface is used to connect to an external system bus to perform actual data transmission for non-cacheable storage access.

[0006] The technical solution of this invention provides a non-blocking processing system for non-cacheable memory access, comprising an instruction processing pipeline, an instruction reordering buffer, a non-cacheable read buffer unit, a write buffer, a non-cacheable write queue, an incomplete transaction information record table, a memory access sorting control unit, a transaction identifier management unit, an error aggregation unit, and a system bus interface. The instruction processing pipeline is used to fetch, decode, issue, execute, and write back instruction sequences. The instruction reordering buffer is coupled to the instruction processing pipeline to track the execution status of issued instructions and control the orderly submission of instructions according to program order. The non-cacheable read buffer unit is coupled to the execution stage of the instruction processing pipeline to temporarily store information on non-cacheable read instructions to be submitted. The write buffer is used to temporarily store submitted on-chip memory write operations, decoupling write operations from memory ports. The non-cacheable write queue is set up independently of the write buffer. The system includes a storage queue for temporarily storing committed non-cacheable write operations; an incomplete transaction information record table coupled to the non-cacheable write queue and the write cache to record the instruction source information corresponding to each incomplete write transaction; a storage access sorting control unit containing software-configurable control registers to control the sorting strategy among non-cacheable storage accesses; a transaction identifier management unit containing software-configurable identifier registers to dynamically control the bus transaction identifier value used by non-cacheable storage accesses; an error aggregation unit coupled to the incomplete transaction information record table to aggregate storage access error events and provide interrupt reporting to the processor; and a system bus interface for connecting to the external system bus to perform actual data transmission for non-cacheable storage accesses. This system solves the problems of pipeline blocking, write path contention, and rigid sorting strategies, improving the throughput, response speed, and reliability of the processing system in scenarios with intensive non-cacheable storage access.

[0007] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0008] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0009] Figure 1 This is a schematic diagram of the structure of a non-blocking processing system for non-cacheable storage access provided in Embodiment 1 of the present invention; Figure 2This is a schematic diagram of the structure of the control status register corresponding to the transaction identifier management unit in a non-blocking processing system according to Embodiment 2 of the present invention. Detailed Implementation

[0010] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0011] It should be noted that the terms "target," "current," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0012] It is worth noting that the information collected in the technical solution of this application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data all comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse; if the user chooses to refuse, the process will proceed to the expert decision-making process.

[0013] Example 1 Figure 1 This is a schematic diagram of the structure of a non-blocking processing system for non-cacheable storage access provided in Embodiment 1 of the present invention. The non-blocking processing system 100 for non-cacheable storage access includes: an instruction processing pipeline 110, an instruction reordering buffer 120, a non-cacheable read buffer unit 130, a write buffer 140, a non-cacheable write queue 150, an incomplete transaction information record table 160, a storage access sorting control unit 170, a transaction identifier management unit 180, an error aggregation unit 190, and a system bus interface 200.

[0014] The instruction processing pipeline 110 is used to perform instruction fetch, decode, issue, execute, and write-back processing on the instruction sequence. The instruction reordering buffer 120 is coupled to the instruction processing pipeline 110 to track the execution status of issued instructions and control the orderly submission of instructions according to the program sequence. The non-cacheable read cache unit 130 is coupled to the execution level of the instruction processing pipeline 110 and is used to temporarily store non-cacheable read instruction information to be submitted. The write buffer 140 is used to temporarily store submitted on-chip memory write operations, thereby decoupling the write operation from the memory port. The non-cacheable write queue 150 is set up independently of the write buffer 140 and is used to temporarily store submitted non-cacheable write operations. The incomplete transaction information record table 160 is coupled with the non-cacheable write queue 150 and the write cache 140 to record the instruction source information corresponding to each incomplete write transaction; The storage access sorting control unit 170 includes a software-configurable control register for controlling the sorting strategy among non-cacheable storage accesses; The transaction identifier management unit 180 includes a software-configurable identifier register for dynamically controlling the bus transaction identifier value used for non-cacheable storage access. The error aggregation unit 190 is coupled to the incomplete transaction information record table 160 and is used to aggregate storage access error events and provide interrupt reporting to the processor. The system bus interface 200 is used to connect to an external system bus to perform actual data transmission for non-cacheable storage access.

[0015] In this embodiment, the non-blocking processing system 100 for non-cacheable storage access includes an instruction processing pipeline 110, an instruction reordering cache 120, a non-cacheable read cache unit 130, a write cache 140, a non-cacheable write queue 150, an incomplete transaction information record table 160, a storage access sorting control unit 170, a transaction identifier management unit 180, an error aggregation unit 190, and a system bus interface 200. These functional units work collaboratively to decouple non-cacheable storage access from the instruction processing pipeline 110, achieving non-blocking pipeline operation while ensuring operational irreversibility. The transaction identifier management unit 180 enables bus-level parallelization of cross-device access, and the incomplete transaction information record table 160 enables accurate detection and diagnosis of write errors.

[0016] Optionally, the non-cacheable read cache unit includes at least two cache entries; wherein each cache entry includes at least one type of field: target register identifier field, instruction identifier field, access address field, and status field; the instruction processing pipeline performs attribute judgment processing on the target address of the read instruction corresponding to the instruction sequence at the execution level; when it is detected that the target address attribute belongs to a non-cacheable region address, the target register identifier field, instruction identifier field, and access address field corresponding to the read instruction are written into the target free cache entry corresponding to the non-cacheable read cache unit; wherein the status of the target free cache entry is set to a waiting-to-commit state; the instruction processing pipeline releases the execution resources corresponding to the read instruction; wherein the non-cacheable read cache unit is also used to detect the commit signal of the instruction reordering cache; after the system bus interface receives the read response from the external system bus connection, the non-cacheable read cache unit writes the read data into the target register through the write-back arbitration port and releases the cache entry.

[0017] In this embodiment, the target register identifier field records the target register number that needs to be written back after the read result. The instruction identifier field records the unique identifier of the read instruction in the instruction reordering cache. The access address field records the non-cacheable address that needs to be accessed. The status field identifies the current processing stage of the cached entry; specifically, the status field may include at least a wait-to-commit status or a bus request status.

[0018] Specifically, the non-blocking processing flow for non-cacheable read instructions is as follows: At the execution level, the instruction processing pipeline performs attribute judgment processing on the target address of the read instruction corresponding to the instruction sequence. When it is detected that the target address attribute belongs to a non-cacheable region address, the target register identifier field, instruction identifier field, and access address field corresponding to the read instruction are written into a target free cache entry corresponding to the non-cacheable read cache unit; and the status field of the target free cache entry is set to a waiting-to-commit state. Simultaneously, the instruction processing pipeline immediately releases the execution resources occupied by the read instruction, allowing subsequent read instructions to continue entering the pipeline for execution.

[0019] Correspondingly, the non-cacheable read cache unit monitors the commit signal of the instruction reordering cache. When the instruction corresponding to a certain cache entry is confirmed to be committed by the instruction reordering cache, the status field of the cache entry is updated to the bus request status, and a read request is sent to the outside through the system bus interface.

[0020] Furthermore, after the system bus interface receives a read response from the external bus, the non-cacheable read cache unit writes the read data to the target register through the write-back arbitration port and releases the cache entry, significantly improving the processor's throughput in non-cacheable read-intensive scenarios.

[0021] Furthermore, for subsequent instructions that depend on the destination register, the processor's register state tracking mechanism (such as a scoreboard) automatically prevents subsequent instructions that depend on the destination register from entering the execution stage while the destination register is marked as not ready, thus ensuring data correctness. When an exception or branch prediction error occurs and the pipeline needs to be flushed, entries in the non-cacheable read cache that have not yet initiated a bus request (i.e., entries in a waiting-to-commit state) will be safely cleared to avoid erroneous side effects.

[0022] Optionally, the write instruction corresponding to the instruction sequence is used to set two cache paths according to the target address storage attributes. The two cache paths are a cache attribute write path and an uncacheable attribute write path. The cache attribute write path is used to write the address and data corresponding to the target write instruction into the write cache when the instruction reordering cache submits a target write instruction and the address of the target write instruction is within the address range corresponding to the on-chip memory. The write cache is configured with a first-in-first-out enqueue order. The uncacheable attribute write path is used to write the address and data corresponding to the target write instruction into the uncacheable write queue when the instruction reordering cache submits a target write instruction and the address of the target write instruction is an uncacheable region address. The uncacheable write queue is independent of the write cache. The entries in the uncacheable write queue initiate write requests to the external system bus through the system bus interface.

[0023] In this embodiment, the write instruction corresponding to the instruction sequence is used to allocate two cache paths according to the target address storage attributes; the first cache path is the cache attribute write path and the second cache path is the non-cacheable attribute write path.

[0024] Furthermore, the cache attribute write path is used to write the address and data corresponding to the target write instruction into the write buffer when the instruction reordering buffer submits a target write instruction and the address of the target write instruction is within the address range of the corresponding on-chip memory. The write buffer is configured with a first-in-first-out (FIFO) enqueue structure; it employs a shallow depth (M entries, where M is a positive integer greater than or equal to 2) to adapt to the low latency characteristics of the on-chip memory. Entries in the write buffer are written to the on-chip memory ports sequentially according to their enqueue order.

[0025] Accordingly, the non-cacheable attribute write path is used to write the address and data corresponding to the target write instruction into the non-cacheable write queue when the instruction reordering cache submits a target write instruction and the address of the target write instruction is an address of a non-cacheable region. The non-cacheable write queue is independent of the write cache and has a relatively deep depth (K entries, K greater than M) to accommodate multiple incomplete non-cacheable write transactions. Entries in the non-cacheable write queue initiate write requests to the external system bus through the system bus interface.

[0026] By separating the paths as described above, the long latency wait of non-cacheable write operations will not occupy the entry resources of the write cache, and the submission and execution of on-chip memory write operations are not affected by the response time of non-cacheable write operations; the two types of write operations enter different cache paths, and operations with large latency differences do not interfere with each other, thus improving the overall utilization efficiency of the write path.

[0027] Optionally, the storage access sorting control unit includes a software-readable and writable control register containing at least two control bits; wherein, the first control bit is a same-port read / write order-preserving bit; the second control bit is a cross-port order-preserving bit; the reset default value of the control register sets the first control bit and the second control bit to an active state, so that the processor defaults to strong sorting mode after reset; the software dynamically switches between strong sorting mode and weak sorting mode by writing to the control register; the control register is used to adjust the sorting order by software according to different user application scenarios.

[0028] Specifically, it also includes: when the first control bit is determined to be valid, for non-cacheable storage access initiated through the same system external bus port, the read operation must wait for all incomplete write transactions on the system external bus port to complete before initiating processing; wherein, the sorting detection corresponding to the storage access sorting control unit is counted by a preset incomplete transaction counter; when the second control bit is valid, non-cacheable storage access initiated through different system external bus ports is executed according to a preset software program order; in each user application scenario, based on the received different target program order preservation requests, the software is instructed to dynamically adjust the first control bit or the second control bit to a valid state; after the target program is executed, the first control bit or the second control bit is set to an invalid state.

[0029] In this embodiment, when the first control bit (i.e., the same-port read / write ordering bit) is determined to be valid, for non-cacheable storage access initiated through the same system external bus port, the read operation must wait for the incomplete write transaction response on the system external bus port to be completed before initiating processing. Ordering detection is implemented by maintaining an incomplete write transaction counter: the incomplete transaction counter increments by one for each initiated write transaction and decrements by one for each received write response; a new read request is allowed only when the incomplete transaction counter value is zero.

[0030] Furthermore, when the second control bit (i.e. the cross-port sequence bit) is in a valid state, non-cacheable memory access initiated through different system external bus ports is executed according to the preset software program order to ensure cross-port memory consistency.

[0031] Correspondingly, the default reset value of the control register sets all the aforementioned control bits to the valid state, meaning that after reset, the processor operates in global strong ordering mode by default, ensuring compatibility with traditional software. In various user application scenarios, based on the received order-preserving requests from different target programs, the software is instructed to dynamically adjust the first or second control bit to the valid state; after the target program is executed, the first or second control bit is then set to the invalid state.

[0032] Specifically, in performance-sensitive application scenarios, the software can actively relax sorting constraints by writing to the control register. The first or second control bit can be set to be valid or invalid according to user requirements to complete the corresponding order preservation operation and obtain higher storage access throughput. The sorting detection adopts a lightweight counter scheme with extremely low hardware overhead.

[0033] Compared to existing address-matching-based sorting schemes, the incomplete transaction counter used in this invention has extremely low hardware overhead (only one bit-width incomplete transaction counter is needed per bus port), eliminating the need for high-power circuits such as content-addressable memory, thus significantly reducing area and power consumption. Furthermore, the control register's reset default value is a global strong sorting mode, requiring no software initialization; existing software can run correctly on enhanced processors without modification.

[0034] Optionally, it further includes: an incomplete transaction information record table, used to set information record tables on write buffers corresponding to the non-cacheable write queue and the on-chip memory respectively; the incomplete transaction information record table includes multiple entries, each entry including multiple entry fields; the entry fields include at least one of the following: a valid bit field, an instruction address field, a storage target address field, and a transaction type field; wherein, the valid bit field is used to identify that the entry is valid; the instruction address field is used to record the program location that initiates the write instruction; the storage target address field is used to record the bus write address; wherein, the transaction type field is used to distinguish between on-chip memory write and non-cacheable write.

[0035] Specifically, it also includes: when a target write instruction is determined to be retired from the instruction reordering cache and a write operation is initiated, the program location identifier and storage target address corresponding to the target write instruction are written to the free entry corresponding to the incomplete transaction information record table, and the valid bit field of the free entry is set; for read-modify-write operations corresponding to the on-chip memory, the entry corresponding to the incomplete transaction information record table is released after the write-back phase of the read-modify-write operation is completed; wherein, for read-modify-write operations corresponding to the on-chip memory, the entry corresponding to the incomplete transaction information record table is released when the error correction code verification corresponding to the read operation passes; when the system bus interface receives an abnormal write operation response, the instruction address and storage target address corresponding to the abnormal transaction are obtained from the incomplete transaction information record table, and the instruction address and storage target address are jointly written to the error cause register and error address register corresponding to the error convergence unit; when the processor of the non-blocking processing system that cannot access cached storage flushes the pipeline due to an abnormality, the entries in the incomplete transaction information record table that have not been requested are cleared along with the write cache.

[0036] In this embodiment, the incomplete transaction information record table is set on the write cache corresponding to the non-cacheable write queue and the on-chip memory, respectively. The incomplete transaction information record table includes multiple entries (the number of entries can be set to N), where N is a positive integer greater than or equal to 16, and N depends on the performance and area requirements. The fields of each entry in the incomplete transaction information record table can include at least one of the following fields: valid bit field, instruction address field, storage target address field, and transaction type field, and can also include a port identifier field and a transaction identifier field. The incomplete transaction information record table is used to solve the problem that asynchronous errors occurring after a write operation retires from the instruction reordering cache cannot be accurately traced.

[0037] Specifically, the incomplete transaction information record table may include normal responses, abnormal write operation responses, and abnormal flushing pipeline operations.

[0038] In detail, the workflow of the incomplete transaction information record table is as follows: During the enqueue operation, when it is determined that the target write instruction has retired from the instruction reordering register and a write operation is initiated (which may specifically include non-cacheable writes initiated through the system bus interface, and read-modify-write operations that need to be performed in the on-chip memory part of the write initiated through the write register), the program location identifier, storage target address, port identifier field and transaction identifier field corresponding to the target write instruction are written to the free entry corresponding to the incomplete transaction information record table, and the valid bit field of the free entry is set.

[0039] During normal dequeueing, when the system bus interface receives a normal write response, it matches the corresponding entry in the information record table based on the transaction identifier and port information carried in the response and releases it. For multiple entries with the same port identifier and the same transaction identifier, the oldest entry is selected according to the enqueue order (because the bus protocol guarantees that responses with the same identifier are returned in order). For read-modify-write operations of on-chip memory, the entry corresponding to the incomplete transaction information record table is released after the write-back phase of the read-modify-write operation is completed. For the read-modify-write operation corresponding to the on-chip memory, the entry corresponding to the incomplete transaction information record table is released when the error correction code verification corresponding to the read operation passes.

[0040] During the error detection and reporting process, when the system bus interface receives an abnormal write operation response, the incomplete transaction information record table obtains the instruction address and storage target address corresponding to the abnormal transaction, and uses the port identifier field and transaction identifier field to locate the corresponding entry in two dimensions, providing the instruction address and storage target address corresponding to the abnormal transaction, and writing the above information into the error cause register and error address register of the error aggregation unit.

[0041] During the abnormal pipeline flushing process, when the processor flushes the pipeline due to an anomaly or branch prediction error, the entries in the incomplete transaction information record table that have issued bus requests are unaffected (because the transactions are irreversible), while the entries that have not yet issued requests are cleared along with the write buffer.

[0042] In this embodiment, compared to precise exception detection for non-cacheable read operations, precise error detection is achieved for write operations (precisely locating the instruction and address that caused the error; it can also detect bus data transmission errors or slave device error waiting). However, since the write instruction has been retired from the instruction reordering cache, precise exception recovery is not supported. Errors are reported asynchronously via an interrupt through the error aggregation unit. The software error handler can read the error cause register and error address register to obtain precise fault information, enabling targeted error diagnosis and recovery strategies. It achieves error backtracking capability for retired write instructions, maintaining accuracy even in multi-transaction out-of-order response scenarios, allowing the software to obtain precise fault location information.

[0043] The technical solution of this invention provides a non-blocking processing system for non-cacheable memory access, comprising an instruction processing pipeline, an instruction reordering buffer, a non-cacheable read buffer unit, a write buffer, a non-cacheable write queue, an incomplete transaction information record table, a memory access sorting control unit, a transaction identifier management unit, an error aggregation unit, and a system bus interface. The instruction processing pipeline is used to fetch, decode, issue, execute, and write back instruction sequences. The instruction reordering buffer is coupled to the instruction processing pipeline to track the execution status of issued instructions and control the orderly submission of instructions according to program order. The non-cacheable read buffer unit is coupled to the execution stage of the instruction processing pipeline to temporarily store information on non-cacheable read instructions to be submitted. The write buffer is used to temporarily store submitted on-chip memory write operations, decoupling write operations from memory ports. The non-cacheable write queue is set up independently of the write buffer. The system includes a storage queue for temporarily storing committed non-cacheable write operations; an incomplete transaction information record table coupled to the non-cacheable write queue and the write cache to record the instruction source information corresponding to each incomplete write transaction; a storage access sorting control unit containing software-configurable control registers to control the sorting strategy among non-cacheable storage accesses; a transaction identifier management unit containing software-configurable identifier registers to dynamically control the bus transaction identifier value used by non-cacheable storage accesses; an error aggregation unit coupled to the incomplete transaction information record table to aggregate storage access error events and provide interrupt reporting to the processor; and a system bus interface for connecting to the external system bus to perform actual data transmission for non-cacheable storage accesses. This system solves the problems of pipeline blocking, write path contention, and rigid sorting strategies, improving the throughput, response speed, and reliability of the processing system in scenarios with intensive non-cacheable storage access.

[0044] Example 2 Figure 2This invention provides a schematic diagram of the control status register corresponding to the transaction identifier management unit in a non-blocking processing system with non-cacheable storage access, as shown in Embodiment 2 of the present invention. This embodiment refines the above embodiment, and the control status register includes a write transaction identifier register and a read transaction identifier register.

[0045] The transaction identifier management unit 180 includes a software-configurable control status register 1800; the control status register includes a write transaction identifier register 1810 and a read transaction identifier register 1820.

[0046] When the processor of the non-blocking processing system for non-cacheable storage access is reset, the initial values ​​of the transaction identifiers corresponding to the write transaction identifier register 1810 and the read transaction identifier register 1820 are zero; all non-cacheable storage accesses use the same transaction identifier; when the software removes the ordering constraint of each non-cacheable storage access at the bus level, a write operation is performed to the transaction identifier management unit 180; wherein, the write operation is a serialized execution instruction, which performs the removal of the ordering constraint processing operation by switching the value of the identifier register and refreshing the pipeline; wherein, after switching the identifier, the initiated non-cacheable storage access carries the new transaction identifier value, which is used to perform parallel routing to the target slave device according to each new transaction identifier value.

[0047] In this embodiment, the transaction identifier management unit 180 is used to address the cross-device serialization problem caused by multiple non-cacheable storage accesses using fixed bus transaction identifiers. The management unit includes a software-configurable control status register.

[0048] Specifically, the write transaction identifier register stores the bus write transaction identifier value used by the current non-cacheable write operation. The register's bit width is equal to the bus transaction identifier's bit width (W bits, where W is a positive integer greater than or equal to 2). Each time software writes to this register, the register value automatically increments by one (cyclically within the range of 2 to the power of W), i.e., performing modulo 2 to the power of W addition. No specific value needs to be provided during software writing; the write operation itself triggers the increment. Upon reset, the register value is zero.

[0049] The read transaction identifier register stores the bus read transaction identifier value used by the current non-cacheable read operation. Its structure and increment behavior are the same as those of the write transaction identifier register.

[0050] In this embodiment, both registers (write transaction identifier register and read transaction identifier register) are software-readable and writable control status registers, and the current transaction identifier value is returned when read.

[0051] The transaction identifier management unit operates as follows: When the processor of the non-blocking processing system that cannot be cached for storage access is reset, the initial value of the transaction identifiers corresponding to the write transaction identifier register 1810 and the read transaction identifier register 1820 is zero; all non-cacheable storage accesses use the same transaction identifier, and the behavior is completely consistent with the fixed identifier scheme, ensuring backward compatibility.

[0052] Furthermore, when the software needs to remove the ordering constraint between subsequent non-cacheable memory accesses and previous non-cacheable memory accesses at the bus level, a write operation is performed to the corresponding transaction identifier management unit 180. This write operation is executed as a serialized instruction. The processor first waits for the instruction processing pipeline to empty (i.e., all previous instructions have been executed), then switches the value of the identifier register and refreshes the pipeline, causing subsequent instructions to be fetched and executed again to perform the ordering constraint removal process. Instruction serialization ensures that all non-cacheable accesses before and after the identifier switch use a definite identifier value, without ambiguity.

[0053] Correspondingly, after the identifier switch, the initiated non-cacheable storage access carries the new transaction identifier value. Since the old and new transaction identifiers are different, the bus interconnect network does not impose ordering constraints on them, allowing the bus to route them in parallel to their respective target slave devices. The target slave devices can independently process their received requests, and responses can be returned independently according to their respective time sequences, no longer affected by each other's delays.

[0054] Typical application scenarios are as follows: For example, in a multi-device configuration scenario, configuration data is first written to the first slave device (using transaction identifier value T0); the transaction identifier register is written (the identifier increments from T0 to T1); configuration data is then written to the second slave device (using transaction identifier value T1). The write requests to the first and second slave devices carry different transaction identifier values ​​on the bus. The bus interconnect network allows both to be transmitted in parallel to their respective target slave devices, eliminating the serialization bottleneck in the fixed identifier scheme where writing configuration data to the second slave device must wait for the writing of configuration data to the first slave device to be completed.

[0055] For example, in a multi-device status polling scenario, a status read is first initiated to the first slave device (using transaction identifier value T0); the status is then written to the read transaction identifier register (incrementing from T0 to T1); finally, a status read is initiated to the second slave device (using transaction identifier value T1). Understandably, the two read requests carry different identifier values, and the responses can be returned out of order. If the second slave device responds faster, its data can be returned to the processor before the data from the first slave device, without waiting.

[0056] Furthermore, the transaction identifier value is globally shared across three or more system bus ports; that is, the value of the same write transaction identifier register is used by write requests on all ports, and the value of the same read transaction identifier register is used by read requests on all ports. Specifically, which port a non-cacheable storage access is sent to is determined by the address routing logic, and is unrelated to the transaction identifier value.

[0057] When the software does not perform the transaction identifier value switching operation (i.e., does not write to the above transaction identifier register), the processor behaves exactly the same as the fixed identifier scheme, achieving unconditional backward compatibility.

[0058] The technical solution of this invention sets write transaction identifier registers and read transaction identifier registers in the control status register corresponding to the transaction identifier management unit, and sets the working method corresponding to the transaction identifier management unit. Through dynamic transaction identifier switching, the software can actively allocate different transaction identifiers between operations accessing different slave devices, enabling the bus interconnection network to route these requests to their respective target slave devices in parallel. In typical scenarios such as multi-device initialization and multi-channel programming, the effective throughput of non-cacheable storage access approaches the theoretical upper limit of bus bandwidth. This solves the cross-device serialization problem caused by multiple non-cacheable storage accesses using fixed bus transaction identifiers, improves the response speed and reliability of the processing system in non-cacheable storage access scenarios, and enables independent return according to their respective timing sequences, no longer affected by mutual delays.

[0059] Furthermore, after introducing dynamic transaction identifier value switching, multiple incomplete read requests using different read transaction identifier values ​​may exist on the same bus port. According to the bus protocol, read responses with different transaction identifier values ​​can be returned out of order (i.e., the order in which responses arrive may differ from the order in which the requests were sent). To support the correct handling of out-of-order responses, the technical solution of this embodiment extends the entry structure of the non-cacheable read cache unit 130 to support out-of-order responses.

[0060] Specifically, it also includes: expanding the entry structure of the non-cacheable read cache unit; wherein, the entry structure expansion includes adding a bus port identifier field and a read transaction identifier field to each cache entry when a non-cacheable read instruction is written into the cache entry; when the system bus interface receives a read response from the target port, performing a two-dimensional match between the read transaction identifier field carried in the read response and the bus port identifier field corresponding to the non-cacheable read cache unit to determine the target cache entry.

[0061] In this embodiment, a bus port identifier field and a read transaction identifier field are added to each cache entry. When a non-cacheable read instruction is written to a cache entry, in addition to writing the original access address field, destination register identifier field, and instruction identifier field, the bus port identifier field and read transaction identifier field of the request are also written to the cache entry.

[0062] Furthermore, when the system bus interface receives a read response from a target port, it performs a two-dimensional match between the read transaction identifier field of that transaction carried in the read response and the bus port identifier field corresponding to the non-cacheable read cache unit. A matching entry is searched among multiple cache entries to determine the target cache entry. For multiple entries with the same port identifier and the same read transaction identifier field (i.e., consecutive reads issued using the same identifier before identifier switching), the oldest entry is selected according to the enqueue order, because the bus protocol guarantees that responses with the same identifier are returned in order. The matched entry is written to the response data and then written back to the target register via the arbitration port.

[0063] Correspondingly, two-dimensional matching replaces the simple first-in-first-out dequeue mechanism in the fixed-identifier scheme; since the number N of entries in the non-cacheable read cache unit is usually small (e.g., 2 to 8), the matching logic only requires N sets of comparators for port identifiers plus transaction identifiers, resulting in minimal hardware overhead.

[0064] Furthermore, the register state tracking mechanism of a processor in a non-blocking processing system with non-cacheable memory access is based on instruction identifier matching, which inherently supports out-of-order write-back. Regardless of the order in which read responses are returned, each response is uniquely associated with the correct destination register and instruction reordering cache entry through its instruction identifier, ensuring data integrity and the orderly submission of instructions.

[0065] Furthermore, after introducing dynamic transaction identifier value switching, multiple incomplete write transactions using different write transaction identifiers may exist on the same bus port. According to the bus protocol, write responses with different transaction identifiers can be returned out of order. To ensure that the accurate detection capability of write errors remains effective in multi-identifier scenarios, the technical solution of this embodiment of the invention can also perform an entry structure expansion operation on the incomplete transaction information record table to support out-of-order responses.

[0066] Specifically, it also includes: expanding the entry structure of the incomplete transaction information record table; wherein, the entry structure expansion includes adding a bus port identifier field and a write transaction identifier field to each entry when a write instruction retires and initiates a bus write request; when the system bus interface receives a write response from the target port, performing a two-dimensional match between the write transaction identifier field carried in the write response and the bus port identifier field corresponding to the incomplete transaction information record table to determine the target entry.

[0067] In this embodiment, a bus port identifier field and a write transaction identifier field are added to each entry in the incomplete transaction information record table. When a write instruction retires and initiates a bus write request, in addition to recording the original valid bit field, instruction address field, storage target address field, and transaction type field, the bus port identifier field and write transaction identifier field of the request are also written to the entry.

[0068] Furthermore, when the system bus interface receives a write response from a target port, the response carries the write transaction identifier field for that transaction. The incomplete transaction information record table uses the bus port identifier field and the write transaction identifier field to perform a two-dimensional matching operation, searching for a matching entry among multiple entries (the number of entries can be set to P). For multiple entries with the same bus port identifier and the same write transaction identifier, the oldest entry is selected according to the enqueue order (write responses with the same identifier are guaranteed to be returned in order by the bus protocol).

[0069] For normal response processing, when a matched entry is released (valid bit cleared), the corresponding incomplete transaction counter is decremented. For error response processing, when a write response indicates an error, the matched entry provides the original instruction address and storage target address that triggered the error. This information is written to the corresponding register in the error aggregation unit and reported to the software via an interrupt mechanism. Because each entry records complete source information upon enqueueing, the accuracy of error tracing remains unaffected even in multi-identifier out-of-order response scenarios.

[0070] In this embodiment, the aforementioned extension upgrades the incomplete transaction information record table from a simple first-in-first-out (FIFO) dequeue under a fixed identifier scheme to a two-dimensional associative dequeue based on the bus port identifier field and the write transaction identifier field. For P entries in the incomplete transaction information record table, the matching logic requires P sets of comparators for bus port identifiers plus write transaction identifiers, as well as a circuit for selecting the oldest entry within the same group. When P is 16 to 64, the area overhead of the comparators and selection circuits accounts for approximately 0.1% to 0.5% of the processor core area, which is within an acceptable range. The computational overhead is relatively small, reducing memory usage.

[0071] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A non-blocking processing system for non-cacheable storage access, characterized in that, The non-blocking processing system for non-cacheable memory access includes: an instruction processing pipeline, an instruction reordering buffer, a non-cacheable read buffer unit, a write buffer, a non-cacheable write queue, an incomplete transaction information record table, a memory access sorting control unit, a transaction identifier management unit, an error aggregation unit, and a system bus interface; The instruction processing pipeline is used to perform instruction fetch, decode, issue, execute, and write-back processing on the instruction sequence. The instruction reordering buffer is coupled to the instruction processing pipeline to track the execution status of issued instructions and control the orderly submission of instructions according to the program sequence. The non-cacheable read cache unit is coupled to the execution stage of the instruction processing pipeline and is used to temporarily store non-cacheable read instruction information to be submitted. The write buffer is used to temporarily store submitted on-chip memory write operations, thereby decoupling the write operation from the memory port. The non-cacheable write queue is set up independently of the write cache and is used to temporarily store submitted non-cacheable write operations. The incomplete transaction information record table is coupled with the non-cacheable write queue and the write cache to record the instruction source information corresponding to each incomplete write transaction; The storage access sorting control unit includes software-configurable control registers for controlling the sorting strategy among non-cacheable storage accesses; The transaction identifier management unit includes a software-configurable identifier register for dynamically controlling the bus transaction identifier value used for non-cacheable storage access. The error aggregation unit is coupled to the incomplete transaction information record table and is used to aggregate and store access error events and provide interrupt reporting to the processor. The system bus interface is used to connect to an external system bus to perform actual data transmission for non-cacheable storage access.

2. The system according to claim 1, characterized in that, The non-cacheable read cache unit includes at least two cache entries; wherein each cache entry includes at least one of the following types of fields: target register identifier field, instruction identifier field, access address field, and status field; The instruction processing pipeline performs attribute judgment processing on the target address of the read instruction corresponding to the instruction sequence at the execution level; When the target address attribute is detected to belong to an uncacheable region address, the target register identifier field, instruction identifier field, and access address field corresponding to the read instruction are written into the target free cache entry corresponding to the uncacheable read cache unit; wherein, the state of the target free cache entry is set to a waiting-to-commit state; the instruction processing pipeline releases the execution resources corresponding to the read instruction; The non-cacheable read cache unit is also used to detect the commit signal of the instruction reordering cache; After the system bus interface receives a read response from the external bus connection, the non-cacheable read cache unit writes the read data to the target register through the write-back arbitration port and releases the cache entry.

3. The system according to claim 1, characterized in that, The write instruction corresponding to the instruction sequence is used to set two cache paths according to the target address storage attributes. The two cache paths are a cache attribute write path and a non-cacheable attribute write path. The cache attribute write path is used to write the address and data corresponding to the target write instruction into the write cache when the instruction reordering cache submits a target write instruction and the address of the target write instruction is within the address range corresponding to the on-chip memory; wherein, the write cache is configured with a first-in-first-out enqueue order; The non-cacheable attribute write path is used to write the address and data corresponding to the target write instruction into the non-cacheable write queue when the instruction reordering cache submits a target write instruction and the address of the target write instruction is a non-cacheable region address. The non-cacheable write queue is independent of the write cache; entries in the non-cacheable write queue initiate write requests to the external system bus through the system bus interface.

4. The system according to claim 2 or 3, characterized in that, The storage access sorting control unit includes a software-readable and writable control register, which contains at least two control bits; The first control bit is the same-port read / write sequence preservation bit; the second control bit is the cross-port sequence preservation bit. The reset default value of the control register sets the first control bit and the second control bit to an active state, so that the processor works in strong sorting mode by default after reset. The software dynamically switches between strong sorting mode and weak sorting mode by writing to the control register. The control register is used to adjust the sorting order via software according to different user application scenarios.

5. The system according to claim 4, characterized in that, Also includes: When it is determined that the first control bit is in a valid state, for non-cacheable storage access initiated through the same system external bus port, the read operation must wait for all incomplete write transactions on the system external bus port to be completed before it can be initiated. The sorting detection corresponding to the storage access sorting control unit is counted by a preset unfinished transaction counter; When the second control bit is active, non-cacheable memory access initiated through different system external bus ports is executed in a preset software program sequence. In each of the aforementioned user application scenarios, based on the received different target program order preservation requests, the software is instructed to dynamically adjust the first control bit or the second control bit to a valid state; after the target program is executed, the first control bit or the second control bit is then set to an invalid state.

6. The system according to claim 2 or 3, characterized in that, Also includes: The incomplete transaction information record table is used to set information record tables on the write caches corresponding to the non-cacheable write queue and the on-chip memory, respectively. The incomplete transaction information record table includes multiple entries, and each entry includes multiple entry fields; The entry fields include at least one of the following: a valid bit field, an instruction address field, a storage target address field, and a transaction type field; The valid bit field is used to identify that the entry is valid; the instruction address field is used to record the program location that initiates the write instruction; and the storage target address field is used to record the bus write address. The transaction type field is used to distinguish between two types: on-chip memory writes and non-cacheable writes.

7. The system according to claim 6, characterized in that, Also includes: When it is determined that the target write instruction has retired from the instruction reordering cache and a write operation is initiated, the program position identifier and storage target address corresponding to the target write instruction are written to the free entry corresponding to the incomplete transaction information record table, and the valid bit field of the free entry is set. For the read-modify-write operation corresponding to the on-chip memory, the entry corresponding to the incomplete transaction information record table is released after the write-back phase of the read-modify-write operation is completed. Specifically, for the read-modify-write operation corresponding to the on-chip memory, the entry corresponding to the incomplete transaction information record table is released when the error correction code corresponding to the read operation passes the verification. When the system bus interface receives an abnormal write operation response, it retrieves the instruction address and storage target address corresponding to the abnormal transaction from the incomplete transaction information record table, and writes the instruction address and storage target address together into the error cause register and error address register corresponding to the error aggregation unit. When a processor in a non-blocking processing system that cannot access cached storage experiences a pipeline overflow due to an anomaly, the entries in the incomplete transaction information record table that were not requested are cleared along with the write cache.

8. The system according to claim 7, characterized in that, The transaction identifier management unit includes a software-configurable control status register; The control status register includes a write transaction identifier register and a read transaction identifier register; When the processor of the non-blocking processing system that cannot cache memory is reset, the initial value of the transaction identifier corresponding to the write transaction identifier register and the read transaction identifier register is zero; all non-cacheable memory accesses use the same transaction identifier. When the software removes the sorting constraints from each non-cacheable storage access at the bus level, it performs a write operation to the transaction identifier management unit; wherein, the write operation is a serialized execution instruction, which performs the sorting constraint removal operation by switching the value of the identifier register and refreshing the pipeline; After the identifier is switched, the initiated non-cacheable storage access carries a new transaction identifier value, which is used to perform parallel routing to the target slave device based on each new transaction identifier value.

9. The system according to claim 8, characterized in that, Also includes: The entry structure of the non-cacheable read cache unit is expanded; The entry structure extension includes adding a bus port identifier field and a read transaction identifier field to each cache entry when a non-cacheable read instruction is written to the cache entry; When the system bus interface receives a read response from the target port, it performs a two-dimensional match between the read transaction identifier field carried in the read response and the bus port identifier field corresponding to the non-cacheable read cache unit to determine the target cache entry.

10. The system according to claim 8, characterized in that, Also includes: Expand the entry structure of the incomplete transaction information record table; The entry structure extension includes adding a bus port identifier field and a write transaction identifier field to each entry when a write instruction retires and initiates a bus write request; When the system bus interface receives a write response from the target port, it performs a two-dimensional match between the write transaction identifier field carried in the write response and the bus port identifier field corresponding to the incomplete transaction information record table to determine the target entry.