I'm working on a project which uses a LEON2 (SparcV8) processor and we have a PCI bus that connects other FPGA and the processor.
Running on this we have a multitasking application using RTEMS and written in C.
Now I'm not familiar at all with processor and pci architecture that's why I come to you guys for enlightenment.
The problem is this : Consider that we have one RTEMS task that performs a read of memory on the PCI bus. On our board a PCI access is approximatively 2us long. Now a colleague of mine raised an issue, what if during that PCI read the task scheduler of RTEMS decided that it was time for another task to fire, and that this task job is to also perform a PCI read. His point is that the first PCI read performed before the task switching would be corrupted by the second PCI read which would be performed by the second task before the first one is performed.
Could this case happen ?
My point of view is that this problem shouldn't happen because for me, a PCI read is like any other memory read, only that instead of reading the local RAM which is for example at address 0x4000'0000, we read address 0xA020'0000 the processor then converts this as being an address on the PCI bus and perform this read thru the bus. Sure this read is longer than a local memory read but this process should not be interruptible in the middle. My understanding may very well be completely off, in that case feel free to correct me !