OpenASIP
2.0
|
#include <ProGeUI.hh>
Public Member Functions | |
virtual | ~ProGeUI () |
ProGeUI () | |
void | generateProcessor (const ProGeOptions &options, int imemWidthInMAUs, std::ostream &errorStream, std::ostream &warningStream, std::ostream &verboseStream) |
void | generateTestBench (const ProGe::HDL language, const std::string &dstDir, const std::string &progeOutDir) |
void | generateScripts (const ProGe::HDL language, const std::string &dstDir, const std::string &progeOutDir, const std::string &sharedOutDir, const std::string &testBenchDir, const std::string &simulationRuntime) |
void | loadMachine (const TTAMachine::Machine &adf) |
void | loadBinaryEncoding (const BinaryEncoding &bem) |
void | loadMachineImplementation (const IDF::MachineImplementation &idf) |
Protected Member Functions | |
void | loadMachine (const std::string &adfFile) |
void | loadBinaryEncoding (const std::string &bemFile) |
void | loadMachineImplementation (const std::string &idfFile) |
void | loadProcessorConfiguration (const std::string &configurationFile) |
void | loadICDecoderGeneratorPlugin (const std::string &pluginFile, const std::string &pluginName) |
void | integrateProcessor (std::ostream &warningStream, std::ostream &errorStream, std::string progeOutDir, std::string sharedOutputDir, const std::string &platformIntegrator, const std::string &coreEntityName, const std::string &programName, const std::string &deviceFamily, const std::string &deviceName, MemType imem, MemType dmem, HDL language, int fmax, bool syncReset) |
Protected Attributes | |
TTAMachine::Machine * | machine_ |
The loaded machine. More... | |
Private Member Functions | |
void | checkIfNull (void *nullPointer, const std::string &errorMsg) |
void | readLSUParameters (MemInfo &dmem) const |
void | readImemParameters (MemInfo &imem) const |
void | generateIDF (const ProGeOptions &options, std::ostream &verboseStream) |
Private Attributes | |
BinaryEncoding * | bem_ |
The loaded binary encoding map. More... | |
IDF::MachineImplementation * | idf_ |
The loaded machine implementation. More... | |
PluginTools | pluginTool_ |
Tool for loading plugin. More... | |
ICDecoderGeneratorPlugin * | plugin_ |
The loaded IC/decoder generator plugin. More... | |
std::string | pluginFile_ |
The plugin file. More... | |
std::string | entityName_ |
Name of the toplevel entity. More... | |
ProcessorGenerator | generator_ |
Static Private Attributes | |
static const std::string | DEFAULT_ENTITY_STR = "tta0" |
Base class for user intefaces of ProGe.
Definition at line 66 of file ProGeUI.hh.
|
virtual |
ProGe::ProGeUI::ProGeUI | ( | ) |
|
private |
Checks if given pointer is NULL.
Throws a InvalidData exception if given pointer is NULL and sets given error message as exceptions error message.
nullPointer | Some pointer. |
errorMsg | Error message for the InvalidData exception. |
Definition at line 436 of file ProGeUI.cc.
References __func__.
Referenced by generateProcessor(), generateTestBench(), and loadICDecoderGeneratorPlugin().
|
private |
Checking only operations that ADF has instead of them all
Definition at line 527 of file ProGeUI.cc.
References IDF::MachineImplementation::addFuGeneration(), IDF::MachineImplementation::addFUImplementation(), IDF::MachineImplementation::addIUImplementation(), IDF::MachineImplementation::addRFImplementation(), ProGeTools::checkForGeneratableFU(), ProGeTools::checkForSelectableFU(), ProGeTools::checkForSelectableIU(), ProGeTools::checkForSelectableRF(), TTAMachine::Machine::controlUnit(), ProGeTools::createFUGeneratableOperationInfos(), TTAMachine::ControlUnit::delaySlots(), TTAMachine::Machine::functionUnitNavigator(), ProGeTools::generateableDAGOperations(), IDF::MachineImplementation::hasFUGeneration(), IDF::MachineImplementation::hasFUImplementation(), IDF::MachineImplementation::hasICDecoderPluginFile(), IDF::MachineImplementation::hasIUImplementation(), IDF::MachineImplementation::hasRFImplementation(), IDF::UnitImplementationLocation::hdbFile(), IDF::MachineImplementation::icDecoderParameterCount(), IDF::UnitImplementationLocation::id(), idf_, TTAMachine::Machine::immediateUnitNavigator(), Application::increasedVerbose(), machine_, IDF::FUGenerated::name(), options, TTAMachine::Machine::registerFileNavigator(), IDF::MachineImplementation::setICDecoderParameter(), IDF::MachineImplementation::setICDecoderPluginFile(), and IDF::MachineImplementation::setICDecoderPluginName().
Referenced by generateProcessor().
void ProGe::ProGeUI::generateProcessor | ( | const ProGeOptions & | options, |
int | imemWidthInMAUs, | ||
std::ostream & | errorStream = std::cerr , |
||
std::ostream & | warningStream = std::cerr , |
||
std::ostream & | verboseStream = std::cerr |
||
) |
Generates the processor with the loaded data.
imemWidthInMAUs | Width of the instruction memory in MAUs. |
language | The language to generate. |
dstDirectory | The destination directory. |
sharedDstDirectory | The destination directory for VHDL files. |
entityString | The string that is used as the top level entity name and to differentiate the entity and package names in processor-specific HDL files. |
errorStream | Stream where error messages are written. |
warningStream | Stream where warning messages are written. |
InvalidData | If ADF or IDF is not loaded. |
IOException | If an IO exception occurs. |
DynamicLibraryException | If the default plugin cannot be opened. |
InvalidData | If HDB or IDF is erroneous or if BEM is not compatible with the machine. |
IllegalMachine | If the machine is illegal. |
OutOfRange | If the given instruction memory width is not positive. |
InstanceNotFound | Something missing from HDB. |
IllegalParameters | IC/Decoder plugin parameter not recognized |
Definition at line 298 of file ProGeUI.cc.
References __func__, bem_, checkIfNull(), entityName_, BEMValidator::errorCount(), IDFValidator::errorMessage(), Exception::errorMessage(), BEMValidator::errorMessage(), BEMGenerator::generate(), generateIDF(), ProGe::ProcessorGenerator::generateProcessor(), generator_, IDF::MachineImplementation::hasICDecoderPluginFile(), IDF::MachineImplementation::hasICDecoderPluginName(), IDF::MachineImplementation::icDecoderParameterCount(), IDF::MachineImplementation::icDecoderParameterName(), IDF::MachineImplementation::icDecoderParameterValue(), IDF::MachineImplementation::icDecoderPluginFile(), IDF::MachineImplementation::icDecoderPluginName(), idf_, loadICDecoderGeneratorPlugin(), machine_, options, plugin_, ProGe::ICDecoderGeneratorPlugin::readParameters(), ProGe::ProcessorGenerator::removeUnconnectedSockets(), ProGe::ICDecoderGeneratorPlugin::setParameter(), IDFValidator::validate(), BEMValidator::validate(), BEMValidator::warningCount(), and BEMValidator::warningMessage().
Referenced by GenerateProcessor::generateProcessor(), and GenerateProcessorDialog::onOK().
void ProGe::ProGeUI::generateScripts | ( | const ProGe::HDL | language, |
const std::string & | dstDir, | ||
const std::string & | progeOutDir, | ||
const std::string & | sharedOutDir, | ||
const std::string & | testBenchDir, | ||
const std::string & | simulationRuntime | ||
) |
Generates vhdl compilation and simulation scripts.
dstDir | Destination directory for the scripts. |
progeOutDir | ProGe output directory. |
progeOutDir | Shared HDL output directory. |
testBenchDir | Directory where a test bench is stored. |
Definition at line 416 of file ProGeUI.cc.
References entityName_, ProGeScriptGenerator::generateAll(), and idf_.
Referenced by GenerateProcessor::generateProcessor(), and GenerateProcessorDialog::onOK().
void ProGe::ProGeUI::generateTestBench | ( | const ProGe::HDL | language, |
const std::string & | dstDir, | ||
const std::string & | progeOutDir | ||
) |
Generates a test bench for simulating.
dstDir | Destination directory for the test bench. |
progeOutDir | ProGe output directory. |
InvalidData | If Machine or implementation not loaded. |
Definition at line 375 of file ProGeUI.cc.
References checkIfNull(), entityName_, ProGeTestBenchGenerator::generate(), generator_, ProGe::ProcessorGenerator::generatorContext(), idf_, machine_, ProGe::ProcessorGenerator::processorTopLevel(), ProGe::Verilog, and ProGe::TestBenchBlock::write().
Referenced by GenerateProcessor::generateProcessor(), and GenerateProcessorDialog::onOK().
|
protected |
Definition at line 443 of file ProGeUI.cc.
References __func__, FileSystem::absolutePathOf(), FileSystem::DIRECTORY_SEPARATOR, generator_, idf_, PlatformIntegrator::integrateProcessor(), machine_, ProGe::ProcessorGenerator::processorTopLevel(), readImemParameters(), PlatformIntegrator::setDeviceFamily(), PlatformIntegrator::setDeviceName(), PlatformIntegrator::setSharedOutputDir(), and MemInfo::type.
Referenced by GenerateProcessor::generateProcessor().
void ProGe::ProGeUI::loadBinaryEncoding | ( | const BinaryEncoding & | bem | ) |
Definition at line 170 of file ProGeUI.cc.
References bem_, and BinaryEncoding::saveState().
Referenced by GenerateProcessorDialog::onOK().
|
protected |
Loads the binary encoding from the given BEM file.
bemFile | The BEM file. |
SerializerException | If the file cannot be read or is erroneous. |
ObjectStateLoadingException | If the object model cannot be constructed. |
Definition at line 143 of file ProGeUI.cc.
References bem_, BEMSerializer::readBinaryEncoding(), and XMLSerializer::setSourceFile().
|
protected |
Loads the given IC/decoder generator plugin.
pluginFile | The file that implements the plugin. |
pluginName | Name of the plugin. |
FileNotFound | If the module is not found. |
DynamicLibraryException | If the module cannot be opened. |
InvalidData | If the machine or BEM is not loaded yet. |
Definition at line 239 of file ProGeUI.cc.
References __func__, PluginTools::addSearchPath(), assert, bem_, checkIfNull(), Environment::icDecoderPluginPaths(), PluginTools::importSymbol(), machine_, plugin_, pluginFile_, pluginTool_, and PluginTools::registerModule().
Referenced by generateProcessor().
|
protected |
Loads machine from the given ADF file.
adfFile | The ADF file. |
SerializerException | If the file cannot be read or is erroneous. |
ObjectStateLoadingException | If the machine cannot be constructed. |
Definition at line 128 of file ProGeUI.cc.
References machine_, ADFSerializer::readMachine(), and XMLSerializer::setSourceFile().
void ProGe::ProGeUI::loadMachine | ( | const TTAMachine::Machine & | adf | ) |
Definition at line 165 of file ProGeUI.cc.
References machine_.
Referenced by GenerateProcessorDialog::onOK().
void ProGe::ProGeUI::loadMachineImplementation | ( | const IDF::MachineImplementation & | idf | ) |
Definition at line 175 of file ProGeUI.cc.
References idf_, and IDF::MachineImplementation::saveState().
Referenced by GenerateProcessorDialog::onOK().
|
protected |
Loads the machine implementation from the given IDF file.
idfFile | The IDF file. |
SerializerException | If the file cannot be read or is erroneous. |
ObjectStateLoadingException | If the object model cannot be constructed. |
Definition at line 158 of file ProGeUI.cc.
References idf_, IDF::IDFSerializer::readMachineImplementation(), and XMLSerializer::setSourceFile().
|
protected |
Loads the given processor configuration.
configurationFile | The PCF file. |
UnreachableStream | If the PCF file cannot be read. |
SerializerException | If some files defined in PCF cannot be read or is erroneous. |
ObjectStateLoadingException | If some of the object models cannot be constructed. |
Definition at line 190 of file ProGeUI.cc.
References __func__, ProcessorConfigurationFile::architectureName(), bem_, FileSystem::directoryOfPath(), ProcessorConfigurationFile::encodingMapName(), idf_, ProcessorConfigurationFile::implementationName(), machine_, BEMSerializer::readBinaryEncoding(), ADFSerializer::readMachine(), IDF::IDFSerializer::readMachineImplementation(), ProcessorConfigurationFile::setPCFDirectory(), and XMLSerializer::setSourceFile().
|
private |
Definition at line 514 of file ProGeUI.cc.
References TTAMachine::FunctionUnit::addressSpace(), MemInfo::asAddrw, MemInfo::asName, bem_, TTAMachine::Machine::controlUnit(), TTAMachine::AddressSpace::end(), TTAMachine::AddressSpace::isShared(), MemInfo::isShared, machine_, MemInfo::mauWidth, TTAMachine::Component::name(), MemInfo::portAddrw, MathTools::requiredBits(), TTAMachine::ControlUnit::returnAddressPort(), TTAMachine::BaseFUPort::width(), BinaryEncoding::width(), and MemInfo::widthInMaus.
Referenced by integrateProcessor().
|
private |
|
private |
The loaded binary encoding map.
Definition at line 127 of file ProGeUI.hh.
Referenced by generateProcessor(), loadBinaryEncoding(), loadICDecoderGeneratorPlugin(), loadProcessorConfiguration(), readImemParameters(), and ~ProGeUI().
|
staticprivate |
Definition at line 141 of file ProGeUI.hh.
|
private |
Name of the toplevel entity.
Definition at line 137 of file ProGeUI.hh.
Referenced by generateProcessor(), generateScripts(), and generateTestBench().
|
private |
Definition at line 139 of file ProGeUI.hh.
Referenced by generateProcessor(), generateTestBench(), and integrateProcessor().
|
private |
The loaded machine implementation.
Definition at line 129 of file ProGeUI.hh.
Referenced by generateIDF(), generateProcessor(), generateScripts(), generateTestBench(), integrateProcessor(), loadMachineImplementation(), loadProcessorConfiguration(), and ~ProGeUI().
|
protected |
The loaded machine.
Definition at line 114 of file ProGeUI.hh.
Referenced by generateIDF(), generateProcessor(), generateTestBench(), integrateProcessor(), loadICDecoderGeneratorPlugin(), loadMachine(), loadProcessorConfiguration(), readImemParameters(), and ~ProGeUI().
|
private |
The loaded IC/decoder generator plugin.
Definition at line 133 of file ProGeUI.hh.
Referenced by generateProcessor(), loadICDecoderGeneratorPlugin(), and ~ProGeUI().
|
private |
The plugin file.
Definition at line 135 of file ProGeUI.hh.
Referenced by loadICDecoderGeneratorPlugin().
|
private |
Tool for loading plugin.
Definition at line 131 of file ProGeUI.hh.
Referenced by loadICDecoderGeneratorPlugin().