OpenASIP
2.0
|
Functions | |
std::string | findHDBPath (std::string name) |
bool | findInOptionList (const std::string &option, std::vector< std::string > list, bool enableAll=true) |
std::vector< IDF::FUGenerated::DAGOperation > | generateableDAGOperations (const std::vector< IDF::FUGenerated::Info > infos, std::ostream &verbose) |
std::vector< IDF::FUGenerated::Info > | createFUGeneratableOperationInfos (const ProGeOptions &options, std::ostream &verbose) |
bool | checkForGeneratableFU (const ProGeOptions &options, TTAMachine::FunctionUnit &fu, IDF::FUGenerated &fug, const std::vector< IDF::FUGenerated::Info > &infos, const std::vector< IDF::FUGenerated::DAGOperation > dagops) |
bool | checkForSelectableFU (const ProGeOptions &options, TTAMachine::FunctionUnit &fu, IDF::FUImplementationLocation &loc, std::ostream &verbose) |
bool | checkForSelectableRF (const ProGeOptions &options, TTAMachine::RegisterFile &rf, IDF::RFImplementationLocation &loc, std::ostream &verbose) |
bool | checkForSelectableIU (const ProGeOptions &options, TTAMachine::ImmediateUnit &iu, IDF::IUImplementationLocation &loc, std::ostream &verbose) |
bool | canGenerateFromDAG (const OperationDAG &dag, const std::vector< IDF::FUGenerated::Info > infos, std::vector< IDF::FUGenerated::Info > *subops) |
int | dagLatency (const OperationDAG &dag, const std::unordered_map< std::string, int > &maxOpLatency) |
int | maxLatencyToNode (const OperationDAG &dag, OperationDAGNode &node, const std::unordered_map< std::string, int > &maxOpLatency, bool allowDifference=true) |
int | nodeLatency (OperationDAGNode &node, const std::unordered_map< std::string, int > &maxOpLatency) |
bool | languageMatches (HDB::BlockImplementationFile::Format format, ProGe::HDL language) |
bool ProGeTools::canGenerateFromDAG | ( | const OperationDAG & | dag, |
const std::vector< IDF::FUGenerated::Info > | infos, | ||
std::vector< IDF::FUGenerated::Info > * | subops | ||
) |
Checks if DAG operation can be implemented, i.e. all basic operations can be implemented
Definition at line 194 of file ProGeTools.cc.
References OperationDAG::isNull(), Operation::name(), BoostGraph< GraphNode, GraphEdge >::node(), BoostGraph< GraphNode, GraphEdge >::nodeCount(), OperationNode::referencedOperation(), and StringTools::stringToLower().
Referenced by Automagic::generateableDAGOperations(), generateableDAGOperations(), and FUGen::parseOperations().
bool ProGeTools::checkForGeneratableFU | ( | const ProGeOptions & | options, |
TTAMachine::FunctionUnit & | fu, | ||
IDF::FUGenerated & | fug, | ||
const std::vector< IDF::FUGenerated::Info > & | infos, | ||
const std::vector< IDF::FUGenerated::DAGOperation > | dagops | ||
) |
Check if given fu can be generated. If so return it in fug.
Definition at line 59 of file ProGeTools.cc.
References IDF::FUGenerated::addOperation(), findInOptionList(), IDF::FUGenerated::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), and options.
Referenced by ProGe::ProGeUI::generateIDF().
bool ProGeTools::checkForSelectableFU | ( | const ProGeOptions & | options, |
TTAMachine::FunctionUnit & | fu, | ||
IDF::FUImplementationLocation & | loc, | ||
std::ostream & | verbose | ||
) |
Checks if FU has an implementation in hdbs.
Definition at line 352 of file ProGeTools.cc.
References HDB::FUEntry::architecture(), findHDBPath(), HDB::HDBManager::fuByEntryID(), HDB::HDBManager::fuEntryIDs(), HDB::CachedHDBManager::instance(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), options, IDF::UnitImplementationLocation::setHDBFile(), IDF::UnitImplementationLocation::setID(), ProGe::Verilog, and ProGe::VHDL.
Referenced by ProGe::ProGeUI::generateIDF().
bool ProGeTools::checkForSelectableIU | ( | const ProGeOptions & | options, |
TTAMachine::ImmediateUnit & | iu, | ||
IDF::IUImplementationLocation & | loc, | ||
std::ostream & | verbose | ||
) |
Checks if RF has an implementation in hdbs.
Definition at line 500 of file ProGeTools.cc.
References HDB::RFEntry::architecture(), findHDBPath(), HDB::CachedHDBManager::instance(), TTAMachine::RegisterFile::isUsedAsGuard(), TTAMachine::ImmediateUnit::latency(), TTAMachine::RegisterFile::maxReads(), options, HDB::HDBManager::rfByEntryID(), HDB::HDBManager::rfEntryIDs(), IDF::UnitImplementationLocation::setHDBFile(), IDF::UnitImplementationLocation::setID(), TTAMachine::BaseRegisterFile::size(), ProGe::Verilog, ProGe::VHDL, and TTAMachine::BaseRegisterFile::width().
Referenced by ProGe::ProGeUI::generateIDF().
bool ProGeTools::checkForSelectableRF | ( | const ProGeOptions & | options, |
TTAMachine::RegisterFile & | rf, | ||
IDF::RFImplementationLocation & | loc, | ||
std::ostream & | verbose | ||
) |
Checks if RF has an implementation in hdbs.
Definition at line 422 of file ProGeTools.cc.
References HDB::RFEntry::architecture(), TTAMachine::Unit::bidirPortCount(), findHDBPath(), TTAMachine::RegisterFile::guardLatency(), TTAMachine::Unit::inputPortCount(), HDB::CachedHDBManager::instance(), TTAMachine::RegisterFile::isUsedAsGuard(), options, TTAMachine::Unit::outputPortCount(), HDB::HDBManager::rfByEntryID(), HDB::HDBManager::rfEntryIDs(), IDF::UnitImplementationLocation::setHDBFile(), IDF::UnitImplementationLocation::setID(), TTAMachine::BaseRegisterFile::size(), ProGe::Verilog, ProGe::VHDL, TTAMachine::BaseRegisterFile::width(), and TTAMachine::RegisterFile::zeroRegister().
Referenced by ProGe::ProGeUI::generateIDF().
std::vector< IDF::FUGenerated::Info > ProGeTools::createFUGeneratableOperationInfos | ( | const ProGeOptions & | options, |
std::ostream & | verbose | ||
) |
Parses all given hdbs for operation implementations.
Definition at line 306 of file ProGeTools.cc.
References findHDBPath(), IDF::FUGenerated::Info::id, HDB::CachedHDBManager::instance(), HDB::HDBManager::OperationImplementationByID(), HDB::HDBManager::OperationImplementationIDs(), and options.
Referenced by ProGe::ProGeUI::generateIDF().
int ProGeTools::dagLatency | ( | const OperationDAG & | dag, |
const std::unordered_map< std::string, int > & | maxOpLatency | ||
) |
Finds the maximum latency of the dag. Uses maxOpLatency for the node latencies.
Definition at line 234 of file ProGeTools.cc.
References assert, OperationDAG::isNull(), maxLatencyToNode(), and BoostGraph< GraphNode, GraphEdge >::sinkNodes().
Referenced by FUGen::parseOperations().
std::string ProGeTools::findHDBPath | ( | std::string | name | ) |
Tries to find full path for hdb file.
Definition at line 339 of file ProGeTools.cc.
References FileSystem::fileExists(), FileSystem::findFileInSearchPaths(), and Environment::hdbPaths().
Referenced by Automagic::checkForSelectableFU(), checkForSelectableFU(), Automagic::checkForSelectableIU(), checkForSelectableIU(), checkForSelectableRF(), Automagic::checkForSelectableRF(), Automagic::createFUGeneratableOperationInfos(), and createFUGeneratableOperationInfos().
bool ProGeTools::findInOptionList | ( | const std::string & | option, |
std::vector< std::string > | list, | ||
bool | enableAll = true |
||
) |
Check if option is in the list or list has 'ALL' in it.
Definition at line 124 of file ProGeTools.cc.
References StringTools::stringToLower().
Referenced by checkForGeneratableFU(), FUGen::createMandatoryPorts(), FUGen::createShadowRegisters(), and FUGen::implement().
std::vector< IDF::FUGenerated::DAGOperation > ProGeTools::generateableDAGOperations | ( | const std::vector< IDF::FUGenerated::Info > | infos, |
std::ostream & | verbose | ||
) |
Find out all operations we can generate from DAG.
Definition at line 142 of file ProGeTools.cc.
References canGenerateFromDAG(), Operation::dag(), Operation::dagCount(), OperationPool::index(), OperationIndex::module(), OperationIndex::moduleCount(), OperationPool::operation(), OperationIndex::operationCount(), OperationIndex::operationName(), and StringTools::stringToLower().
Referenced by ProGe::ProGeUI::generateIDF().
bool ProGeTools::languageMatches | ( | HDB::BlockImplementationFile::Format | format, |
ProGe::HDL | language | ||
) |
int ProGeTools::maxLatencyToNode | ( | const OperationDAG & | dag, |
OperationDAGNode & | node, | ||
const std::unordered_map< std::string, int > & | maxOpLatency, | ||
bool | allowDifference = true |
||
) |
Definition at line 274 of file ProGeTools.cc.
References assert, BoostGraph< GraphNode, GraphEdge >::inEdges(), nodeLatency(), and BoostGraph< GraphNode, GraphEdge >::tailNode().
Referenced by Automagic::dagLatency(), dagLatency(), Automagic::maxLatencyToNode(), and FUGen::scheduleOperations().
int ProGeTools::nodeLatency | ( | OperationDAGNode & | node, |
const std::unordered_map< std::string, int > & | maxOpLatency | ||
) |
Definition at line 252 of file ProGeTools.cc.
References Operation::name(), OperationNode::referencedOperation(), and StringTools::stringToLower().
Referenced by Automagic::maxLatencyToNode(), and maxLatencyToNode().