Download Malibu Library User's Manual
Transcript
}
Dsp[i]->Cpu().DownloadCoff(FileName);
}
Loading Logic Files
Many baseboards have down-loadable logic to provide customized behavior. Loading this logic is also grouped into an
interface class. In the code below, one of the Quadia's two logic chips is being loaded. The interface class also contains
events that can be hooked to provide feedback in the user interface.
//--------------------------------------------------------------------------// BaseboardLogicLoadDialog::OnBnClickedQfpga1Cfgbtn() -//--------------------------------------------------------------------------void BaseboardLogicLoadDialog::OnBnClickedQfpga1Cfgbtn()
{
if (!Owner->QuadiaOpened)
{
Owner->AppendToLog("No Quadia Installed");
return;
}
CString ExoFilename;
Fpga1FileName.GetWindowText(ExoFilename);
if (! Innovative::IIFileExists(ExoFilename))
throw Innovative::IIException("Exo file not found!");
Owner->AppendToLog("-----------------------\r\nParsing FPGA 1");
Owner->UpdateWindow();
Owner->Quadia->Logic(1).ConfigureFpga(std::string(ExoFilename));
Owner->AppendToLog("-----------------------\r\n");
Owner->UpdateWindow();
}
Script Files
Many PMC modules feature user-reprogrammable FPGA logic. As the behavior of this logic is subject to change to
accommodate user requirements, it is commonplace to map registers into the User FPGA on these modules to support
configuration and control.
To facilitate rapid prototyping of new logic, Malibu features two script interpreter classes Scripter and GcScripter.
These classes parse the contents of a text file at application runtime, calling predefined event handlers during the process. By
overloading these handlers within application code, it is possible to read and write to custom user logic registers at strategic
times during application execution.
For instance, the Digital Receiver PMC module supports four GrayChip 5016 down-converter ICs. These are sophisticated
devices with a large complement of mapped registers used to configure the down-conversion process. Rather than building
one particular initialization pattern for these devices into the DigitalReceiver class, Malibu defers the initialization
process for these IC devices into the application domain.
The application program instantiates a GcScripter object, and calls the Execute method on this object at the inception of
analog data flow, within the OnStreamStart event handler of the DigitalReceiver object. In turn, the GcScripter object
parses a user-authored text file which contains initialization commands targeting the GC5016 devices addressable through the
command-channel (PCI bus). The initialization command file may be created manually, or the Texas Instruments -supplied
utility for creation of 5016-compliant initialization files may be used. Regardless of the origin of this file, its contents will be
Malibu Library User's Manual
24