[raspi-internals] Re: QPU Tutorials/Samples

  • From: Herman Hermitage <hermanhermitage@xxxxxxxxxxx>
  • To: "raspi-internals@xxxxxxxxxxxxx" <raspi-internals@xxxxxxxxxxxxx>
  • Date: Wed, 19 Feb 2014 15:09:54 +1200

> compiling. Sent a pull request with what I have so far. I am still  
> missing the rotator and packer support - any chance you can document  
> this in the bit level? 

I think got more a handle on the packer now.

Given:
  packbits:8, with packbits = unpack:3 packmul:1 pack:4

Seen behaviour:

  packmul=0 => 
    Read of ra0 to ra63 is unpacked according to 'unpack' with the bank-a 
unpacker.
    Write of ra0 to ra63 is packed according to 'pack' with the bank-a packer.
    Read of rb0 to rb63, or r0 to r3 is not unpacked. (r4 unknown).
    Write of rb0 to rb63, or r0 to r4 is not packed. (no writes to r4).

  packmul=1 => 
    Read of ra4 is unpacked according to 'unpack' by the r4 unpacker.
    Write back of multiplier-alu to r0..r3, ra0...r63, rb0..r63 is packed.
    Write back of add-alu is not packed.

I think that gives me enough to add some support to the assembler for more 
experimentation.

In terms of the bits, its like [8d, 8c, 8b, 8a] or [16b, 16a]  (ie 8a and 16a 
are at the lower end).

> ldi with 32 bit argument: 
> Original     - ldi.never -, 0x00000019 #/* 00000180: 00000019 e80009e7 */ 
> Compiled  - ldi.never -, 0x00000019 #/* 00000180: 00000019 e00009e7 */ 
>  
> Note the 8 in the second word, which appears in the original binary but  
> not in our decompile-recompile result. The assembly documents these 8  
> bits as "unknown", any guess as for the meaning of this field? 

To what extend those 8 bits are still the packer, I'm not sure.

For instance:
  0x40302010, 0xe0020027, /* ldi ra0, 0x40302010 */
  0x009e7000, 0x100009e7, /* nop */
  0x000100f0, 0xe0920027, /* ldi ra0.16as, 0x00100f0 */
  // I think this produces ra0 = 0x40307fff  (ie saturating write to .16a of 
ra0)

So it might be that
  0x00000019, 0xe80009e7, /* ldi -, 0x00000019.8a */                            
          

Other related posts: