Please provide answers for my following questions:
1.What do you refer to by "FIFO", is it a GPIF thread or a DMA Buffer?
2.What is the interface clock which you are planning to use?
3.When one FIFO is full, how can the master know about it? Is this done by using FLAGs from the P Port of FX3 or do you have any other implementations on FPGA to track this?
Thank you for your answer.
1. It is GPIF. Planning to move it with Synchronous Slave FIFO Interface (marked red on page 4 of attached manual)
2.It is 100MHz. (marked red on page 10 of attachment)
3. I am planning to use the FLAGs marked red on page 14 of attached manual.
But i can do it on FPGA as well.
AN65974.pdf 314.5 K
1 of 1 people found this helpful
Thank you for providing the details accurately. I found from your first attachment that the data bus width for GPIF II block is 32 bits. I understood that you are using 2 current thread flags (one ready flag and other a partial flag).
The general formula for using partial flag for write operation is mentioned in section 9.3 of AN65974. For write operation, this is
Number of data words that may be written after the clock edge at which the partial flag is sampled low = watermark * (32/bus width) - 4.
I also understood that the interface frequency is 100MHz. So one clock cycle is 10ns.
The second option which you asked at the beginning is not possible. The first option can be achieved. This can be done in the following way. Consider a write operation to the slave FIFO. Configure the watermark value for the partial flag as 4. So that the number of data words that may be written after the clock edge at which the partial flag is sampled low will be 0 (from section 9.3 of AN65974). At the start of the write operation, the master will assert the address lines A1:A0. After the assertion of address lines, at the third clock edge(starting from the clock edge where address lines were asserted), the status of the flag will be valid. Make sure that at the start of the transfer you sample ready flag itself. This is because partial flag shows a different behaviour at the start of transfer.
Now when the last data word to be written is reached, the partial flag will go low. After sampling the partial flag low, the master should de-assert the write signal and switch the thread by changing A1:A0. At the third clock edge after sampling the address lines, the ready flag corresponding to the new thread becomes valid. If the flag shows ready condition, then next write can start.
This was very helpful, thanks a lot.
My collegue is working on it now.