Directio:The SRIo directio transfer class is similar to a memcopy transfer between two SRIo devices. one of the devices is the master that initiates the transfer. the second deviceis the slave that responds to the masters requests. the slave device application normallydoes not become aware of the access (the accessed salve DSP does not know the access initiated by the master DSP through SRIo ). the master must know the destination memoryaddress for running Directio transfer (the master must know the access address of the salve end to be accessed, that is, if the master wants to write/read data of several bytes starting from the address 0x80000000 on the salve end, must know the address 0x80000000 ).
The direct Io mode can be further divided into the following transmission formats (each transmission mode has its own transmission package ):
1. nwrite: normal write operation. The number of writes directly to the peer memory. The maximum size of a package is 256 bytes, and the receiving end is not required to respond.
2. nwrite_r: nwrite (nwrite with response) with response, which requires the receiving end to respond.
3. swrite: stream write. The data length must be an integer multiple of 8 bytes and the receiver is not required to respond.
4. nread: Common read operation. You can directly retrieve the number of memories from the peer. The maximum size of a package is 256 bytes, that is, the master DSP reads the data in the memory of the slave DSP.
As mentioned above, SRIo's direct Io package, in fact, c66x DSP's SRIo package includes direct Io package, doorbell package, message package, and maintenance package. The most important among them is the direct Io package and the doorbell package transmission control. For the direct Io package and the doorbell package, its transmission control module is divided into LSU (load/Store Unit) control unit and MAU (memo-ry access unit) control unit. LSU is used to send direct Io packets and doorbell packets, while MAU is responsible for receiving direct Io packets.
The LSU unit is actually a series of registers. On the msater side, if the master DSP wants to access (read/write) the memory data of the slave DSP through SRIo, the master needs to configure the LSU register, the hardware will package the content in the Register into the package (for example, during the nwrite operation) as the package header. Eight LSU groups are provided on the c66x DSP to send direo data. Each LSU has seven registers. When the fifth register is written, the data is sent out, the 6th registers are used to detect the current LSU status.
LSU register (refer to SRIo guide 3.8 LSU/MAU registers)
The read/write and doorbell operations are mainly controlled by the seven registers in which the values are automatically added to the package. On the SRIo bus, each SRIo device has a corresponding device address. The device address is like the ID of an SRIo device, used to distinguish different SRIo devices. When an SRIo device on the SRIo bus performs read/write access, the package it sends contains the device address, only the SRIo device whose device address matches the device address of the package will respond to the transfer. SRIo address MSB and SRIo address LSB constitute 64-bit addressing, indicating the address of the SRIo device to be accessed. The Development Board only uses 32-bit addressing. Therefore, SRIo address MSB is 0, and SRIo address LSB indicates the address of the accessed DSP. The DSP Address indicates the address of the local DSP. For example, when the operation is nwrite, the data at this address will be written to the SRIo address LSB address of the slave DSP. Byte_count indicates the number of bytes transmitted. A read/write operation (which can be many packets) can transmit up to 4 Kbytes of data, which can be divided into multiple packages for transmission, because the maximum size of payload for each package is 256 bytes. Destid is the ID of the target device, used to distinguish devices on the SRIo bus. Drbll info is used for doorbell events. This segment is used to interrupt the target DSP. Packet type indicates the type of the current transmission, such as nread, nwrite, and doorbell.
For the DSP, after SRIo is initialized, the master DSP can send data to the slave DSP through SRIo, but note that slave does not know when the master starts to send data, when the master sends the data, so generally the master will automatically generate a doorbell (via the doorbell message, that is, the doorbell package) information to inform slave after the data transmission is complete, after the master data has been sent, the slave SRIo hardware can trigger an interruption after receiving the doorbell message, so that the slave can process the data. After the data is complete, the function of sending the doorbell message is automatically triggered by setting the LSU register. That is, when the drbll_val bit of lsu_reg3 is set to 1 (means: there is doorbell information which needs to be sent out at the end of the packet), which indicates that the drbll_info value of lsu_reg5 is valid, so that drbll_info (16bit, doorbell message payload is only 16bit) will be sent to the slave DSP through the doorbell package.