Reading from FPGA Issue

Hi Guys

I am trying to read 36 signal one by one from FPGA using different addresses and these signal are of 3 bits length. My address bus is bidirectional (32 bit length)and it's on tristate while not performing read operations. I am using PCI API fucntion to perform open , read and write operations as it is PCI FPGA reconfigurable board having XCV600 device. The values are being read by using SRAM in the board and I am using addresses which are properly mapped to PCI bus and Onboard Memory. Now the problem is that I delebrately make a loop to read the sequence of signal again and again in order to make sure I am reading the correct output every time. But the thing is that in different iteration the values of different signal are not the same. it means that the signal which is being read is changing all the time. But according to simulated desing this is not the case , I must have been reading the correct output everytime . Is there is any design constraint ? My desing has internal clock as well is this is affecting the signal. But in simulation this is not the case .

Also one thing more does the VHDL coding style effect the read from FPGA or not. Because in my other desing I have state machine and number of different states in the Process (desing is synchronous) and I am using CASE statement to move from one state to another. When I download this into the chip and when I perform read operation after writing data into the chip I am getting nothing from FPG. If any one can tell me how to stabilize particular signal so that it could to read oout from FPGA.

Cheers Help would be appreciated.

Rgds

Isaac

Reply to
Isaac
Loading thread data ...

Hi Isaac,

Your problem is almost impossible to be solved from remote. You say that it is working well in simulation. Do you mean functional simulation (i.e. pure VHDL code) or back-annotated simulation (i.e. simulation of the synthesized design including estimated delays etc.)?

Are you also sure that you meet all timing parameters when accessing the RAM?

Absolutely! VHDL coding style might have heavy impact on the result. To give an example effect I once encountered with Synopsys: When you have a clocked process with asynchronous reset and a couple of registers inside, and you forget to include one signal in the reset clause, then Synopsys created a register where the output is feed back and is ORed at the input. As a result, once the register turns to '1', it can never turn to '0' again. But in functional simulation you do not see that effect (exept from the fact that the register is not initialized during reset).

That's another reason why it is important to simulate the synthesized design.

Regards, Mario

Reply to
Mario Trams

Without seeing your code it is not possible to make an exact diagnosis (maybe I couldn't even if I did see it), but I do have suggestions. Any signal that is an input to the FPGA synchronous logic should be internally synchronized with the logic's clock using 2 d flip-flops. The bus data need not be synchronized in this manner if the transfer logic (handshake) is synchronized. The read operation should have some sort of handshake to ensure that the output data is stable before it is read and that the FPGA logic "knows" when new data is requested. Does PCI protocol involve a handshake? If so, have you implemented it on the FPGA side?

A typical handshake would be: The reader asserts data_request; the FPGA logic puts the data on the bus and asserts data_ready. The reader sees data_ready, reads the data, and unasserts data_request (this lets the FPGA logic know that the data has been read and it unasserts data_ready and). There are a number of variations on this, but without some sort of handshake it is quite likely that there will be missed data, multiple reads of the same data, etc.

Charles

Reply to
Charles M. Elias

--------------------

------------------------------------------------------------------- Here is the Case Statement which I am using, in this you will see different signal which I am using in differnt process which I haven't included .

process1: process (CLK_2X) begin if RISING_EDGE(CLK_2X) then state paritycheck

Reply to
Isaac

Here is the Case Statement which I am using, in this you will see

Reply to
Isaac

Reply to
Kening

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.