Search

CN-122019297-A - Method for detecting use rate of software baseband buffer

CN122019297ACN 122019297 ACN122019297 ACN 122019297ACN-122019297-A

Abstract

The invention provides a method for detecting the use rate of a buffer area of a software baseband, which is characterized in that when a buffer area memory is applied, an associated handle is used for applying a shared memory, the shared memory stores important information related to the buffer area and is updated in real time in the running process of the software baseband program, when the software baseband program is running, another program is started to open the shared memory by using the related handle, data in the shared memory is read, the use condition of the buffer area of the memory is checked in real time, and whether the buffer area overflows or not.

Inventors

  • LI JIAHUA
  • ZHANG TAO
  • WANG JINGWEN
  • ZHANG YANG
  • DONG WEITAO

Assignees

  • 北京遥测技术研究所

Dates

Publication Date
20260512
Application Date
20251224

Claims (7)

  1. 1. The method for detecting the use rate of the software baseband buffer area is characterized by comprising the following steps: S1, when each demodulation module of a software baseband creates a circular buffer zone, creating a linux shared buffer zone which is the same as the number of the circular buffer zones and corresponds to the number of the circular buffer zones one by one according to the number N of the circular buffer zones and buffer zone handles, and creating a shared structure body corresponding to the linux shared buffer zone in a linux shared memory, wherein variables of the shared structure body comprise the size of the linux shared buffer zone, the name of the linux shared buffer zone, the data type of the corresponding circular buffer zone, the reading count of the corresponding circular buffer zone and the writing count of the corresponding circular buffer zone; Initializing, namely writing the opened memory size of the circulation buffer into a linux shared buffer size variable in the shared structure body, and initializing the read count of the circulation buffer and the write count of the circulation buffer to 0; S2, starting running of a software baseband, wherein in the running process, a producer of an nth circulation buffer zone synchronously updates a circulation buffer zone write count variable in an nth shared structure body when writing data; s3, configuring an XML file, and filling the buffer handle in the XML file; S4, constructing a checking buffer area use condition program, wherein the checking buffer area use condition program reads the XML file, loads the buffer area handle, opens a corresponding linux shared memory according to the buffer area handle, circularly reads data in the linux shared memory in real time, calculates the circulation buffer area use rate and then displays the circulation buffer area use rate in real time, and the circulation buffer area use rate is as follows: circular buffer usage = (circular buffer write count-circular buffer read count)/circular buffer memory size.
  2. 2. The method for detecting software baseband buffer utilization as in claim 1, wherein in step S1, the number of the buffer handle, the circular buffer, the Linux shared memory area and the shared fabric is N.
  3. 3. The method for detecting the utilization rate of the software baseband buffer area is characterized in that the buffer area handle is a unique identification bit of the circulating buffer area, the circulating buffer area is indexed through the buffer area handle, and the reading and writing operation is carried out on the circulating buffer area; The circulating buffer zone is a buffer pool between read-write operations between any two demodulation modules of the software baseband.
  4. 4. A method for detecting software baseband buffer utilization as defined in claim 3, wherein said buffer handle includes a circular buffer name and an accumulated number of consumers reading said circular buffer.
  5. 5. The method for detecting the utilization rate of a software baseband buffer according to claim 1, wherein the linux shared buffer can be created on a CPU or a GPU.
  6. 6. The method for detecting the utilization rate of a software baseband buffer according to claim 1, wherein a user configures a circular buffer to be observed according to the XML file.
  7. 7. The method for detecting software baseband buffer utilization as defined in claim 1, wherein in step S4, the view buffer utilization program displays circular buffer utilization information in real time, the circular buffer utilization information including a read pointer count value, a write pointer count value, and the circular buffer utilization.

Description

Method for detecting use rate of software baseband buffer Technical Field The invention relates to the technical field of measurement and test, in particular to a method for detecting the use rate of a software baseband buffer area. Background Conventional baseband signal processing systems typically rely on dedicated hardware, such as an Application Specific Integrated Circuit (ASIC) or Digital Signal Processor (DSP). These hardware are optimized for specific communication standards and protocols, and while providing high processing efficiency, they suffer from inherent disadvantages of poor flexibility, long development cycle, high cost, and difficulty in upgrading. With the rapid development of wireless communication technology, multiple communication systems coexist, and future standards evolve continuously, so that the implementation manner based on hardware has difficulty in adapting to the increasing demands for flexibility and reconfigurability. The Software Defined Radio (SDR) technology aims to solve the above problem, and its core idea is to implement as many communication functions (in particular baseband processing) as possible on a general-purpose computing platform through software. In the prior art, although a general purpose processor (CPU) is used for baseband processing, the serial processing capability and the real-time performance are limited, and it is difficult to deal with high-speed data streams. Graphics Processors (GPUs) offer new possibilities for high performance signal processing due to their powerful parallel computing capabilities. The software baseband is an architecture based on the cooperative computation of the CPU and the GPU. The system carries out efficient division and scheduling on tasks of a complete baseband processing chain (including signal capturing, fine synchronization, carrier and symbol tracking, channel equalization, demodulation decoding and the like) between a CPU and a GPU, and fully utilizes the logic control advantage of the CPU and the large-scale data parallel processing capability of the GPU, thereby realizing a baseband signal processing scheme with high performance, high flexibility and software upgrading on a general computing platform. In the software baseband, data are transmitted step by step in each demodulation module, the front end receiving module transmits the sampled data to the carrier code synchronization module, the carrier code synchronization module transmits the demodulated code element soft data to the decoding module, and the decoding module transmits the decoded data to the frame synchronization module after decoding. The interaction of the data is realized in each circular buffer, the data writer of the upper stage is the producer of the circular buffer, and the data reader of the lower stage is the consumer of the circular buffer. That is, in the software baseband operation, the consumer needs to have the capability of processing data in time, and cannot have backlog and coverage of the data in the circular buffer, and if the backlog and coverage of the data exist, the demodulation delay of the software baseband may be increased and the data may be lost. Therefore, a method for checking the use condition of each level of buffer area of the software baseband in real time is needed, so as to count the time delay of the software baseband, improve the real-time performance of checking the software baseband and improve the running condition. Disclosure of Invention The invention provides a method for detecting the use rate of a software baseband buffer zone, which aims to solve the problems of the increase of the demodulation delay and the data loss of the software baseband, and applies for a shared memory by using an associated handle when applying for the memory of the buffer zone, wherein the shared memory stores important information related to the buffer zone and is updated in real time in the running process of the software baseband program. The invention provides a method for detecting the use rate of a software baseband buffer area, which comprises the following steps: S1, when each demodulation module of a software baseband creates a circular buffer, creating a linux shared buffer which is the same as the number of the circular buffers and corresponds to the number of the circular buffers one by one according to the number N of the circular buffers and buffer handles, and creating a shared structure corresponding to the linux shared buffer in a linux shared memory, wherein variables of the shared structure comprise the size of the linux shared buffer, the name of the linux shared buffer, the corresponding data type of the circular buffer, the corresponding read count of the circular buffer and the write count of the circular buffer; Initializing, namely writing the opened memory size of the circulating buffer into a linux shared buffer size variable in a shared structure body, and initializing the reading count of the circ