An iCE40UP5K board has a 12 MHz active oscillator and needs 48 MHz from the PLL. Two divider combinations give the right result on a calculator, yet only one operates reliably. Reusing the configuration on a revised board can even leave the lock signal deasserted. Review the input on the schematic, the target clock and the PLL's internal frequency window together. A total ratio of four can still correspond to internal frequencies an octave apart.
Calculate two internal nodes before the output
In Lattice's SIMPLE feedback mode, feedback comes from the VCO before the final DIVQ divider. The phase detector runs at fIN ÷ (DIVR + 1). Multiply that by (DIVF + 1) for VCO frequency, then divide by 2 raised to DIVQ for the PLL output. The UltraPlus sysCLOCK PLL timing table gives 10 to 133 MHz at the input, 10 to 133 MHz at the phase detector and 533 to 1066 MHz at the VCO, along with an output range. Verify the applicable limits with the selected part and feedback mode in the design tool. Lattice PLL design guide, section 3.5.2 on SIMPLE feedback Lattice iCE40 UltraPlus datasheet, section 4.26
One candidate uses DIVR = 0, DIVF = 31 and DIVQ = 3. The phase detector sees 12 MHz, the calculated VCO runs at 384 MHz and a final division by eight gives 48 MHz. The arithmetic produces the target frequency, but 384 MHz is below the 533 MHz VCO minimum. With DIVR = 0, DIVF = 63 and DIVQ = 4, the detector still sees 12 MHz. The VCO is 768 MHz and division by 16 also gives 48 MHz. That satisfies the three frequency checks in the example. Generate and verify the remaining PLL attributes in the design tool.
A larger output divider can also fall outside the range. At divide-by-32, a 48 MHz output would require a 1536 MHz VCO. Divide-by-four would need 192 MHz. The powers-of-two divider places the VCO at discrete frequencies when working backward from 48 MHz. These candidates miss the VCO window. Dividing the 12 MHz input by two before the detector would also put the detector at 6 MHz, below its specified range. Put both intermediate frequencies in the review so the failing stage is visible.
If the next board has a shared 24 MHz source, reusing that second configuration would push the nominal VCO to 1536 MHz. Setting DIVR to one would return the phase detector to 12 MHz while preserving 768 MHz at the VCO and 48 MHz at the output in this example. Regenerate the PLL configuration and the timing constraints for the actual source. If only a 12 MHz board is supported, require the same nominal frequency for substitutions. The two board designs may share 48 MHz logic but still need their own input clock records.
After the arithmetic, check the pin, routing and lock
The active oscillator needs to reach a supported FPGA input. The public iCEBreaker schematic shows a development-board example of routing a 12 MHz system clock. A custom board needs its own pinout. Check the full part and package to determine whether the external pin directly feeds the PLL or whether an allowed internal reference is required. In a public YosysHQ issue, a designer on another iCE40 part ran into a PLL pin and resource routing error. An operating oscillator and valid arithmetic still leave physical connection and resource checks to do. Public iCEBreaker schematic Public iCE40 PLL routing discussion
After place and route, confirm that 48 MHz uses the intended global network. Check which constraints apply to the external 12 MHz and which apply to the generated 48 MHz. A lower-frequency diagnostic output can show basic operation. Dividing 48 MHz by 16 gives a nominal 3 MHz that can be captured alongside 12 MHz. A divided output hides details of individual clock cycles. Qualifying edge quality or period jitter calls for the original-rate measurement path and relevant datasheet conditions.
When comparing active sources of the same nominal frequency, establish a baseline with a stable unmodulated reference. The design guide calls for a stable single-frequency input and compliance with duty cycle and jitter requirements. A product revision using a modulated shared source needs applicable device guidance and bench evidence. A clean trace at the oscillator output should be checked at the FPGA for ringing or short pulses after the resistor, test branch and receiving load. Lattice design guide, clock input requirements
The design guide treats the output as stable once LOCK stays asserted. During startup, capture the supplies, reference arrival, LOCK and logic reset release. BYPASS can make the output follow the input clock. A 12 MHz observation in maintenance mode warrants checking what controls BYPASS. Release application reset in the appropriate destination clock domain and handle loss of lock. Test reference interruption and recovery, recording whether logic stops as expected, restarts and keeps the first transaction away from an unready clock. Lattice PLL design guide, output validity, LOCK and BYPASS
Tie every alternate oscillator to a board and bitstream
With several oscillators all marked 12 MHz, verify voltage domain, input thresholds, duty cycle, temperature stability, startup time and the test conditions for period jitter. The PLL input limits have phase detector frequency conditions and footnotes. A jitter figure measured at a divided diagnostic output does not qualify the input source. Compare the original and candidate with the same bitstream, input pin and test method. Save cold starts, resets while powered and relock captures. If only a warm reset works, retain the failed input waveform before changing filter parameters. UltraPlus sysCLOCK PLL input requirements
Calculate long-term frequency error after lock as well. If the 12 MHz input runs 20 ppm high, a fixed ratio of four gives a nominal output offset of 48000000 × 0.000020, or 960 Hz. This model treats long-term proportional frequency error only. Check PLL phase noise and cycle variations against their own requirements. Incoming 12 MHz tolerance and board acceptance at 48 MHz are related but distinct measurements.
Save the generated PLL configuration with the device frequency limits and measured clocks. The bill of materials should identify an active oscillator driving a digital input. If a different chip supplies the reference, record which power state and firmware action enable it. For a later substitution, verify board and bitstream pairing, then check the stability of 48 MHz after lock. That leaves usable evidence for input quality, out-of-range settings and physical routing.
