Thanks BrianHG for your feedback, I will try to make a test project in Xilinx ISE and make some simulation,
But I need help on setting up the IP,
Wait, you went ahead 1 step too quickly...
1 last thing first....
Option 1:
You need to decide whether to use 1 twisted pair to transmit data and clock.
Basically an ~1ghz link using our 3 bit trick using OSERDES2 & a special DLL setup.
Or,
Option 2:
Use the 2 balanced lines in the SATA cable to transmit data and clock separately.
Basically an ~300mb link with an ~150mhz clock using DDRIO buffers as a 2:1 serializers.
Here are the pros and cons:
Option 1 means you will generate code which will be heavily tied down to Spartan 6 specific DLL and PLL.
The important data bit will be a 1ns wide pulse in the signal, meaning with IO tolerances, looking at an ~ +/- 250ps jitter at the IO pins, to read capture this bit, your PCB wiring will need to be good enough to operate in an ~ +/-250ps wide read window.
This method will be a little tricky to get working right.
Option 2, (langwadt recommended and my preferred method)
Means you will generate code which will work not only on Spartan6, but, it will also work on Efinix, Lattice, Altera, and any other FPGA which has IO with a general purpose IO DDR capable pins.
The jitter at the IO pins will still be ~ +/-250ps, however, the data bits will now be 3ns long, meaning you serial capture window will be around +/- 1250ps. Far easier for your PCB routing and cable tolerances.
Your core clock will operate around 150mhz, fairly easy on modern FPGA, even slow ones.
No special DLL/PLL timing considerations, all vendors FPGAs can handle a 150Mhz 1:1 clock in, clock out.
Much easier to code everything.
(I know ASMI said that the SATA spec doesn't specify twisted pair timing matching, but come on, a +/-1250ps read window between both pairs in the cable means to mess this up, you will need 1 pair in the cable to be over 10 inches longer or shorter than the adjacent pair and looking at the crimped SATA ribbon cable connector, I do not think that is mechanically possible within the laws of our universe. If you were doing the speeds of Option 1 with a 250ps/bit timing window, then yes, things would be a lot more critical here.)
Which option will you choose 1 or 2?
And, if you do not have the experience handling 1gbit routing on a pcb or how to order impedance controlled PCBs, then to be safe, I would recommend only going with option #2. Though, if you need to send data in the opposite direction, depending on how much bandwidth you need, you might be stuck with option #1 with a new problem, you cannot exactly use the embedded clock as precisely the data going in the opposite direction at the same speed. Otherwise, you PCB routing and coding will be a nightmare as now each cable length matters, you, you will need to use 2x DLL / PLLs in each FPGA to custom clock each direction.