MIPI SoundWire provides an optional mechanism for transporting register operations at higher bandwidth than mandatory command mechanism. Bulk Register Access (BRA) protocol is a particular format of data transport to achieve the higher bandwidth. While normal commands can only be driven at the rate of one command per frame, Bulk Register Access provides the option to read/write as many as 511 registers in one frame. So a clock frequency of 5MHz and frame size of 256*16(4096 BitSlots or 2048 clock periods) will increase the effective rate of data transfer to approximately 1.2 MBps. MIPI SoundWire supports a frequency of up to 12 MHz, so the bandwidth can be even higher. In this blog I’ll focus on what a Bulk Register Access payload stream looks like and how it can be used to achieve higher bandwidth.
Since BRA is in no way related to actual audio transport we have the freedom to choose any values of word length and sample interval as per our needs. However, there are some restrictions as our aim is to transport a minimum of 11 bytes even in the worst case scenario (with 11 bytes we are only accessing 1 byte which is defeating the whole purpose of BRA, a normal command in this case would be more efficient). To use as many bits available in a frame for transporting data, sample word length can be set equal to hwidth and sample interval equal to number of columns. HStop can be set to max column and HStart to column 0 or 1 when lane 0 is being used. Hence the specification recommends that Port 0 should support all values of word length from 1 to 16 as it provides the most efficient packing of data.
Data on port 0 can be easily multiplexed with other ports when desired. Keeping a separate sub-frame for BRA when multiplexing it with other Ports looks like a better option as it removes any restrictions on sample interval which are present when multiplexing both Port 0 and “normal” data ports in the same sub-frame. However when it comes to test modes for BRA, any kind of multiplexing can be used without trouble as now we are not interested in ensuring that our BRA block should be complete within a frame.
Another important differentiating feature of BRA is that it is packed in bytes without taking channel boundaries into consideration. All payload channel samples falling within a frame are collectively used for transporting one BRA block. Since a BRA block is always packed in bytes all bits beyond a multiple of 8 are ignored even if they fall within the frame. With a new frame a new BRA block starts, so if 64 contiguous addresses are to be read and only 60 addresses can be read in one frame due to limitations on available bits for payload, the remaining 4 addresses will be read in the next frame/next BRA block. The next BRA block will have the 61st address as the starting address and number of bytes will be set to 4 so that the remaining 4 bytes are read.
Let’s take Frame size = 10 columns * 60 rows and number of bytes to be read = 64
Total number of bits that’ll be used for such a BRA block -> (64 + 10) bytes * 8 = 592 bits
Payload Parameters-> Hstart 1, Hstop 9 Word length = 9, Sample Interval = 10
Available payload bits in frame -> 60*9 = 540
Number of bits that can be used = 540 – 540%8 = 536
Number of bytes that can fit one frame = 536/8 = 67
So only 64-7 = 57bytes can be read in this frame, total bits in block 67 *8 = 536
The frame would look like as shown below in table -1.
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
1 |
C |
|
|
|
|
|
|
|
|
|
2 |
O |
|
|
|
|
|
|
|
|
|
3 |
N |
|
|
|
|
|
|
|
|
|
. |
T |
|
|
|
|
|
|
|
|
|
. |
R |
|
|
|
|
|
|
|
|
|
. |
O |
|
|
|
|
|
|
|
|
|
. |
L |
|
|
|
|
|
|
|
|
|
|
W |
|
|
|
|
|
|
|
|
|
|
O |
|
|
|
|
|
|
|
|
|
|
R |
|
|
|
|
|
|
|
|
|
48 |
D |
|
|
|
|
|
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
60 |
|
|
|
|
|
|
|
|
|
|
Remaining 7 bytes can be accessed in another frame, total bits in this BRA block: 17*8 = 136
The resulting frame is shown below in table-2.
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
1 |
C |
|
|
|
|
|
|
|
|
|
2 |
O |
|
|
|
|
|
|
|
|
|
3 |
N |
|
|
|
|
|
|
|
|
|
. |
T |
|
|
|
|
|
|
|
|
|
. |
R |
|
|
|
|
|
|
|
|
|
15 |
O |
|
|
|
|
|
|
|
|
|
16 |
L |
|
|
|
|
|
|
|
|
|
. |
W |
|
|
|
|
|
|
|
|
|
. |
O |
|
|
|
|
|
|
|
|
|
. |
R |
|
|
|
|
|
|
|
|
|
48 |
D |
|
|
|
|
|
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
60 |
|
|
|
|
|
|
|
|
|
|
Let’s take the same frame with same sub –frame and word length = 12 and sample interval = 24
I’m not going into detailed calculations here but the packed BRA block would look something like this (Table 3 BRA Block 3). All channel samples falling within the frame would collectively be used to send one BRA block.
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
1 |
C |
|
|
|
|
|
|
|
|
|
2 |
O |
|
|
|
|
|
|
|
|
|
3 |
N |
|
|
|
|
|
|
|
|
|
. |
T |
|
|
|
|
|
|
|
|
|
. |
R |
|
|
|
|
|
|
|
|
|
. |
O |
|
|
|
|
|
|
|
|
|
. |
L |
|
|
|
|
|
|
|
|
|
|
W |
|
|
|
|
|
|
|
|
|
|
O |
|
|
|
|
|
|
|
|
|
|
R |
|
|
|
|
|
|
|
|
|
48 |
D |
|
|
|
|
|
|
|
|
|
We will talk more about other aspects of Bulk Register Access such as deferred command response and interrupts in case of failed commands, in our upcoming blogs.
For more information on MIPI Soundwire, you can download our whitepaper, and visit http://synopsys.com/vip
By the way we have published an informative series of blogs on MIPI Soundwire. In MIPI Soundwire: Digital Audio Simplified, we mentioned that digital audio formats, including Pulse Code Modulation (PCM) and Pulse Density Modulation (PDM), are target applications for MIPI Soundwire. Later, we discussed Digital Audio Streams and Channels, Benefits of MIPI Soundwire and MIPI Soundwire Source Code Test Suites.
Authored by Parul Raj