WO2011063574A1 - 一种流数据处理方法及流处理器 - Google Patents

一种流数据处理方法及流处理器 Download PDF

Info

Publication number
WO2011063574A1
WO2011063574A1 PCT/CN2009/076108 CN2009076108W WO2011063574A1 WO 2011063574 A1 WO2011063574 A1 WO 2011063574A1 CN 2009076108 W CN2009076108 W CN 2009076108W WO 2011063574 A1 WO2011063574 A1 WO 2011063574A1
Authority
WO
WIPO (PCT)
Prior art keywords
thread
data
task
local storage
processing
Prior art date
Application number
PCT/CN2009/076108
Other languages
English (en)
French (fr)
Inventor
梅思行
王世好
劳咏仪
冯凯敏
白华
Original Assignee
深圳中微电科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳中微电科技有限公司 filed Critical 深圳中微电科技有限公司
Priority to US13/395,502 priority Critical patent/US20120233616A1/en
Publication of WO2011063574A1 publication Critical patent/WO2011063574A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/483Multiproc

Definitions

  • the present invention relates to the field of data processing, and more particularly to a stream data processing method and stream processor. Background technique
  • the technical problem to be solved by the present invention is that, in view of the above-mentioned increase in cost and power consumption of the prior art, the cost is too high, and the cost performance is not high, and a streamlined data processing method and stream processor are provided.
  • step C) Determine if there is still data not processed, if any, return to step A); if not, exit this data processing.
  • the step A) further includes:
  • A1 Data of different time periods or data of multiple tasks in the same task are respectively allocated to different, free local storage units connected to the thread processing engine through a virtual direct memory access channel.
  • the step A) further includes:
  • step A) The plurality of thread processing engines simultaneously process the local storage unit connected thereto.
  • the step A) further includes the following steps:
  • A2' assigning a plurality of tasks to the plurality of thread processing engines respectively;
  • A3' initializing each thread processing engine to connect to a local storage unit through the virtual direct memory access channel by setting a storage pointer;
  • the step C) further includes:
  • step C 2 determining whether there is unprocessed data in the local storage unit not connected to the plurality of thread processing engines, if yes, returning to step A); if not, executing step C3);
  • the number of the thread processing engines is four, and the number of the local storage units is four or eight.
  • the method further includes the steps of: receiving the task or When an interrupt request is issued by the hardware, the processing of the thread processing engine assigned to the task is interrupted, and the interrupt handler is executed.
  • the method further includes the following steps: when any one of the running thread processing engines needs to wait for a long time, release the thread processing engine, and configure it to the same one that is running or Different tasks.
  • the invention also relates to a processor for processing stream data, comprising:
  • Parallel multiple thread processing engines for processing tasks or threads assigned to the thread processing engine
  • a management unit configured to acquire, determine, and control a state of the plurality of thread processing engines, and allocate a thread or a task in a waiting queue to the plurality of thread processing engines;
  • Local storage area used to store data processed by the thread processing engine, and complete data processing in conjunction with the thread processing engine.
  • the thread processing engine comprising an arithmetic logic unit and the arithmetic The multiplier corresponding to the logical operation unit.
  • the local storage area includes a plurality of local storage units, the local storage unit being configured to correspond to the thread processing engine when the thread processing engine is operating.
  • the number of the thread processing engines is four, and the number of the local storage units is eight.
  • any four local storage units are separately configured with the thread processing engine. --correspond.
  • the management unit includes:
  • Software configuration module configured to set a task for the thread processing engine according to a starting program pointer
  • a task initialization module a local storage area pointer and a global storage area pointer for setting the task
  • Thread configuration module for setting a priority and an operation mode of a task; an interrupt processing module: for processing external and internal interrupts received by the stream processor; Pause control module: used to control the thread processing engine to temporarily stop or restart when processing a task.
  • the management unit further includes a thread control register, the thread control register further comprising: a start program pointer for indicating a starting physical address of the task program for indicating a thread global storage area The global storage area starting point register of the starting address and the thread configuration register for setting the thread priority and operating mode.
  • the management unit changes a task run by the thread processing engine by changing a configuration of the thread processing engine; the configuring includes changing a value or a change of the start program pointer register A local storage unit pointer to the local storage unit.
  • the interrupt processing module includes an interrupt processing unit that controls a thread interrupt in the kernel or other core when its interrupt register controls a bit.
  • a stream data processing method and a stream processor embodying the present invention have the following beneficial effects: Since the hardware is improved to some extent, a plurality of parallel arithmetic logic units and their corresponding intra-core memory systems are used, and The thread management unit manages threads to be processed by the processor, so that the plurality of arithmetic logic units achieve dynamic load balancing when the work task is saturated, and turn off some of the arithmetic logic operation units when the task is not saturated, thereby saving Power consumption. Therefore, higher performance can be achieved at a lower cost, and the cost performance is higher.
  • FIG. 1 is a flow chart of a method for processing a stream data of the present invention and a method of a stream processor;
  • FIG. 2 is a schematic structural diagram of the processor in the embodiment;
  • FIG. 3 is a schematic diagram showing the structure of a data thread in the embodiment
  • Figure 5 is a schematic diagram showing the structure of an MVP thread in the embodiment
  • FIG. 6 is a schematic diagram showing the structure of an MVP thread in the embodiment
  • FIG. 7 is a schematic structural diagram of an operation MVP thread and an operation mode in the embodiment.
  • FIG. 8 is a schematic diagram of a local storage structure of an MVP thread in the embodiment
  • Figure 9 is a schematic diagram showing the structure of an instruction output in the embodiment
  • Figure 10 is a schematic diagram of MVP thread buffering configuration in the embodiment.
  • FIG. 11 is a schematic diagram of a configuration of a local storage unit and a thread processing engine in the embodiment. detailed description
  • the stream data processing method includes the following steps:
  • Step S11 obtains the program pointer in the data:
  • the processor there are cases where different tasks need to be processed at the same time, and in the stream data processing, this situation is also common. For example, there are two different streams of data input at the same time that need to be processed at the same time. Of course, you can deal with one of them first, and then handle the other. This method will bring a delay in time. In the time-sensitive task, it is necessary to simultaneously process the above stream data, which is also the basis of the embodiment. Of course, in another case, there may be only one data input, only one handler is needed.
  • the input data already has program pointers when it needs to be processed, and these program pointers represent the programs required to process the data.
  • Step S12 is based on the program pointer, and different tasks are assigned to different engines or the same task are respectively assigned to different engines:
  • this step there are two cases, one case is only one task, and in this embodiment, there are four Threading engine, if only one thread processing engine is used to handle this task, of course it is ok.
  • the processing time is prolonged, and the remaining 3 thread processing engines are not working, which is also a waste. Therefore, in this step, the one task is simultaneously configured to the four thread processing engines but the different data is processed, so that the four thread processing engines process the different time period data of the task in parallel, and the task is completed in a faster time.
  • Another case is that the data belongs to multiple tasks, and the above four thread processing engines need to process the multiple tasks at the same time but process different data.
  • the number of tasks is more than the number of engines mentioned above, four tasks are configured to the above four thread processing engines, each engine processes one task, and the extra tasks are queued for waiting for the above engine to complete the current task and then configured; For 4, each engine is configured with one; when the number of tasks is less than 4 and greater than 1
  • the above-mentioned thread processing engine can be evenly distributed or each thread can be assigned a thread processing engine, and then the remaining engines can be assigned tasks with higher priority tasks.
  • Step S13 The data is stored in the local storage unit.
  • the stream data of the current task is stored in the local storage unit according to the time period of the task or the input.
  • the stream data is continuously input, and the continuously input data is sent to the local storage unit after passing through the input buffer, and the amount of data stored in each local storage unit may be the same or may be based on the stream data.
  • the characteristics of the input the amount of different data.
  • the size of each local storage unit is the same, and therefore, the amount of data input thereto is also the same.
  • the local storage unit is marked so that the data sources stored in the local storage units can be identified.
  • Step S14 initializes the engine and allocates the local storage unit:
  • the thread processing engine is initialized to prepare to process the data. In the process of initializing the engine, it is more important to store the above-mentioned local storage that has stored the task data.
  • the unit is configured into the corresponding thread processing engine, even if a local storage unit is connected to a thread processor through a virtual storage channel. These virtual storage channels are virtual DMA (Direct Memory Access) connections in this embodiment, and there is no corresponding hardware.
  • the corresponding thread processing engine described above is a thread processing engine that has been connected to the local storage unit and obtains the task execution code.
  • the remaining 4 constitute a queue, waiting to be configured into the thread processing engine, the 4 waiting
  • the local storage unit stores data from the input buffer.
  • the above local storage unit may also be empty, and no data is stored.
  • the task of initializing the engine includes giving it a local storage area pointer and a global storage area pointer, as well as setting its priority and running mode, and so on.
  • Step S15 processes the data:
  • the thread processing engine processes the data in the local storage unit of its configuration.
  • processing is performed according to its requirements under the control of the execution code of its tasks.
  • the data processed by each thread processing engine may be data input in different time periods of the same task, or may be data input in different time periods of different tasks, or may be input in different time periods of different tasks. data.
  • Step S16 releases the local storage unit connected to the thread processing engine through the virtual storage channel: when a thread processing engine processes the configuration (ie, connects through the virtual DMA channel described above) local storage list After the meta-data, it first releases the configured local storage unit and transfers the data to the next thread processing engine through the virtual DMA channel connection described above. After the local storage unit is released, the queue waiting to be configured to the thread processing engine is added. As with other local storage units that are not assigned to the thread processing engine, the data in the input cache (if any) will be entered into it.
  • Step S17 All tasks are processed? In this step, it is judged whether all tasks have been completed, and if ⁇ is completed, step S18) is performed; if not, step S19) is performed. A more obvious criterion is to determine whether there is data in the input buffer and the local storage unit not configured in the thread processor. If there is no data, it can be determined whether the task is processed.
  • Step S18 quits the current data processing: in this step, one or more tasks have been processed, and the corresponding one or more local storage units have been released, where one or more threads corresponding to the task are released. Process the engine and other resources, and exit this data processing of the task.
  • the task if there is an unprocessed task, and the task has been configured into the thread processor, then return to step S13) to allocate a new local storage unit for the thread processor of the configured task, and then execute Processing the data of the local storage unit; if there is an unprocessed task, and the task is not configured to the thread processing engine, returning to step S11), configuring a thread processing engine for the task, if there is no idle thread processing engine, waiting An idle thread processing engine appears.
  • the thread processing engine is configured again for the task to speed up the processing.
  • the task can be considered to have been configured; otherwise , can be judged that the task is not configured.
  • the present invention also relates to a processor for processing stream data.
  • the processor is a multi-thread Virtual Pipelined stream processor (MVP).
  • the processor includes a thread management and control unit 1, an instruction acquisition unit 2, an instruction output unit 3, an arithmetic logic unit [3: 0] 4, and a multiplier (Mult iply-Add unit) [3: 0] 5.
  • the unit acquisition unit 2 acquires an instruction by the instruction buffer unit 8 and the system bus interface 11 under the control of the thread management and control unit 1, and outputs the acquisition instruction to the thread management and control unit 1 under the control of the thread management and control unit 1.
  • the instruction output unit 3 is further connected to the interrupt controller 12, and receives control when the interrupt controller 12 has an output, and stops the fetching instruction; the output of the command output unit 3 passes through the parallel bus and the above arithmetic Logic unit [3: 0] 4.
  • the multiplier [3: 0] 5 and the specific function unit 6 are connected, and the operation code and the operand in the fetch instruction are respectively transferred to the above four arithmetic logic units according to their needs, and four
  • the multiplier and the specific functional unit 6; and the above arithmetic logic unit [3:0] 4, the multiplier [3:0] 5 and the specific functional unit 6 are also connected to the register 7 through the bus, respectively, to facilitate the state thereof.
  • a thread processing engine includes an arithmetic logic unit and a multiplier, and thus, in the present embodiment, four thread processing engines that are parallel in hardware are included.
  • the thread management and control unit 1 further includes: a software configuration module: configured to set a task for the thread processing engine according to the initial program pointer; a task initialization module: configured to set a local storage area of the task Pointer and global storage area pointer; thread configuration module: used to set the priority and operation mode of a task; interrupt processing module: for processing external and internal interrupts received by the stream processor; pause control module: for control The thread processing engine temporarily stops or restarts when processing the task; and ends the module, the ending module is used to exit the current data processing, and the module runs the command EXIT to cause the thread processing engine to exit the data processing.
  • the implementation channel of the above MVP includes four ALUs (Arithmetic Logic Units), four MACs (multipliers, Mul t ip ly-Add uni t ), and a 128 ⁇ 32-bit register, in addition, It includes a 64KB instruction buffer unit, a 32KB data buffer unit, a 64KB SRAM as a thread buffer, and a thread management unit.
  • MVP supports two parallel computing modes, data parallel computing mode and task parallel computing mode.
  • the MVP core can process up to four work items in a work group, which are mapped to four parallel threads of the MVP core.
  • the MVP core can process up to 8 workgroups, each of which includes a work item.
  • the MVP core also includes a proprietary mode, MVP thread mode, in which up to 8 threads can be configured as MVP thread mode, these 8 threads It behaves as a dedicated chip channel hierarchy.
  • MVP thread mode in which up to 8 threads can be configured as MVP thread mode, these 8 threads It behaves as a dedicated chip channel hierarchy.
  • the above eight threads can be applied to different cores for stream processing or processing stream data without interruption.
  • the MVP mode described above has a higher price/performance ratio in a variety of stream processing applications.
  • Multithreading and its use are one of the different priorities of MVP and other processors, which can achieve a final better solution more clearly.
  • the purpose of multithreading is as follows: Provide task parallelism and data parallel processing mode, and provide a proprietary functional parallel mode designed for stream channels; in MVP, load balancing for maximum hardware resource utilization; Reduce latency concealment capabilities that depend on memory and peripheral speed.
  • MVP removes or reduces too much special hardware, especially the hardware set up for special applications. Compared to improving hardware performance alone, such as increasing the clock rate of the CPU, MVP has better versatility and flexibility in different applications.
  • the MVP supports three different parallel thread modes, including a data parallel thread mode, a task thread parallel mode, and an MVP parallel thread mode, wherein the data parallel thread mode is used to process different stream data through the same kernel.
  • a data parallel thread mode for example, the same program within the MVP.
  • the data arrives at different times and the time it takes to start processing is different.
  • these threads are running, even if the programs that process them are the same, they are in different operational processes. From the point of view of the MVP command channel, there is no difference between programs that operate differently, for example, different tasks.
  • Each data set placed on the same thread will be a minimal set of self-contained ( sel f- conta ined ), for example, without communicating with other data sets.
  • Task threads run concurrently on different cores. Referring to Figure 4, from the perspective of the operating system, they behave as different programs or different functions. For greater flexibility, the nature of the task thread has completely risen to the software classification. Each task runs on a different program. Task threads are not interrupted by communication with other threads. Each task thread behaves as a workgroup with one work item. In FIG. 4, including thread 0 301, thread 1 302, thread 2 303, and thread 3 304 corresponding to task 0 through task 3, these tasks are connected to superscalar execution channel 306 via four parallel I/O lines 305, respectively. At the same time, the superscalar execution channel 306 is also connected to the local storage area through the storage bus 307.
  • the local storage area is divided into four parts (ie, four local storage units), which are used to store the above four threads (
  • the areas of data corresponding to 301, 302, 303, and 304) are respectively an area 308 corresponding to thread 0, an area 309 corresponding to thread 1, an area 310 corresponding to thread 2, and an area 311 corresponding to thread 3.
  • Each of the above threads (301, 302, 303, 304) reads data in its corresponding area (308, 309, 310, 311).
  • MVP threads behave differently at the functional channel level. This is also its design point and key features. Each functional level of an MVP thread is similar to a different kernel in operation, just like a task thread.
  • the biggest feature of MVP threads is the ability to automatically activate or deactivate themselves based on their input data state and output buffering capabilities.
  • the ability of the MVP thread to automatically activate or deactivate itself allows such a thread to remove completed threads from the currently executing channel and free up hardware resources for other active threads. This provides the load balancing capabilities we want.
  • it allows MVP threads to activate more threads than running threads. It supports up to 8 activated threads.
  • Figure 5 shows the MVP mode Relationship between the thread and the local storage unit, wherein thread 0 401, thread 1 402, thread 2 403, and thread 3 404 are connected to the superscalar execution channel 406 through parallel I/O connection lines 405, respectively.
  • the thread (task) is also separately connected to the area (407, 408, 409, 41 0 ) in the local storage unit that is divided into the thread, and between these areas, through the virtual DAM engine connection, these virtual DMA engines make The data therein can be quickly transferred between the divided areas as needed; in addition, the divided areas are respectively connected to the bus 411, and the bus 41 1 is also connected to the above-described superscalar execution channel 406.
  • Figure 6 depicts the threading situation in MVP mode from another perspective. In FIG.
  • running threads are included, that is, running thread 0 501, running thread 1 502, running thread 2 503, and running thread 3 504, which respectively run on the above four ALUs, respectively Parallel I/O lines are connected on the superscalar execution channel 505; at the same time, the above four running threads are respectively connected to the prepared thread queue 507 (actually, the above four running threads are taken out from the thread queue 507)
  • the above queues are arranged with threads that are already prepared but not yet running. These threads can have up to eight threads. Of course, depending on the actual situation, there may be less than eight of them; among them, these are ready.
  • the thread can be the same kernel (application or task, kernel 1 508 to kernel n 509 in Figure 6), or not, in extreme cases, these threads may belong to 8 different cores respectively (application Program or task), of course, the actual situation may be other numbers, for example, may belong to 4 applications, and each application We are prepared to have two threads (thread priority under the same conditions).
  • the threads in the queue 507 are from an external host through the command queue 509 in FIG.
  • the same thread can be started between multiple runtimes.
  • the same core can start more (threads) at a time to speed up subsequent data processing in the circular buffer.
  • MVP threads are the most cost-effective configuration by delivering the best load balancing, minimal MVP interaction with the host CPU, and any data movement between MVP and host memory.
  • Load balancing is effective for fully utilizing hardware computing resources in multitasking and/or multiple data rooms
  • MVP has two ways to manage load balancing: First, use the software to configure 4 active threads (typically through the public IPA) in any way (in the task thread mode and MVP thread mode, 8 threads) Activated); Another way is to use hardware to dynamically update, inspect, and tune running threads at runtime. In the software configuration path, as we know most of the application features, initially need to set its static task partitioning for special applications; and the second way requires the hardware to have the ability to dynamically adjust under different runtime conditions. .
  • the above two methods enable the MVP to achieve the maximum instruction output bandwidth with maximum hardware utilization. Latency hiding relies on dual output capability to maintain 4 output rates.
  • MVP configures 4 threads through software configuration thread control registers.
  • Each thread includes a set of register configurations, including the Starting-PC register, the Star ting-GM-base register, the Starting-LM_base register, and the Thread_cfg register.
  • the Star t in g _PC register is used to indicate the starting physical location of a task program;
  • the Start ing_GM_base register is used to indicate the base point location of the thread local storage unit starting a thread;
  • the Start ing_LM_base register is used to indicate the thread global memory starting a thread.
  • the base point position (only for MVP threads);
  • the Thread_cfg register is used to configure the thread.
  • the register includes: Running Mode bit, when it is 0, it means normal, when it is 1, it means priority; Thread_Pri bit: Set the running priority of the thread ( 0-7 level); Thread Types bit: When it is 0, it means the thread is not available. When it is 1, it means it is a data thread. When it is 2, it means it is a task thread. When it is 3, it means it is an MVP thread.
  • the thread will enter the running state in the next cycle; if the thread is in MVP mode, its thread buffering and the validity of the input data will be checked in each cycle. Once they are ready, the activated thread enters the running state.
  • a thread entering the running state uploads the value in its Start ing_PC register to one of the four program counters (PCs) of the running channel program, and the thread starts running. See Figure 7 for thread management and configuration.
  • the thread runs 601, reads or accepts the values of thread configuration register 602, thread status register 603, and I/O buffer status register 604 and converts it into three control signal outputs. Among them, these control signals include: Launch-valid, Launch-tid ⁇ Launch infor.
  • MVP thread can be in hardware knot When the current data set is bundled, it is placed in a wait state, waiting for the next data set of the thread to be prepared or sent to its corresponding local storage area.
  • MVP does not have any intrinsic hardware connections between the data thread and the task thread, except for its shared memory and API-defined compartment features (bar r i er fea ture ). Each of these threads is treated as completely separate hardware. Nonetheless, MVP provides interrupt characteristics between threads, so each thread can be interrupted by any other core.
  • An inter-thread interrupt is a software interrupt that specifically interrupts a specified core, including its own kernel, by running a thread write to the software interrupt register. After such an inter-thread interrupt, the interrupted kernel terminal program will be called.
  • an interrupt in MVP if enabled and configured, will jump to a pre-configured interrupt handler for each interrupted thread. If the software is enabled, each MVP will respond to an external interrupt.
  • the interrupt controller handles all interrupts.
  • FIG. 10 shows eight cores (applications or tasks, K1 to K8) and their corresponding buffer regions (Buf A to Buf H ), wherein the buffer regions pass through a virtual DMA channel. Connection, for quick copying of data.
  • MVP has 64KB of intra-core SRAM as a thread buffer, which is configured as 16-zone, 4KB per zone. They are mapped by each thread memory to a fixed space of the local storage unit. For data threads, this 64KB thread buffer is the entire local storage unit, just like a typical SRAM. Since there are a maximum of 4 work items, for example, 4 threads, belonging to the same work group, they can be linearly addressed for thread processing. (See Figure 3)
  • the above 64KB thread buffer can be configured for up to 8 different locals A collection of storage units, one for each thread. (See Figure 4.)
  • the value of each local storage unit can be adjusted by software configuration.
  • each MVP thread has its own thread buffer pointed to as the local storage unit of the kernel itself.
  • the kernel can be thought of as a virtual DMA engine that instantly copies the contents of one thread's local storage unit to the local storage unit of the next thread.
  • the instantaneous copy stream data is achieved by the virtual DMA engine dynamically changing the virtual physical mapping in the activated thread.
  • Each thread has its own mapping.
  • the thread When the thread finishes executing, the thread will upgrade its own mapping and resume execution according to the following guidelines: If the local storage unit is enabled and valid (input data arrives), the thread is ready to start; After the thread completes, the conversion maps to the next local storage unit and marks the current mapped local storage unit valid (output data is prepared for the next thread); return to the first step.
  • thread 0 701, thread 1 702, thread 2 703, and thread 3 704 are respectively connected to storage areas (ie, 705, 706, 707, 708) mapped as their local storage units, in the above-mentioned storage areas. Interconnected by virtual DMA connections (709, 710, 711). It is worth mentioning that, in FIG. 8, the virtual DMA connection (709, 710, 711) does not exist on the hardware. In this embodiment, the data transfer in the storage area is implemented by changing the configuration of the thread. It makes it look like a connection from the outside, but there is actually no hardware connection. The same is true for the connection between Buf A and Buf H in Figure 10.
  • the operation of the above thread buffer mainly provides a channel data flow mode in MVP thread mode that does not implement any form of data copy and moves the local storage unit content of the earlier thread to the local storage unit of the later thread. Save time and electricity.
  • MVP has a separate 32-bi t data input and a separate 32-bi t data output connected to the system bus via an external port bus, so the MVP core can pass the load
  • the /s tore instruction or virtual DMA engine transfers data to/by the thread buffer. If a particular thread buffer is activated, it means that it is executed with the thread and can be used by the thread program. When an external access attempts to write, the access will be delayed by the out-of-step buffer.
  • the fetch time slot is passed in a loop in all running threads. For example, if there are 4 running threads, the same thread will get an instruction every 4 cycles; if there are 4 running threads, two of them are in priority mode, and the priority mode allows two outputs per cycle. The instructions, then, the above gap will be reduced to 2.
  • the value of the thread selection depends on the instruction fetching card of the loop, the mode of operation, and the state of the instruction buffer.
  • MVP is designed to support 4 threads running simultaneously, with a minimum of 2 threads running. For this reason, not every cycle is fetched, which gives enough time to set the next PC (program counter) pointing address for any kind of stream program that is unrestricted. Since the design point is 4 running threads, MVP has 4 cycles before the next thread fetches the same time, which provides 3 cycles for the branch resolution delay. Although addressing is rarely more than 3 cycles, MVP has a single-branch prediction strategy to reduce the 3-cycle branch resolution delay. It uses a static l'a- no-t-taken strategy. In the case of 4 running threads, this simple branch prediction strategy will not have the effect of causing possible errors, because the thread's PC performs branch resolution while fetching. This feature will then be determined by the design performance of its switch, without further settings to accommodate a different number of running threads.
  • MVP can always output 4 instructions per cycle (see output selection 806 in Figure 8).
  • the MVP will check eight instructions, two for each running thread (801, 802, 803, 804), which are passed to the risk check 805.
  • Output selection 806. Normally, if there is no mismatch, each running thread outputs an instruction. If there is a mismatch, for example, waiting for a long time to implement the result, or there are not enough running threads, then the two instructions that each thread is detected will detect any ILPs in the same thread, in order to hide the suspended thread extension. When the maximum dynamic balance is reached. In addition, in the priority mode, in order to achieve maximum load balancing, the higher priority thread 2 prepared instructions will be selected before the lower priority one.
  • MVP has 4 LAUs, 4 MACs, and up to 4 outputs per cycle, there is usually no resource risk unless a fixed function unit is involved. However, like a typical processor, its existence requires a data hazard that is cleared before the instruction can be output.
  • a long delay risk (l ong la tency produce-to -consume ), such as a generator command that takes up n cycles of a long delay to specify a functional unit (producer Ins t ruct i on ), or a load ins t ruc t ion that takes at least two cycles.
  • a functional unit producer Ins t ruct i on
  • a load ins t ruct ion that takes at least two cycles.
  • any consumer ins t ruct ion will mismatch to know that the adventure is cleared.
  • the risk check should be executed when the second output instruction is issued to confirm that no correlation will occur on the first instruction. Sex.
  • Latency hiding is a very important feature of MVP.
  • the request thread will be placed in a paused state with no instruction output until the long delay operation is completed.
  • one thread will be running while the other running thread will fill the idle time slots to take advantage of the extra hardware.
  • each specific functional unit is only associated with one thread, if at any time, there is more than one. The thread runs on the specified specific functional unit, without worrying about the lack of resources for a particular functional unit. At this time, the load instruction processing cannot be performed by an ALU.
  • the load instruction loses a buffer, the load instruction cannot occupy the channel of the specified ALU, because the ALU is a general execution unit and can be freely used by other threads.
  • the instruction cancellation method to release the ALU channel.
  • the long delay load instruction does not need to wait in the ALU's channel as the normal processor, otherwise it will resend the instruction when the thread is from the suspend state to the rerun.
  • MVP does not make any branch predictions, so no speculation is performed.
  • the only situation that causes the instruction to be canceled comes from the load delay pause.
  • WB Wi i te Back
  • MEM Da Ta memory acces s
  • the occupied load command is canceled, and all the MEM phase is raised to the IS phase, that is, the above MEM plus EX (Execut ion or addres s ca l culat ion), and subsequent instructions will be canceled.
  • a thread in the thread instruction buffer will enter a pause state until it is woken up by the wake-up signal. It means that the thread in the thread instruction buffer will not Don't wait until it finds the EME stage.
  • the operation of the instruction pointer needs to consider the possibility of canceling any kind of instruction.
  • 11 is an example in the embodiment, wherein four thread processing engines are respectively configured to perform four tasks, and local storage units 1-4 are respectively configured to operate by the thread processing engines 1-4, wherein each task is stored separately.
  • the local storage unit 5 stores the data of the task 2, so when the thread processing engine 2 processes the data of the local storage unit 2 and releases the local storage unit 2, through the management unit (ie, the thread management in FIG. 2 and The control unit 1;) configures the local storage unit 5 to the thread processing engine 2, and the thread processing engine 2 directly processes the data of the local storage unit 5, and does not need to copy the data in the local storage unit 5 to the local storage unit 2 .
  • the actions of other thread processing engines and other local storage units are roughly the same.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)
  • Advance Control (AREA)

Description

一种流数据处理方法及流处理器 技术领域
本发明涉及数据处理领域, 更具体地说, 涉及一种流数据处理方法及流处 理器。 背景技术
电子技术的发展对处理器提出越来越高的需求,通常集成电路工程师通过 增加时钟速度、 硬件资源以及特殊应用功能来为使用者提供更多或更好的性 能。 这种做法在一些应用场合, 特别是移动应用时并不是太恰当。 通常, 处理 器时钟的原始速度的提高并不能打破处理器由于访问储存器及外设速度的限 制而带来的瓶颈。 对于处理器而言, 增加硬件需要大量的该处理器在使用中的 更高的使用效率, 由于 ILP (Ins truct ion Level Para l lei i sm)的缺少, 上述 增加硬件通常是不可能的。而使用特殊的功能模块又会带来对于该处理器应用 范围的限定以及对产品上市时间的拖延。特别是对于现在使用广泛的流媒体而 言, 因其使用的范围较广, 尤其是在终端设备中, 大都用于采用电池供电的便 携式移动终端,其上述问题更加突出。单独提高硬件性能,例如增加时钟频率、 增加处理器中核的数量, 虽然可以在一定程度上解决问题,但是可能带来成本 及耗电量的增加, 其代价太大, 其性价比不高。 发明内容
本发明要解决的技术问题在于, 针对现有技术的上述成本及耗电量的增 加, 其代价太大, 性价比不高的缺陷, 提供一种性价比较高的流数据处理方法 及流处理器。
本发明解决其技术问题所采用的技术方案是: 构造一种流数据处理方法, 包括如下步骤:
A )得到数据中指示其所属任务的程序指针, 并依据所述程序指针 配置一个线程处理引擎; B ) 多个线程引擎同时处理所述任务不同时段的数据或多个线程引 擎同时处理所述不同任务的数据;
C )判断是否还有数据未处理, 如有, 返回步骤 A ); 如没有, 退出 本次数据处理。
在本发明所述的流数据处理方法中, 所述步骤 A )进一步包括:
A1 )将同一个任务中不同时段的数据或多个任务的数据分别分配到 不同的、 空闲的、通过虛拟直接存储器访问通道与所述线程处理引擎连接的本 地存储单元中。
在本发明所述的流数据处理方法中, 所述步驟 A )进一步包括:
A2 )将同一任务分配到所述多个线程处理引擎;
A3 ) 初始化每个线程处理引擎, 通过设置存储指针使其通过所述 虚拟直接存储器访问通道与一个本地存储单元连接;
A4 ) 所述多个线程处理引擎同时处理与其连接的本地存储单元中 在本发明所述的流数据处理方法中, 所述步骤 A )进一步包括如下步骤:
A2' )将多个任务分别分配到所述多个线程处理引擎; A3' )初始化每个线程处理引擎,通过设置存储指针使其通过所述 虚拟直接存储器访问通道与一个本地存储单元连接;
A4' )所述多个线程处理引擎同时处理与其连接的本地存储单元中 在本发明所述的流数据处理方法中, 所述步骤 C )进一步包括:
C1 )释放通过所述虚拟直接存储器访问通道与所述多线程处理引 擎连接的本地存储单元;
C 2 ) 判断未连接到多个线程处理引擎的本地存储单元中是否存在 未处理数据, 如有, 返回步骤 A ); 如无, 执行步骤 C3 );
C3 )释放所有资源, 结束本次数据处理。
在本发明所述的流数据处理方法中, 所述线程处理引擎的数量为 4个, 所 述本地存储单元的数量为 4个或 8个。
在本发明所述的流数据处理方法中,还包括如下步骤:接收到所述任务或 硬件发出的中断请求时, 中断分配给所述任务的线程处理引擎的处理,执行中 断处理程序。
在本发明所述的流数据处理方法中,还包括如下步骤: 当任意一个正在运 行的线程处理引擎需要等待较长时间,释放该线程处理引擎, 并将其配置到其 他正在运行的同一个或不同的任务中。
本发明还涉及一种用于处理流数据的处理器, 包括:
并行的多个线程处理引擎: 用于处理被分配给该线程处理引擎的 任务或线程;
管理单元:用于取得、判断和控制所述多个线程处理引擎的状态, 将处于等待队列中的线程或任务分配到所述多个线程处理引擎中;
本地存储区域: 用于存储所述线程处理引擎处理的数据, 配合所 述线程处理引擎完成数据处理。
在本发明所述的处理器中,还包括用于数据及线程緩冲、指令緩冲的内部 在本发明所述的处理器中,所述线程处理引擎包括算术逻辑运算单元以及 与所述算术逻辑运算单元对应的乘加器。
在本发明所述的处理器中,所述本地存储区域包括多个本地存储单元, 所 述本地存储单元在所述线程处理引擎工作时被配置对应于所述线程处理引擎。
在本发明所述的处理器中,所述线程处理引擎为 4个, 所述本地存储单元 为 8个,所述线程处理引擎工作时任意 4个本地存储单元被分别配置与所述线 程处理引擎——对应。
在本发明所述的处理器中, ,所述管理单元包括:
软件配置模块:用于依据起始程序指针为所述线程处理引擎设置 其任务;
任务初始化模块:用于设置所述任务的本地存储区域指针和全局 存储区域指针;
线程配置模块: 用于设置一个任务的优先级和运行模式; 中断处理模块: 用于处理所述流处理器接收到的外部和内部中 断; 暂停控制模块:用于控制所述线程处理引擎在处理任务时暂时停 止或重新开始。
在本发明所述的处理器中,所述管理单元还包括线程控制寄存器,所述线 程控制寄存器进一步包括:用于表明任务程序的起始物理地址的起始程序指针 用于表明线程全局存储区域的起始地址的全局存储区域起始基点寄存器以及 用于设置该线程优先级、 运行模式的线程配置寄存器。
在本发明所述的处理器中,所述管理单元通过改变所述线程处理引擎的配 置来改变所述线程处理引擎运行的任务;所述配置包括改变所述起始程序指针 寄存器的值或改变指向所述本地存储单元的本地存储单元指针。
在本发明所述的处理器中,所述中断处理模块包括中断处理单元,所述线 程中断单元在其中断寄存器控制位置位时控制所述内核或其他内核中的线程 中断。
实施本发明的一种流数据处理方法及流处理器, 具有以下有益效果: 由于 在一定程度上提高了硬件,使用多个并行的算术逻辑单元及其对应的核内存储 系统, 并且通过软件及线程管理单元对该处理器要处理的线程进行管理,使得 该多个算术逻辑单元在工作任务饱和时达到动态负载平衡,而在其任务不饱和 时关掉其中部分算术逻辑运算单元, 以节省其电能消耗。 因此, 可以花费较小 的代价来达到较高的性能, 其性价比较高。 附图说明
图 1是本发明流数据处理方法及流处理器实施例中方法流程图; 图 2是所述实施例中该处理器的结构示意图;
图 3是所述实施例中数据线程结构示意图;
图 4是所述实施例中任务线程结构示意图;
图 5是所述实施例中 MVP线程结构示意图;
图 6是所述实施例中 MVP线程结构示意图;
图 7是所述实施例中操作 MVP线程及操作模式结构示意图;
图 8是所述实施例中 MVP线程本地存储结构示意图; 图 9是所述实施例中指令输出结构示意图;
图 1 0是所述实施例中 MVP线程緩冲配置示意图;
图 1 1 是所述实施例中本地存储单元与线程处理引擎配置示意图。 具体实施方式
下面将结合附图对本发明实施例作进一步说明。
如图 1所示,在本发明一种流数据处理方法及流处理器实施例中,其流数 据处理方法包括如下步骤:
步骤 S11取得数据中的程序指针: 通常在处理器中,会出现同时需要处理 不同任务的情况, 而在流数据处理中, 这种情况也是常见的。 例如, 同时有两 路不同的流数据输入, 需要同时对其处理。 当然, 可以先处理其中一个, 再处 理另一个, 这样的方法会带来时间上的延迟。 而在对时间敏感的任务中, 需要 同时对上述流数据进行处理, 这一点也是本实施例的基础。 当然, 在另外一种 情况下,也可能只有一路数据输入,只需要一个处理程序即可,在这种情况下, 当然也可以只使用一个线程处理引擎来处理该路数据,但其所用时间显然比用 多个线程处理引擎同时处理该路数据要长。 在本实施例中,输入的数据在需要 处理时其中已经带有程序指针,这些程序指针表示了处理这些数据所需要的程 序所在。
步骤 S12依据程序指针, 不同任务分配到不同引擎或同一任务分别分配到 不同引擎: 在本步骤中, 分为两种情况, 一种情况是只有一个任务, 而在本实 施例中, 有四个线程处理引擎, 如果只用一个线程处理引擎处理这一个任务, 当然是可以的。 但是, 在这种情况下, 会延长处理时间, 并且, 剩下 3个线程 处理引擎未工作, 也是一种浪费。 因此, 在本步骤中, 将该一个任务同时配置 到 4个线程处理引擎但处理不同数据,使得这 4个线程处理引擎并行处理该任务 的不同时段数据, 以较快的时间完成该任务。 另一种情况是其数据分别属于多 个任务, 上述 4个线程处理引擎需要同时处理所述多个任务但处理不同数据。 当任务数多于上述引擎数时, 将 4个任务配置到上述 4个线程处理引擎,每个引 擎处理一个任务, 多出来的任务排队等候上述引擎处理完成当前任务后再配 置; 当任务数刚刚好是 4个时, 每个引擎配置一个; 当任务数小于 4个而大于 1 个时,可以平均分配上述线程处理引擎或每个任务分配一个线程处理引擎后再 将剩下的引擎分配执行任务优先级较高的任务。
步骤 S13数据存放于本地存储单元: 在本步驟中, 将当前任务的流数据按 照其任务或输入的时间段不同, 分别存放到所述本地存储单元。 当然, 流数据 是不断输入的,这些不断输入的数据在经过输入緩存之后被送入上述本地存储 单元, 至于存入每个本地存储单元的数据量, 可以是相同的, 也可以是依据流 数据的特点, 输入不同的数据量。 在本实施例中, 各个本地存储单元的大小相 同, 因此, 输入到其中的数据量也是相同的。 并且, 这些来自不同流数据的数 据存放在不同的本地存储单元时, 标记该本地存储单元, 使得可以识别出这些 本地存储单元内存储的数据来源。
步骤 S14初始化引擎, 分配本地存储单元: 在本步骤中, 开始初始化线程 处理引擎, 准备处理数据, 在对上述引擎初始化的过程中, 较重要的一点, 是 将上述已经存储有任务数据的本地存储单元配置到相应的线程处理引擎中,即 使一个本地存储单元通过虚拟存储通道与一个线程处理器连接。这些虚拟存储 通道在本实施例中是虚拟的 DMA ( Direct Memory Access, 直接存储器访问)连 接, 其并不存在相应的硬件。 上述相应的线程处理引擎也就是已经与本地存储 单元连接的、 取得任务执行代码的线程处理引擎。 值得一提的是, 在本实施例 中, 包括 8个本地存储单元, 除 4个被配置给线程处理单元外, 其余 4个組成 一个队列, 等待配置到线程处理引擎中, 这 4个等待的本地存储单元中存放有 来自输入緩存的数据, 当然, 如果输入緩存中已经没有数据, 上述本地存储单 元中也可以是空的, 不存放数据。 此外初始化引擎的任务还包括对其赋予本地 存储区域指针和全局存储区域指针, 以及设置其优先级和运行模式等等。
步骤 S15处理数据: 在本步骤中, 上述线程处理引擎处理其配置的本地存 储单元中的数据。 当然, 处理是在其任务的执行代码的控制下按照其要求执行 的。 值得一提的是, 在本步骤中, 各线程处理引擎处理的数据可能是同一个任 务中不同时段输入的数据, 也可能是不同任务同一时段输入的数据,还可能是 不同任务不同时段输入的数据。
步骤 S16释放通过虚拟存储通道与线程处理引擎连接的本地存储单元:当 一个线程处理引擎处理完配置(即通过上述虚拟 DMA通道连接 )的本地存储单 元中数据之后,其首先释放配置的本地存储单元并通过上述虚拟 DMA通道连接 将数据传送到下一个线程处理引擎, 该本地存储单元被释放后, 加入上述等待 配置到线程处理引擎的队列。与其他未分配到线程处理引擎的本地存储单元一 样, 输入緩存中的数据 (如杲有的话)将输入到其中。
步骤 S17所有任务处理完成? 在本步驟中, 判断是否所有任务都已完成, 如杲完成, 则执行步骤 S18) ; 如果没有完成, 则执行步骤 S19)。 一个较为 明显的判断标准,是判断在输入緩存以及未配置到线程处理器中的本地存储单 元是否有数据, 如果已经没有数据, 即可判断出任务是否处理完。
步骤 S18退出本次数据处理:在本步骤中 ,一个或多个任务已被处理完毕, 其对应的一个或多个本地存储单元已被释放, 在此, 释放该任务对应的一个或 多个线程处理引擎及其他资源, 退出该任务的本次数据处理。
步骤 S19任务已配置? 在本步骤中,如果有未处理完的任务, 而该任务又 已经配置到线程处理器中, 则返回执行步骤 S13) , 为该已配置任务的线程处 理器分配新的本地存储单元,再执行处理该本地存储单元的数据; 如果有未处 理的任务, 而该任务没有配置到线程处理引擎, 则返回执行步骤 S11 ) , 为该 任务配置线程处理引擎, 如果没有空闲的线程处理引擎, 则等待空闲的线程处 理引擎出现。 在其他实施例中, 如果任务已经配置, 但仍有空闲的线程处理引 擎, 也可以返回步骤 S11 ) , 再次为该任务配置线程处理引擎, 使其处理速度 加快。 而判断任务是否被配置, 仍然是使用其数据中的程序指针, 如果数据中 的程序指针已经被读出过且配置到该指针的线程处理引擎未退出,则可以认为 该任务已经被配置; 否则, 可以判断为该任务未被配置。
本发明还涉及一种用于处理流数据的处理器,如图 1所示,在本实施例中, 该处理器是一个并行多线程虚拟通道处理器(MVP, Multi-thread Virtual Pipelined stream processor) , 所述处理器包括线程管理及控制单元 1、 指 令取得单元 2、指令输出单元 3、算术逻辑单元 [3: 0]4、乘加器(Mult iply-Add unit) [3: 0] 5、 特定功能单元 6、 寄存器 7、 指令緩冲单元 8、 数据及线程緩 冲单元 9、 存储器直接读取单元 10、 系统总线接口 11 以及中断控制器 12; 其中, 线程管理及控制单元 1用于管理、 控制当前已准备好的线程、 正在运 行的线程等, 其分别与系统总线接口 11、 指令取得单元以及中断控制器 12 等单元连接; 指令取得单元 2在上述线程管理及控制单元 1的控制下, 通过 指令緩冲单元 8 及系统总线接口 11取得指令, 并在线程管理及控制单元 1 的控制下将取得指令输出到指令输出单元 3 , 同时, 上述指令取得单元 2还 与上述中断控制器 12连接, 在中断控制器 12有输出时接受其控制, 停止取 指令; 指令输出单元 3的输出通过并行的总线与上述算术逻辑单元 [3: 0] 4、 乘加器 [ 3: 0] 5以及特定功能单元 6连接, 将取得指令中的操作码及操作数分 别根据其需要传送到上述 4个算术逻辑单元、 4个乘加器以及特定功能单元 6 中; 而上述算术逻辑单元 [ 3: 0] 4、 乘加器 [3: 0] 5以及特定功能单元 6还分别 通过总线与寄存器 7连接, 便于将其中状态的变化情况及时写入上述寄存器 7; 寄存器 7又分别与上述算术逻辑单元 [ 3: 0] 4、 乘加器 [3: 0] 5 以及特定功 能单元 6连接(与上述连接不同), 便于将其中状态变化(不是由上述三个单 元引起的, 例如, 由软件直接写入的) 写入上述三个单元; 数据及线程緩冲 单元 9连接在上述系统总线接口 11上, 其通过上述系统总线接口 11取得数 据及指令, 并存储起来, 供其他单元(特别是取指单元 2读取), 数据及线程 緩冲单元 9还分别与存储器直接读取单元 10、算术逻辑单元 [3: 0] 4以及寄存 器 7连接。 在本实施例中, 一个线程处理引擎包括一个算术逻辑单元和一个 乘加器, 因此, 在本实施例中, 就包括了 4个在硬件上并行的线程处理引擎。
在本实施例中, 线程管理及控制单元 1进一步包括: 软件配置模块: 用于 依据起始程序指针为所述线程处理引擎设置其任务; 任务初始化模块: 用于设 置所述任务的本地存储区域指针和全局存储区域指针; 线程配置模块: 用于设 置一个任务的优先级和运行模式; 中断处理模块: 用于处理所述流处理器接收 到的外部和内部中断; 暂停控制模块: 用于控制所述线程处理引擎在处理任务 时暂时停止或重新开始; 以及结束模块, 该结束模块用于退出本次数据处理, 该模块运行命令 EXIT使得线程处理引擎退出数据处理。
在本实施例中, 上述 MVP 的实现通道包括 4 个 ALU (算术逻辑单元)、 4 个 MAC (乘加器, Mul t ip ly- Add uni t )、 以及一个 128X32- b i t 的寄存器, 此 外, 还包括一个 64KB的指令緩冲单元, 一个 32KB的数据緩冲单元,一个作为 线程緩冲器的 64KB的 SRAM, 以及一个线程管理单元。 MVP支持两种并行计算模式, 数据并行计算模式及任务并行计算模式。 在 处理数据并行计算模式时, MVP核在一个工作组 (work group ) 中能够最多处 理 4个工作项目(work i tem) , 这 4个工作项目被映射到 MVP核的 4个并行的 线程。 在处理任务并行计算模式时, MVP核能够最多处理 8个工作组, 每个工 作组包括一个工作项目。这 8个工作项目也被映射到 MVP核的 8个并行的线程, 从硬件的角度来看, 与数据并行模式没有不同。 更为重要的是, 为达到最大的 性价比, MVP核还包括一种专有的模式, 即 MVP线程模式, 在这种模式中, 可 以将最多 8个线程配置为 MVP线程模式,这 8个线程表现为专用芯片通道层次。 在上述 MVP模式中, 上述 8个线程都可以无中断地运用于不同的、用于流处理 或处理流数据的内核中。 典型地, 在多种流处理运用中, 上述 MVP模式具有更 高的性价比。
多线程及其运用是 MVP 与其他处理器不同的重点之一, 其可以较为明确 地达成一个最终的较佳解决方案。 在 MVP中, 多线程的目的如下: 提供任务并 行和数据并行处理模式, 并提供针对流通道设计的、 专有的功能并行模式; 在 MVP中, 为达到最大硬件资源利用而采用的负载平衡; 减少依赖于存储器、 外 设速度的延迟隐蔽能力。 为了发掘使用多线程的及其在性能上的先进性, MVP 去掉或减少过多的特殊硬件, 特别是为达到特殊应用而设置的硬件。对比单独 提升硬件性能, 例如升高 CPU的时钟速率, MVP具有更好的通用性及面对不同 运用时的灵活性。
在本实施例中, MVP支持 3中不同的并行线程模式, 包括数据并行线程模 式、 任务线程并行模式以及 MVP并行线程模式, 其中, 数据并行线程模式用于 处理通过同一个内核的不同的流数据, 例如 , 在 MVP内的同一个程序。 (参见 图 3 ), 数据在不同的时间到达, 其开始处理的时间也不同。 当这些线程运行 时, 即使处理他们的程序是同一个, 也处于不同的操作流程中。 由 MVP指令通 道的观点来看, 与操作不同的程序没有不同的地方, 例如, 不同的任务。 每个 被放到同一个线程的数据集将是一个自包含( s e l f- conta ined ) 的最小集合, 例如, 不需要与别的数据集进行通讯。 这就意味着数据线程不会被因与别的线 程通讯而中断。 每个数据线程表现为一个工作项目。 在图 3中, 包括对应于数 据 0到数据 3的 4个线程, 其分别是线程 0到线程 4 ( 201、 202、 203、 204 ), 超标量执行通道 206 , 线程緩冲单元 208 (即本地存储单元 ), 以及连接上述线 程(数据 ) 与超标量执行通道 206的总线 205, 连接上述超标量执行通道 206 与线程緩冲单元 208 (即本地存储单元) 的总线 206。 如上所述, 在数据并行 模式下, 上述 4个线程实际上是相同的, 其数据是该线程在不同时间的数据。 其实质是将不同时间输入的同一个程序的数据在同一个时间处理。在这种模式 下, 上述本地存储单元是作为一个整体参加上述处理的。
任务线程并发地运行在不同的内核上。参见图 4,在操作系统的观点看来, 他们表现为不同的程序或不同的功能。 为得到更高的灵活性,任务线程的特性 完全上升到软件分类。每个任务运行在不同的程序上。任务线程不会被因与别 的线程通讯而中断。 每个任务线程表现为具有一个工作项目的工作组。 在图 4 中, 包括与任务 0到任务 3对应的线程 0 301、 线程 1 302、 线程 2 303以及 线程 3 304 , 这些任务分别通过 4个并行 I/O线 305与超标量执行通道 306连 接,同时,上述超标量执行通道 306还通过存储总线 307与本地存储区域连接, 该本地存储区域此时被分为 4个部分(即 4个本地存储单元), 分别是用于存 储上述 4个线程( 301、 302、 303、 304 )所对应的数据的区域, 他们分别是对 应于线程 0的区域 308、 对应于线程 1的区域 309、 对应于线程 2的区域 310 以及对应于线程 3的区域 311。 上述每个线程( 301、 302、 303、 304 )分别在 其对应的区域( 308、 309、 310、 311 ) 中读取数据。
由专用集成电路的观点来看, MVP线程表现为不同的功能通道层面。 这也 是其设计点及关键特性。 MVP 线程的每个功能层面都类似运行中的不同的内 核, 正如任务线程一样。 MVP线程的最大的特点是能够依据其输入数据状态及 输出緩冲的能力自动激活或关闭其本身。 MVP线程的自动激活或关闭其本身的 能力使得这种线程能够从当前正在执行的通道中移开已经完成的线程以及释 放硬件资源用于其它以激活的线程。 这就提供了我们希望的负载平衡能力。 此 外, 还使得 MVP 线程可以激活比正在运行的线程更多的线程。 其支持最多 8 个已激活线程。 这 8个线程被动态管理, 最多 4个线程可以被运行, 而其他 4 个已激活线程则等待空闲的运行时段。 参见图 5、 图 6。 图 5示出了在 MVP模 式下线程与本地存储单元之间的关系, 其中, 线程 0 401、 线程 1 402、 线程 2 403和线程 3 404分别通过并行的 I /O连接线 405与超标量执行通道 406连 接, 同时, 这些线程(任务)还单独与本地存储单元中被划分到该线程的区域 ( 407、 408、 409、 41 0 )连接, 在这些区域之间, 通过虚拟的 DAM引擎连接, 这些虚拟的 DMA 引擎使得在需要的时候可以在上述被划分的区域之间快速转 移其中的数据; 此外, 这些被划分的区域分别与总线 411连接, 而该总线 41 1 还与上述超标量执行通道 406连接。图 6从另一个角度描述了在 MVP模式下的 线程情况。 在图 6中, 包括 4个正在运行的线程, 即运行线程 0 501、 运行线 程 1 502、 运行线程 2 503以及运行线程 3 504 , 这 4个线程分别在上述 4个 ALU上运行, 其分别通过并行的 I/O线连接在超标量执行通道 505上; 同时, 上述 4个正在运行的线程分别与准备完毕的线程队列 507连接 (实际上, 上述 4个运行线程就是由上述线程队列 507 中取出的), 由上面的描述可知, 上述 队列中排列有已经准备好但是尚未运行的线程, 这些线程最多可以有 8个, 当 然, 根据实际情况, 在其中可能也不足 8个; 其中, 这些准备好的线程可以是 同一个内核 (应用程序或任务, 图 6中的内核 1 508到内核 n 509 ) 的, 也可 以不是, 在极端的情况下, 这些线程可能是分别属于 8个不同的内核(应用程 序或任务)的, 当然, 实际情况可能是其他数字, 例如, 可能是属于 4个应用 程序, 而每个应用程序可能有两个线程被准备(在线程的优先权相同的情况 下)。该队列 507中的线程是通过图 6中的命令队列 509由外部的主机而来的。
此外, 如果一个特殊的耗时线程( t ime- consuming thread )在其循环緩 冲队列中后续一个线程有需求, 同一个线程(内核 )可以在多个运行时间段之 间被启动。 这种情况下, 该同一个内核可以一次启动更多 (的线程), 以加快 在循环緩冲器中后续的数据处理。
上述线程的不同的执行模式的组合增加了 4个线程同时运行的机会,这是 一个较为理想的状态, 其最大限度地增加指令输出速率。
通过传递最好的负载平衡、最小的 MVP与主机 CPU之间的交互及任何数据 在 MVP及主机存储器之间的移动, MVP线程是最具性价比的配置。
对于在多任务或 /和多数据室全面利用硬件计算资源, 负载平衡是有效的 方法, MVP有两个途径管理负载平衡:一是利用软件使用其能用的任何方式(典 型地, 通过公共的 IPA )配置 4个激活的线程(在任务线程模式和 MVP线程模 式, 8 个线程被激活); 另一个途径是使用硬件在运行时间动态地更新、 检查 及调整正在运行的线程。在软件配置途径中,正如我们所知的大多数运用特性, 初始时就需要针对特殊的运用设置其静态的任务划分;而第二种方式要求硬件 具有在不同的运行时间情况下动态调节的能力。上述两种方式使得 MVP在最大 硬件利用率的情况下达到最大的指令输出带宽。而延时隐藏( latency hiding) 则依赖于为保持 4输出速率的双输出能力。
MVP通过软件配置线程控制寄存器来配置 4个线程。每个线程包括一个寄 存器配置集合, 该集合包括 Starting—PC寄存器, Star ting— GM— base寄存器, Starting— LM_base寄存器以及 Thread— cfg寄存器。 其中, Star t ing_PC寄存 器用于表示一个任务程序的开始物理位置; Start ing_GM_base 寄存器用于表 示开始一个线程的线程本地存储单元的基点位置; Start ing_LM_base 寄存器 用于表示开始一个线程的线程全局存储器的基点位置 (仅限于 MVP线程); 而 Thread_cfg寄存器用于配置线程, 该寄存器又包括: Running Mode位, 其为 0时表示普通, 为 1时表示优先; Thread_Pri位: 设置线程的运行优先级( 0-7 级); Thread Types位: 其为 0时表示线程不可用, 为 1时表示是数据线程, 为 2时表示是任务线程, 为 3时表示是 MVP线程。
如果线程是数据线程或任务线程模式, 当线程被激活后, 线程将在下一个 周期进入运行状态; 如果线程是 MVP模式, 其线程緩冲及输入数据的有效性将 在每个周期被检查。一旦他们已经准备好, 该被激活的线程进入运行状态。一 个进入运行状态的线程将其 Start ing_PC寄存器中的值上载到运行通道程序 4 个程序计数器(PC) 中的一个, 于是该线程开始运行。 关于线程管理及配置参 见图 7。 在图 Ί 中, 线程运行 601, 读取或接受线程配置寄存器 602、 线程状 态寄存器 603以及 I/O緩冲状态寄存器 604的值,并将其转换为三个控制信号 输出。其中,这些控制信号包括: Launch-valid, Launch-tid ^ Launch infor。
当线程运行到 EXIT指令时, 该线程完成。
上述 3种线程都只能通过软件来关闭 ( disable )。 MVP线程能够在硬件结 束现行数据集时被置于等待状态,等待该线程的下一个数据集被准备或送入其 对应的本地存储区域。
在数据线程和任务线程之间 MVP没有任何内在的硬件连接,除了其共享的 存储器和有 API定义的隔层特征( bar r i er fea ture )。 这些线程中的每一个都 被作为完全独立的硬件来对待。 虽然如此, MVP提供线程间的中断特性, 于是, 每个线程可以被任何一个其他内核中断。 线程间中断 ( inter- thread interrupt )是软件中断, 其通过运行的线程写入软件中断寄存器特别地中断 一个指定内核, 包括其本身的内核。 在这样一个线程间中断之后, 被中断的内 核的终端程序将被调用。
正如一个传统的中断处理程序一样, 在 MVP中的中断,如果其被使能并配 置, 对于每一个被中断的线程, 将跳转到一个事先设置好的中断处理程序。 如 果软件使能, 每一个 MVP将响应外部中断。 中断控制器处理所有的中断。
对于 MVP线程而言, 所有的线程被视为一个硬件的专用集成电路通道, 于 是,每个中断寄存器将用于调整单个的线程的睡眠和唤醒。 线程緩冲器将作为 一个线程间的数据通道。 利用软件来划分 MVP线程的规则, 类似多处理器在任 务并行计算模式下的特性, 是任何通过所有线程的数据流都是单向的。 以避免 任何线程之间互锁的机会。这就意味着具有数据前向或后向交换的功能都被作 为一个内核保持在一个单项任务中。 因此, 当软件初始化配置后, 在运行时间 内线程间的通讯将固有地通过虚拟 DMA通道并由硬件自动处理。 于是, 该通讯 变得对软件透明并不会非必要地激活中断处理程序。 参见图 10 , 图 10中示出 了 8个内核(应用程序或任务, K1到 K8 )及其对应的緩冲区域( Buf A到 Buf H ) ,其中, 上述緩冲区域之间通过虚拟 DMA通道连接, 用于数据的快速拷贝。
MVP有 64KB的核内 SRAM作为线程緩冲器, 其被配置为 16区, 每区 4KB。 他们由每一个线程存储器映射到本地存储单元的一个固定空间。 对于数据线 程, 这 64KB的线程緩冲器是整个的本地存储单元, 就像一个典型的 SRAM。 由 于最大有 4个工作项目, 例如, 4个线程, 属于同一个工作组, 对于线程处理, 其可以被线性寻址。 (参见图 3 )
对于任务线程, 上述 64KB线程緩冲器可以被配置为最多 8个不同的本地 存储单元集合, 每个对应一个线程。 (参见图 4 )每个本地存储单元的数值可 以通过软件配置来调节。
对于 MVP线程模式, 该 64KB的线程緩冲器的配置方式只有如图 8所示的 一种。 正如任务线程模式, 每个 MVP线程具有其指向的、 作为该内核本身的本 地存储单元的线程緩沖区, 在如图 8所示 4个线程被配置的情况下,每个线程 有 64KB/4=16KB 的本地存储单元。 此外, 该内核可以被视为一个虚拟的 DMA 引擎,该引擎能瞬间整体拷贝一个线程的本地存储单元内容到下一个线程的本 地存储单元。该瞬间拷贝流数据通过虚拟 DMA引擎在被激活线程中动态改变虚 拟的物理映射而达到。每个线程具有其自身的映射而当该线程执行完毕时, 线 程将升级其自身的映射并依照下述准则重新开始执行:如果本地存储单元使能 并有效(输入数据到达), 线程准备启动; 在线程完成、 转换映射到下一个本 地存储单元并标记现行映射的本地存储单元有效 (输出数据准备为下一个线 程); 返回第一步。
在图 8中, 线程 0 701、 线程 1 702、 线程 2 703以及线程 3 704分别与 被映射作为其本地存储单元的存储区域(即 705、 706、 707、 708 )连接, 在 上述这些存储区域之间, 通过虚拟 DMA连接( 709、 710、 711 )连接。 值得一 提的是, 在图 8中, 该虚拟 DMA连接( 709、 710、 711 ) 在硬件上不存在的, 在本实施例中, 通过改变线程的配置而实现上述存储区域中的数据转移,使得 其从外面看起来好像存在连接一样, 但实际上并不存在硬件的连接。 图 10中 的 Buf A到 Buf H之间的连接也是如此。
注意当线程已经准备好启动时,如果有其他准备好的线程, 则可能仍未启 动, 特别是在多于 4个激活线程的情况下。
上述线程緩冲器的操作主要在 MVP 线程模式下提供一种不实施任何形式 的数据拷贝而将较早线程的本地存储单元内容搬移到较晚线程的本地存储单 元中的通道数据流模式, 以节省时间和电力。
对于线程緩冲器的输入和输出流数据, MVP具有一个单独的 32-bi t数据 输入和一个单独的 32-bi t数据输出通过外»口总线连接到系统总线,于是, MVP核能够通过 load/ s tore指令或虚拟 DMA引擎传输数据到 /由线程緩冲器。 如果一个特定的线程緩沖区被激活,意味着其与线程一起被执行且可以被 线程程序使用。 当一个外部访问试图写入时, 该访问将会被失步緩冲延迟。
每个周期, 对于单个线程而言, 有 4条指令被取出。 在普通模式下, 该取 指时隙以循环的方式在所有正在运行的线程中传递。例如, 如果有 4个正在运 行的线程, 同一个线程将每隔 4个周期取得一次指令; 如果有 4个正在运行的 线程, 其中有两个处于优先模式, 而该优先模式允许每周期输出两条指令, 那 么, 上述间隙将减少到 2。 于是, 线程的取值选择取决于循环的取指令牌、 运 行模式以及指令緩冲器的状态。
MVP被设计为支持 4个线程同时运行, 最少线程运行的情况是 2个线程。 为此, 并不是每个周期都取指, 这给出足够的时间为不受限制的任何种类的流 程序建立下一个 PC (程序计数器)指向地址。 由于设计点是 4个运行的线程, MVP在同一个线程下一次取指之前有 4个周期, 这为支路解析延迟提供了 3个 周期。 虽然, 寻址很少会超过 3个周期, MVP具有筒单支路预测策略用来减少 3周期的支路解析延迟。 其采用静态的不采用 (a lways-no t-taken )策略。 在 4个运行线程的情况下, 该简单的支路预测策略将不会带来导致可能错误的效 果, 因为线程的 PC在取指的同时就进行支路解析。 于是该特性将由设计性能 决定其开关, 不需要进一步的设定来适应不同的数量的正在运行的线程。
如图 9所示, MVP在每个周期内总能输出 4条指令(见图 8中的输出选择 806,)是一个重点。 为从线程指令緩冲器中找出 4条准备好的指令, MVP将检 查 8条指令, 每个正在运行的线程( 801、 802、 803、 804 ) 两条, 这些指令通 过冒险检查 805传送给输出选择 806。 通常情况下, 如果不存在失配, 每个正 在运行的线程输出一条指令。 如果存在失配, 例如, 长时间等待实施结果, 或 者没有足够的正在运行的线程,于是这两条每个线程被检测的指令将探测同一 个线程中的任何 ILPs , 以便于隐藏暂停的线程延时, 达到最大的动态平衡。 此外在优先模式下, 为了达到最大的负载平衡, 较高优先级线程 2条已准备指 令将先于较低优先级的一个被选择。这将有利于较好地利用较高优先级线程的 任意 ILPs , 这将缩短更多时间敏感任务的操作时间, 以及增加能够被用于任 何线程模式的能力。 由于 MVP有 4个 LAU、 4个 MAC,以及最多每周期 4个输出, 通常没有资源 冒险, 除非涉及固定功能单元。 然而, 和通常的处理器类似, 其存在需要在指 令能够输出前被清除的数据冒险。在任意两个不同周期中输出的指令之间, 其 可能具有长延时冒险 ( l ong la tency produce-to -consume ), 例如占用 n个周 期的长延时指定功能单元的产生者指令( producer ins t ruct i on ), 或一个至 少占用两个周期的负载指令( load ins t ruc t ion )。 在这种情况下, 任何消费 者指令 ( consumer ins t ruct ion )将失配知道该冒险被清除。 如果为了负载平 衡, 需要在一个周期内发出多于一个的指令, 或者为了延时隐藏的理由, 在第 二输出指令发出时冒险检查应该被执行,以确认在第一个指令上不会产生相关 性。
延时隐藏(latency hiding)是 MVP非常重要的特性。 在 MVP指令实施通道 中, 有两种长延时的情况: 一个是特定功能单元另一个是访问外接存储器或 10。 在任何一种情况中, 该请求线程将被置于暂停状态, 没有指令输出直到该 长延时操作被完成。在此期间, 将少一个线程在运行而其他正在运行的线程将 填充空闲的时隙以利用额外的硬件,现假设每个特定功能单元仅与一个线程联 合, 如果任何时候, 有多于 1个的线程在指定的特定功能单元运行, 不用担心 特定功能单元资源的缺乏。 此时不能由一个 ALU去实施负载指令处理, 如果负 载指令失去一个緩冲, 于是负载指令就不能占用指定 ALU 的通道, 因为 ALU 是通用执行单元, 可以被其他线程自由使用。 于是, 对于长延时负载访问, 我 们使用指令取消的办法来释放 ALU的通道。长延时负载指令不需要和通常的处 理器一样在 ALU的通道中等待,反之, 其将在该线程从暂停状态到再次运行时 再发一次该指令。
如上所述, MVP不做任何支路预测, 因此也没有执行推测。 于是, 唯一导 致指令取消的情形来自于负载延迟暂停, 对于任何已知的緩冲丢失, 在 MVP 的指令提交阶段, 一个指令在当然可以完成的 WB ( Wr i te Back )阶段, 为 MEM ( Da ta memory acces s ) 阶段。 如果緩冲丢失已经发生, 占用的负载指令取 消, 于是所有的由 MEM阶段上升到 I S阶段,即上述 MEM加上 EX (Execut ion or addres s ca l culat ion),其后续指令也将会取消。 在线程指令緩冲中的线程将 进入暂停状态直到其被唤醒信号唤醒。其意味着在线程指令緩冲器的线程将不 得不等待, 直到其查找到 EME阶段。 同时, 指令指针的操作需要考虑任意一种 指令取消的可能。
图 11是本实施例中的一个例子, 其中 4个线程处理引擎分别被配置执行 4个任务, 本地存储单元 1-4分别被配置到上述线程处理引擎 1-4运作, 其中 分别存储各任务的数据, 此外, 本地存储单元 5存储的是任务 2的数据, 于是 当线程处理引擎 2处理完本地存储单元 2的数据并释放本地存储单元 2时,通 过管理单元 (即图 2 中的线程管理及控制单元 1;), 将本地存储单元 5配置到 线程处理引擎 2 , 该线程处理引擎 2直接处理本地存储单元 5的数据, 不需要 再将本地存储单元 5中的数据拷贝到本地存储单元 2中。这样就节省了时间及 拷贝时所用的电量。 具有较高的性价比。 当然, 其他的线程处理引擎及其他的 本地存储单元的动作也是大致相同的。
以上所述实施例仅表达了本发明的几种实施方式, 其描述较为具体和详 细, 但并不能因此而理解为对本发明专利范围的限制。 应当指出的是, 对于本 领域的普通技术人员来说, 在不脱离本发明构思的前提下,还可以做出若干变 形和改进, 这些都属于本发明的保护范围。 因此, 本发明专利的保护范围应以 所附权利要求为准。

Claims

权 利 要 求 书
1、 一种流数据处理方法, 其特征在于, 包括如下步骤:
A )得到数据中指示其所属任务的程序指针, 并依据所述程序指针 配置一个线程处理引擎;
B ) 多个线程引擎同时处理所述任务不同时段的数据或多个线程引 擎同时处理所述不同任务的数据;
C )判断是否还有数据未处理, 如有, 返回步骤 A ); 如没有, 退出 本次数据处理。
2、 根据权利要求 1所述的流数据处理方法, 其特征在于, 所述步骤 A ) 进一步包括:
A1 )将同一个任务中不同时段的数据或多个任务的数据分别分配到 不同的、 空闲的、通过虚拟直接存储器访问通道与所述线程处理引擎连接的本 地存储单元中。
3、 根据权利要求 1所述的流数据处理方法, 其特征在于, 所述步骤 A ) 进一步包括:
A2 )将同一任务分配到所述多个线程处理引擎;
A3 ) 初始化每个线程处理引擎, 通过设置存储指针使其通过所述 虚拟直接存储器访问通道与一个本地存储单元连接;
A4 ) 所述多个线程处理引擎同时处理与其连接的本地存储单元中 数据。
4、 根据权利要求 1所述的流数据处理方法, 其特征在于, 所述步骤 A ) 进一步包括如下步骤:
A2' )将多个任务分别分配到所述多个线程处理引擎; A3' )初始化每个线程处理引擎,通过设置存储指针使其通过所述 虛拟直接存储器访问通道与一个本地存储单元连接;
A4' )所述多个线程处理引擎同时处理与其连接的本地存储单元中 数据。
5、 根据权利要求 3或 4所述的流数据处理方法, 其特征在于, 所述步骤 C )进一步包括:
CI )释放通过所述虛拟直接存储器访问通道与所述多线程处理引 擎连接的本地存储单元;
C 2 ) 判断未连接到多个线程处理引擎的本地存储单元中是否存在 未处理数据, 如有, 返回步骤 A ); 如无, 执行步骤 C3 );
C3 )释放所有资源, 结束本次数据处理。
6、 根据权利要求 5所述的流数据处理方法, 其特征在于, 所述线程处理 引擎的数量为 4个, 所述本地存储单元的数量为 4个或 8个。
7、 根据权利要求 3或 4所述的流数据处理方法, 其特征在于, 还包括如 下步骤: 接收到所述任务或硬件发出的中断请求时, 中断分配给所述任务的线 程处理引擎的处理, 执行中断处理程序。
8、 根据权利要求 3或 4所述的流数据处理方法, 其特征在于, 还包括如 下步骤: 当任意一个正在运行的线程处理引擎需要等待较长时间,释放该线程 处理引擎, 并将其配置到其他正在运行的同一个或不同的任务中。
9、 一种流数据处理器, 其特征在于, 包括:
并行的多个线程处理引擎: 用于处理被分配给该线程处理引擎的 任务或线程;
管理单元:用于取得、判断和控制所述多个线程处理引擎的状态, 将处于等待队列中的线程或任务分配到所述多个线程处理引擎中;
本地存储区域: 用于存储所述线程处理引擎处理的数据, 配合所 述线程处理引擎完成数据处理。
10、根据权利要求 9所述的流数据处理器, 其特征在于, 还包括用于数据 及线程緩冲、指令緩冲的内部存储系统以及用于存储所述并行处理器的各种状 态的寄存器。
11、根据权利要求 9所述的流数据处理器, 其特征在于, 所述线程处理引 擎包括算术逻辑运算单元以及与所述算术逻辑运算单元对应的乘加器。
12、根据权利要求 9所述的流数据处理器, 其特征在于, 所述本地存储区 域包括多个本地存储单元,所述本地存储单元在所述线程处理引擎工作时被配 置对应于所述线程处理引擎。
1 3、 根据权利要求 1 2所述的流数据处理器, 其特征在于, 所述线程处理 引擎为 4个, 所述本地存储单元为 8个, 所述线程处理引擎工作时任意 4个本 地存储单元被分别配置与所述线程处理引擎——对应。
14、 根据权利要求 9-12任意一项所述的流处理器, 其特征在于, 所述管 理单元包括:
软件配置模块:用于依据起始程序指针为所述线程处理引擎设置 其任务;
任务初始化模块:用于设置所述任务的本地存储区域指针和全局 存储区域指针;
线程配置模块: 用于设置一个任务的优先级和运行模式; 中断处理模块: 用于处理所述流处理器接收到的外部和内部中 断;
暂停控制模块:用于控制所述线程处理引擎在处理任务时暂时停 止或重新开始。
15、 根据权利要求 14所述的流数据处理器, 其特征在于, 所述管理单元 还包括线程控制寄存器, 所述线程控制寄存器进一步包括: 用于表明任务程序 的起始物理地址的起始程序指针寄存器,用于表明本地存储区域的起始地址的 本地存储区域起始基点寄存器,用于表明线程全局存储区域的起始地址的全局 存储区域起始基点寄存器以及用于设置该线程优先级、运行模式的线程配置寄 存器。
16、 根据权利要求 1 5所述的流数据处理器, 其特征在于, 所述管理单元 通过改变所述线程处理引擎的配置来改变所述线程处理引擎运行的任务;所述 配置包括改变所述起始程序指针寄存器的值或改变指向所述本地存储单元的 本地存储单元指针。
17、 根据权利要求 1 6所述的流数据处理器, 其特征在于, 所述中断处理 模块包括中断处理单元,所述线程中断单元在其中断寄存器控制位置位时控制 所述内核或其他内核中的线程中断。
PCT/CN2009/076108 2009-11-27 2009-12-28 一种流数据处理方法及流处理器 WO2011063574A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US13/395,502 US20120233616A1 (en) 2009-11-27 2009-12-28 Stream data processing method and stream processor

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200910188409.X 2009-11-27
CN200910188409XA CN101739242B (zh) 2009-11-27 2009-11-27 一种流数据处理方法及流处理器

Publications (1)

Publication Number Publication Date
WO2011063574A1 true WO2011063574A1 (zh) 2011-06-03

Family

ID=42462769

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/076108 WO2011063574A1 (zh) 2009-11-27 2009-12-28 一种流数据处理方法及流处理器

Country Status (3)

Country Link
US (1) US20120233616A1 (zh)
CN (1) CN101739242B (zh)
WO (1) WO2011063574A1 (zh)

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102147722B (zh) * 2011-04-08 2016-01-20 深圳中微电科技有限公司 实现中央处理器和图形处理器功能的多线程处理器及方法
CN102200906B (zh) * 2011-05-25 2013-12-25 上海理工大学 大规模并发数据流处理系统及其处理方法
CN102722417B (zh) * 2012-06-07 2015-04-15 腾讯科技(深圳)有限公司 一种扫描任务的分配方法和装置
KR20150019349A (ko) * 2013-08-13 2015-02-25 삼성전자주식회사 다중 쓰레드 실행 프로세서 및 이의 동작 방법
CN103955408B (zh) * 2014-04-24 2018-11-16 深圳中微电科技有限公司 Mvp处理器中有dma参与的线程管理方法及装置
CN105426163A (zh) * 2015-10-27 2016-03-23 浪潮(北京)电子信息产业有限公司 一种基于mic协处理器的单数据流分位数处理方法
WO2017086826A1 (en) * 2015-11-18 2017-05-26 Huawei Technologies Co., Ltd. Data processing device for providing access to a data stream
US10419501B2 (en) * 2015-12-03 2019-09-17 Futurewei Technologies, Inc. Data streaming unit and method for operating the data streaming unit
CN113504984A (zh) * 2016-07-29 2021-10-15 华为技术有限公司 一种任务处理方法以及网络设备
CN108287759B (zh) * 2017-01-10 2021-07-09 阿里巴巴集团控股有限公司 处理数据过程中的调度方法、装置和系统
CN108364251B (zh) * 2017-01-26 2021-06-25 超威半导体公司 具有通用寄存器资源管理的矢量处理器
CN107092556B (zh) * 2017-03-09 2020-05-08 北京星选科技有限公司 测试方法、装置及设备
CN107515795A (zh) * 2017-09-08 2017-12-26 北京京东尚科信息技术有限公司 基于队列的多任务并行数据处理方法、装置、介质和设备
CN109508229A (zh) * 2018-09-19 2019-03-22 安徽慧视金瞳科技有限公司 一种多点同时绘制的匹配方法
KR20220139304A (ko) * 2019-12-30 2022-10-14 스타 알리 인터내셔널 리미티드 구성 가능한 병렬 계산을 위한 프로세서
CN111402906B (zh) * 2020-03-06 2024-05-14 深圳前海微众银行股份有限公司 语音解码方法、装置、引擎及存储介质
CN111381887B (zh) * 2020-03-18 2023-05-09 深圳中微电科技有限公司 在mvp处理器中进行图像运动补偿的方法、装置及处理器
CN111767129B (zh) * 2020-06-30 2021-10-29 深圳职业技术学院 数据流任务处理装置及方法
CN112732416B (zh) * 2021-01-18 2024-03-26 深圳中微电科技有限公司 有效消除数据访问延迟的并行数据处理方法及并行处理器
CN114218152B (zh) * 2021-12-06 2023-08-15 海飞科(南京)信息技术有限公司 流处理方法、处理电路和电子设备
CN116126526B (zh) * 2022-12-29 2024-04-19 苏州华太电子技术股份有限公司 计算超越函数的方法、装置、电子设备和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1708747A (zh) * 2002-10-11 2005-12-14 沙桥技术有限公司 用于多线程处理器中基于线程的存储器存取的方法和装置
CN101097514A (zh) * 2006-06-27 2008-01-02 国际商业机器公司 启用同时多线程(smt)的系统及其管理方法
US20080276261A1 (en) * 2007-05-03 2008-11-06 Aaftab Munshi Data parallel computing on multiple processors
CN101344842A (zh) * 2007-07-10 2009-01-14 北京简约纳电子有限公司 多线程处理器及其多线程处理方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7233335B2 (en) * 2003-04-21 2007-06-19 Nividia Corporation System and method for reserving and managing memory spaces in a memory resource
US7590830B2 (en) * 2004-05-28 2009-09-15 Sun Microsystems, Inc. Method and structure for concurrent branch prediction in a processor
US7734359B2 (en) * 2005-11-14 2010-06-08 General Electric Company Systems and methods for capturing data within an intelligent electronic device
US7750915B1 (en) * 2005-12-19 2010-07-06 Nvidia Corporation Concurrent access of data elements stored across multiple banks in a shared memory resource
US8656145B2 (en) * 2008-09-19 2014-02-18 Qualcomm Incorporated Methods and systems for allocating interrupts in a multithreaded processor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1708747A (zh) * 2002-10-11 2005-12-14 沙桥技术有限公司 用于多线程处理器中基于线程的存储器存取的方法和装置
CN101097514A (zh) * 2006-06-27 2008-01-02 国际商业机器公司 启用同时多线程(smt)的系统及其管理方法
US20080276261A1 (en) * 2007-05-03 2008-11-06 Aaftab Munshi Data parallel computing on multiple processors
CN101344842A (zh) * 2007-07-10 2009-01-14 北京简约纳电子有限公司 多线程处理器及其多线程处理方法

Also Published As

Publication number Publication date
CN101739242A (zh) 2010-06-16
US20120233616A1 (en) 2012-09-13
CN101739242B (zh) 2013-07-31

Similar Documents

Publication Publication Date Title
WO2011063574A1 (zh) 一种流数据处理方法及流处理器
WO2011032327A1 (zh) 并行处理器及其线程处理方法
US10949249B2 (en) Task processor
US10268609B2 (en) Resource management in a multicore architecture
US7925869B2 (en) Instruction-level multithreading according to a predetermined fixed schedule in an embedded processor using zero-time context switching
EP1730628B1 (en) Resource management in a multicore architecture
US8996761B2 (en) Virtual queue processing circuit and task processor
CN101681262B (zh) 用于执行线程的处理器及方法
WO2008023426A1 (fr) Dispositif de traitement de tâche
EP3186704B1 (en) Multiple clustered very long instruction word processing core
WO2008023427A1 (fr) Dispositif de traitement de tâche
US8909892B2 (en) Method, apparatus, and computer program product for fast context switching of application specific processors
US10771554B2 (en) Cloud scaling with non-blocking non-spinning cross-domain event synchronization and data communication
US10496409B2 (en) Method and system for managing control of instruction and process execution in a programmable computing system
JP2010277177A (ja) マルチオペレーティングシステム制御方法及びプロセッサシステム
US9946665B2 (en) Fetch less instruction processing (FLIP) computer architecture for central processing units (CPU)

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09851587

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 13395502

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09851587

Country of ref document: EP

Kind code of ref document: A1