Baseband software task processing method and device, computer equipment and storage medium
By splitting baseband software tasks on the DSP chip and managing processing threads, reducing interaction with the platform layer, the problem of large overhead of embedded operating systems is solved, and the performance and system stability of DSP chips are improved.
Patent Information
- Application Number
- CN202411268293.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-27
AI Technical Summary
The embedded operating system on existing digital signal processing (DSP) chips has a large overhead, affecting the overall system performance, and is obviously performed in extreme scenarios.
The baseband software task is split into multiple processing tasks through the transit processing verification entity, and it is sent to the baseband processing cluster entity using hardware or software queues, creating and managing processing threads, reducing interaction with the platform layer, and reducing system overhead.
It effectively reduces the overhead of embedded operating systems, improves the overall performance of DSP chips, reduces interaction with the platform layer, and simplifies the positioning of system problems.
Smart Images

Figure CN119201388A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular, to a baseband software task processing method, apparatus, computer equipment and storage medium. Background Art
[0002] Currently, the processing of baseband software tasks on DSP (Digital Signal Process) chips is mostly based on the embedded operating system of the DSP chip. The embedded operating system needs to use interrupts, semaphore identifiers, mailboxes, etc. to implement the processing of baseband software tasks and inter-core communication. In the process of processing baseband software tasks through the embedded operating system, the overhead of the embedded operating system is an inevitable part of the overall system overhead of the DSP chip. This overhead is likely to affect the performance of the overall DSP chip system in extreme scenarios.
[0003] Therefore, there is an urgent need for a method that can reduce the overhead of embedded operating systems. Summary of the invention
[0004] The embodiments of the present application provide a baseband software task processing method, apparatus, computer equipment and storage medium.
[0005] In a first aspect of an embodiment of the present application, a baseband software task processing method is provided, which is applied to a baseband software processing system, wherein the baseband software processing system includes: a transit processing core entity, a plurality of task hardware queue entities, and a plurality of baseband processing cluster entities that are communicatively connected to each other, and the method includes:
[0006] The transit processing core entity splits the baseband software task to be processed into a plurality of baseband processing tasks, and sends the baseband processing tasks to the baseband processing cluster entity through the task hardware queue entity;
[0007] The baseband processing core in the baseband processing cluster entity creates a corresponding number of baseband processing threads according to the received baseband processing tasks;
[0008] The baseband processing core enqueues the baseband processing thread into a pre-built thread queue according to the deployment information of the baseband processing thread;
[0009] The baseband processing core queries each of the thread queues in an idle state according to a pre-configured priority order, removes unprocessed threads in each of the thread queues from the queue and executes them.
[0010] In an optional embodiment of the present application, the baseband software processing system further includes a protocol stack entity communicatively connected to the transit processing core entity; correspondingly, the transit processing core entity splits the baseband software task to be processed into multiple baseband processing tasks, including:
[0011] The protocol stack entity sends a protocol stack scheduling message to the transit processing core entity, and the transit processing core entity splits the to-be-processed baseband software task into a plurality of the baseband processing tasks according to the type of the protocol stack scheduling message.
[0012] In an optional embodiment of the present application, the type of the protocol stack scheduling message includes: at least one of an uplink and downlink service channel of a baseband physical layer and a control channel of a baseband physical layer.
[0013] In an optional embodiment of the present application, the baseband processing thread includes: at least one of an initialization function, a main processing function, a thread pre-state, and thread stack information.
[0014] In an optional embodiment of the present application, each of the baseband processing cluster entities includes a plurality of the baseband processing cores; each of the baseband processing cores includes at least one private thread queue and one shared thread queue; wherein the private thread queue includes threads for acquiring and executing the baseband processing core in which it is located; and the shared thread queue includes threads for acquiring and executing other baseband processing cores outside the baseband processing cluster entity in which it is located;
[0015] Correspondingly, the baseband processing core queues the baseband processing thread into a pre-built thread queue according to the deployment information of the baseband processing thread, including:
[0016] The baseband processing core queues the baseband processing thread into the pre-built private thread queue or the shared thread queue according to the deployment information of the baseband processing thread.
[0017] In an optional embodiment of the present application, the baseband processing core queues the baseband processing thread into the pre-built private thread queue or the shared thread queue according to the deployment information of the baseband processing thread, including:
[0018] If, when the baseband processing thread is executed, the corresponding data storage and resources are exclusive to a specific baseband processing core, the baseband processing thread is queued to the private thread queue;
[0019] If, when the baseband processing thread is executed, the corresponding data storage and resources are not exclusive to the specific baseband processing core, the baseband processing thread is queued into the shared thread queue.
[0020] In an optional embodiment of the present application, if the unprocessed thread fails to be removed from the queue, the method further includes:
[0021] The unprocessed thread is requeued to the shared thread queue in the baseband processing core where it was originally located.
[0022] In an optional embodiment of the present application, the baseband software task processing method further includes:
[0023] The baseband processing core queries each of the thread queues according to a preconfigured priority order, and if there is no unprocessed thread in each of the thread queues, the state of the baseband processing core is marked as an idle state.
[0024] In an optional embodiment of the present application, removing the unprocessed threads in each of the thread queues from the queue and executing them includes:
[0025] Determine the previous execution information of the previous program, and store the previous execution information at the top of the stack space; wherein the previous execution information includes: at least one of a register, an execution state, and a return address;
[0026] The unprocessed thread is executed based on the current program.
[0027] In an optional embodiment of the present application, after executing the unprocessed thread based on the current program, the method further includes:
[0028] If the unprocessed program is executed to completion, obtaining the previous execution information from the top of the stack space;
[0029] The previous program is restored and returned to according to the previous execution information.
[0030] According to a second aspect of an embodiment of the present application, a baseband software task processing device is provided, which is applied to a baseband software processing system, wherein the baseband software processing system includes: a transit processing core entity, a plurality of task hardware queue entities, and a plurality of baseband processing cluster entities that are communicatively connected to each other, and the baseband software task processing device includes:
[0031] A distribution module, used for the transit processing core entity to split the baseband software task to be processed into multiple baseband processing tasks, and send the baseband processing tasks to the baseband processing cluster entity through the task hardware queue entity;
[0032] A thread creation module, used for the baseband processing core in the baseband processing cluster entity to create a corresponding number of baseband processing threads according to the received baseband processing tasks;
[0033] An enqueue module, configured for the baseband processing core to enqueue the baseband processing thread into a pre-built thread queue according to the deployment information of the baseband processing thread;
[0034] The execution module is used for the baseband processing core to query each of the thread queues according to a pre-configured priority order in an idle state, and to remove unprocessed threads in each of the thread queues from the queue and execute them.
[0035] According to a third aspect of an embodiment of the present application, a computer device is provided, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0036] A fourth aspect of the embodiments of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any of the above methods when executed by a processor.
[0037] On the one hand, in the traditional architecture, the stack of each thread is managed by the driver platform layer, and the baseband software needs to notify the platform layer of the stack space size of each thread, and then the platform layer allocates stack space to each thread and maintains the creation and release of stack space. However, the present application is configured with a baseband software processing system, which splits the baseband tasks to be processed through the transit processing core entity, and the baseband processing core in the baseband processing cluster entity creates a corresponding number of baseband processing threads according to the received baseband processing tasks. The baseband processing core queues the baseband processing threads into a pre-built thread queue according to the deployment information of the baseband processing threads. The architecture of the baseband software processing system can realize the interaction between the entity modules without notifying the platform layer, thereby reducing the interaction with the platform layer and reducing the system overhead;
[0038] Secondly, the embodiments of the present application mainly utilize hardware queues or software queues to implement the processing of baseband processing tasks, and decompose the baseband processing tasks into multiple threads. Task preemption, task execution, task suspension and task recovery can be performed on any core in the multiple cores within the baseband chip. The definition and maintenance of the stack of the baseband processing thread are the responsibility of the baseband software, which reduces the interaction with the platform layer, reduces system overhead, and is also conducive to the location of subsequent system problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0040] Figure 1 A schematic diagram of an application scenario of a baseband software task processing method provided by an embodiment of the present application;
[0041] Figure 2 A flowchart of a baseband software task processing method provided by one embodiment of the present application;
[0042] Figure 3 A flowchart of thread execution within a baseband cluster in a baseband software task processing method provided in one embodiment of the present application;
[0043] Figure 4 A single thread operation flow chart in a baseband software task processing method provided in one embodiment of the present application;
[0044] Figure 5 A schematic diagram of updating the stack space of a scheduling thread by a main program in a baseband software task processing method provided in one embodiment of the present application;
[0045] Figure 6 A schematic diagram of the structure of a baseband software task processing device provided in one embodiment of the present application;
[0046] Figure 7 A schematic diagram of the computer device structure provided for one embodiment of the present application. DETAILED DESCRIPTION
[0047] In the process of implementing the present application, the inventors found that there is an urgent need for a method that can reduce the overhead of an embedded operating system.
[0048] In response to the above problems, embodiments of the present application provide a baseband software task processing method, apparatus, computer device and storage medium to reduce the overhead of an embedded operating system.
[0049] The solutions in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented C language and assembly programming language, etc.
[0050] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0051] The following is a brief description of the application environment of the baseband software task processing method provided in the embodiment of the present application:
[0052] See also Figure 1 The baseband software task processing method provided in the embodiment of the present application is applied to Figure 1The baseband software processing system in the invention comprises: a transit processing core entity, a plurality of task hardware queue entities and a plurality of baseband processing cluster entities which are communicatively connected to each other, and each entity is communicatively connected to each other and exchanges information. Among them, the transit processing core entity refers to an entity used to receive baseband software tasks to be processed, and split and process the baseband software tasks to be processed. All entities in the embodiments of the present application refer to computers, servers or communication devices configured according to their functions, etc., as long as they can realize the corresponding functions. A hardware queue entity refers to a queue function entity implemented in hardware. Each hardware queue can be bound to multiple cores, and can also be understood as a hardware queue manager, which is a hardware resource of a queue function implemented in hardware. A baseband processing cluster entity refers to an entity used to process baseband processing tasks, including a thread processing module and a thread processing module, which are used to perform thread processing on baseband processing tasks.
[0053] See also Figure 2 , Figure 3 and Figure 4 The baseband software task processing method provided in the embodiment of the present application is applied to the above-mentioned baseband software processing system. The baseband software task processing method includes the following steps 210 to 240:
[0054] Step 210: the transit processing core entity splits the baseband software task to be processed into a plurality of baseband processing tasks, and sends the baseband processing tasks to the baseband processing cluster entity through the task hardware queue entity;
[0055] Step 220: The baseband processing core in the baseband processing cluster entity creates a corresponding number of baseband processing threads according to the received baseband processing tasks;
[0056] Among them, each baseband processing cluster entity includes multiple baseband processing cores, and the configuration and processing functions of each baseband processing core are the same. In an optional embodiment of the present application, in order to improve the task processing efficiency, for the same baseband processing cluster entity, a baseband processing core can be defined as the baseband processing master core, and the remaining baseband processing cores are baseband processing slave cores. The priority of the baseband processing master core is higher than that of the baseband processing slave core. In the actual processing process, the baseband processing master core can be called first, and then the other baseband processing slave cores are called in turn according to the set order, so as to avoid uneven utilization of each baseband processing core or calling errors caused by out-of-order calling.
[0057] Step 230: The baseband processing core queues the baseband processing thread into a pre-built thread queue according to the deployment information of the baseband processing thread.
[0058] The deployment information refers to the baseband processing core distribution information of the baseband processing thread, which is used to indicate whether the baseband processing thread is exclusively occupied by a certain baseband processing core or shared by several baseband processing cores. The deployment information can be represented by a core identifier or by other methods, which are not specifically limited here. The thread queue is pre-built according to the nature of each baseband processing task, including Figure 1 In an optional embodiment of the present application, the multiple thread queues may include Figure 1 There are two types of thread queues in the system: private thread queues and shared thread queues; the private threads in the private thread queues refer to threads whose corresponding data storage and resources are unique to a specific baseband processing core when the baseband processing thread is executed; the shared threads in the shared thread queues refer to threads whose corresponding data storage and resources are shared by multiple baseband processing cores when the baseband processing thread is executed.
[0059] Step 240: The baseband processing core queries each of the thread queues in an idle state according to a pre-configured priority order, removes unprocessed threads in each of the thread queues from the queue and executes them.
[0060] For each thread queue in the baseband processing core, if there is an unprocessed thread in the thread queue, it is determined that the baseband processing core is in a working state; if there is no thread in the queue, it is determined that the baseband processing core is in an idle state.
[0061] The communication baseband software architecture is from top to bottom: baseband software - platform layer - driver layer - hardware board. Among them, the platform layer is an intermediate layer that isolates the baseband software and the driver layer, and provides a common interface API for the baseband software to use. That is, when the hardware board is different, the baseband software does not perceive the changes in the underlying hardware board and driver interface, which is conducive to code maintenance and porting. The stack definition is a linear data structure that follows the "first in, first out" principle and is crucial in memory management. Each thread will have an independent stack space when running, growing from high address to low address, to ensure data isolation and data security during the execution of each thread.
[0062] On the one hand, in the traditional architecture, the stack of each thread is managed by the driver platform layer, and the baseband software needs to notify the platform layer of the stack space size of each thread, and then the platform layer allocates stack space to each thread and maintains the creation and release of stack space. However, the present application is configured with a baseband software processing system, which splits the baseband tasks to be processed through the transit processing core entity, and the baseband processing core in the baseband processing cluster entity creates a corresponding number of baseband processing threads according to the received baseband processing tasks. The baseband processing core queues the baseband processing threads into a pre-built thread queue according to the deployment information of the baseband processing threads. The architecture of the baseband software processing system can realize the interaction between the entity modules without notifying the platform layer, thereby reducing the interaction with the platform layer and reducing the system overhead;
[0063] Secondly, the embodiments of the present application mainly utilize hardware queues or software queues to implement the processing of baseband processing tasks, and decompose the baseband processing tasks into multiple threads. Task preemption, task execution, task suspension and task recovery can be performed on any core in the multiple cores within the baseband chip. The definition and maintenance of the stack of the baseband processing thread are the responsibility of the baseband software, which reduces the interaction with the platform layer, reduces system overhead, and is also conducive to the location of subsequent system problems.
[0064] Please continue to see Figure 1 , Figure 2 and Figure 3 In an optional embodiment of the present application, the baseband software processing system further includes a protocol stack entity that is communicatively connected to the transit processing core entity; correspondingly, the transit processing core entity splits the baseband software task to be processed into a plurality of baseband processing tasks, including:
[0065] The protocol stack entity sends a protocol stack scheduling message to the transit processing core entity, and the transit processing core entity splits the to-be-processed baseband software task into a plurality of the baseband processing tasks according to the type of the protocol stack scheduling message.
[0066] Among them, the protocol stack refers to the sum of the protocols at each layer in the network, which is used to reflect the process of file transfer in a network: from the upper layer protocol to the underlying protocol, and then from the underlying protocol to the upper layer protocol. For example, the Internet protocol stack, the protocols from top to bottom are: application layer (HTTP, FTP, TFTP, TELNET, DNS, EMAIL, etc.), transport layer (TCP, UDP), network layer (IP), link layer (WI-FI, Ethernet, Token Ring, FDDI, MAC, etc.), physical layer. The protocol stack scheduling message refers to the interaction between the upper layer protocol and the underlying protocol for management and control. Among them, in an optional embodiment of the present application, the types of the protocol stack scheduling messages include: at least one of the uplink and downlink service channels of the baseband physical layer and the control channel of the baseband physical layer.
[0067] The division of task threads varies according to different baseband software design schemes. The embodiment of the present application divides the uplink and downlink service channels and control channels that need to be processed by the baseband physical layer into different baseband processing clusters. For example, the PDSCH channel and the PDCCH channel can be divided into 2 different baseband processing clusters and executed in parallel. There is no difference between different baseband processing clusters. They are all processing resources. Software flow processing of different channels can be performed according to the different channel tasks they obtain, thereby improving the processing efficiency of task threads. The corresponding protocol stack scheduling message is the information used to indicate different channel tasks.
[0068] In an optional embodiment of the present application, the baseband processing thread includes: at least one of an initialization function, a main processing function, a thread pre-state, and thread stack information.
[0069] Different threads have different functions, and the functions of the initialization functions of each baseband processing thread are also different. For example, the functions of the initialization functions of some threads are: moving the data to be processed from the external storage to the on-chip storage, the memory used for the processing of this thread, etc., corresponding to other baseband processing threads, according to actual needs, they can flexibly select and configure from the main processing function, thread pre-state, and thread stack information to adapt to different baseband processing tasks.
[0070] Please continue to see Figure 3 In an optional embodiment of the present application, each of the baseband processing cluster entities includes a plurality of the baseband processing cores; each of the baseband processing cores includes at least one private thread queue and one shared thread queue; wherein the private thread queue includes threads for acquiring and executing the baseband processing core in which it is located; and the shared thread queue includes threads for acquiring and executing other baseband processing cores outside the baseband processing cluster entity in which it is located;
[0071] Correspondingly, the baseband processing core queues the baseband processing thread into a pre-built thread queue according to the deployment information of the baseband processing thread, including:
[0072] The baseband processing core queues the baseband processing thread into the pre-built private thread queue or the shared thread queue according to the deployment information of the baseband processing thread.
[0073] In the baseband processing cluster, there are one or more baseband processing cores. The embodiment of the present application takes two cores as an example, one core is the baseband processing master core, and the other cores are baseband processing slave cores. The difference between the transit processing core and the baseband processing core: From a functional point of view, the transit processing core is mainly used for data parsing and message distribution, and the baseband processing core is mainly used for physical layer software processing, so the transit processing core can be a scalar processing core, and the baseband processing core generally includes two types of functions, vector processing and scalar processing, because the physical layer software design of the baseband processing core involves vector processing and scalar processing.
[0074] The baseband processing core described in the embodiment of the present application queues the baseband processing thread into the pre-built private thread queue or the shared thread queue according to the deployment information of the baseband processing thread, that is, by dividing the thread queue into a private thread queue and a shared thread queue, it is convenient to classify and process the baseband processing threads, thereby improving the processing efficiency of the threads.
[0075] Please continue to see Figure 3 In an optional embodiment of the present application, the baseband processing core queues the baseband processing thread into the pre-built private thread queue or the shared thread queue according to the deployment information of the baseband processing thread, including:
[0076] If, when the baseband processing thread is executed, the corresponding data storage and resources are exclusive to a specific baseband processing core, the baseband processing thread is queued to the private thread queue;
[0077] If, when the baseband processing thread is executed, the corresponding data storage and resources are not exclusive to the specific baseband processing core, the baseband processing thread is queued into the shared thread queue.
[0078] In the embodiment of the present application, when the baseband processing thread is executed, the private thread is queued into the private thread queue for processing, and the shared thread is queued into the shared thread queue for processing, and threads of different properties are classified and processed, thereby greatly improving the processing efficiency of the threads.
[0079] In an optional embodiment of the present application, if the unprocessed thread fails to be removed from the queue, the method further includes:
[0080] The unprocessed thread is requeued to the shared thread queue in the baseband processing core where it was originally located.
[0081] Each thread can have the following states: start---query the previous state--predecessor state is not satisfied, re-queue--predecessor state is satisfied, execution state--pause execution state--resume execution--end state. For example, threads A, B, and C, the execution of thread C needs to wait for both threads AB to complete execution, and needs to use the results of threads AB, so when C is executed, it needs to query the status of the two predecessor threads A and B to see if they have completed.
[0082] When requeuing the unprocessed thread to the shared thread queue in the baseband processing core where it was originally located, for private threads, when requeuing, they are requeued to the private queue; for shared threads, when requeuing, they are enqueued to the shared queue. For shared threads, when they are dequeued from the queue and resume execution after requeuing, there is a scenario where different cores resume execution (that is, core 0 suspends execution and then queues, and then core 1 obtains the thread and continues execution). In this scenario, it is necessary to ensure that the thread stack is shared or visible to multiple cores, so it is enqueued to the shared thread queue for subsequent processing.
[0083] The process of resuming execution can be, for example, as follows: when a thread is requeued due to being paused, the thread will wait in the queue for a baseband processing core to access the hardware queue and read it out of the queue. When the baseband processing core reads a paused thread, it can be known from the thread state that this thread was previously paused, not a thread that is running from the beginning, but a thread that is paused during running, so it will resume running from the place where it was previously paused. The conditions for resuming running are: 1) the requeued thread is obtained by the processing core; 2) the processing core determines that the current thread state is a paused state, and resumes running.
[0084] Requeuing refers to a previously scheduled thread. The pause can be when the thread does not meet the running conditions. For example, when the thread needs to query the result of another thread during the running process, but the other thread has not been completed on other cores, the current thread can be paused actively to let the current core execute other threads. The scenario of not pausing refers to a thread from start to end, without interacting with other threads, and can be executed to completion.
[0085] The embodiment of the present application can ensure the orderly execution of the task processing framework and improve the reliability and stability of baseband software task processing by re-queuing unprocessed threads.
[0086] In an optional embodiment of the present application, the baseband software task processing method further includes:
[0087] The baseband processing core queries each of the thread queues according to a preconfigured priority order, and if there is no unprocessed thread in each of the thread queues, the state of the baseband processing core is marked as an idle state.
[0088] The master core and slave core query the private thread queue and the shared thread queue in order of priority in the idle state. If there are unprocessed threads in the thread queue, the unprocessed threads are removed from the thread queue and executed. If there are no threads in the queue, the baseband processing core is determined to be in an idle state and marked.
[0089] The priority order is configured according to the actual situation. For example, the order of querying the private thread queue and the shared thread queue can be set for each core. For example, the order of querying the hardware queue for the baseband processing main core is: task thread queue - shared thread queue - private thread queue. The order of querying the hardware queue for the slave core is: private thread queue - shared thread queue. Among them, the baseband processing main core and the baseband processing slave core obtain the unexecuted threads from the hardware queue according to their own query order of the hardware queue, and the execution of the threads is continued by the core that obtains them.
[0090] In an optional embodiment of the present application, the step of removing unprocessed threads from each thread queue and executing the threads includes:
[0091] Determine the previous execution information of the previous program, and store the previous execution information at the top of the stack space; wherein the previous execution information includes: at least one of a register, an execution state, and a return address;
[0092] The unprocessed thread is executed based on the current program.
[0093] In this process, the input parameters can be assigned to registers. The input parameters are parameter passing specifications of C language and assembly, and the input parameters of the function are saved in the form of registers. By storing the previous execution information at the top of the stack space, it is convenient to re-read the previous execution information after executing the unprocessed thread based on the current program, prevent the loss of the previous execution information, facilitate the recovery of the previous state and improve data security.
[0094] In an optional embodiment of the present application, after executing the unprocessed thread based on the current program, the method further includes the following steps:
[0095] If the unprocessed program is executed to completion, obtaining the previous execution information from the top of the stack space;
[0096] The previous program is restored and returned to according to the previous execution information.
[0097] For example Figure 5In the process, when thread B finishes executing, it will get the execution status and return address of program A from its own stack space, so that it can find the program execution point where program A jumped to thread B through the return address, and then update the registers of this core with the saved registers and status, so that it can restore to the program execution point where program A jumped to thread B, and then continue to execute the program after thread B.
[0098] The mark of the predecessor thread's completion means that after the predecessor thread is executed, a special field (for example, 1) is written to a certain address of the specified memory by writing to shared memory or external shared memory or external DDR (Double Data Rate) to mark the completion of the current thread. The successive thread will query the address of this memory, and when the query is 1, it knows that the predecessor thread has been completed.
[0099] Please continue to see Figure 4 In the process of processing a single thread, when a program executes a thread, that is, it runs to the step of calling the thread, then when entering the stack space of the thread, the registers and status of the previous program must be saved at the top of the stack space, the return address, and then the thread is executed. When the thread is executed, the registers and status of the previously saved program must be restored, and the return address must be restored, so that the program can be returned to continue execution. The static parameter configuration of each thread will indicate the types of different parameters and the number of parameters, such as how many ordinary parameters there are and how many address type parameters there are. Just add the number of parameters of these two types. For any function to be executed, if there are input parameters, then the input parameters need to be updated to the specified registers, and then the execution function gets the entry parameters from these specified registers, and then executes.
[0100] The main processing function is a standard C function, which can be expressed as follows
[0101] func(input_param A,
[0102] input_param B,
[0103] input_param*addr_C);
[0104] Updating the thread stack space includes the following actions: saving the parameters and status of the calling function, saving the return address, updating the thread function's input parameter registers, and saving the thread local variables to the stack space.
[0105] In the above process of removing the unprocessed threads in each of the thread queues from the queue and executing them, since the register width of the scalar processor is limited and the pseudo-random sequence is generated according to a set order, the pseudo-random sequence generation efficiency is low. Therefore, the above baseband software task processing method further includes the following steps:
[0106] Acquire a target offset value of an initial pseudo-random sequence, and determine an initial state matrix in the initial pseudo-random sequence according to the target offset value; wherein the initial state matrix is a sequence after the initial pseudo-random sequence is offset, and a column rank of the initial state matrix is a first preset value;
[0107] Acquire a target state transfer matrix corresponding to the initial pseudo-random sequence, and perform a matrix operation on the target state transfer matrix and the initial state matrix to obtain a pseudo-random sequence after the operation;
[0108] If the length of the post-operation pseudo-random sequence is less than the preset length, the new initial state matrix is used as the initial state matrix, and the target state transfer matrix and the initial state matrix are re-matrixed to obtain a new post-operation pseudo-random sequence, until the sum of the lengths of all current post-operation pseudo-random sequences is not less than the preset length, then the pseudo-random sequence formed by merging all post-operation pseudo-random sequences is determined as the target pseudo-random sequence.
[0109] In an optional embodiment of the present application, determining the initial state matrix in the initial pseudo-random sequence according to the target offset value includes:
[0110] Using the initial pseudo-random sequence elements as input values of a generator polynomial of the initial pseudo-random sequence to obtain corresponding output values;
[0111] Constructing a first initial state matrix starting from an offset value based on each of the output values;
[0112] Merging the first initial state matrices to form an initial state set;
[0113] The first initial state matrix corresponding to the target offset value is obtained by querying from the initial state set, and the first initial state matrix obtained by querying is used as the target initial state matrix.
[0114] In an optional embodiment of the present application, constructing a first initial state matrix starting from an offset value based on each of the output values includes: constructing an initial state matrix subsequent to the initial pseudo-random sequence based on each of the output values;
[0115] Selecting each target sequence element starting from an offset value from the initial pseudo-random sequence and an initial state matrix subsequent to the initial pseudo-random sequence;
[0116] A first initial state matrix is constructed based on each target sequence element.
[0117] In an optional embodiment of the present application, the step of obtaining a target state transfer matrix corresponding to the initial pseudo-random sequence includes:
[0118] A first state transfer matrix is obtained according to the initial state matrix and the state matrix after the initial state matrix is offset by a preset amount; wherein the row rank and column rank of the first state transfer matrix are both first preset values;
[0119] A target state transfer matrix is determined according to the first state transfer matrix; wherein a column rank of the target state transfer matrix is a first preset value.
[0120] In an optional embodiment of the present application, a first state transfer matrix is obtained according to the initial state matrix and the state matrix after the initial state matrix is offset by a preset amount by the following expression:
[0121] [x(n+m)x(n+m+1)…x(n+m+p-1)]=G*[x(n)x(n+1)…x(n+p-1)] T
[0122] Among them, G is the first state transfer matrix, [x(n+m)x(n+m+1)…x(n+m+p-1)] is the state matrix after the initial state matrix is offset with the offset preset amount of m, [x(n)x(n+1)…x(n+p-1)] is the initial state matrix starting from n, and p is the first preset value.
[0123] In an optional embodiment of the present application, determining a target state transfer matrix according to the first state transfer matrix includes:
[0124] Determine a plurality of matrices corresponding to the first state transfer matrix;
[0125] The first row vector in each of the square matrices is used as a row vector of a target state transfer matrix to obtain the target state transfer matrix.
[0126] In an optional embodiment of the present application, performing a matrix operation on the target state transfer matrix and the initial state matrix to obtain a pseudo-random sequence after the operation includes:
[0127] Writing the target state transfer matrix into a first vector register of a preset vector processor;
[0128] Amplifying the initial state matrix according to the instruction of the preset vector processor, and writing the amplified initial state matrix into the second vector register of the preset vector processor;
[0129] According to the instructions of the preset vector processor, a parallel multiplication-addition operation is performed on the target state transfer matrix in the first vector register and the initial state matrix in the second vector register to obtain a pseudo-random sequence after the operation, and the pseudo-random sequence after the operation is written into a third vector register of the preset vector processor.
[0130] It should be understood that, although the various steps in the flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0131] See also Figure 6 An embodiment of the present application provides a baseband software task processing device 600, which is applied to a baseband software processing system. The baseband software processing system includes: a transit processing core entity, a plurality of task hardware queue entities, and a plurality of baseband processing cluster entities that are communicatively connected to each other. The baseband software task processing device includes:
[0132] A distribution module 610, configured for the transit processing core entity to split the baseband software task to be processed into a plurality of baseband processing tasks, and to send the baseband processing tasks to the baseband processing cluster entity through the task hardware queue entity;
[0133] A thread creation module 620, configured for a baseband processing core in the baseband processing cluster entity to create a corresponding plurality of baseband processing threads according to the received baseband processing tasks;
[0134] An enqueuing module 630, configured for the baseband processing core to enqueue the baseband processing thread into a pre-built thread queue according to the deployment information of the baseband processing thread;
[0135] The execution module 640 is used for the baseband processing core to query each of the thread queues according to a pre-configured priority order in an idle state, and remove the unprocessed threads in each of the thread queues from the queue and execute them.
[0136] In an optional embodiment of the present application, the baseband software processing system also includes a protocol stack entity that is communicatively connected to the transit processing core entity; correspondingly, the distribution module 610 is specifically used for the protocol stack entity to send a protocol stack scheduling message to the transit processing core entity; the transit processing core entity splits the baseband software task to be processed into multiple baseband processing tasks according to the type of the protocol stack scheduling message.
[0137] In an optional embodiment of the present application, the type of the protocol stack scheduling message includes: at least one of an uplink and downlink service channel of a baseband physical layer and a control channel of a baseband physical layer.
[0138] In an optional embodiment of the present application, the baseband processing thread includes: at least one of an initialization function, a main processing function, a thread pre-state, and thread stack information.
[0139] In an optional embodiment of the present application, each of the baseband processing cluster entities includes multiple baseband processing cores; each of the baseband processing cores includes at least one private thread queue and one shared thread queue; wherein the private thread queue contains threads for acquiring and executing the baseband processing core in which it is located; the shared thread queue contains threads for acquiring and executing other baseband processing cores outside the baseband processing cluster entity; correspondingly, the enqueuing module 630 is specifically used for the baseband processing core to enqueue the baseband processing thread into the pre-built private thread queue or the shared thread queue according to the deployment information of the baseband processing thread.
[0140] In an optional embodiment of the present application, the enqueue module 630 is specifically used to enqueue the baseband processing thread to the private thread queue if the corresponding data storage and resources are unique to a specific baseband processing core when the baseband processing thread is executed; if the corresponding data storage and resources are not unique to a specific baseband processing core when the baseband processing thread is executed, enqueue the baseband processing thread to the shared thread queue.
[0141] In an optional embodiment of the present application, if the removal of the unprocessed thread from the queue fails, the queuing module 630 is further configured to re-queue the unprocessed thread into the shared thread queue in the baseband processing core where it was originally located.
[0142] In an optional embodiment of the present application, the execution module 640 is specifically used for the baseband processing core to query each of the thread queues according to a preconfigured priority order, and if there is no unprocessed thread in each of the thread queues, the state of the baseband processing core is marked as an idle state.
[0143] In an optional embodiment of the present application, the execution module 640 is specifically used to determine the previous execution information of the previous program and store the previous execution information to the top of the stack space; wherein the previous execution information includes: at least one of a register, an execution status and a return address; and execute the unprocessed thread based on the current program.
[0144] In an optional embodiment of the present application, the execution is also used to, if the unprocessed program is executed to completion, obtain the previous execution information from the top of the stack space; and restore and return to the previous program according to the previous execution information.
[0145] For the specific definition of the above-mentioned baseband software task processing device 600, please refer to the definition of the baseband software task processing method above, which will not be repeated here. Each module in the above-mentioned baseband software task processing device 600 can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0146] In one embodiment, a computer device is provided, the internal structure diagram of which can be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a baseband software task processing method as described above is implemented. It includes: a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, any step in the baseband software task processing method as described above is implemented.
[0147] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any step in the above baseband software task processing method can be implemented.
[0148] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0149] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0150] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0152] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0153] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A baseband software task processing method, characterized in that: Applied to a baseband software processing system, the baseband software processing system includes: a transit processing core entity, a plurality of task hardware queue entities and a plurality of baseband processing cluster entities that are communicatively connected to each other, the method includes: The transit processing core entity splits the baseband software task to be processed into a plurality of baseband processing tasks, and sends the baseband processing tasks to the baseband processing cluster entity through the task hardware queue entity; The baseband processing core in the baseband processing cluster entity creates a corresponding number of baseband processing threads according to the received baseband processing tasks; The baseband processing core enqueues the baseband processing thread into a pre-built thread queue according to the deployment information of the baseband processing thread; The baseband processing core queries each of the thread queues in an idle state according to a pre-configured priority order, removes unprocessed threads in each of the thread queues from the queue and executes them.
2. The baseband software task processing method according to claim 1, characterized in that: The baseband software processing system further includes a protocol stack entity that is communicatively connected to the transit processing core entity; correspondingly, the transit processing core entity splits the baseband software task to be processed into a plurality of baseband processing tasks, including: The protocol stack entity sends a protocol stack scheduling message to the transit processing core entity; The transit processing core entity splits the to-be-processed baseband software task into a plurality of the baseband processing tasks according to the type of the protocol stack scheduling message.
3. The baseband software task processing method according to claim 2, characterized in that: The type of the protocol stack scheduling message includes: at least one of an uplink and downlink service channel of a baseband physical layer and a control channel of a baseband physical layer.
4. The baseband software task processing method according to claim 1, characterized in that: The baseband processing thread includes at least one of an initialization function, a main processing function, a thread pre-state, and thread stack information.
5. The baseband software task processing method according to claim 1, characterized in that: Each of the baseband processing cluster entities includes a plurality of the baseband processing cores; each of the baseband processing cores includes at least one private thread queue and one shared thread queue; wherein the private thread queue includes threads for acquiring and executing the baseband processing core in which it is located; and the shared thread queue includes threads for acquiring and executing other baseband processing cores outside the baseband processing cluster entity in which it is located; Correspondingly, the baseband processing core queues the baseband processing thread into a pre-built thread queue according to the deployment information of the baseband processing thread, including: The baseband processing core queues the baseband processing thread into the pre-built private thread queue or the shared thread queue according to the deployment information of the baseband processing thread.
6. The baseband software task processing method according to claim 5, characterized in that: The baseband processing core queues the baseband processing thread into the pre-built private thread queue or the shared thread queue according to the deployment information of the baseband processing thread, including: If, when the baseband processing thread is executed, the corresponding data storage and resources are exclusive to a specific baseband processing core, the baseband processing thread is queued to the private thread queue; If, when the baseband processing thread is executed, the corresponding data storage and resources are not exclusive to the specific baseband processing core, the baseband processing thread is queued into the shared thread queue.
7. The baseband software task processing method according to claim 5, characterized in that: If the unprocessed thread fails to be removed from the queue, the method further includes: The unprocessed thread is requeued to the shared thread queue in the baseband processing core where it was originally located.
8. The baseband software task processing method according to claim 1, characterized in that: The method further comprises: The baseband processing core queries each of the thread queues according to a preconfigured priority order, and if there is no unprocessed thread in each of the thread queues, the state of the baseband processing core is marked as an idle state.
9. The baseband software task processing method according to claim 2, characterized in that: The step of removing unprocessed threads from each thread queue and executing the threads includes: Determine the previous execution information of the previous program, and store the previous execution information at the top of the stack space; wherein the previous execution information includes: at least one of a register, an execution state, and a return address; The unprocessed thread is executed based on the current program.
10. The baseband software task processing method according to claim 9, characterized in that: After executing the unprocessed thread based on the current program, the method further includes: If the unprocessed program is executed to completion, obtaining the previous execution information from the top of the stack space; The previous program is restored and returned to according to the previous execution information.
11. A baseband software task processing device, characterized in that: Applied to a baseband software processing system, the baseband software processing system includes: a transit processing core entity, a plurality of task hardware queue entities and a plurality of baseband processing cluster entities that are communicatively connected to each other, and the baseband software task processing device includes: A distribution module, used for the transit processing core entity to split the baseband software task to be processed into multiple baseband processing tasks, and send the baseband processing tasks to the baseband processing cluster entity through the task hardware queue entity; A thread creation module, used for the baseband processing core in the baseband processing cluster entity to create a corresponding number of baseband processing threads according to the received baseband processing tasks; An enqueue module, configured for the baseband processing core to enqueue the baseband processing thread into a pre-built thread queue according to the deployment information of the baseband processing thread; The execution module is used for the baseband processing core to query each of the thread queues according to a pre-configured priority order in an idle state, and to remove unprocessed threads in each of the thread queues from the queue and execute them.
12. A computer device comprising: The method comprises a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of the method according to any one of claims 1 to 10 when executing the computer program.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.