Altera_Forum
Honored Contributor
17 years agoTiming Constraints for Serial Interface
Hi all,
I´m quite new to all of this so I have some basic questions which I probably should know but would appreciate your help on. I am currently working with a StratixII GX device on a board where I have to implement a serial interface to send and rx data to/from another board. I am using Quartus II version 7.1 and sometimes 7.2 on another PC in the lab. My problem is that the interface works but I think a lot of the time it is just very marginal. When I alter code in other modules and compile everything again it can stop working (the data is transmitted properly, but the timing has changed). Actually this is another thing I was wondering about, how can a change in the project code affect the operation of logic in another part. Is it true that the fitter will do things differently if contraints are not put in place and a change in one place could cause the fitter to alter how something is impemented elsewhere? As I said the interface works, but marginally I think. I have played around with constraints in quartus like maximum or minimum delay, then min tco and tco etc. But the truth is that I dont really understand which type of constraint I should put in place. I havent encountered this type of issue before as I have never interface to another board and with the delays encountered through the cable and buffer on the other board, i think this is why its becoming more of a challenge. Basically, I have 3 LVDS lines, a chip select, a data line and a clock (83MHz). on the tranmitter side and a receiving line which receives the data from the other board (another FPGA) a specified number of cycles after chip selct falls. What I was concerned about was one of the signals, for example the clock getting delayed a fraction more than the data and at the receieving end the incorrect data being read. From scope shots i can see a small delay in the clock signal arriving between both boards (maybe 1ns I would guess, through a 5 inch long cable). Anyway I would really appreciate it if somebody could give me some guidance on which type of constraints I should put in place, to ensure that the interface functions well. Also, a workmate told me I should put a 'global signal' assignment on each of the signals used for the interface in the assignment editor. I have done this and the signals viewed on the scope seemed better. Could somebody explain what this assignment actually does. I know there is an explanation given in quartus, but its not always self explanitary for me. Also, one final thing. Is a tco constraint is a measure of the time difference betwen when the clock and the data appear on the output pins of the FPGA? or the delay incurred from when the clock signal inside the FPGA changes and the data on the pin of the FPGA changes? Thank you for your time