Altera_Forum
Honored Contributor
10 years agoCyclone V - major transceiver misunderstanding
Hi all,
I'm struggling with my understanding about Cyclone V transceivers in SX/GX devices. We have a custom board with 2 Cyclone V FPGAs. The one is an SX and the other one a GX device. They are connected via 2 transceiver lanes. I succesfully modified the Transceiver Toolkit example to get a testpattern communication between both devices in full duplex mode on both lanes. No errors occur (unless I inject one) and it runs stable over hours. So I'm pretty confident that the hardware is just okay..... Now, I would like to implement my own transceiver FPGA fabric logic. I tried to understand the test pattern generator and ckecker source code that drives the Toolkit examples. I implemented my own components in VHDL (because this is my preferred language) and I'm able to transmit data via the serial link. I used the same settings of the transceivers (in QSys) as in the toolkit examples. However, I really have troubles in understanding how I have to interpret the data that I get on the receive side of the transceiver link. The first naive step has been to send a 32 bit wide data word to the parallel tx data port of the native transceiver component and receive the same 32 bit word on the rx data port of the receiving native transceiver component...... That was completely not the case, so I digged more and found out that I probably have to use a 40 bit wide port on the transceiver components, because there is a gap of 2 bits for each 8 bit user data which are just not important, if I don't use 8b/10b encoding. So I put my user data that I would like to transmit (32bit) on the transmitter port in that way: tx_port(7 downto 0) <= data(7 downto 0); tx_port(17 downto 10) <= data(15 downto 8); tx_port(27 downto 20) <= data(23 downto 16); tx_port(37 downto 30) <= data(31 downto 24); After that, again, I was expecting that I receive something similar on the rx side that I send on the tx side.... which was not the case. It is not even so that the data is shifted because I may miss some word alignment, it is just somehow confused so that the data is not recognisable, at all..... Apropos word alignment.... since I set up (in QSys) the word alignment pattern equally on the tx and rx side, I suppose that I don't even have to care about word alignemnt because the trasceiver cores will handle that on their own. (is that correct?) Because I was not able to get my own transceiver link to work, I decided to signal tap the working toolkit examples. Unfortunately, confusion got even worse, because I see the same effects in my signal tap traces as with my custom components. The pattern that is send via the tx channel ist not received on the rx side. It is totally different. Nevertheless, the result in the system console GUI ist green and no errors are detetced. If I inject an error, it is recognized on the other side. So here is my basic transceiver misunderstanding: I think that the transceivers are implemented in the FPGAs in order to protect the user (or custom FPGA logic developer) from the need to understand all that transceiver stuff. I thought, I can just put a stream of data into the TX side, and get that same stream of data on the RX side. All the encodings, alignments, disparity checks, bit slippings and clock recoveries are done in the hard IP transceiver modules according to their settings.... Is there any explanation out there, step by step, of an innocent 32bit TX data word that is fed through this transceiver hell, which describes what happens to this data on its way throug all the different stages of the transceivers (TX and RX) and how it ist possible to get the same data back at the end of the transmission line? I read alot through the documentation (even XILINX docs I already read) but have not found the reason why the rx data word is so scrambled.....and most importantly, how I can de-scramble it. Basically, what I would like to have is, if the tx and rx transceiver are configured the same way, to get the data on the rx-port that I send on the tx-port. Please be kind with me if this is a totally stupid question, but I just don't know where to look anymore..... Thanks, Maik