Give me a day to get back to you. I've already did some research a few months back. It seems it is best for me to use Lattice's free DDR# PHY in place of my 'Altera DDR IO Port' .sv module, so, copying an example schematic from one of their dev boards for wiring the DDR3 itself is a good starting place for research to maintain hardware backwards compatibility with Lattice's full paid version of their DDR3 controller.
Are you sure they provide a free PHY for DDR3? I can see it in their IPs list, but so is the "full" DDR3 controller, and description doesn't say anything about licensing.
Ok, their PHY is nothing more than a pre-configed IO buffer DDR port for the command and DQ lines.
It has no intelligence and just calls and configures the physical buffers, see here:
https://www.latticesemi.com/products/designsoftwareandip/intellectualproperty/ipcore/ipcores02/ddr3phyThis is Lattice's full DDR3 controller:
https://www.latticesemi.com/products/designsoftwareandip/intellectualproperty/ipcore/ipcores01/ddr3sdramcontrollerAs you can see, the full controller also uses the top 'PHY' to drive the IO buffer pins.
I know the full controller is paid, but what about that PHY.
If not, I basically need to manually instantiate the IO pin's DDR primitives like what I have done in my 'BrianHG_DDR3_IO_PORT_ALTERA.sv' source file. Lattice seems to have similar PLL capabilities to what 'SpacedCowboy' was doing with Gowin, except, I am forced to use a 4:1 and 1:4 serializer to achieve the the full 800mbps instead of Altera's 2:1 and 1:2. This isn't horrible as I have already a second layer 1:2 / 2:1 after my Altera IO port's 2:1 / 1:2, but, I will need to remove some code in my main PHY section.
Properly instantiate the DQ bus to the DQS lines instead of using a tuned PLL and using the IO buffer's delay lines for the write 90deg phase will also save a second PLL from being used since I must use the PLL's main clock output on any IO buffer to achieve the 800mbps unlike with Altera where any PLLs clock can run the IO buffer at full speed and there I also get 6 tunable outputs instead of 1 tunable output, plus 3 additional integer divided outputs per Lattice PLL.
2x 16bit DDR3 will still be plenty speed for a 720p 3D accelerator, or 1080p @ 16bit color.
1x 16bit DDR3 will give us the same as the Arrow DECA board, double the necessary bandwidth for 1080p60 at 32bit.
The 'LFE5U-45' and 'LFE5U-85' should both have a variant with pin-pin compatibility.
There should be enough in the 85k chip to include a 1080p MJPEG2000 player with 2x 16bit DDR3 chips, just barely enough with the 45k chip.
I will look tonight at the documentation about the Lattice's QDR IO buffer (4:1 / 1:4) and see how they handle the write delay and DQS read latching. I'll also read up on their PLL capabilities. Limiting myself to 1 PLL just means my controller will also be meaningful for Lattice's 25k / 12k fpga. (only 2 PLLs) (Note that their 12k is actually the same die as their 25k.)