cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nag.chil
Observer
Observer
4,596 Views
Registered: ‎03-29-2016

PCIe Swizzling function

Hello iam having data in Little Endian of 64-bit format data_out[63:0]

i have assumed in byte wise like this B7 B6 B5 B4 B3 B2 B1 B0

If i want to send this QW as payload and send, i have to swizzle this and send to TX_ENGINE.

 

My doubt is the swizzled data will look like how...??

data_out_swizzled[64:0]= ?

 

1. B4 B5 B6 B7 B0 B1 B2 B3

2. B0 B1 B2 B3 B4 B5 B6 B7

3. or any other (please specify)

 

 

0 Kudos
Reply
4 Replies
balkris
Xilinx Employee
Xilinx Employee
4,581 Views
Registered: ‎08-01-2008

check this guide packet analysis section
http://www.xilinx.com/Attachment/Xilinx_Answer_56616_7_Series_PCIe_Link_Training_Debug_Guide.pdf
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Reply
muzaffer
Teacher
Teacher
4,578 Views
Registered: ‎03-31-2012

checkout htonl and nltoh functions: http://linux.die.net/man/3/htonl
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Reply
nag.chil
Observer
Observer
4,508 Views
Registered: ‎03-29-2016

Hello @muzaffer this functions will be useful when we write device driver...

I want in the hardware side...

So anyone can help me..

0 Kudos
Reply
muzaffer
Teacher
Teacher
4,443 Views
Registered: ‎03-31-2012

little endian mean B0 goes to data_out[7:0], B1 to data_out[15:8] ... B7 goes to data_out[63:56].
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Reply