A data flow acceleration device and method with scalability and flexibility
By designing data flow acceleration devices with scalability and flexibility in cloud computing scenarios, and using a variety of components and permission tables to achieve fine-grained resource configuration, the limitations of existing acceleration devices in the number of devices and dynamic resource management are solved. It improves data exchange efficiency and isolation between virtual machines, and meets high-performance requirements in cloud computing environments.
Patent Information
- Application Number
- CN202410780502.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-06-18
AI Technical Summary
In cloud computing scenarios, existing acceleration devices have limitations in terms of device quantity, dynamic resource management, and live migration, and cannot meet the growing virtual machine performance requirements. Pure software solutions cannot achieve efficient data interaction and function expansion.
A data flow acceleration device with scalability and flexibility is designed. By introducing the request platform, Batch queue, decoding, checking platform, substitution platform, DMA reading platform, processing platform, computing unit, DMA writing platform, and submission platform , response queue, read data buffer, write data buffer, parsing descriptor and other components, combined with permission table and capability configuration, to achieve fine-grained dynamic resource configuration and data interaction optimization.
It achieves safe isolation and improved data exchange efficiency between different virtual machines, reduces processor core load, supports data movement between platform components, provides highly scalable configuration and flexible resource allocation, and reduces the cost of data operations between virtual machines.
Smart Images

Figure CN118363900B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ASIC design, and in particular to a data flow acceleration device and method with scalability and flexibility. Background Art
[0002] With the rapid development of advanced computing applications such as cloud computing and data centers, infrastructure processors not only carry network, storage and virtualization offloads, but also undertake security, management, monitoring and other functions, physically isolate business and management, and provide elastic infrastructure processors that better meet user needs. Its architecture is composed of a heterogeneous combination of CPUs, acceleration devices, etc. The hardware foundation is composed of chips / chiplets of different types and functions deployed on the same platform to achieve multi-node deployment, and the upper-level software ecosystem is built with unified heterogeneous computing software.
[0003] In cloud computing scenarios, as the scale of business continues to expand, in order to achieve efficient business offloading and rapid iteration, such as data movement and memory deduplication, pure software solutions can no longer meet the requirements. It is necessary to use hardware to achieve high-performance functional expansion, provide stronger energy consumption acceleration ratio, lower cost and hardware functional flexibility.
[0004] At the same time, in cloud computing scenarios, acceleration devices need to have good performance, flexibility, and scalability, and provide parallel processing capabilities and secure isolation between different virtual functions. In response to the growing performance requirements of virtual machines, IO virtualization technology has evolved from traditional virtualization to SR-IOV virtualization, Scalable IOV virtualization, etc. SR-IOV virtualization provides the ability to share devices, virtualizing device hardware into multiple virtual functions for use by different virtual machines, but it has limitations in terms of the number of devices, dynamic resource management, and hot migration. Scalable IOV virtualization provides a hardware-assisted pass-through architecture and more fine-grained dynamic resource configuration, with higher flexibility and higher density.
[0005] To this end, it is necessary to design a data flow acceleration device with scalability and flexibility to optimize data interaction within and between chiplets, including between the CPU and the device, and between devices. A unified memory management should be built at the software and hardware levels to improve data interaction efficiency and reduce the overhead of data exchange between virtual machines and data operations between internal nodes in applications such as data centers, storage, and networks. Summary of the invention
[0006] In order to solve the above technical problems, the present invention provides a data flow acceleration device with scalability and flexibility, which reduces the load of the processor core under basic transactions such as storage applications, message delivery, and fast inspection, and supports data operations between platform components, including:
[0007] The engine includes a request station, a batch queue, a decoding station, a check station, a substitution station, a DMA read station, a processing station, a calculation unit, a DMA write station, a submission station, a response queue, a read data buffer, a write data buffer, and is capable of parsing descriptors, reading data, executing request operations on data, writing output data, writing completion records, and initiating interrupts. When the request station is idle, it processes requests initiated by the adapters in this group. When the request station is busy, requests initiated by the adapters in this group are assigned to other engines in this group or are temporarily stored.
[0008] The permission table includes a puncher, records the base address, size, read and write permissions of the thread address, and the permissions of other thread addresses to access the target thread address, and processes the update request and check request initiated by the check station in the engine.
[0009] In one embodiment of the present invention, the data flow acceleration device further comprises: a slave bus interface, including an overflow buffer, processing read and write requests of the on-chip bus, and reading or writing capability configuration and writing request queues according to address decoding, wherein the address of the request queue is the device specified base address A+page size*request queue number, and the register address in the capability configuration is the device specified base address B+register offset address;
[0010] Request queue, cache write request descriptor, can be configured as dedicated or shared mode; request descriptor includes command descriptor and batch descriptor, command descriptor includes data address, data length, operation type, thread address; batch descriptor includes descriptor address, descriptor length, thread address;
[0011] Capability configuration, which is a capability register and a configuration register, configures a request queue mapping table and an engine mapping table of the group adapter, configures the mode of the request queue, and the capability register feeds back device resources to the program software;
[0012] The group adapter establishes a mapping relationship according to the request queue mapping table and the engine mapping table of the group; processes the request of the request queue of the group, selects the descriptor of the target request queue according to the blanking strategy; selects the target engine according to the status of the engine of the group, and outputs the descriptor to the target engine;
[0013] The address substitution unit includes a puncher, which processes the substitution request initiated by the substitution station in the engine, selects the substitution request according to the round-robin punching strategy, and generates a physical address by substituting the thread address number + the virtual address; if the substitution succeeds, the physical address is returned; if the substitution fails, the memory read page table is accessed through the main bus interface, the address substitution table entry is filled and the physical address is returned; if the memory read page table access fails, a substitution error is returned;
[0014] The main bus interface includes a puncher, which punches the DMA read and write requests respectively, selects the target engine, completes writing data or writing completion records, reading data or reading batch descriptors; or selects an interrupt to complete a memory write request, selects the address substitution unit to complete a data read request; or selects a write request of an overflow buffer;
[0015] Interrupt, handle the completion interrupt initiated by the response queue in the engine, form an interrupt message and send it to the on-chip bus.
[0016] In one embodiment of the present invention, the request queue can be configured as a dedicated or shared mode. When configured as a dedicated mode, the software program has exclusive use of the request queue and adopts a credit flow control strategy to write to the request queue; when configured as a shared mode, the request queue is accessed by multiple software programs. If the request queue is full, it is cached in the overflow buffer and written to the request queue when the queue is not full; if the overflow buffer is full, it is written to the host machine memory space and waits for the host machine program to process; the software programs have different thread addresses.
[0017] In one embodiment of the present invention, the operation types in the command descriptor include filling, comparison, vector comparison, difference recording, difference application, and movement of memory within the same thread address space, filling, comparison, vector comparison, and movement of memory in different thread address spaces, and data movement of storage mapped IO space; operations between different thread address spaces are performed by the permission table recording the access rights of the target thread address space memory space.
[0018] In one embodiment of the present invention, the descriptor address in the batch descriptor points to the first address of a plurality of command descriptor strings in the memory space of the thread address space.
[0019] In one embodiment of the present invention, the engine determines whether to receive the request of the group cutter by the busy / idle status of the requesting station;
[0020] The request station determines that if it is a command descriptor, it sends it to the decoder, and if it is a batch descriptor, it sends it to the Batch queue;
[0021] The Batch queue parses the batch descriptor and initiates a descriptor fetch request to the replacement station, caches the command descriptor returned by the main bus interface, and sends it to the decoder in sequence. The batch descriptor waits for the pointed command descriptor to be processed before sending it. The Batch queue is idle only after the batch descriptor is sent.
[0022] The decoding processes the requests of the Batch queue and the requesting station, wherein the requests of the Batch queue are processed first; the source data address, target data address, completion record address, operation type, etc. in the command descriptor are parsed, and sent to the checking station;
[0023] The inspection station determines according to the command type. If the command type is an operation of a different thread address space, a check request is sent to the permission table to determine the legality of the operation. If the request is illegal, the substitution, DMA read, DMA write and other operations are not performed; otherwise, the request is distributed to the processing station;
[0024] The processing station includes multiple stations, which respectively complete write data, read data->calculate->write data, and read data->write data operations according to the operation type parsed by the command descriptor; if the source address and the target address are non-memory addresses, no address substitution is performed, otherwise the source data address and the target data address are split according to the page size, and the split read and write data requests are sent to the substitution station; for a read data request, wait for the read response of the DMA read station to send an operation request to the calculation unit, and send a request to the substitution station again after completing the page data processing; for a write data request, wait for the write response of the DMA write station, and send a request to the substitution station again after completing the page data processing; after completing the operation of the command descriptor or the substitution station returns a substitution error, send a request to the submission station;
[0025] The substitution station processes the requests of the batch queue and the processing station, wherein the requests of the processing station are processed first; initiates a virtual address substitution request to the address substitution unit, and if it is a request to get data or get descriptor, sends a request to the DMA read station; if it is a request to write data, sends a request to the DMA write station;
[0026] The DMA read station processes the data fetching request and the descriptor fetching request of the substitution station, wherein the data fetching request is processed first; the burst is split into several DMA read requests according to the burst length, and sent to the main bus interface, and a read response is returned after the read request is completed;
[0027] The DMA write station processes the write request of the replacement station and the write completion response request of the response queue, wherein the write completion response request is processed first; the burst is split into several DMA write requests according to the burst length, and sent to the main bus interface, and a write response is returned after the write request is completed;
[0028] The read data buffer caches the read data of the main bus interface, and the write data buffer caches the write data of the operation unit;
[0029] The puncher of the main bus interface selects the engine and initiates a DMA request. If it is a read data request, the data is written into the read data buffer. If it is a read descriptor request, the data is written into the batch queue. If it is a write data request, data is taken from the write data buffer. If it is a write completion response request, data is taken from the response queue.
[0030] The operation unit processes the operation request of the processing station, obtains the source data of the operation from the read data buffer, performs comparison / vector comparison / difference record according to the operation type, writes the comparison result to the write data buffer, and returns a response to the processing station after completing the page data processing;
[0031] The submitting station processes the request of the processing station and writes the processing results into the response queue;
[0032] The response queue buffers the write completion response of the command descriptor in the engine, applies for a write request to the DMA write station, and sends an interrupt request to the interrupt after completing the write request.
[0033] The present invention also provides a data flow acceleration method with scalability and flexibility, which is designed according to the data flow acceleration device architecture and includes the following steps:
[0034] Step S1: The host program obtains the capability register of the device from the capability configuration, writes the request queue mapping table and the engine mapping table according to the virtual machine application requirements, writes the thread address table entry into the permission table, and notifies the address substitution unit to preload the page table;
[0035] Step S2: the host program writes the request queue mode into the capability configuration as thread address dedicated or shared mode, and allocates the request queue address to the virtual machine program;
[0036] Step S3: The virtual machine program forms a request descriptor according to the application requirements. For the command descriptor, it is written into the request queue address provided by the host program by means of IO write merging; for the batch descriptor, the command descriptor pointed to in the batch descriptor is written into the thread address memory space, and then the batch descriptor is written into the request queue address provided by the host program by means of IO write merging; for the dedicated mode request queue, the credit is -1;
[0037] Step S4: the virtual machine program submits the request descriptor and then processes other programs. When the data flow acceleration device initiates an interrupt message, the virtual machine program accesses the completion response and completes the request processing process. For the dedicated mode request queue, the credit is increased by 1.
[0038] Step S5: When a request overflow occurs in the overflow buffer, the host program resubmits the request to an idle request queue.
[0039] The above technical solution of the present invention has the following advantages over the prior art: the data flow acceleration device described in the present invention is flexible, can allocate device engine resources according to virtual machine applications, and has fine-grained dynamic resource configuration; the hardware ensures isolation through permission tables and address substitution units during DMA, and can achieve exclusivity of different virtual devices; and the data flow acceleration device provided by the present invention is scalable, assisting the processor core to offload data movement, and reducing the load of the processor core in basic transactions such as storing applications and quick checks; it supports data movement between platform components, including memory and IO devices, supports highly scalable configuration, and data can be shared between virtual machines and application processes. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to make the contents of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments of the present invention in conjunction with the accompanying drawings.
[0041] Figure 1 It is a structural schematic diagram of a data flow acceleration device with scalability and flexibility provided by the present invention.
[0042] Figure 2 It is a schematic diagram of the data structure for replacing the virtual address with the physical address in Embodiment 1 of the present invention.
[0043] Figure 3 It is a schematic diagram of the data structure of the permission table in Example 1 of the present invention.
[0044] Figure 4 It is a schematic diagram of the structure of a processor chip embedded with a data flow acceleration device in Embodiment 2 of the present invention.
[0045] Figure 5 It is a schematic diagram of the fine-grained support of an application by an acceleration device in Embodiment 2 of the present invention. DETAILED DESCRIPTION Example 1
[0046] This embodiment specifically discloses a data flow acceleration device with scalability and flexibility. For the device structure, please refer to Figure 1 , including: slave bus interface, n request queues, capability configuration, m group adapters, k engines, address substitution unit, permission table, master bus interface and interrupt.
[0047] The slave bus interface includes an overflow buffer, processes read and write requests of the on-chip bus, reads or writes the capability configuration and writes the request queue according to the address decoding, the address of the request queue is the device specified base address A+page size*request queue number, and the register address in the capability configuration is the device specified base address B+register offset address. In this embodiment, the page size is 4KB.
[0048] Request queue, cache write request descriptor, can be configured as dedicated or shared mode; request descriptor contains command descriptor and batch descriptor, command descriptor contains data address, data length, operation type, thread address; batch descriptor contains descriptor address, descriptor length, thread address.
[0049] Capability configuration is capability register and configuration register, which configure the request queue mapping table and engine mapping table of the group adapter, configure the mode of the request queue, and the capability register feeds back device resources to the program software.
[0050] The group adapter establishes a mapping relationship based on the request queue mapping table and engine mapping table of this group; processes the request of this group's request queue, selects the descriptor of the target request queue according to the blanking strategy; selects the target engine according to the status of this group's engine, and outputs the descriptor to the target engine.
[0051] The engine includes a request station, a batch queue, a decoding station, a check station, a substitution station, a DMA read station, a processing station, an operation unit, a DMA write station, a submission station, a response queue, a read data buffer, a write data buffer, and parses descriptors, reads data, performs request operations on data, writes output data, writes completion records, and initiates interrupts; when the request station is idle, it processes requests initiated by the adapters in this group; when the request station is busy, the requests initiated by the adapters in this group are assigned to other engines in this group or are temporarily stored.
[0052] The address substitution unit includes a puncher, which processes the substitution request initiated by the substitution station in the engine, selects the substitution request according to the round-robin punching strategy, and generates the physical address by substituting the thread address number + virtual address; if the substitution succeeds, the physical address is returned; if the substitution fails, the memory read page table is accessed through the main bus interface, the address substitution table entry is filled and the physical address is returned; if the memory read page table access fails, a substitution error is returned. See Figure 2 , which is a data structure diagram of replacing the virtual address with the physical address. In this embodiment, the base address and the thread address are used to obtain the first-level page table base address; the first-level page table base address plus the high bit of the virtual address are used to access the first-level page table to obtain the second-level page table base address; the second-level page table base address plus the middle bit of the virtual address are used to access the second-level page table to obtain the third-level page table base address; the third-level page table base address plus the low bit of the virtual address are used to access the third-level page table to obtain the physical address table entry.
[0053] The permission table, including the puncher, records the base address, size, read and write permissions of the thread address, and the permissions of other thread addresses to access the target thread address, and handles the update request and check request initiated by the check station in the engine. See Figure 3 , which is the permission table entry data structure of the target thread address.
[0054] The main bus interface includes a puncher, which punches the DMA read and write requests respectively, selects the target engine, completes writing data or writing completion records, reading data or reading batch descriptors; or selects the interrupt to complete the memory write request, selects the address substitution unit to complete the data read request; or selects the overflow buffer write request. In this embodiment, the puncher is a k+3 source puncher, which gives priority to the overflow buffer write request.
[0055] Interrupt, handle the completion interrupt initiated by the response queue in the engine, form an interrupt message and send it to the on-chip bus.
[0056] The request queue can be configured as dedicated or shared mode. When configured as dedicated mode, the software program has exclusive use of the request queue and adopts a credit flow control strategy to write to the request queue. When configured as shared mode, the request queue is accessed by multiple software programs. If the request queue is full, it is cached in the overflow buffer and written to the request queue when the queue is not full. If the overflow buffer is full, it is written to the host memory space and waits for the host program to process. The software programs have different thread addresses.
[0057] The operation types in the command descriptor include filling, comparison, vector comparison, difference recording, difference application, and movement of memory in the same thread address space, filling, comparison, vector comparison, and movement of memory in different thread address spaces, and data movement of storage mapped IO space; the operations between different thread address spaces are recorded by the permission table to the access rights of the target thread address space memory space. The descriptor address in the batch descriptor points to the first address of several command descriptor strings in the thread address space memory space.
[0058] The engine determines whether to receive the request of the group cutter by the busy / idle status of the requesting station; if the requesting station determines that it is a command descriptor, it will be sent to the decoder; if it is a batch descriptor, it will be sent to the Batch queue. The Batch queue parses the batch descriptor and initiates a descriptor fetch request to the replacement station, caches the command descriptor returned by the main bus interface, and sends it to the decoder in sequence. The batch descriptor waits for the pointed command descriptor to be processed before sending it. The Batch queue is idle only after the batch descriptor is sent. The decoder processes the requests of the Batch queue and the requesting station, wherein the requests of the Batch queue are processed first; the source data address, target data address, completion record address, operation type, etc. in the command descriptor are parsed and sent to the inspection station.
[0059] The inspection station determines based on the command type. If the command type is an operation in a different thread address space, a check request is initiated to the permission table to determine the legality of the operation. If the request is illegal, substitution, DMA read, DMA write and other operations are not performed; otherwise, it is distributed to the processing station.
[0060] The processing stations include multiple stations, which respectively complete the operations of writing data, reading data->computing->writing data, and reading data->writing data according to the operation type parsed by the command descriptor; if the source address and the target address are non-memory addresses, no address substitution is performed, otherwise the source data address and the target data address are split according to the page size, and the split read and write data requests are sent to the substitution station; for the read data request, wait for the read response of the DMA read station to send the operation request to the operation unit, and send the request to the substitution station again after completing the page data processing; for the write data request, wait for the write response of the DMA write station, and send the request to the substitution station again after completing the page data processing; after completing the operation of the command descriptor or the substitution station returns a substitution error, a request is sent to the submission station. In this embodiment, there are two processing stations, and the inspection station preferentially allocates requests to the processing station 1, and the substitution station preferentially processes the request of the processing station 1 when receiving two processing station requests.
[0061] The substitution station processes the requests of the Batch queue and the processing station, wherein the requests of the processing station are processed first; a virtual address substitution request is initiated to the address substitution unit, and if it is a request to obtain data or a descriptor, a request is sent to the DMA read station; if it is a request to write data, a request is sent to the DMA write station.
[0062] The DMA read station processes the data fetching request and the descriptor fetching request of the substitution station, wherein the data fetching request is processed first; it is split into several DMA read requests according to the burst length, sent to the main bus interface, and returns a read response after completing the read request. The DMA write station processes the data write request of the substitution station and the write completion response request of the response queue, wherein the write completion response request is processed first; it is split into several DMA write requests according to the burst length, sent to the main bus interface, and returns a write response after completing the write request.
[0063] The read data buffer caches the read data of the main bus interface, and the write data buffer caches the write data of the operation unit. In this embodiment, the read data buffer and the write data buffer share a memory bank, each memory bank is 4KB, and the memory bank is allocated according to the operation type, 3 memory banks are allocated for comparison operation, and 1 memory bank is allocated for move operation.
[0064] The puncher of the main bus interface selects the engine and initiates a DMA request. If it is a read data request, the data is written into the read data buffer. If it is a read descriptor request, the data is written into the batch queue. If it is a write data request, data is taken from the write data buffer. If it is a write completion response request, data is taken from the response queue.
[0065] The operation unit processes the operation request of the processing station, obtains the source data of the operation from the read data buffer, performs comparison / vector comparison / difference record according to the operation type, writes the comparison result to the write data buffer, and returns a response to the processing station after completing the page data processing. The submission station processes the request of the processing station and writes the processing result to the response queue. The response queue buffers the write completion response of the command descriptor in the engine, applies for a write request to the DMA write station, and sends an interrupt request to the interrupt after completing the write request. Example 2
[0066] This embodiment specifically discloses a data flow acceleration method with scalability and flexibility. Figure 4 It is a processor chip structure of computing core particle + IO core particle, including 4 computing core particles and 1 IO core particle. The data flow acceleration device is located on the on-chip interconnection bus of the IO core particle.
[0067] The steps include:
[0068] Step S1: The host program obtains the capability register of the device from the capability configuration, writes the request queue mapping table and the engine mapping table according to the virtual machine application requirements, writes the thread address table entry into the permission table, and notifies the address substitution unit to preload the page table;
[0069] Step S2: The host program writes the request queue mode into the capability configuration as thread address dedicated or shared mode, and allocates the request queue address to the virtual machine program; see Figure 5 , the host program H allocates 1 dedicated request queue, 1 shared request queue, and 2 engines to 1 team adapter, and allocates the dedicated request queue to the virtual machine program S1, and the shared request queue is shared by the host program H, the virtual machine programs S1, and S2;
[0070] Step S3: The virtual machine program forms a request descriptor according to the application requirements. For the command descriptor, it is written into the request queue address provided by the host program by means of IO write merging; for the batch descriptor, the command descriptor pointed to in the batch descriptor is written into the thread address memory space, and then the batch descriptor is written into the request queue address provided by the host program by means of IO write merging; for the dedicated mode request queue, the credit is -1;
[0071] Step S4: the virtual machine program submits the request descriptor and then processes other programs. When the data flow acceleration device initiates an interrupt message, the virtual machine program accesses the completion response and completes the request processing process. For the dedicated mode request queue, the credit is increased by 1.
[0072] Step S5: When a request overflow occurs in the overflow buffer, the host program resubmits the request to an idle request queue.
[0073] The data flow acceleration device described in this embodiment reduces the load on the processor core in basic transactions such as storage applications, message delivery, and quick checks, supports data operations between platform components, and minimizes the delay in data movement and processing; it designs hardware resources in a fine-grained manner and implements secure isolation to flexibly support upper-level applications.
[0074] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.
Claims
1. A data flow acceleration device with scalability and flexibility, which reduces the load of the processor core under basic transactions such as storage applications, message delivery, and fast inspection, and supports data operations between platform components, characterized in that: include: The engine includes a request station, a batch queue, a decoding station, a check station, a substitution station, a DMA read station, a processing station, a calculation unit, a DMA write station, a submission station, a response queue, a read data buffer, a write data buffer, and is capable of parsing descriptors, reading data, executing request operations on data, writing output data, writing completion records, and initiating interrupts. When the request station is idle, it processes requests initiated by the adapters in this group. When the request station is busy, requests initiated by the adapters in this group are assigned to other engines in this group or are temporarily stored. A permission table, which includes a puncher, records the base address, size, read and write permissions of the thread address, and the permissions of other thread addresses to access the target thread address, and processes update requests and check requests initiated by the check station in the engine; Data flow acceleration equipment also includes: From the bus interface, including the overflow buffer, handles the read and write requests of the on-chip bus, reads or writes the capability configuration and writes the request queue according to the address decoding. The address of the request queue is the device specified base address A + page size * request queue number. The register address in the capability configuration is the device specified base address B + register offset address. Request queue, cache write request descriptor, can be configured as dedicated or shared mode; request descriptor includes command descriptor and batch descriptor, command descriptor includes data address, data length, operation type, thread address; batch descriptor includes descriptor address, descriptor length, thread address; Capability configuration, which is a capability register and a configuration register, configures a request queue mapping table and an engine mapping table of the group adapter, configures the mode of the request queue, and the capability register feeds back device resources to the program software; The group adapter establishes a mapping relationship according to the request queue mapping table and the engine mapping table of the group; processes the request of the request queue of the group, selects the descriptor of the target request queue according to the blanking strategy; selects the target engine according to the status of the engine of the group, and outputs the descriptor to the target engine; The address substitution unit includes a puncher, which processes the substitution request initiated by the substitution station in the engine, selects the substitution request according to the round-robin punching strategy, and generates a physical address by substituting the thread address number + the virtual address; if the substitution succeeds, the physical address is returned; if the substitution fails, the memory read page table is accessed through the main bus interface, the address substitution table entry is filled and the physical address is returned; if the memory read page table access fails, a substitution error is returned; The main bus interface includes a puncher, which punches the DMA read and write requests respectively, selects the target engine, completes writing data or writing completion records, reading data or reading batch descriptors; or selects an interrupt to complete a memory write request, selects the address substitution unit to complete a data read request; or selects a write request of an overflow buffer; Interrupt, handle the completion interrupt initiated by the response queue in the engine, form an interrupt message and send it to the on-chip bus.
2. The data flow acceleration device according to claim 1, characterized in that: The request queue can be configured as a dedicated or shared mode. When configured as a dedicated mode, the software program has exclusive use of the request queue and adopts a credit flow control strategy to write to the request queue. When configured as a shared mode, the request queue is accessed by multiple software programs. If the request queue is full, it is cached in the overflow buffer and written to the request queue when the queue is not full. If the overflow buffer is full, it is written to the host machine memory space and waits for the host machine program to process it. The software programs have different thread addresses.
3. The data flow acceleration device according to claim 1, characterized in that: The operation types in the command descriptor include filling, comparison, vector comparison, difference recording, difference application, and movement of memory within the same thread address space, filling, comparison, vector comparison, and movement of memory in different thread address spaces, and data movement of storage mapped IO space; operations between different thread address spaces are recorded by the permission table with access rights to the memory space of the target thread address space.
4. The data flow acceleration device according to claim 1, characterized in that: The descriptor address in the batch descriptor points to the first address of a plurality of command descriptor strings in the memory space of the thread address space.
5. The data flow acceleration device according to claim 1, characterized in that: The engine determines whether to receive the request of the group cutter by the busy / idle status of the requesting station; The request station determines that if it is a command descriptor, it sends it to the decoder, and if it is a batch descriptor, it sends it to the Batch queue; The Batch queue parses the batch descriptor and initiates a descriptor fetch request to the replacement station, caches the command descriptor returned by the main bus interface, and sends it to the decoder in sequence. The batch descriptor waits for the pointed command descriptor to be processed before sending it. The Batch queue is idle only after the batch descriptor is sent. The decoding processes the requests of the Batch queue and the requesting station, wherein the requests of the Batch queue are processed first; the source data address, target data address, completion record address, operation type, etc. in the command descriptor are parsed, and sent to the checking station; The inspection station determines according to the command type. If the command type is an operation of a different thread address space, a check request is sent to the permission table to determine the legality of the operation. If the request is illegal, the substitution, DMA read, DMA write and other operations are not performed; otherwise, the request is distributed to the processing station; The processing station includes multiple stations, which respectively complete write data, read data->calculate->write data, and read data->write data operations according to the operation type parsed by the command descriptor; if the source address and the target address are non-memory addresses, no address substitution is performed, otherwise the source data address and the target data address are split according to the page size, and the split read and write data requests are sent to the substitution station; for a read data request, wait for the read response of the DMA read station to send an operation request to the calculation unit, and send a request to the substitution station again after completing the page data processing; for a write data request, wait for the write response of the DMA write station, and send a request to the substitution station again after completing the page data processing; after completing the operation of the command descriptor or the substitution station returns a substitution error, send a request to the submission station; The substitution station processes the requests of the batch queue and the processing station, wherein the requests of the processing station are processed first; initiates a virtual address substitution request to the address substitution unit, and if it is a request to get data or get descriptor, sends a request to the DMA read station; if it is a request to write data, sends a request to the DMA write station; The DMA read station processes the data fetching request and the descriptor fetching request of the substitution station, wherein the data fetching request is processed first; the burst is split into several DMA read requests according to the burst length, and sent to the main bus interface, and a read response is returned after the read request is completed; The DMA write station processes the write request of the replacement station and the write completion response request of the response queue, wherein the write completion response request is processed first; the burst is split into several DMA write requests according to the burst length, and sent to the main bus interface, and a write response is returned after the write request is completed; The read data buffer caches the read data of the main bus interface, and the write data buffer caches the write data of the operation unit; The puncher of the main bus interface selects the engine and initiates a DMA request. If it is a read data request, the data is written into the read data buffer. If it is a read descriptor request, the data is written into the batch queue. If it is a write data request, data is taken from the write data buffer. If it is a write completion response request, data is taken from the response queue. The operation unit processes the operation request of the processing station, obtains the source data of the operation from the read data buffer, performs comparison / vector comparison / difference record according to the operation type, writes the comparison result to the write data buffer, and returns a response to the processing station after completing the page data processing; The submitting station processes the request of the processing station and writes the processing results into the response queue; The response queue buffers the write completion response of the command descriptor in the engine, applies for a write request to the DMA write station, and sends an interrupt request to the interrupt after completing the write request.
6. A data flow acceleration method with scalability and flexibility, characterized by: The data flow acceleration device architecture design according to any one of claims 2 to 5 comprises the following steps: Step S1: The host program obtains the capability register of the device from the capability configuration, writes the request queue mapping table and the engine mapping table according to the virtual machine application requirements, writes the thread address table entry into the permission table, and notifies the address substitution unit to preload the page table; Step S2: the host program writes the request queue mode into the capability configuration as thread address dedicated or shared mode, and allocates the request queue address to the virtual machine program; Step S3: The virtual machine program forms a request descriptor according to the application requirements. For the command descriptor, it is written into the request queue address provided by the host program by means of IO write merging; for the batch descriptor, the command descriptor pointed to in the batch descriptor is written into the thread address memory space, and then the batch descriptor is written into the request queue address provided by the host program by means of IO write merging; for the dedicated mode request queue, the credit is -1; Step S4: the virtual machine program submits the request descriptor and then processes other programs. When the data flow acceleration device initiates an interrupt message, the virtual machine program accesses the completion response and completes the request processing process. For the dedicated mode request queue, the credit is increased by 1. Step S5: When a request overflow occurs in the overflow buffer, the host program resubmits the request to an idle request queue.
Citation Information
Patent Citations
A device for extending the capacity of access queue by distribution control
CN101447911A
Extensible automatic computing service platform and construction method for same
CN104506620A
