sipeed / TangMega-138KPro-example

Tang Mega 138K Pro examples
47 stars 10 forks source link

PLL out of range #6

Open Cyviznerd opened 1 month ago

Cyviznerd commented 1 month ago

The PLL_inst will cause an error due to new[?] range constraints in device data delivered with IDE version 1.9.10 (build 75092). The IDIV_SEL value of 3, will cause the following error due to 50Mhz/3 being below 19Mhz;

ERROR (PA2078) : Invalid PFD frequency 'FCLKIN/IDIV_SEL' to 'PLL_inst'(PLL) set by module 'Gowin_PLL', suitable range is from 19MHz to 400MHz

This can be fixed by changing:

defparam PLL_inst.IDIV_SEL = 2; defparam PLL_inst.MDIV_SEL = 45;

This produces an output image of 640x480@~60Hz, 25Mhz pixelclk.

Cyviznerd commented 1 month ago

The above PLL settings was for the "svo" code. For the 1080p colorbars, use: defparam PLL_inst.IDIV_SEL = 2; defparam PLL_inst.MDIV_SEL = 59;

This produces 1920x1080@~60Hz,147.5 MHz pixelclock-