by support »
It looks like your issue is in C language, and not PCIe.
The question lies in the type of this->iRegPciBase. I suppose you want it to be a pointer to a 32-bit word, but you have something else, so the "+" operation isn't multiplied by 4. This results in successive unaligned 32-bit words. You wanted addr, addr+4, addr+8 etc. and got addr, addr+1, addr+2 instead.
It looks like your issue is in C language, and not PCIe.
The question lies in the type of this->iRegPciBase. I suppose you want it to be a pointer to a 32-bit word, but you have something else, so the "+" operation isn't multiplied by 4. This results in successive unaligned 32-bit words. You wanted addr, addr+4, addr+8 etc. and got addr, addr+1, addr+2 instead.