Hello everybody,
I am trying to figure out how to use the PLL on the iCE40, and even bought a board (icesugar v1.5) to play around with. Reading the datasheet, I cannot figure out what the filter_range parameter means. Figure 3.1 in the PLL manual (linked under my post) shows a low-pass filter after the input divider, so I think it probably sets the cutoff frequency of that low-pass filter. Yet I don't know how to decide on the right FILTER_RANGE value. The table on page 11 shows the number is a 3-bit value.
So far I found out the filter_range does matter. For instance, when I configure the PLL for 15MHz output with simple feedback path and 24MHz input (following the provided equation), setting the filter_range variable to 0 results in a 24MHz output, but setting it to 1 gives me 15MHz on the output. The other values give me a very jittery clock-signal on the output, approaching 15MHz.
Can anyone tell me more about this parameter? I'm aware the manual says you should just use their software to determine the right values for the PLL, but I would like to know how to determine/calculate the value myself.
iCE40 PLL manual:
https://www.latticesemi.com/view_document?document_id=47778
Project icestorm has a tool that can compute PLL parameters.
From its source code, you can figure out how to:
https://github.com/YosysHQ/icestorm/blob/master/icepll/icepll.ccSee line 'int filter_range = ...'
it just depends on the PFD parameter.
Where they got this information from, I don't know. I suspect they reverse-engineered it using Lattice tools.
I also had struggles with Lattice ICE40UP5K PLL. Documentation (datasheets) for this chip have many errors. On the filter range question I don't have an answer. But sharing what I think is wrong in the block diagrams and the text in the Lattice documents.
You may have better luck in hunting down the original docs from Silicon Blue on this topic. It was Silicon Blue that created the ICE40 IP and was then aqcquired by Lattice.
Thanks all for the helpful responses! As for determining the filter range, I think I can indeed use the 'table' from icepll. Also thanks for the corrected block diagram!