Integrated circuit and method for accelerating data query
By designing a programmable parallel processing unit in an integrated circuit and using FPGA or ASIC hardware to accelerate database queries, the inefficiency problem of traditional data processing applications in big data queries is solved, and fast response and high-performance processing are achieved.
Patent Information
- Application Number
- CN201980080587.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-12-06
- Filing Date
- 2019-10-16
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2039-10-16
AI Technical Summary
Traditional data processing application software is difficult to effectively handle complex queries in big data, resulting in long data query response times, low processing throughput, and high costs.
An integrated circuit is designed, which contains an independent and programmable parallel processing unit, which can process data streams and generate query results according to a predetermined instruction set. It uses programmable FPGA or fixed ASIC hardware to accelerate database queries to achieve hardware acceleration.
Significantly reduces response time and processing time for large database queries, improves computational efficiency, reduces cost and power requirements, and provides 10-25x performance improvements.
Smart Images

Figure CN113168409B_ABST
Abstract
Description
Technical Field
[0001] Various embodiments are generally directed to integrated circuits having a configurable fabric for hardware acceleration. Background Art
[0002] Big data is used to refer to the study and application of data sets that are so large and complex that traditional data processing application software is inadequate to handle them. Big data brings challenges, and these challenges include but are not limited to data capture, data storage, data analysis, data updating, information privacy, and data query.
[0003] A data query can generally refer to requesting data or information from a database table or combination of tables. This data can be generated as results returned by Structured Query Language (SQL), or as graphs, charts, or complex results (e.g., trend analysis from a data mining tool). SQL is a standard language for storing, manipulating, and retrieving data in a database. Summary of the invention
[0004] Integrated circuits and methods related to hardware acceleration include independent, programmable, and parallel processing units (PUs) that are custom-adapted to process data streams and aggregate results in response to queries. In the example shown, the data stream from the database can be divided into data blocks and assigned to corresponding PUs. Each data block can be processed by one of the PUs to produce results according to a predetermined instruction set. The connection unit can merge and connect the results of each data block together to generate the output results of the query. In some embodiments, for example, very large database SQL queries can be accelerated by implementing a hardware PU / connection engine in a fixed ASIC or reconfigurable FPGA hardware circuit.
[0005] In some embodiments, a field programmable gate array (FPGA) can provide electrically reconfigurable programmable hardware logic circuits formed in a structure. The FPGA structure can be reconfigurable in response to electrical configuration signals to provide a specific query arrangement of hardware resources. As taught herein, by uniquely customizing the hardware processing circuits for each query, the reconfigurable structure can be arranged to produce a hardware accelerator for efficiently processing queries of large databases, thereby enabling a single FPGA to flexibly accelerate a wide range of queries.
[0006] In some embodiments, an application specific integrated circuit (ASIC) may be manufactured to provide a fixed arrangement of hardware logic circuits (e.g., digital, analog). The ASIC may provide a hardware accelerator that efficiently processes queries of large databases using customized hardware processing circuits for one or more predetermined queries, so that one or more ASICs (alone or in combination) may accelerate one or more predetermined queries.
[0007] Various embodiments can achieve one or more advantages. For example, some embodiments can significantly reduce data query response time and / or increase processing throughput when performing queries such as large databases. Hardware acceleration of database queries can be implemented using customizable (e.g., non-fixed) hardware blocks that are configured according to the operations and parameters of each specific query. Some implementations can be programmed in a programmable structure device to perform queries of large databases provided by customers. Various embodiments can offload high-speed data stream processing from a fixed central processing unit (CPU) to a custom-programmed hardware processing channel, in which multiple data streams of a data block can be processed separately according to a predetermined instruction set. Therefore, significant computing efficiency can be achieved, which can cause a significant reduction in the processing time of queries to large-scale databases.
[0008] For example, some embodiments can reduce manufacturing costs and reduce decentralized asynchronous communications, for example, by utilizing reconfigurable fabricated devices (e.g., FPGAs) to perform efficient parallel processing with minimal hardware resources. For example, some embodiments can improve kernel-level performance relative to CPUs when processing some queries, and / or provide 10-25 times performance improvement. In various embodiments, an end user can flexibly customize a field-programmable FPGA one or more times to meet dynamic query requirements.
[0009] In some embodiments, the ASIC may advantageously provide hardware acceleration capabilities for one or more predetermined query structures using dedicated (e.g., fixed) hardware circuits. For example, some embodiments incorporating the ASIC may provide query hardware acceleration with reduced component cost, volume, and / or power requirements.
[0010] In one exemplary aspect, an integrated circuit includes a plurality of processing units (PU(i)) arranged in parallel. Each of the plurality of PU(i) is composed of a hardware circuit configured to process a selected data block of a data stream according to a predetermined instruction set (S(i)) in an instruction set group (G) using a predetermined query language. Each PU(i) generates an intermediate output result corresponding to a selected portion of the data stream processed by the PU(i). A connection circuit is coupled to receive each intermediate output result from each of the plurality of PU(i) and generate an aggregated result. Each S(i) includes functionality of instructions extracted from a user-defined query.
[0011] In some embodiments, the predetermined instruction set (S(i)) may include SQL instructions. In some embodiments, the predetermined query language may include SQL. In some embodiments, the connection unit may be configured to generate the aggregated result according to a predetermined function related to a user-defined query. In some embodiments, each of the plurality of processing units may be implemented as a fixed hardware circuit in an ASIC. In some embodiments, each of the plurality of processing units may be implemented as reconfigurable hardware in a programmable structure of an FPGA.
[0012] In some embodiments, the integrated circuit may include a scheduler circuit coupled to receive a data stream. The scheduler circuit may be configured to selectively direct each of the data blocks to one of the multiple PUs (i). In some embodiments, the scheduler circuit may include a round-robin scheduler. In some embodiments, each S (i) may further include a function of extracting at least one parameter from a user-defined query. In some embodiments, each of the multiple PUs (i) may include an arithmetic logic unit ALU, which is suitable for executing the corresponding S (i) by performing an operation based on the extracted instruction. The operation can be performed using (i) a first operand and (ii) a second operand, wherein the first operand includes a portion of the data stream stored in a variable register, and the second operand includes one of the extraction parameters stored in a constant register.
[0013] In some embodiments, each of the plurality of processing units may further include a temporary register, a first multiplexer, and a second multiplexer, wherein the temporary register is configured to hold a result of an executed operation, the first multiplexer is configured to receive input from the constant register and the variable register, and the second multiplexer is configured to receive input from the constant register, the variable register, and the temporary register.
[0014] In some embodiments, each of the plurality of PUs (i) may include an instruction register configured to store S (i) to be executed in the ALU. In some embodiments, each PU (i) may be configured with the same S (i). In some embodiments, each PU (i) may be configured with a different S (i). The plurality of instructions in the predetermined query language instruction set group G may include scan instructions and aggregate instructions. The scan instructions may include a logical AND operation and a logical OR operation.
[0015] In some embodiments, a method for configuring a structure to perform a data query includes: receiving a data query from a user and converting the data query into a predetermined query language command. The method also includes extracting parameters to be stored in multiple parallel processing units PU(i) from the command and extracting instructions from the command to form an instruction set group G to be executed by PU(i). The instruction set group G includes multiple instruction sets S(i). The method also includes loading the extracted parameters and the extracted instructions into multiple PU(i). Each PU(i) is configured to process a predetermined data block (i) of a data stream in parallel with its corresponding parameters and instruction set S(i).
[0016] In some embodiments, the predetermined query language may include SQL. In some embodiments, each PU(i) may be configured with the same S(i). The method may further include cleaning all PU(i) before loading the extracted parameters and the extracted instructions.
[0017] The details of various embodiments are set forth in the drawings and the description that follows. Other features and advantages will be apparent from the description and drawings, and from the claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 Exemplary programmable integrated circuits (ICs) are described in which the disclosed circuits and processes may be implemented.
[0019] FIG. 2(A) depicts a host computing system with an exemplary hardware accelerated processing engine.
[0020] FIG. 2(B) depicts a block diagram of the hardware accelerated processing system of FIG. 2(A) executing an exemplary data query.
[0021] FIG. 3(A) depicts an exemplary processing unit included in the hardware acceleration processing engine of FIG. 2(B).
[0022] FIG. 3(B) illustrates example instructions for operating the example processing unit of FIG. 2(B).
[0023] Figure 4A flow chart of an exemplary design-time architecture reconfiguration method for a hardware acceleration processing engine configured to perform data query work is described.
[0024] Figure 5 An exemplary structure of a hardware acceleration processing engine is described.
[0025] Figure 6 A flow chart of an exemplary run-time method for performing data queries utilizing a programmable hardware accelerated processing engine is described.
[0026] Like reference symbols in the various drawings indicate like elements. DETAILED DESCRIPTION
[0027] To facilitate understanding, this article is organized as follows. First, reference Figure 1 An exemplary programmable integrated circuit (IC) on which the disclosed hardware acceleration processing engine and process may be implemented is briefly described. Next, with reference to FIGS. 2(A) to 3, the discussion turns to an exemplary embodiment that illustrates the structure of a configurable structure and a method of configuring the structure. Then, with reference to Figure 4 (A) to Figure 5 , shows an exemplary structure of a processing unit and an exemplary structure of a hardware acceleration processing engine. Figure 6 , showing an exemplary method for executing data query at run-time.
[0028] Figure 1 An exemplary programmable integrated circuit (IC) on which the disclosed circuits and processes may be implemented is described. The programmable IC 100 includes FPGA logic. The programmable IC 100 is implemented using various programmable resources and is referred to as a system on a chip (SOC). Various examples of FPGA logic include several different types of programmable logic blocks in an array.
[0029] For example, Figure 1A programmable IC 100 is shown that includes a number of different programmable tiles, including a multi-gigabit transceiver (MGT) 101, a configurable logic block (CLB) 102, a random access memory block (BRAM) 103, an input / output block (IOB) 104, configuration and clock logic (CONFIG / CLOCKS) 105, a digital signal processing block (DSP) 106, a dedicated input / output block (I / O) 107 (e.g., clock ports), and other programmable logic 108 (e.g., digital clock manager, analog-to-digital converter, system monitoring logic). The programmable IC 100 includes a dedicated processor block (PROC) 110. The programmable IC 100 may include internal and external reconfiguration ports (not shown).
[0030] In various examples, a serializer / deserializer can be implemented using MGT 101. MGT 101 can include various data serializers and deserializers. The data serializer can include various multiplexer implementations. The data deserializer can include various demultiplexer implementations.
[0031] In some examples of FPGA logic, each programmable cell block includes a programmable interconnect element (INT) 111 having standard connections 124 to and from corresponding interconnect elements in each adjacent cell block. Thus, the programmable interconnect elements together implement the programmable interconnect structure for the FPGA logic shown. The programmable interconnect element INT 111 includes intra-connections 120 to and from programmable logic elements in the same cell block, such as those included in the Figure 1 The programmable interconnect element INT 111 includes an inter-INT-connection 122 between INTs to and from the programmable interconnect element INT 111 in the same cell block, as included in Figure 1 as shown in the example.
[0032] For example, CLB 102 may include a configurable logic element (CLE) 112 that may be programmed to implement user logic together with a single programmable interconnect element INT 111. BRAM 103 may include a BRAM logic element (BRL) 113 and one or more programmable interconnect elements. In some examples, the number of interconnect elements included in the cell block depends on the height of the cell block. In the illustrated embodiment, the BRAM cell block has the same height as 5 CLBs, but other numbers (e.g., 4) may also be used. DSP cell block 106 may include a DSP logic element (DSPL) 114 and one or more programmable interconnect elements. For example, IOB 104 may include two instances of I / O logic element (IOL) 115 and one instance of programmable interconnect element INT 111. For example, the actual I / O pad connected to the I / O logic element 115 may be made using metal that is stacked above the various logic blocks shown and may not be limited to the area of the input / output logic element 115.
[0033] In the illustrated embodiment, the columnar region near the center of the die (eg Figure 1 100) are used for configuration, clock, and other control logic. Horizontal regions 109 extending from the columns distribute clock and configuration signals across the width of programmable IC 100. It is important to note that references to "columnar" and "horizontal" regions are relative to viewing the figure in a vertical orientation.
[0034] use Figure 1 Some programmable ICs of the illustrated architecture may include other logic blocks that disrupt the regular columnar structure that makes up most of the programmable IC. The other logic blocks may be programmable blocks and / or dedicated logic. For example, Figure 1 The processing block PROC 110 is shown spanning several columns of CLBs 102 and BRAMs 103 .
[0035] Figure 1 An example of a programmable IC architecture is shown. The number of logic blocks in a column, the relative widths of the columns, the number and order of the columns, the types of logic blocks included in the columns, the relative sizes of the logic blocks, and the implementation of the interconnect / logic are provided only as examples. For example, in an actual programmable IC, no matter where CLB 102 appears, more than one adjacent column of CLBs 102 may be included to facilitate efficient implementation of user logic.
[0036] As computer applications continue to expand in various fields, various application scenarios have put forward higher and higher requirements on the data processing capabilities of servers. In certain specific cases, it can be difficult for servers to balance resource allocation. In order to achieve the required processing speed, more powerful computing power is required. In some cases, data processing speed is important, and FPGAs can be used to share some of the work of the central processing unit (CPU) through hardware accelerators and perform certain types of calculations.
[0037] FIG. 2(A) describes a host computing system including an exemplary hardware acceleration processing engine. The host computing system 200 includes a hardware acceleration processing system 205. The hardware acceleration processing system 205 includes a plurality of interconnected circuit subsystems, one of which is a central processing unit (CPU) 210 electrically coupled to a field programmable gate array (FPGA) 215. The FPGA may include a semiconductor integrated circuit substrate. The FPGA 215 may share some of the work of the central processing unit (CPU) through the hardware acceleration processing engine, which may be flexibly reconfigured to process certain complex database query instructions. The FPGA 215 provides one or more hardware acceleration processing engines 225 to accelerate the data query response speed. In various embodiments, the computational burden may be selectively unloaded from the CPU 210 to the hardware acceleration processing engine 225 that provides a query-specific hardware circuit to efficiently generate results in response to large database queries.
[0038] The hardware accelerated processing engine 225 includes a group of processing units (PUs) 230 placed in parallel to perform data processing, and a connection unit 235 configured to connect the processed results. Each processing unit 230 can be independently programmed to perform predetermined filtering and / or aggregation operations, for example, on a data stream. In various examples, the data stream input to each processing unit PU230 may include operations and / or recorded data. For example, the operation can be initiated by a user inputting a desired query to the hardware accelerated processing system 205 via a user interface. The recorded data can be retrieved from a database by the hardware accelerated processing system 205, for example, the database can be a remote third party or government database that performs operable data communication (for example, through a communication network) with the CPU 210. In some embodiments, the CPU 210 can retrieve a large number of data records from a database for processing using the parameters of the user input query. In some embodiments, those operations include SQL instructions.
[0039] In some embodiments, one or more processing engines 225 may be formed using a customized ASIC alone or in combination with FPGA 215. In such embodiments, a customized ASIC with dedicated hardware circuits may be configured to perform one or more exemplary processing engine functions represented in the illustrated figure. For example, an ASIC with customized fixed hardware circuits may be configured as a hardware circuit designed to function as one or more of a DDR reader, a buffer, a processing unit PU 230, and / or a connection unit 235 that is capable of effectively performing at least a portion of a predetermined set of query operations. The ASIC may be arranged with a hardware circuit configured to perform a predetermined set of query operations to be processed by the hardware accelerated processing system 205. In some examples, the customized fixed hardware configuration defined in the ASIC may be capable of executing query instructions that may offload the computational burden of, for example, a CPU 210 and / or one or more FPGAs (e.g., FPGA 215) to the processing engine 225.
[0040] Fig. 2(B) depicts a block diagram of the hardware accelerated processing system of Fig. 2(A) executing an exemplary data query. In the example shown, the hardware accelerated processing system 205 includes a CPU 210, an FPGA 215, a database 220, and a query language processing unit 240, which is included in an electrically reconfigurable hardware circuit of the FPGA 215. In some embodiments, the query language processing unit 240 can be a SQL processing unit engine.
[0041] The CPU 210 receives a data query request from a user and may send a data query command signal to the query language processing unit 240 to program the FPGA 215 to perform a database query, which may involve, for example, processing a data stream. In some embodiments, the data stream may include i different data blocks. In some embodiments, the FPGA 215 may include, for example, hardware resources, different types of registers, multiplexers, connection units, and / or summers.
[0042] The query language processing unit 240 provides a predetermined instruction set group G suitable for processing data according to the data query command signal. The instruction set group G includes one or more instruction sets S(i). If the query language processing unit 240 accepts the data query command signal, the FPGA 215 is reconfigured to provide a processing unit PU(i) to process the data stream in parallel according to the predetermined instruction set group G. PU(i) is the processing unit 230 of FIG. 2(A). In some embodiments, each processing unit PU(i) may be configured with a corresponding set of hardware resources to process a corresponding predetermined data block (i) of the data stream according to the predetermined instruction set S(i) in the instruction set group G.
[0043] In the example shown, FPGA 215 receives a data stream from a database (e.g., via one or more buffers). After retrieving the data stream from the database, a data block (i) of the data stream can be assigned to i different processing units PU(i) by an input data scheduler. These i different data blocks can then be processed by i parallel processing units PU(i) (e.g., PU(1), PU(2), PU(3), PU(4), ...). Each PU(i) processes its data block (i) according to its respective (e.g., independent) instruction set S(i). In some embodiments, all PU(i) may have the same instruction set S(i). In some embodiments, each PU(i) may have a different instruction set S(i).
[0044] For example, each processing unit 230 can be independently programmed to perform predetermined filtering and aggregation operations. In some embodiments, these operations can include a predefined group of query instructions, such as SQL instructions. Then, the hardware accelerated processing engine 225 can transmit the final query results to the CPU 210.
[0045] In some embodiments, the hardware accelerated processing engine 225 and / or the query language processing unit 240 may be implemented in part by the CPU 210 executing an instruction program, which, when executed, at least in part through software-driven operations rather than entirely through the operation of hardware acceleration circuits, causes the operations to be executed to produce hardware-accelerated query processing results. In some embodiments, the hardware accelerated processing engine 225 and / or the query language processing unit 240 may be embedded in whole or in part in the fixed circuits of an ASIC. In some embodiments, PU(i) may be implemented by a series and / or parallel combination of, for example, a fixed hardware circuit embedded in an ASIC and a reprogrammable hardware circuit embedded in an FPGA.
[0046] FIG. 3 (A) describes an exemplary processing unit included in the hardware acceleration processing engine of FIG. 2 (B). In the example of FIG. 3 (A), the processing unit 230 (which may be an embodiment of the processing unit 230 of FIG. 2) includes an instruction register 305, a variable register 310, and an arithmetic logic unit (ALU) 325. The instruction register 305 is used to store arithmetic and / or logic instructions being executed or decoded. The variable register 310 accepts data assigned to the processing unit 230. The arithmetic logic unit (ALU) 325 is used to perform arithmetic and logic operations on operands in a computer instruction word. The type of instruction data can be any SQL type. For example, the instruction data can be a decimal, an integer, a data, a Boolean value (Boolean). In the example described, the instruction data includes an integer and a Boolean value. For example, the SQL type and instruction added to the processing unit 230 can cause the processing unit 230 to operate as a SQL processing unit.
[0047] In some embodiments, constant registers 315 can be used to store constant data. In operation, constant data representing a query criterion provided by a user can be input before the data stream is processed at run time, for example, to evaluate the result of an instruction (e.g., variable data (greater than) constant data). In some embodiments, temporary registers 320 can be used to save intermediate results. In some embodiments, multiplexers 330, 335 can be used to select data that needs to be processed by ALU 325. In some embodiments, a data block (i) of a data stream can be loaded into variable registers 310. ALU 325 can perform operations on the loaded data block (i) by executing programming instructions stored in instruction register 305.
[0048] In some embodiments, multiplexer 330 may be a 2:1 multiplexer, and multiplexer 335 may be a 3:1 multiplexer. In some embodiments, multiplexer 330 may receive inputs from constant register 315 and variable register 310, and multiplexer 335 may receive inputs from constant register 315, variable register 310, and temporary register 320. In some embodiments, instruction register 305 and constant register 315 may be independently pre-programmed (e.g., configuring the respective hardware circuits as PU(i) at design time, which is performed prior to the run-time execution of the query) to implement the desired functionality.
[0049] Fig. 3 (B) shows an exemplary instruction of the exemplary processing unit of operation Fig. 2 (B). The type of instruction data can be any SQL type. For example, the instruction data can be a decimal, an integer, a data, a Boolean value. In the described example, the instruction data includes an integer and a Boolean value. For example, the SQL type and instruction added to the processing unit 230 can cause the processing unit 230 to operate as a SQL processing unit. In some embodiments, the instructions in the set can be executed to perform SQL filtering and aggregation operations. In some embodiments, the instructions can include filtering operations, addition or subtraction operations, and multiplication operations. In some embodiments, the filtering operations can include AND, OR, NOT, EQ, and NEQ. In some embodiments, these instructions can be pre-programmable and reconfigurable. In some embodiments, each processing unit 230 can execute different pre-programmable instructions.
[0050] Figure 4 A flowchart of an exemplary design time structure reconfiguration method for a hardware accelerated processing engine is described, which is configured to perform data query work. In this illustrative example, a command signal is generated to execute hardware resources available in a programmable logic circuit to form a hardware accelerated processing engine (e.g., hardware accelerated processing engine 225 of FIG. 2(A)). In the exemplary method 400, a CPU (e.g., CPU 210) receives a data query command signal from a user via CPU 210 at 405. Reference Figure 2A When the CPU 210 receives the data query command signal, in order to improve the data query response speed, a portion of the query work can be offloaded or assigned to the hardware acceleration processing engine 225. The CPU 210 determines at 410 whether the work of processing the data stream can be offloaded or assigned to the FPGA 215. If it is not appropriate to offload the work to the hardware acceleration processing engine 225, the control of the process can be passed to the CPU 210 to execute instructions to perform the data query at 415 without using the hardware acceleration processing engine 225.
[0051] At 410, if the work is suitable for being offloaded to the hardware accelerated processing engine 225, the CPU 210 converts the data query command signal into a predetermined query language command, such as a SQL command, at 420. For example, by using the SQL command, the CPU 210 extracts parameters and instructions at 425. In the depicted example, at 430, the CPU 210 cleans up all available PUs by cleaning up any pre-existing configuration parameters or instructions that were previously programmed into the programmable logic of the FPGA 215.
[0052] In preparation for configuring FPGA 215 to offload data query command signals from the user, CPU 210 starts variable i=1 at 435. At 440, the CPU loads the extracted parameters and instruction sets corresponding to processing unit PU(i). If, at 445, more PU(i) are available to process any additional extracted parameters and instruction sets, then at 450, the CPU increments variable i and loops back to 440. If, at 445, no more PU(i) are available to process any additional extracted parameters and instruction sets, then method 400 ends.
[0053] In the example shown, the FPGA 215 can be configured to select whether to offload work from the CPU. For example, the FPGA offload switch can be used to accept or reject the offload. Whether to accept or reject the work can depend on the type of work. In the example described, if the work is related to data scanning and aggregation, the FPGA 215 can be configured to accept the work. If the FPGA rejects the offload, the CPU 210 can process the query. In response to the data query command signal, the query language processing unit 240 can be configured to generate an instruction set group G. The instruction set group G may include one or more instruction sets S(i). Each parallel processing unit (e.g., Figure 2B PU(i)) can be programmed to execute a predetermined instruction set S(i). More specifically, query language processing unit 240 can be configured to convert queries into SQL commands, extract parameters from the SQL commands, and generate instruction sets to be implemented by each corresponding processing unit in FPGA 215. In some embodiments, each processing unit can have the same instruction set. In some embodiments, each processing unit can execute a different instruction set.
[0054] Next, the instruction set group G and the extracted parameters can be loaded into the parallel processing units in the FPGA to process the data stream. For example, PU(1) can be loaded by the first instruction set S(1), and PU(2) and PU(3) can be loaded by the second instruction set S(2). More specifically, for each PU(i), a constant register (e.g., constant register 315 of FIG. 3(A)) can be loaded with one or more constants. An instruction register (e.g., instruction register 305 of FIG. 3(A)) can be loaded with a predetermined instruction set S(i). Before loading new parameters into each processing unit, each processing unit can be cleaned up. For example, constant registers and instruction registers can be cleaned up. In some embodiments, variable registers (e.g., variable registers 310) and temporary registers (e.g., temporary registers 320) can also be cleaned up.
[0055] The hardware accelerated processing engine can then be ready to process the data stream.
[0056] An illustrative example is further described to explain the design time process. For example, a user wants to know the cumulative revenue of an online retailer that occurred in 1994, with a product discount between 5% and 7%, and the number of products is less than 24. Then, the user can send a query to the CPU 210. The query is related to data scanning and aggregation. Therefore, the FPGA 215 has the ability to process the query. Then, the CPU 210 offloads the query work to the FPGA. The query language processing unit 240 can accept the query and convert the query into SQL commands.
[0057] An example query could be:
[0058] SELECT SUM(L_EXTENDEDPRICE*L_DISCOUNT)AS REVENUE
[0059] FROM LINEITEM
[0060] WHERE L_SHIPDATE>='1994-01-01'AND L_SHIPDATE<'1995-01-01'
[0061] AND L_DISCOUNT BETWEEN.06-0.01AND.06+0.01AND L_QUANTITY<24
[0062] Software can be used to convert queries into SQL commands. The software can extract parameters and instructions from the SQL commands. An exemplary SQL command before the processing unit is as follows:
[0063] Define the constants as follows −
[0064] def l_quantity 0
[0065] def l_extendedprice 1
[0066] def l_discount 2
[0067] def l_shipdate 3
[0068] def d1994_01_01 1994 / 01 / 01
[0069] def c1 1
[0070] def d1995_01_01 1995 / 01 / 01
[0071] def c5 500
[0072] LD CONST[0]d1994_01_01
[0073] GE VAR[l_shipdate]CONST[0]TEMP[C0]
[0074] #save the result of"l_shipdate<date'1994-01-01'+interval'1'year"toTEMP1
[0075] LT VAR[l_shipdate]CONST[1]TEMP[1]
[0076] #save the result of"l_shipdate>=date'1994-01-01'
[0077] #and l_shipdate<date'1994-01-1'+interval'1'year"to TEMP0
[0078] AND,TEMP,TEMP0,BOOL,TEMP,TEMP1,BOOL,TEMP,TEMP0,BOOL
[0079] #Decompose"l_discount between.06-0.01and.06+0.01"as
[0080] #a."l_discount>=.05"and
[0081] #b."l_discount<=.07"
[0082] #save the result of"l_discount<.05"to TEMP1
[0083] <v> GE,VAR,l_discount,DECIMAL,CONST,exp3_1_con,DECIMAL,TEMP,TEMP1,BOOL< / v>
[0084] <v> AND,TEMP,TEMP0,BOOL,TEMP,TEMP1,BOOL,TEMP,TEMP0,BOOL< / v>
[0085] <v> LE,VAR,l_discount,DECIMAL,CONST,exp3_2_con,DECIMAL,TEMP,TEMP1,BOOL< / v>
[0086] <v> AND,TEMP,TEMP0,BOOL,TEMP,TEMP1,BOOL,TEMP,TEMP0,BOOL< / v>
[0087] #save the result of"l_quantity<24"to TEMP1
[0088] <v> LT,VAR,l_quantity,DECIMAL,CONST,exp4_con,DECIMAL,TEMP,TEMP1,BOOL< / v>
[0089] #save the result of the whole qualifier to TEMP0
[0090] <v>AND,TEMP,TEMP0,BOOL,TEMP,TEMP1,BOOL,TEMP,TEMP0,
[0091] BOOL< / v>
[0092]
[0093] like Figure 4 As shown, the extracted parameters and instruction set S can be loaded into the available processing units in FPGA 215 to perform the query operation. When data is streamed at run time, these programmed processing units can start to perform the query operation, referring to Figure 6 Examples thereof are described in further detail.
[0094] Figure 5 Describes an exemplary structure of a hardware acceleration processing engine. Referring to FIG. 2 (AB), Figure 5 An embodiment of a hardware accelerated processing engine 225 is described, which includes an input data scheduler 505 and a connection unit 235, where the data scheduler 505 coordinates the input to the PU(i) 230 and the connection unit 235 processes the output of the PU(i) 230.
[0095] The input data scheduler 505 can be configured to divide the input data stream into several predetermined data blocks. These data blocks can then be assigned to appropriately configured PU (i) 230 to execute a predetermined instruction set S (i) suitable for the data block. In some embodiments, at least two or more PU (i) operate on the data blocks in parallel. In the described example, for example, the data stream can be passed to the hardware acceleration processing engine 225 via a high-speed data communication channel (e.g., PCIe, DMA) that is operably communicated with a data stream source (e.g., a database). Each block of the stream data processed by the input data scheduler 505 can be buffered by a BRAM block before being transmitted to the PU (i) 230.
[0096] The connection unit 235 may be configured to merge the results processed by each PU(i) 230. In some embodiments, the connection unit 235 may be a hardware unit. In some implementations, each processing unit 230 may be configured to perform predetermined data filtering and aggregation operations.
[0097] The hardware accelerated processing engine 225 also includes a scheduler 505 to schedule the work in the hardware accelerated processing engine. The scheduler 505 distributes the data blocks in the data stream to the corresponding processing units. In some embodiments, the scheduler 505 can be a round-robin scheduler. In some embodiments, each processing unit 230 can be injected with its own HTTP live streaming (HLS) stream with different read and write data widths. In some embodiments, a striped read buffer can be used to minimize the use of block RAM read and write buffers. In some embodiments, a wide DDR (double data rate) width can be used to maximize the efficiency and number of processing cycles of the optical PU resources used. In some embodiments, the DDR burst length can be long enough to reduce the inefficiency of DDR.
[0098] Figure 6 A flowchart of an exemplary runtime method for performing a data query using a programmable hardware accelerated processing engine is described. In method 600, a programmable hardware accelerated processing engine (e.g., Figure 5 At 605, the scheduler (e.g., Figure 5 The scheduler 505 of the programmable hardware acceleration processing engine schedules and divides the data flow into different data blocks in response to the programmed instructions to be processed by different, independent and programmable processing units (e.g., Figure 5 Then, at 615, each independent and programmable processing unit in the processing engine performs predetermined data filtering and aggregation operations to generate processed results. In some embodiments, SQL queries can be used to implement data filtering and aggregation operations. At 620, the results of these processes are transmitted through a connection unit (e.g., Figure 5 The connection unit 235 of the data stream is connected to form an output result. At 625, it is determined whether to terminate the data query process. If the data stream has more records to be processed, the method 600 returns to 605. If the data stream has no more records to be processed, the method has determined the result of the query and is completed. In some embodiments, for example, the query result output can then be displayed on a user interface.
[0099] In the example shown, the algorithm for the query may be:
[0100]
[0101]
[0102] An illustrative example is further described to explain the process of design time. For example, FPGA 215 may include 5 processing units that can be used to perform a query operation. The extracted parameters and instructions may have been loaded into FPGA 215 to perform the query operation. Then, the FPGA can retrieve a data stream related to the sales record of an online retailer from the database. The sales record may include 200 pages of data. The FPGA can retrieve 20 pages of record data from the data. Scheduler 505 can assign the data retrieved in page 1 to the first processing unit, and assign the data in page 2 to the second processing unit, and so on. An example of the allocation results is shown in the table below.
[0103]
[0104] When the data is loaded into the variable register, each processing unit can then execute its instructions. The temporary results can be stored in the temporary register 320. After the processing unit PU1 queries all pages 1, 6, 11, 16, PU1 can output the first cumulative income sum 1 of pages 1, 6, 11, 16 under the instruction. PU2 will output the second cumulative income sum 2 and so on. The output connection unit 235 performs the final calculation and returns the final result to the user.
[0105] Although various embodiments have been described with reference to the accompanying drawings, other embodiments are possible. For example, in some embodiments, SQL queries can be translated into instructions and loaded to be executed on the FPGA. In some embodiments, different SQL queries can be executed without recompiling on the FPGA. In some embodiments, these executed SQL queries may be suitable for OLAP (online analytical processing). In some embodiments, PostgreSQL and its various extensions can be used for data analysis and GIS applications.
[0106] In some embodiments, users can execute their existing Postgres SQL queries on the accelerated FPGA platform. In some embodiments, the hardware accelerated processing engine can be a massively parallel SQL processing unit, and instruction code for the massively parallel SQL processing unit can be generated on the fly for each successive user query. In some embodiments, Postgres storage pages can be parsed locally in the FPGA to scan relation rows to select rows specified by the "where" clause, and users can use all existing Postgres functions to execute remote or local queries.
[0107] In some embodiments, for example, a user can use 32 SQL PUs on a VU9P device for F1 implementation. In some embodiments, each PU can be extended to hash, sort, or customer-specific instructions. In some embodiments, the data being processed can be block-streamed from the FPGA using multiple buffers to hold input and output data, ensuring that the FPGA acceleration core is not starved of data.
[0108] Some aspects of the embodiments may be implemented as a computer system. For example, various embodiments may include digital and / or analog circuits, computer hardware, firmware, software, or a combination thereof. The device elements may be implemented in a computer program product tangibly embodied in an information carrier (e.g., in a machine-readable storage device), executed by a programmable processor; and the method may be performed by a programmable processor executing an instruction program to perform the functions of the various embodiments by operating on input data and generating output. Some embodiments may advantageously be implemented in one or more computer programs that can be executed on a programmable system, the programmable system comprising at least one programmable processor coupled to receive data and instructions from a data storage system, at least one input device, and / or at least one output device, and to transmit data and instructions to a data storage system, at least one input device, and / or at least one output device. A computer program is a set of instructions that can be used directly or indirectly in a computer to perform a specific activity or bring about a specific result. A computer program may be written in any programming language (including compiled or interpreted languages), and it may be deployed in any form (including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment).
[0109] As an example and not limited to, suitable processors for executing instruction programs include general-purpose microprocessors and special-purpose microprocessors, which may include a single processor or one of multiple processors of any type of computer. Typically, the processor can receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a processor for executing instructions and one or more memories for storing instructions and data. Storage devices suitable for tangibly embodying computer program instructions and data include all forms of non-volatile memory, including, for example, semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices). The processor and memory can be supplemented by or incorporated into an ASIC (application-specific integrated circuit). In some embodiments, the processor and memory can be supplemented by or incorporated into a hardware programmable device (e.g., FPGA).
[0110] In some embodiments, each system can be programmed with the same or similar information and / or initialized with substantially the same information stored in volatile and / or non-volatile memory. For example, a data interface can be configured to perform auto-configuration, auto-download and / or auto-update functions when connected to an appropriate host device (e.g., a desktop computer or server).
[0111] In various embodiments, a computer system may include non-transitory memory. The memory may be connected to one or more processors, which may be configured to store data and computer-readable instructions, including processor-executable program instructions. The data and computer-readable instructions may be accessed by one or more processors. When executed by one or more processors, the processor-executable program instructions may cause the one or more processors to perform various operations.
[0112] In various embodiments, a computer system may include an Internet of Things (IoT) device. An IoT device may include objects embedded with electronics, software, sensors, actuators, and network connections that enable these objects to collect and exchange data. IoT devices can be used with wired or wireless devices by sending data to another device via an interface. IoT devices can collect useful data and then autonomously flow that data between other devices.
[0113] Various examples of modules can be implemented using circuits including various electronic hardware. As an example and not limitation, the hardware can include transistors, resistors, capacitors, switches, integrated circuits, and / or other modules. In various examples, the modules can include analog and / or digital logic, discrete components, traces, and / or storage circuits manufactured on a silicon substrate including various integrated circuits. In some embodiments, the modules can include pre-programmed instructions and / or software executed by a processor. For example, various modules can involve both hardware and software.
[0114] In an example, an integrated circuit includes: a plurality of processing units (PU(i)) arranged in parallel and a connection circuit, each of the plurality of PU(i) being formed by a hardware circuit configured to process a selected data block of a data stream according to a predetermined instruction set (S(i)) in an instruction set group (G) using a predetermined query language, each of the plurality of PU(i) generating an intermediate output result corresponding to a selected portion of the data stream processed by the PU(i), the connection circuit being coupled to receive each intermediate output result from each of the plurality of PU(i) and to generate an aggregated result, wherein each S(i) includes functionality of instructions extracted from a user-defined query.
[0115] In an example, the predetermined instruction set (S(i)) includes SQL instructions. In an example, the predetermined query language includes SQL. In an example, the connection unit is configured to generate an aggregated result based on a predetermined function associated with a user-defined query. In an example, each of the plurality of processing units is implemented as a fixed hardware circuit in an ASIC. In an example, each of the plurality of processing units is implemented as reconfigurable hardware in a programmable structure of an FPGA. In an example, the integrated circuit includes a scheduler circuit coupled to receive a data stream, wherein the scheduler circuit is configured to selectively direct each data block to one PU(i) of a plurality of PU(i). In an example, the scheduler circuit includes a round-robin scheduler. In an example, each S(i) also includes a function of extracting at least one parameter from a user-defined query.
[0116] In an example, each of the plurality of PUs (i) includes an arithmetic logic unit ALU adapted to execute a corresponding S (i) by performing an operation based on the fetched instruction, wherein the operation is performed using (i) a first operand and (ii) a second operand, the first operand comprising a portion of a data stream stored in a variable register, and the second operand comprising one of the fetched parameters stored in a constant register. In an example, each of the plurality of processing units further includes: a temporary register, a first multiplexer, and a second multiplexer, the temporary register being configured to hold a result of the performed operation, the first multiplexer being configured to receive input from a constant register and a variable register, and the second multiplexer being configured to receive input from the constant register, the variable register, and the temporary register.
[0117] In an example, a method for configuring a structure to perform a data query, the method comprising: receiving a data query from a user; converting the data query into a predetermined query language command; extracting parameters to be stored in a plurality of parallel processing units PU(i) from the command, and extracting instructions from the command to form an instruction set group G to be executed by PU(i), the instruction set group G comprising a plurality of instruction sets S(i), and loading the extracted parameters and the extracted instructions into a plurality of PU(i), wherein each PU(i) is configured to process a predetermined data block (i) of a data stream in parallel using its corresponding parameters and instruction set S(i).
[0118] In an example, the predetermined query language includes SQL. In an example, each PU(i) is configured with the same S(i). In an example, the method further includes cleaning all PU(i) before loading the extraction parameters and the extraction instructions.
[0119] A large number of embodiments have been described. Nevertheless, it will be appreciated that various modifications may be made. For example, advantageous results may be achieved if the steps of the disclosed technology are performed in a different order, or if the components of the disclosed system are combined in a different manner, or if the components are supplemented with other components. Therefore, other embodiments are within the scope of the appended claims.
Claims
1. An integrated circuit, comprising: A plurality of processing units are arranged in parallel, each of the plurality of processing units comprises a first register, the first register is loaded with a predetermined instruction set of an instruction set group, wherein the instruction set group comprises a plurality of instructions extracted from a predetermined query language command converted by a data query; and each of the plurality of processing units is constituted by a hardware circuit, wherein the hardware circuit is configured to: processing the selected data block of the data stream by executing operations based on instructions of the predetermined instruction set; as well as generating an intermediate output result corresponding to a selected portion of the data stream processed by the processing unit; as well as, A connection circuit is coupled to receive each of the intermediate output results from each of the plurality of processing units and generate an aggregated result.
2. The integrated circuit according to claim 1, characterized in that The instructions of the predetermined instruction set are SQL instructions.
3. The integrated circuit according to claim 1, characterized in that The predetermined query language command is a SQL command.
4. The integrated circuit according to claim 1, characterized in that The connection circuit is configured to generate the aggregated result according to a predetermined function related to a user-defined query.
5. The integrated circuit according to claim 1, characterized in that Each processing unit of the plurality of processing units is implemented as a fixed hardware circuit in an ASIC.
6. The integrated circuit according to claim 1, characterized in that Each of the plurality of processing units is implemented as reconfigurable hardware in a programmable structure of the FPGA.
7. The integrated circuit according to claim 1, characterized in that The integrated circuit also includes a scheduler circuit coupled to receive the data stream, wherein the scheduler circuit is configured to selectively direct each of the data blocks to one of the plurality of processing units.
8. The integrated circuit according to claim 7, characterized in that The scheduler circuit includes a round robin scheduler.
9. The integrated circuit according to claim 1, characterized in that: Each of the predetermined instruction sets further comprises a function of at least one parameter extracted from a user-defined query.
10. The integrated circuit according to claim 9, characterized in that Each of the plurality of processing units comprises an arithmetic logic unit ALU adapted to execute a corresponding predetermined instruction set by performing the operation, wherein the operation is performed by using a first operand and a second operand, the first operand comprising a portion of the data stream stored in a variable register, and the second operand comprising one of the extracted parameters stored in a constant register.
11. The integrated circuit according to claim 10, characterized in that Each of the plurality of processing units further comprises: a temporary register configured to hold a result of an executed operation; a first multiplexer configured to receive inputs from the constant register and the variable register; and A second multiplexer is configured to receive inputs from the constant register, the variable register, and the temporary register.
12. A method of configuring a structure to perform a data query, the method comprising: Receive data queries from users; converting the data query into a predetermined query language command; extracting parameters from the predetermined query language command to be stored in a plurality of processing units in parallel, and, extracting instructions from the predetermined query language command to form an instruction set group to be executed by the processing unit, the instruction set group comprising a plurality of instruction sets; and, loading the extracted parameters into a first register of each of the plurality of processing units and loading the extracted instructions into a second register of each of the plurality of processing units, Each of the plurality of processing units is configured to process predetermined data blocks of the data stream in parallel using the parameters in its respective first register and executing operations based on instructions of an instruction set in its respective second register.
13. The method according to claim 12, characterized in that The predetermined query language command is a SQL command, and the extracted instruction is a SQL instruction.
14. The method according to claim 12, characterized in that Each processing unit of the plurality of processing units is configured with the same instruction set.
15. The method according to claim 12, characterized in that The method further includes cleaning all processing units before loading the extracted parameters and the extracted instructions.
