Is there any method of reading and writing more than 1 DW from the user-space of PCI device? I am currently using https://github.com/numato-viya/pcimem this code for accessing the data from the user space of the PCI device but the limitation of this code is it can access only 1 DW from the Userspace. But I want to access more than one DW from the userspace in one TLP. Can you help me how to access more than 1DW in one TLP?
Asked
Active
Viewed 211 times
0
-
Do you mean you want to access a QWORD, or do you mean you want to access a bunch of consecutive DWORDs? If the latter, I think there's no way to do it from the CPU. (I'm sure there's no way to do it from an x86 or x86-64 CPU; I'm less sure about other types of processors. You didn't mention your CPU architecture.) – prl Jan 16 '18 at 07:57
-
Currently, I am using my Ubuntu OS on my Intel core I7 4th generation processor for accessing a bunch of consecutive DWORDs in one TLP from my memory implemented on my PCIe device. – Hamayoun Ahmad Jan 19 '18 at 04:59
-
Sorry for miss understanding currently I am not accessing a bunch of consecutive DWORDs I am trying to access. – Hamayoun Ahmad Jan 19 '18 at 09:20
2 Answers
0
You could easily add a 'd' option to that code to use a uint64_t. On a 64-bit processor, it would generate an 8-byte access. The device is not obligated to support 8-byte accesses, though.

prl
- 11,716
- 2
- 13
- 31
-
Thanks for quick reply. I tried "uint64_t " but this doesn't work because I am using a 32-bit address line mode. Actually, I am trying to find a way to increase the length of TLP. – Hamayoun Ahmad Jan 19 '18 at 04:55
0
You can use AVX instructions to perform larger memory transfers. AVX512 can move 64 bytes in a single operation.

prl
- 11,716
- 2
- 13
- 31
-
Thanks for reply can you explain a little bit about how to use AVX or a link which can helpful for me? – Hamayoun Ahmad Jan 22 '18 at 04:36