Bluetooth Broadcast System with Isochronous Link Time Diversity Function
Through state machine and pointer memory management at the sending and receiving end of Bluetooth baseband, data cache is optimized, and the power consumption and storage space problems of Bluetooth BIS broadcasting system are solved, and efficient time-diversity data transmission is achieved.
Patent Information
- Application Number
- CN202310064721.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-12
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2043-01-12
AI Technical Summary
When processing Bluetooth BIS broadcast data, existing Bluetooth baseband chips have problems such as high power consumption and insufficient storage space in the chip, making it difficult to adapt to the BIS time-diversified data transmission method.
The state machine and pointer memory of the Bluetooth baseband transmitting and receiving end are adopted to schedule data transmission through event parameters NSE, BN, PTO, and IRC to realize pre-transmission and de-diversity of time diversity, optimize data cache space management, and reduce in-chip storage requirements.
It improves the transmission reliability of Bluetooth broadcasting systems, reduces power consumption and saves chip area, and is suitable for circuit systems such as digital chips and FPGAs.
Smart Images

Figure CN116074764B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of wireless communication, and particularly relates to a Bluetooth broadcast system with an isochronous link time diversity function. Background Art
[0002] In December 2019, the Bluetooth Special Interest Group launched the Bluetooth Core Specification Version 5.2, adding Low Energy Isochronous Channels to the Bluetooth Low Energy part. This channel defines a time-dependent data transmission channel and transmission strategy for the next-generation Bluetooth Low Energy Audio (LE Audio) applications, including a Connected Isochronous Stream logical transmission channel and a Broadcast Isochronous Stream (BIS) logical transmission channel.
[0003] For BIS, any device within the range of the broadcast transmitter can receive and present the broadcast audio stream. The biggest difference from the classic Bluetooth audio profile (Advanced Audio Distribution Profile, A2DP) is that it is unidirectional and has no acknowledgment mechanism. This means that technically, a broadcast source that only sends data without including a receiver can be constructed. These broadcasts can be received by any one of the Broadcast Sinks within the range. For the broadcast receiver, not sending acknowledgments can save more energy. At the same time, to make up for the lack of an acknowledgment mechanism, the Bluetooth specification introduces a time diversity retransmission mechanism in the BIS protocol to maximize the chance of receiving information.
[0004] The BIS event bearer provides an isochronous data stream for broadcasting. The transmitted data can be divided into multiple payloads, and each payload is transmitted in a single BIS data PDU. A BIS event consists of one or more BIS PDUs. For each BIS event, the data source should provide burst data consisting of BN (Burst Number) payloads. The total number of sub-events for each BIS event is NSE, which is between 1 and 31 and should be an integer multiple of BN. The sub-events of each BIS event are divided into groups of every BN sub-events, and the total number of groups (Group Count) is GC = NSE ÷ BN. IRC (Immediate Repetition Count) specifies the number of groups carrying data related to the current BIS event, and the remaining groups carry data related to future BIS events specified by PTO (Pre-Transmission Offset). IRC should be greater than 0 and not greater than GC. BN, PTO, and IRC control which data is transmitted in each BIS event. The value of BN should be between 1 and 7, the value of PTO should be between 0 and 15, and the value of IRC should be between 1 and 15.
[0005] The BIS sub-event groups are numbered in order using the g parameter from 0 to GC - 1: If g < IRC, the g-th group should contain data related to the current BIS; if g ≥ IRC, the g-th group should contain data related to future BIS events, that is, PTO × (g - IRC + 1) BIS events after the current BIS event.
[0006] For ease of understanding the time diversity mechanism in BIS broadcasting, Figure 1 、 Figure 2 、 Figure 3 illustrates the payload data distribution corresponding to three different configurations of NSE, BN, PTO, and IRC parameters. Among them, Figure 1 is the payload allocation within the BIS for BN = 2, IRC = 2, PTO = 0, and NSE = 4, Figure 2 is the payload allocation within the BIS for BN = 1, IRC = 3, PTO = 2, and NSE = 5, Figure 3 is the payload allocation within the BIS for BN = 2, IRC = 2, PTO = 4, and NSE = 6.
[0007] Due to the introduction of the above-mentioned time diversity pre - transmission mechanism, multiple payload data need to be pre - stored within the same Bluetooth BIS broadcast event. The maximum length of a single payload in the BIS data PDU can reach 251 bytes. For some application scenarios, the amount of data burst - transmitted in one BIS event may be very large, and when pre - transmitting data in multiple BIS events, the degree of data dispersion may be relatively high. Existing Bluetooth baseband chips mostly handle broadcast data by transmitting a small amount of continuous data frames, making it difficult to adapt to the above - mentioned BIS time - diversity data transmission method, and there are defects such as high power consumption and insufficient storage space within the chip. Summary of the Invention
[0008] The present invention aims at the deficiencies of the prior art and provides a Bluetooth broadcast system with an isochronous link time - diversity function.
[0009] The system of the present invention includes a Bluetooth baseband transmitter and a Bluetooth baseband receiver.
[0010] The Bluetooth baseband transmitter has a Bluetooth baseband top - layer controller, a transmission link controller, a transmission data buffer, a transmission state machine, a transmission pointer memory, and a modulator; the Bluetooth baseband receiver has a Bluetooth baseband top - layer controller, a reception link controller, a reception data buffer, a reception state machine, a reception pointer memory, and a demodulator.
[0011] The transmission state machine schedules the to - be - transmitted BIS data PDU according to the event parameters NSE, BN, PTO, IRC, and outputs the to - be - transmitted sub - event data offset address pointer corresponding to the to - be - transmitted BIS data PDU to the transmission link controller in the order after time diversity. The reception state machine schedules the to - be - received BIS data PDU according to the event parameters NSE, BN, PTO, IRC, and outputs the to - be - received sub - event data offset address pointer corresponding to the to - be - received BIS data PDU to the reception link controller in the order after time diversity.
[0012] The transmission pointer memory stores the to - be - transmitted data offset address pointer of the to - be - transmitted BIS data PDU, and the reception pointer memory stores the to - be - received data offset address pointer of the to - be - received BIS data PDU. The transmission state machine calculates the address index of the transmission pointer memory corresponding to each Bluetooth sub - event time slot through event parameters and frame counting, takes out the to - be - transmitted data offset address pointer of the corresponding BIS data PDU in the transmission pointer memory according to this index, and outputs it to the transmission link controller. The transmission link controller adds the base address pointer sent by the Bluetooth baseband top - layer controller to the to - be - transmitted data offset address pointer as the sub - event data address pointer and sends it to the transmission data buffer.
[0013] The receiving state machine calculates the receiving pointer memory address index corresponding to each Bluetooth sub - event time slot through event parameters and frame counts. According to this index, it fetches the offset address pointer of the data to be received for the corresponding BIS data PDU in the receiving pointer memory and outputs it to the receiving link controller. The receiving link controller adds the base address pointer sent by the Bluetooth baseband top - layer controller to the offset address pointer of the data to be received as the sub - event data address pointer and sends it to the receiving data buffer.
[0014] When the link - layer state is the broadcast isochronous transmission state, the Bluetooth baseband top - layer controller sends the event parameters to the transmission state machine. According to the data address pointer to be sent, it caches the data to be sent into the transmission data buffer by segmenting it according to BIS sub - events, and inputs the corresponding offset address pointer of the data to be sent into the transmission pointer memory in sequence, and sends the base address pointer to the transmission link controller. When the link - layer state is the broadcast isochronous receiving state, the Bluetooth baseband top - layer controller sends the event parameters to the receiving state machine, inputs the offset address pointer of the data to be received into the receiving pointer memory in sequence, and sends the base address pointer to the receiving link controller.
[0015] After the BIS event ends, the Bluetooth baseband top - layer controller adds the received sub - event data offset address pointer read from the receiving pointer memory to the base address pointer stored by itself to obtain the receiving data address pointer, sends the receiving data address pointer to the receiving data buffer, and transmits it to the upper - layer software through the firmware driver.
[0016] The transmission link controller adds the offset address pointer of the sub - event data to be sent provided by the transmission state machine to the base address pointer provided by the Bluetooth baseband top - layer controller to obtain the sub - event data address pointer, and sends it to the transmission data buffer to read the corresponding BIS sub - event data, and appends the corresponding header and synchronization header according to the Bluetooth protocol, completes bit - stream encoding, appends CRC check bits, encrypts, forms the data stream to be finally sent to the air channel and outputs it to the modulator.
[0017] The receiving link controller receives the Bluetooth isochronous data stream of the air channel by matching the synchronization header, completes functions such as bit - stream decoding, decryption, and CRC check, parses the header of the successfully received BIS data PDU, and adds the offset address pointer of the sub - event data to be received provided by the receiving state machine to the base address pointer provided by the Bluetooth baseband top - layer controller to obtain the sub - event data address pointer, and sends it to the receiving data buffer to store the corresponding BIS sub - event data.
[0018] The modulator modulates the transmission data stream into the Bluetooth 2.4GHz frequency band for transmission; the demodulator demodulates the received Bluetooth 2.4GHz frequency band signal into the original data stream and outputs it;
[0019] Both the sending state machine and the receiving state machine have three count value variables BN_cnt, GC_cnt, and NSE_cnt; the counting rules are as follows:
[0020] (1) NSE_cnt counts for NSE, is initialized to 0 at the start of a BIS event, and at the end of each BIS sub-event, if the count value of NSE_cnt is less than or equal to NSE - 1, the count value of NSE_cnt is incremented by 1; otherwise, the counting of NSE_cnt in this BIS event terminates.
[0021] (2) BN_cnt counts for BN, is initialized to 0 at the start of a BIS event, and at the end of each BIS sub-event, if the count value of NSE_cnt is less than NSE - 1, then when the count value of BN_cnt is less than BN - 1, the count value of BN_cnt is incremented by 1; otherwise, the count value of BN_cnt is cleared; at the end of a BIS sub-event, if the count value of NSE_cnt is equal to NSE - 1, the counting of BN_cnt in this BIS event terminates.
[0022] (3) GC_cnt counts for GC, is initialized to 0 at the start of a BIS event, and at the end of each BIS sub-event, if the count value of NSE_cnt is less than NSE - 1, then when the count value of BN_cnt is equal to BN - 1, the count value of GC_cnt is incremented by 1; otherwise, the count value of GC_cnt remains unchanged; at the end of a BIS sub-event, if the count value of NSE_cnt is equal to NSE - 1, the counting of GC_cnt in this BIS event terminates.
[0023] The sending state machine uses these count values to calculate the sending pointer memory index in different states, and takes out the corresponding data offset address pointer in the sending pointer memory as the data offset address pointer of the sub-event to be sent and outputs it to the sending link controller; the receiving state machine uses these count values to calculate the receiving pointer memory index in different states, and takes out the corresponding data offset address pointer in the receiving pointer memory as the data offset address pointer of the sub-event to be received and outputs it to the receiving link controller;
[0024] The transmission state machine has three states: idle state, transmitting the current BIS sub-event state, and transmitting the future BIS sub-event state; in the idle state, the transmission state machine waits for the Bluetooth baseband top-level controller to send a BIS event start instruction; after the BIS event starts, the transmission state machine enters the transmitting the current BIS sub-event state and sends the pointer to the offset address of the sub-event to be transmitted corresponding to the index BN_cnt in the pointer memory to the transmission link controller; when the count value NSE_cnt = BN × IRC and BN × IRC < NSE, the transmission state machine enters the transmitting the future BIS sub-event state and sends the pointer to the offset address of the sub-event data to be transmitted corresponding to the index (GC_cnt - IRC + 1) × PTO × BN + BN_cnt in the pointer memory to the transmission link controller; each time the transmission state machine outputs a new pointer to the offset address of the sub-event data to be transmitted, the transmission link controller adds the offset address pointer and the base address pointer provided by the Bluetooth baseband top-level controller to obtain the sub-event data address pointer and sends it to the transmission data buffer to retrieve the corresponding BIS sub-event data in the transmission data buffer for subsequent framing and transmission; when the count value NSE_cnt = NSE, the current BIS event ends and the state machine enters the idle state.
[0025] The reception state machine has three states: idle state, receiving the current BIS sub-event state, and receiving the future BIS sub-event state; in the idle state, the reception state machine waits for the Bluetooth baseband top-level controller to send a BIS event start instruction; after the BIS event starts, the reception state machine enters the receiving the current BIS sub-event state and sends the pointer to the offset address of the sub-event data to be received corresponding to the index BN_cnt in the pointer memory to the reception link controller; when the count value NSE_cnt = BN × IRC and BN × IRC < NSE, the state machine enters the receiving the future BIS sub-event state and outputs the pointer to the address of the sub-event data to be received corresponding to the index (GC_cnt - IRC + 1) × PTO × BN + BN_cnt in the pointer memory to the reception link controller; each time the reception state machine outputs a new pointer to the address of the sub-event data to be received, the reception link controller adds the offset address pointer and the base address pointer provided by the Bluetooth baseband top-level controller to obtain the sub-event data address pointer and stores the successfully received corresponding BIS sub-event data in the corresponding address of the reception data buffer; when the count value NSE_cnt = NSE, the current BIS event ends and the state machine enters the idle state.
[0026] Using the above Bluetooth broadcast system with isochronous link time diversity function, the Bluetooth baseband top controller in the topology connection divides the data cache space according to the event parameters before the start of the BIS event; the size of the transmitted data cache space is allocated with (PTO × (GC - IRC) + 1) × BN PDU data blocks, where each PDU data block is allocated space according to the size of the BIS data PDU with the maximum length, and the corresponding data offset address pointer is stored in the pointer memory; at the start of the first BIS event, the baseband top controller fills the above transmitted data cache, and then in each BIS event, the time diversity controller schedules the data PDUs corresponding to BN current BIS sub-events for transmission. These PDUs will not be retransmitted after the end of the current BIS event, so the corresponding cache space can be overwritten in the next BIS event; similarly for the received data cache, for specific event parameters, the size of (PTO × (GC - IRC) + 1) × BN PDU data blocks is also allocated, and the corresponding data offset address pointer is stored in the pointer memory. At the end of each BIS event, after the Bluetooth baseband top controller retrieves the corresponding data PDU using the base address pointer and the current BIS sub-event offset address pointer, these cache spaces are overwritten in the next BIS event.
[0027] After each BIS event ends, the Bluetooth baseband transmitter discards the BN BIS sub-event data of the current BIS event that has ended and supplements new BN BIS sub-event data to be transmitted; the write start address pointer in the transmit pointer memory points to the index base pointer of the current ended BIS event, and the index base pointer moves BN BIS sub-event data, and then points to the storage space of the first BIS sub-event data to be transmitted in the next BIS event; before the start of the next BIS event, the Bluetooth baseband top controller starts to continuously write BN BIS sub-event data based on this write start address pointer;
[0028] After each BIS event ends, the Bluetooth baseband receiver reads out the BN BIS sub-event data of the current BIS event that has ended and outputs it to the upper layer protocol stack, and the index base pointer in the receive pointer memory moves BN BIS sub-event data, and then points to the storage space of the first BIS sub-event data to be received in the next BIS event.
[0029] The address pointer used by the transmit / receive link controller to read and write data should be the value of the offset address pointer output by the time diversity controller plus the base address pointer provided by the Bluetooth baseband top controller; the transmit / receive pointer memory is a circular storage structure. When the index obtained after calculation or movement exceeds the highest index of the cache structure, the exceeded part continues to increment starting from the lowest bit of the storage structure.
[0030] The present invention can schedule the transmission order of event frames according to different Bluetooth broadcast isochronous event parameters, implement a pre - transmission mechanism for time diversity, and increase the reliability of transmission; and implement diversity resolution at the receiving end to output event frames to the upper - layer software protocol stack in order. For the case where Bluetooth broadcast isochronous time diversity requires pre - storing multiple data frames, in the present invention, the controller only schedules the data storage pointer, and the data cache can use internal cache or external cache of the chip according to the actual application situation, which is beneficial to saving chip area and power consumption. The present invention is easy to be applied in circuit systems such as digital chips and FPGAs to implement a classic Bluetooth BLE system with LE Audio characteristics. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 Schematic diagram of payload allocation within a BIS with BN = 2, IRC = 2, PTO = 0, and NSE = 4;
[0032] Figure 2 Schematic diagram of payload allocation within a BIS with BN = 1, IRC = 3, PTO = 2, and NSE = 5;
[0033] Figure 3 Schematic diagram of payload allocation within a BIS with BN = 2, IRC = 2, PTO = 4, and NSE = 6;
[0034] Figure 4 Topology diagram of an existing Bluetooth broadcast system;
[0035] Figure 5 Topology diagram of the Bluetooth broadcast system of the present invention;
[0036] Figure 6 State transition diagram of the transmission state machine;
[0037] Figure 7 State transition diagram of the receiving state machine;
[0038] Figure 8 Schematic diagram of the storage structure of the pointer memory;
[0039] Figure 9 Flowchart when the Bluetooth baseband is the sender in a single BIS event;
[0040] Figure 10 Flowchart when the Bluetooth baseband is the receiver in a single BIS event. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0041] The present invention will be further described below in conjunction with the drawings and embodiments.
[0042] An existing Bluetooth broadcast system, such as Figure 4 shown, includes a Bluetooth baseband transmitter and a Bluetooth baseband receiver.
[0043] The Bluetooth baseband transmitter has a Bluetooth baseband top - layer controller, a transmission link controller, a transmission data buffer, and a modulator.
[0044] The Bluetooth baseband top - layer controller is implemented by the CPU in the SOC or by a dedicated circuit. The Bluetooth baseband top - layer controller receives the instructions and data sent by the firmware driver, completes instruction parsing and data storage. When the link - layer state is the broadcast - transmission state, it sends the Bluetooth broadcast event parameters to the transmission link controller, and caches the data to be sent into the transmission data buffer in segments according to the event based on the pointer of the data address to be sent, and sends the corresponding offset address pointer and base address pointer of the data to be sent to the transmission link controller. The transmission link controller obtains the event data address pointer according to the offset address pointer and base address pointer of the data to be sent provided by the Bluetooth baseband top - layer controller; the transmission link controller reads the broadcast data of the corresponding event from the transmission data buffer according to the event data address pointer, attaches the corresponding header and synchronization header according to the Bluetooth protocol, completes functions such as bit - stream encoding, attaching CRC check bits, and encryption, forms the data stream to be finally sent to the air channel and outputs it to the modulator, and the modulator modulates the transmission data stream to the 2.4GHz Bluetooth band for transmission.
[0045] The Bluetooth baseband receiver has a Bluetooth baseband top - layer controller, a reception link controller, a reception data buffer, and a demodulator.
[0046] The Bluetooth baseband top - layer controller is implemented by the CPU in the SOC or by a dedicated circuit. The Bluetooth baseband top - layer controller receives the instructions and data sent by the firmware driver, completes instruction parsing and data storage. When the link - layer state is the broadcast - reception state, it sends the Bluetooth broadcast event parameters to the reception link controller, and sends the corresponding offset address pointer and base address pointer of the data to be received to the reception link controller. The reception link controller obtains the event data address pointer according to the offset address pointer and base address pointer of the data to be received provided by the Bluetooth baseband top - layer controller; the demodulator demodulates the signal in the 2.4GHz Bluetooth band and outputs it to the reception link controller, and the reception link controller parses the corresponding header and synchronization header according to the event parameters and the Bluetooth protocol, completes functions such as bit - stream decoding, CRC check - bit decoding, and decryption, and stores the broadcast data of the corresponding event into the reception data buffer according to the event data address pointer. Then the Bluetooth baseband top - layer controller reads the broadcast data of the corresponding event from the reception data buffer according to the reception data address pointer.
[0047] In the present invention, a transmission state machine and a transmission pointer memory are set in the Bluetooth baseband transmitter, and a reception state machine and a reception pointer memory are set in the Bluetooth baseband receiver. The transmission state machine, the transmission pointer memory, the reception state machine, and the reception pointer memory constitute a time - diversity controller.
[0048] As Figure 5 shown, a Bluetooth broadcast system with isochronous link time diversity function includes a Bluetooth baseband transmitter and a Bluetooth baseband receiver. Among them, the Bluetooth baseband transmitter has a Bluetooth baseband top controller, a transmission link controller, a transmission data buffer, a transmission state machine, a transmission pointer memory, and a modulator; the Bluetooth baseband receiver has a Bluetooth baseband top controller, a reception link controller, a reception data buffer, a reception state machine, a reception pointer memory, and a demodulator.
[0049] The transmission state machine schedules the to-be-transmitted BIS data PDU according to the event parameters NSE, BN, PTO, IRC, and outputs the to-be-transmitted sub-event data offset address pointer corresponding to the to-be-transmitted BIS data PDU to the transmission link controller in the order after time diversity.
[0050] The reception state machine schedules the to-be-received BIS data PDU according to the event parameters NSE, BN, PTO, IRC, and outputs the to-be-received sub-event data offset address pointer corresponding to the to-be-received BIS data PDU to the reception link controller in the order after time diversity.
[0051] The transmission pointer memory stores the to-be-transmitted data offset address pointer of the to-be-transmitted BIS data PDU, and the reception pointer memory stores the to-be-received data offset address pointer of the to-be-received BIS data PDU;
[0052] The transmission state machine calculates the address index of the transmission pointer memory corresponding to each Bluetooth sub-event time slot through the event parameters and frame count, takes out the to-be-transmitted data offset address pointer of the corresponding BIS data PDU in the transmission pointer memory as the to-be-transmitted sub-event data offset address pointer according to this index, and outputs it to the transmission link controller. The transmission link controller adds the base address pointer sent by the Bluetooth baseband top controller to the to-be-transmitted data offset address pointer as the sub-event data address pointer and sends it to the transmission data buffer.
[0053] The reception state machine calculates the address index of the reception pointer memory corresponding to each Bluetooth sub-event time slot through the event parameters and frame count, takes out the to-be-received data offset address pointer of the corresponding BIS data PDU in the reception pointer memory as the to-be-received sub-event data offset address pointer according to this index, and outputs it to the reception link controller. The reception link controller adds the base address pointer sent by the Bluetooth baseband top controller to the to-be-received data offset address pointer as the sub-event data address pointer and sends it to the reception data buffer.
[0054] The Bluetooth baseband top controller is implemented by the CPU in the SOC or by a dedicated circuit. It receives the instructions and data from the reception firmware driver and completes the instruction parsing and data storage.
[0055] When the link layer is in the broadcast isochronous transmission state, the Bluetooth baseband top-level controller sends event parameters such as NSE, BN, PTO, and IRC to the transmission state machine, caches the data to be transmitted in segments according to the BIS sub-events into the transmission data cache based on the data address pointer to be sent, inputs the corresponding data offset address pointer to be sent into the transmission pointer memory in sequence, and sends the base address pointer to the transmission link controller.
[0056] When the link layer is in the broadcast isochronous reception state, the Bluetooth baseband top-level controller sends event parameters such as NSE, BN, PTO, and IRC to the reception state machine, inputs the data offset address pointer to be received into the reception pointer memory in sequence, and sends the base address pointer to the reception link controller.
[0057] After the BIS event ends, the Bluetooth baseband top-level controller adds the received sub-event data offset address pointer read from the reception pointer memory to the base address pointer stored by itself to obtain the received data address pointer, and sends the received data address pointer to the reception data cache so that the Bluetooth baseband top-level controller can retrieve the corresponding received data and transmit it to the upper-layer software through the firmware driver.
[0058] The transmit / receive data cache uses an external cache of the chip to save on-chip area and power consumption. The address and data transmission between the Bluetooth baseband top-level controller and the transmit / receive link controller and the transmit / receive data cache are carried out through the SOC chip bus and external communication interfaces (such as SPI, I2C, USB, and UART, etc.), and the data to be transmitted and the received data are stored in segments according to the data address pointer provided by the transmit / receive link controller or the Bluetooth baseband top-level controller.
[0059] The transmit link controller adds the data offset address pointer of the sub-event to be transmitted provided by the transmit state machine to the base address pointer provided by the Bluetooth baseband top-level controller to obtain the sub-event data address pointer, and sends it to the transmit data cache to read the corresponding BIS sub-event data, and attach the corresponding header and sync header according to the Bluetooth protocol, complete functions such as bitstream encoding, attaching CRC check bits, and encryption, form the data stream to be finally sent to the air channel, and output it to the modulator.
[0060] The receive link controller receives the Bluetooth isochronous data stream on the air channel by matching the sync header, completes functions such as bitstream decoding, decryption, and CRC check, parses the header of the successfully received (without check errors) BIS data PDU, and adds the data offset address pointer of the sub-event to be received provided by the receive state machine to the base address pointer provided by the Bluetooth baseband top-level controller to obtain the sub-event data address pointer, and sends it to the receive data cache so that the receive data cache can store the obtained BIS sub-event data at the corresponding address.
[0061] The modulator modulates the transmitted data stream into the Bluetooth 2.4 GHz band for transmission. The demodulator demodulates the received Bluetooth 2.4 GHz band signal into the original data stream for output.
[0062] Both the transmission state machine and the reception state machine have three count value variables BN_cnt, GC_cnt, and NSE_cnt. The counting rules are as follows:
[0063] (1) NSE_cnt counts for NSE. It is initialized to 0 at the start of a BIS event. At the end of each BIS sub-event, if the count value of NSE_cnt is less than or equal to NSE - 1, the count value of NSE_cnt is incremented by 1; otherwise, the counting of NSE_cnt in this BIS event terminates.
[0064] (2) BN_cnt counts for BN. It is initialized to 0 at the start of a BIS event. At the end of each BIS sub-event, if the count value of NSE_cnt is less than NSE - 1, when the count value of BN_cnt is less than BN - 1, the count value of BN_cnt is incremented by 1; otherwise, the count value of BN_cnt is cleared. At the end of a BIS sub-event, if the count value of NSE_cnt is equal to NSE - 1, the counting of BN_cnt in this BIS event terminates.
[0065] (3) GC_cnt counts for GC. It is initialized to 0 at the start of a BIS event. At the end of each BIS sub-event, if the count value of NSE_cnt is less than NSE - 1, when the count value of BN_cnt is equal to BN - 1, the count value of GC_cnt is incremented by 1; otherwise, the count value of GC_cnt remains unchanged. At the end of a BIS sub-event, if the count value of NSE_cnt is equal to NSE - 1, the counting of GC_cnt in this BIS event terminates.
[0066] The transmission state machine uses these count values to calculate the transmission pointer memory index in different states, and takes out the corresponding data offset address pointer in the transmission pointer memory as the data offset address pointer of the sub-event to be transmitted and outputs it to the transmission link controller.
[0067] The reception state machine uses these count values to calculate the reception pointer memory index in different states, and takes out the corresponding data offset address pointer in the reception pointer memory as the data offset address pointer of the sub-event to be received and outputs it to the reception link controller.
[0068] Such as Figure 6, the transmission state machine has three states: idle state, transmitting current BIS sub - event state, and transmitting future BIS sub - event state. In the idle state, the transmission state machine waits for the Bluetooth baseband top - layer controller to send a BIS event start instruction. After the BIS event starts, the transmission state machine enters the transmitting current BIS sub - event state and sends the pointer to the offset address of the sub - event to be transmitted corresponding to the index BN_cnt in the pointer memory to the transmission link controller. When the count value NSE_cnt = BN×IRC and BN×IRC < NSE, the transmission state machine enters the transmitting future BIS sub - event state and sends the pointer to the offset address of the sub - event data to be transmitted corresponding to the index (GC_cnt - IRC + 1)×PTO×BN + BN_cnt in the pointer memory to the transmission link controller. Each time the transmission state machine outputs a new pointer to the offset address of the sub - event data to be transmitted, the transmission link controller adds this offset address pointer to the base address pointer provided by the Bluetooth baseband top - layer controller to obtain the sub - event data address pointer and sends it to the transmission data buffer to fetch the corresponding BIS sub - event data in the transmission data buffer for subsequent framing and transmission. When the count value NSE_cnt = NSE, the current BIS event ends and the state machine enters the idle state.
[0069] Such as Figure 7 , the reception state machine has three states: idle state, receiving current BIS sub - event state, and receiving future BIS sub - event state. In the idle state, the reception state machine waits for the Bluetooth baseband top - layer controller to send a BIS event start instruction. After the BIS event starts, the reception state machine enters the receiving current BIS sub - event state and sends the pointer to the offset address of the sub - event data to be received corresponding to the index BN_cnt in the pointer memory to the reception link controller. When the count value NSE_cnt = BN×IRC and BN×IRC < NSE, the state machine enters the receiving future BIS sub - event state and outputs the pointer to the sub - event data address to be received corresponding to the index (GC_cnt - IRC + 1)×PTO×BN + BN_cnt in the pointer memory to the reception link controller. Each time the reception state machine outputs a new pointer to the sub - event data address to be received, the reception link controller adds this offset address pointer to the base address pointer provided by the Bluetooth baseband top - layer controller to obtain the sub - event data address pointer and stores the successfully received corresponding BIS sub - event data in the corresponding address of the reception data buffer. When the count value NSE_cnt = NSE, the current BIS event ends and the state machine enters the idle state.
[0070] The counting mechanism and state transition mechanism of the transmission state machine and the reception state machine can be implemented by a dedicated circuit or by a program running on the CPU in the SOC.
[0071] Using the above Bluetooth broadcast isochronous link time diversity controller, the Bluetooth baseband top-layer controller in the topology connection divides the data cache space according to the event parameters before the start of the BIS event. Specifically, the transmit data cache space can be allocated with a size of (PTO × (GC - IRC) + 1) × BN PDU data blocks, where each PDU data block is allocated space according to the size of the BIS data PDU with the maximum length, and the corresponding data offset address pointer is stored in the pointer memory. At the start of the first BIS event, the baseband top-layer controller fills the above transmit data cache. Subsequently, in each BIS event, the time diversity transmit controller schedules the data PDUs corresponding to BN current BIS sub-events for transmission. These PDUs will not be retransmitted after the end of the current BIS event, so the corresponding cache space can be overwritten in the next BIS event. Similarly, for the receive data cache, for specific event parameters, a size of (PTO × (GC - IRC) + 1) × BN PDU data blocks is also allocated, and the corresponding data offset address pointer is stored in the pointer memory. At the end of each BIS event, after the Bluetooth baseband top-layer controller retrieves the corresponding data PDU using the base address pointer and the current BIS sub-event offset address pointer, these cache spaces are overwritten in the next BIS event.
[0072] The transmit / receive pointer memory can use an external cache of the chip.
[0073] After each BIS event ends, the Bluetooth baseband transmitter discards the BN BIS sub-event data of the current BIS event that has ended and supplements new BN BIS sub-event data to be transmitted. For example Figure 8 , the write start address pointer in the transmit pointer memory (the pointer memory address corresponding to the first newly written data block in the next BIS event) points to the index base pointer of the current ended BIS event (the pointer memory address corresponding to index 0), and the index base pointer moves BN BIS sub-event data, thus pointing to the storage space of the first BIS sub-event data to be transmitted in the next BIS event. Before the start of the next BIS event, the Bluetooth baseband top-layer controller starts to continuously write BN BIS sub-event data based on this write start address pointer.
[0074] After each BIS event ends, the Bluetooth baseband receiver reads out the BN BIS sub-event data of the current BIS event that has ended and outputs it to the upper protocol stack. The index base pointer in the receive pointer memory moves BN BIS sub-event data, thus pointing to the storage space of the first BIS sub-event data to be received in the next BIS event.
[0075] The address pointer used by the transmit / receive link controller when reading and writing data shall be the offset address pointer output by the time diversity controller plus the value of the base address pointer provided by the Bluetooth baseband top-level controller. The transmit / receive pointer memory is a cyclic storage structure. When the index obtained after calculation or movement exceeds the highest index of the cache structure, the exceeded part continues to increment starting from the lowest index of the storage structure.
[0076] The mechanism of the present invention will be described below by taking the BIS event with BN = 2, IRC = 2, PTO = 4, and NSE = 6 as a specific example. In a BIS event, the Bluetooth baseband transmit and receive processes based on the present invention are as Figure 9 and 10 shown.
[0077] First, the case when the Bluetooth baseband is a broadcast isochronous transmitter will be described. The Bluetooth baseband enters the broadcast isochronous transmission state by transmitting three types of BLE advertisement packets, namely ADV_EXT_IND, AUX_ADV_IND, and AUX_SYNC_IND. Before transmitting the BIS data PDU, the Bluetooth baseband top-level controller allocates storage space for (PTO × (GC - IRC) + 1) × BN = 10 PDU data blocks in the cache, sends the base address of this cache space to the transmit link controller, and writes 10 BIS data PDUs from P0 to P9 to the corresponding addresses. At the same time, space is allocated in the cache to store the offset addresses of 10 PDUs, that is, the pointer memory. The offset addresses of 10 PDUs are written into the pointer memory in the transmission order. After writing, the indexes 0 to 9 of the pointer memory correspond to the PDUs numbered 0 to 9.
[0078] The Bluetooth baseband top-level controller sends the event parameters BN, IRC, PTO, and NSE to the time diversity controller transmit state machine, then sends a BIS event start instruction, the transmit state machine counter starts, and the state machine enters the transmit current BIS sub-event state.
[0079] In the first BIS sub-event frame, the count value BN_cnt is 0. Therefore, the time diversity transmit state machine reads out the offset address pointer corresponding to index 0 in the pointer memory and outputs it to the transmit link controller. The transmit link controller reads out the PDU numbered 0 according to this offset address and the base address for framing and transmission. After the transmission is completed, the sub-event ends. At this time, the three count values are updated to BN_cnt = 1, GC_cnt = 0, and NSE_cnt = 1.
[0080] In the second BIS sub-event frame, the count value BN_cnt is 1. Therefore, the time diversity transmission state machine reads out the pointer of the offset address of the sub-event data corresponding to index 1 in the pointer memory and outputs it to the transmission link controller. The transmission link controller reads out the PDU with sequence number 1 according to this offset address and the base address for framing and transmission. After the transmission is completed, the sub-event ends. At this time, the three count values are updated to BN_cnt = 0, GC_cnt = 1, and NSE_cnt = 2.
[0081] In the third and fourth BIS sub-event frames, similar to the operations in the previous two frames, the PDUs with sequence numbers 0 and 1 are retransmitted according to the count value BN_cnt respectively. After the fourth sub-event ends, the three count values are updated to BN_cnt = 0, GC_cnt = 2, and NSE_cnt = 4.
[0082] When the fifth BIS sub-event starts, since NSE_cnt = BN × IRC at this time, the transmission state machine enters the state of transmitting future sub-events. The transmission state machine reads out the pointer of the offset address of the sub-event data corresponding to index (GC_cnt - IRC + 1) × PTO × BN + BN_cnt = 8 in the pointer memory and outputs it to the transmission link controller. The transmission link controller reads out the PDU with sequence number 8 according to this offset address and the base address for framing and transmission. After the transmission is completed, the sub-event ends. At this time, the three count values are updated to BN_cnt = 1, GC_cnt = 2, and NSE_cnt = 5.
[0083] In the sixth BIS sub-event frame, the transmission state machine reads out the pointer of the offset address of the sub-event data to be transmitted corresponding to the index of (GC_cnt - IRC + 1) × PTO × BN + BN_cnt = 9 in the pointer memory and outputs it to the transmission link controller. The transmission link controller reads out the PDU with the serial number 9 according to this offset address and the base address for framing and transmission. After the transmission is completed, the sub-event ends. Since NSE_cnt = NSE - 1 at this time, the BN_cnt and GC_cnt counters stop counting, and NSE_cnt is updated to 6. At this time, NSE_cnt = NSE, and the transmission state machine enters the idle state, and the first BIS event ends. According to the write start address pointer at this time (pointing to the offset address of the data PDU with the index of 0), the Bluetooth baseband top controller overwrites the PDUs with the serial numbers 0 and 1 in the transmission buffer with the PDUs with the serial numbers 10 and 11. Subsequently, the index base pointer of the pointer memory moves BN = 2 bits, that is, it moves to the corresponding bit of the PDU with the serial number 2. In the next BIS event, when the transmission state machine calculates that the index is 0, it will read out the pointer of the offset address corresponding to the PDU with the serial number 2; when calculating that the index is 8 and 9, due to the circular storage structure of the pointer memory, when the sum of the index base pointer and the index value exceeds the maximum depth (10 in this embodiment) corresponding index bit, it will continue to increment starting from the lowest bit. Therefore, the indexes 8 and 9 will respectively correspond to the offset addresses of the PDUs with the serial numbers 10 and 11. And so on, the order of the PDU serial numbers transmitted in the second BIS event is: p2, p3, p2, p3, p10, p11, and the order of the PDUs after time diversity is the same as that in Figure 3 the same as that in
[0084] When the Bluetooth baseband is a broadcast isochronous receiver, the operating mechanisms of the counters and the state machine are the same as those during transmission. The only difference is that during reception, the link controller writes data to the receive data buffer based on the pointer of the offset address of the sub-event data to be received and the base address pointer provided by the receive state machine, while the Bluetooth baseband top controller reads out the data from the receive data buffer.
[0085] The above embodiments only further elaborate on the purpose, the content of the invention, and the beneficial effects of the present invention, and are not used to limit the protection scope of the present invention. For those skilled in the art, there may be situations inconsistent with this embodiment when designing according to specific applications, such as different BIS event parameters, different buses used for transmitting data between modules, etc. Without departing from the principle of the present invention, it should also be within the protection scope of the present invention.
Claims
1. A Bluetooth broadcast system with isochronous link time diversity function, including a Bluetooth baseband transmitter and a Bluetooth baseband receiver, characterized in that: The Bluetooth baseband transmitter has a Bluetooth baseband top - layer controller, a transmission link controller, a transmission data buffer, a transmission state machine, a transmission pointer memory, and a modulator; the Bluetooth baseband receiver has a Bluetooth baseband top - layer controller, a reception link controller, a reception data buffer, a reception state machine, a reception pointer memory, and a demodulator; The transmission state machine, the transmission pointer memory, the reception state machine, and the reception pointer memory constitute a time diversity controller; The transmission state machine schedules the to - be - transmitted BIS (Broadcast Isochronous Stream) data PDU according to the event parameters NSE (Number of Subevents), BN (Burst Number), PTO (Pre - Transmission Offset), IRC (Immediate Repetition Count), and outputs the to - be - transmitted sub - event data offset address pointer corresponding to the to - be - transmitted BIS data PDU to the transmission link controller in the order after time diversity; The reception state machine schedules the to - be - received BIS data PDU according to the event parameters NSE, BN, PTO, IRC, and outputs the to - be - received sub - event data offset address pointer corresponding to the to - be - received BIS data PDU to the reception link controller in the order after time diversity; The transmission pointer memory stores the to - be - transmitted data offset address pointer of the to - be - transmitted BIS data PDU, and the reception pointer memory stores the to - be - received data offset address pointer of the to - be - received BIS data PDU; The transmission state machine calculates the address index of the transmission pointer memory corresponding to each Bluetooth sub - event time slot through event parameters and frame count, and takes out the to - be - transmitted data offset address pointer of the corresponding BIS data PDU in the transmission pointer memory according to this index, and outputs it as the to - be - transmitted sub - event data offset address pointer to the transmission link controller; The reception state machine calculates the address index of the reception pointer memory corresponding to each Bluetooth sub - event time slot through event parameters and frame count, and takes out the to - be - received data offset address pointer of the corresponding BIS data PDU in the reception pointer memory according to this index, and outputs it as the to - be - received sub - event data offset address pointer to the reception link controller; When the link layer state is the broadcast isochronous transmission state, the Bluetooth baseband top - layer controller sends the event parameters to the transmission state machine, caches the to - be - transmitted data into the transmission data buffer in segments according to the BIS sub - events according to the to - be - transmitted data address pointer, and inputs the corresponding to - be - transmitted data offset address pointer into the transmission pointer memory in order, and sends the base address pointer to the transmission link controller; When the link layer state is the broadcast isochronous reception state, the Bluetooth baseband top - layer controller sends the event parameters to the reception state machine, inputs the to - be - received data offset address pointer into the reception pointer memory in order, and sends the base address pointer to the reception link controller; After the BIS event ends, the Bluetooth baseband top-level controller adds the received sub-event data offset address pointer read from the receive pointer memory to the base address pointer stored in itself to obtain the receive data address pointer, sends the receive data address pointer to the receive data buffer, and transmits it to the upper-layer software through the firmware driver; The transmit link controller adds the sub-event data offset address pointer provided by the transmit state machine to the base address pointer provided by the Bluetooth baseband top-level controller to obtain the sub-event data address pointer, and sends it to the transmit data buffer to read the corresponding BIS sub-event data, and appends the corresponding header and sync header according to the Bluetooth protocol, completes bitstream encoding, appends CRC check bits, encrypts, forms the data stream to be finally sent to the air channel and outputs it to the modulator; The receive link controller receives the Bluetooth isochronous data stream of the air channel by matching the sync header, completes bitstream decoding, decryption, and CRC check functions, parses the header of the successfully received BIS data PDU, and adds the sub-event data offset address pointer provided by the receive state machine to the base address pointer provided by the Bluetooth baseband top-level controller to obtain the sub-event data address pointer, and sends it to the receive data buffer to store the corresponding BIS sub-event data; The modulator modulates the transmit data stream into the Bluetooth 2.4 GHz band for transmission; the demodulator demodulates the received Bluetooth 2.4 GHz band signal into the original data stream for output; Both the transmit state machine and the receive state machine have three count value variables BN_cnt, GC_cnt, and NSE_cnt, which are used to count for NSE, BN, and GC (Group Count) respectively; The transmit state machine uses these count values to calculate the transmit pointer memory index in different states, and the receive state machine uses these count values to calculate the receive pointer memory index in different states; The transmit state machine has three states: idle state, transmit current BIS sub-event state, and transmit future BIS sub-event state; In the idle state, the transmit state machine waits for the BIS event start instruction sent by the Bluetooth baseband top-level controller; after the BIS event starts, the transmit state machine enters the transmit current BIS sub-event state and sends the sub-event offset address pointer corresponding to BN_cnt in the transmit pointer memory to the transmit link controller; when the count value NSE_cnt = BN × IRC and BN × IRC < NSE, the transmit state machine enters the transmit future BIS sub-event state and sends the sub-event data offset address pointer corresponding to (GC_cnt - IRC + 1) × PTO × BN + BN_cnt in the transmit pointer memory to the transmit link controller; every time the transmit state machine outputs a new sub-event data offset address pointer to be transmitted, the transmit link controller adds the offset address pointer to the base address pointer provided by the Bluetooth baseband top-level controller to obtain the sub-event data address pointer, and sends it to the transmit data buffer to fetch the corresponding BIS sub-event data in the transmit data buffer for subsequent framing and transmission; When the count value NSE_cnt = NSE, the current BIS event ends and the state machine enters the idle state; The receiving state machine has three states: idle state, receiving the current BIS sub-event state, and receiving the future BIS sub-event state; In the idle state, the receiving state machine waits for the BIS event start instruction sent by the Bluetooth baseband top-level controller; After the BIS event starts, the receiving state machine enters the receiving the current BIS sub-event state and sends the offset address pointer of the sub-event data to be received corresponding to the index BN_cnt in the receive pointer memory to the receive link controller; When the count value NSE_cnt = BN × IRC and BN × IRC < NSE, the state machine enters the receiving the future BIS sub-event state and outputs the address pointer of the sub-event data to be received corresponding to the index (GC_cnt - IRC + 1) × PTO × BN + BN_cnt in the receive pointer memory to the receive link controller; After the receive state machine outputs a new address pointer of the sub-event data to be received each time, the receive link controller adds the offset address pointer and the base address pointer provided by the Bluetooth baseband top-level controller to obtain the sub-event data address pointer, and stores the successfully received corresponding BIS sub-event data in the corresponding address of the receive data buffer; When the count value NSE_cnt = NSE, the current BIS event ends and the state machine enters the idle state; For the Bluetooth broadcast system with the above isochronous link time diversity function, the Bluetooth baseband top-level controller in the topology connection divides the data buffer space according to the event parameters before the BIS event starts; Allocate the size of (PTO × (GC - IRC) + 1) × BN PDU data blocks for the transmit data buffer space, where each PDU data block is allocated space according to the size of the maximum-length BIS data PDU, and store the corresponding data offset address pointer in the transmit pointer memory; At the start of the first BIS event, the baseband top-level controller fills the above transmit data buffer. Subsequently, in each BIS event, the time diversity controller schedules the data PDUs corresponding to BN current BIS sub-events for transmission. These PDUs will not be retransmitted after the current BIS event ends, and their corresponding buffer spaces will be overwritten in the next BIS event; The receive data buffer space is also allocated the size of (PTO × (GC - IRC) + 1) × BN PDU data blocks, and the corresponding data offset address pointer is stored in the receive pointer memory. At the end of each BIS event, after the Bluetooth baseband top-level controller uses the base address pointer and the current BIS sub-event offset address pointer to fetch the corresponding data PDU, these buffer spaces will be overwritten in the next BIS event; After each BIS event ends, the Bluetooth baseband transmitter discards the BN BIS sub-event data of the ended current BIS event and replenishes new BN BIS sub-event data to be transmitted; The write start address pointer in the transmit pointer memory points to the index base pointer of the currently completed BIS event. The index base pointer then moves BN BIS sub-event data, thereby pointing to the storage space of the first BIS sub-event data to be transmitted in the next BIS event. Before the start of the next BIS event, the Bluetooth baseband top-level controller starts continuously writing BN BIS sub-event data based on this write start address pointer. After each BIS event ends, the Bluetooth baseband receiving end reads out the BN BIS sub-event data of the currently completed BIS event and outputs it to the upper layer protocol stack. The index base pointer in the receive pointer memory moves BN BIS sub-event data, thereby pointing to the storage space of the first BIS sub-event data to be received in the next BIS event. The address pointer used by the transmit / receive link controller to read and write data should be the offset address pointer output by the time diversity controller plus the value of the base address pointer provided by the Bluetooth baseband top-level controller. The transmit / receive pointer memory is a cyclic storage structure. When the index obtained after calculation or movement exceeds the highest index of the cache structure, the excess part continues to increment starting from the lowest bit of the storage structure.
2. The Bluetooth broadcast system with isochronous link time diversity function according to claim 1, wherein: The aforementioned Bluetooth baseband top-level controller is implemented by the CPU in the SOC or by a dedicated circuit, receives instructions and data from the receive firmware driver, and completes instruction parsing and data storage.
3. The Bluetooth broadcast system with isochronous link time diversity function as claimed in claim 1, wherein: The transmit data cache and receive data cache use an external cache of the chip. The address and data transfer between the Bluetooth baseband top-level controller and the transmit / receive link controller and the transmit / receive data cache are carried out through the SOC chip bus and the external communication interface, and the data to be transmitted and the received data are stored in segments according to the data address pointer provided by the transmit / receive link controller or the Bluetooth baseband top-level controller.
4. The Bluetooth broadcast system with an isochronous link time diversity function as claimed in claim 1, wherein: The aforementioned transmit pointer memory and receive pointer memory use an external cache of the chip.
5. The Bluetooth broadcast system with isochronous link time diversity function according to claim 1, wherein The counting rules of the transmit state machine and the receive state machine are as follows: (1) NSE_cnt counts for NSE, is initialized to 0 at the start of the BIS event, and at the end of each BIS sub-event, if the count value of NSE_cnt is less than or equal to NSE - 1, the count value of NSE_cnt is incremented by 1, otherwise the counting of NSE_cnt in this BIS event terminates. (2) BN_cnt counts for BN, is initialized to 0 at the start of the BIS event, and at the end of each BIS sub-event, if the count value of NSE_cnt is less than NSE - 1, when the count value of BN_cnt is less than BN - 1, the count value of BN_cnt is incremented by 1, otherwise the count value of BN_cnt is cleared. At the end of the BIS sub-event, if the count value of NSE_cnt is equal to NSE - 1, the counting of BN_cnt in this BIS event terminates. (3) The GC_cnt counts the GCs. It is initialized to 0 at the start of the BIS event. At the end of each BIS sub-event, if the count value of NSE_cnt is less than NSE - 1, then when the count value of BN_cnt is equal to BN - 1, the count value of GC_cnt is incremented by 1; otherwise, the count value of GC_cnt remains unchanged. At the end of the BIS sub-event, if the count value of NSE_cnt is equal to NSE - 1, the counting of GC_cnt in this BIS event terminates.
6. The Bluetooth broadcast system with an isochronous link time diversity function according to claim 1, characterized in that The counting mechanism and state transition mechanism of the sending state machine and the receiving state machine are implemented by dedicated circuits or by running programs on the CPU in the SOC.
Citation Information
Patent Citations
Bluetooth communication method and electronic device
CN112740728A
Bluetooth protocol data packet loss compensation method based on binaural connection
CN114501412A