AI Engine-ML Intrinsics User Guide
(v2023.2)
|
Compressed load operations load a compressed vector and expand it into an AIE-ML register. More...
Compressed load operations load a compressed vector and expand it into an AIE-ML register.
The decompression treats the first 32 bits as a mask where each bit will correspond to an eight bits word. If given bit of the mask has value zero, then eight bits of zeros will be inserted in the corresponding position. Otherwise eight bits will be taken from the values received from memory. As the amount of data read from the memory depends on the mask a second pointer is used to mark the location from which the next eight bits will be read.
The following code snippet shows how the pointers are used. Here, p points to the memory location from which the buffer will be filled and p2 points to the next available data inside the buffer. 32 bit must always be read from memory as that is the mask that will be used for the decompression. This example shows the extreme cases in which either all mask bits are zero or all mask bits are one. Depending on the amount of data decmpressed from pointer p2 is incremented accordingly. This is also needed if the program switches between different streams of data. In that case p2 must be backed up before the switch to another data stream takes place.
To switch between streams of data the internal buffer pointer p2 must be backed up. This pointer is given as an output in some versions of the pop, fill and reset functions. Once p2 has been backed up, the internal buffer can be initialized with data from the the second stream of data. This is done by passing the memory pointer to this second stream to the compr_reset function.
To return to the original stream of data the backup of p2 is passed as the memory pointer to compr_reset. The following example shows how to switch between different streams of data.
Modules | |
Compressed Load Reset Operations | |
Compressed Load of Eight Vectors | |
Compressed Load of Four Vectors | |
Compressed Load of One Vector | |
Compressed Load of Two Vectors | |