How can I genarate a test pattern for a compliance test? Is there a register in i.MX6 for this or can I use a tool or do I need special code for this?
You might want to take a look at this i.MX6Q PCIe EP/RC Validation System if you want to do that in Linux.
If you want to make your own test without any OS you can download the Bare-metal SDK for the i.MX 6 series, which you can find here: SABRE Board Reference Design|Freescale under the Software Development Tools section > Software Development kits > i.MX 6Series Platform SDK.
Follow the instructions given in README.pdf in order to compile your code.
There's a PCIe driver in there and a test function. You can modify both in order to run the desired tests.
Retrieving data ...