PLL Configuration
FrontPanel-enabled devices with on-board PLLs allow PLL settings to be stored into EEPROM. (Note: Not all integration modules include on-board PLLs. These typically include a fixed-frequency oscillator but you can use the clock synthesis features of the FPGA to generate additional clocks.)
If your application needs custom PLL settings, the okCPLLxxx (where xxx = 22150 or 22393) classes contain these settings. The two versions of PLL available on Opal Kelly devices have different configuration settings and methods, so make sure the version you program is correct for your device. You can refer to the corresponding PLL datasheet for information on settings compatibility.
Methods with EEPROM in the name get/set the PLL settings stored in an on-board EEPROM. These methods do not change the live PLL settings.
Method | Description |
---|---|
SetPLLxxxConfiguration | Sets the active PLL configuration. The new settings take effect immediately. |
SetPLLxxxEEPROMConfiguration | Stores the PLL settings to EEPROM. The live PLL settings are not affected. |
To configure the custom settings, create an object of okCPLLxxx and use the Set methods to load the desired settings to the object. Load the settings onto the device using the SetPLLxxxConfiguration method. You can also use the GetPLLxxxConfiguration to retrieve the existing settings, modify them, and re-configure the settings with the SetPLLxxxConfiguration.
C/C++
okCFrontPanel dev;
okCPLL22150 pll22150;
okCPLL22150 pll22150chk;
dev.OpenBySerial();
// Get the existing settings to modify them
error = dev.GetPLL22150Configuration(pll22150);
// Modify the PLL settings
pll22150.SetReference(48.0f, false);
pll22150.SetVCOParameters(400, 48);
//...And so forth
// Save new settings to the device
dev.SetPLL22150Configuration(pll22150);
Code language: JavaScript (javascript)
C#
okCFrontPanel dev = new okCFrontPanel();
okCPLL22150 pll22150 = new okCPLL22150();
okCPLL22150 pll22150chk = new okCPLL22150();
dev.OpenBySerial("");
// Get the existing settings to modify them
dev.GetPLL22150Configuration(pll22150);
// Modify the PLL settings
pll22150.SetReference(48.0f, false);
pll22150.SetVCOParameters(400, 48);
//...And so forth
// Save new settings to the device
dev.SetPLL22150Configuration(pll22150);
Code language: JavaScript (javascript)
Python
dev = ok.okCFrontPanel()
pll22150 = ok.PLL22150()
pll22150chk = ok.PLL22150()
dev.OpenBySerial("")
# Get the existing settings to modify them
dev.GetPLL22150Configuration(pll22150)
# Modify the PLL settings
pll22150.SetReference(48.0, False)
pll22150.SetVCOParameters(400, 48)
# ...And so forth
# Save new settings to the device
dev.SetPLL22150Configuration(pll22150)
Code language: PHP (php)
Java
public class example{
okCFrontPanel dev;
okCPLL22150 PLL22150;
okCPLL22150 PLL22150chk;
public boolean Initialize(){
//Create and open
dev = new okCFrontPanel();
dev.OpenBySerial("");
}
public void PLLSet(){
//setup the PLL
PLL22150 = new okCPLL22150();
// Get the existing settings to modify them
dev.GetPLL22150Configuration(PLL22150);
System.out.println("Configuring PLL settings.");
// Modify the PLL settings
PLL22150.SetReference(48.0f, false);
PLL22150.SetVCOParameters(400, 48);
//...And so forth
//Save new settings to the device
dev.SetPLL22150Configuration(PLL22150);
}
}
Code language: PHP (php)