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 Automagic::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 193 of file AutomagicTools.cc.
References OperationDAG::isNull(), Operation::name(), BoostGraph< GraphNode, GraphEdge >::node(), BoostGraph< GraphNode, GraphEdge >::nodeCount(), OperationNode::referencedOperation(), and StringTools::stringToLower().
bool Automagic::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 58 of file AutomagicTools.cc.
References IDF::FUGenerated::addOperation(), findInOptionList(), IDF::FUGenerated::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), and options.
bool Automagic::checkForSelectableFU | ( | const ProGeOptions & | options, |
TTAMachine::FunctionUnit & | fu, | ||
IDF::FUImplementationLocation & | loc, | ||
std::ostream & | verbose | ||
) |
Checks if FU has an implementation in hdbs.
Definition at line 348 of file AutomagicTools.cc.
References HDB::FUEntry::architecture(), ProGeTools::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.
bool Automagic::checkForSelectableIU | ( | const ProGeOptions & | options, |
TTAMachine::ImmediateUnit & | iu, | ||
IDF::IUImplementationLocation & | loc, | ||
std::ostream & | verbose | ||
) |
Checks if RF has an implementation in hdbs.
Definition at line 491 of file AutomagicTools.cc.
References HDB::RFEntry::architecture(), ProGeTools::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().
bool Automagic::checkForSelectableRF | ( | const ProGeOptions & | options, |
TTAMachine::RegisterFile & | rf, | ||
IDF::RFImplementationLocation & | loc, | ||
std::ostream & | verbose | ||
) |
Checks if RF has an implementation in hdbs.
Definition at line 417 of file AutomagicTools.cc.
References HDB::RFEntry::architecture(), TTAMachine::Unit::bidirPortCount(), ProGeTools::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, and TTAMachine::BaseRegisterFile::width().
std::vector< IDF::FUGenerated::Info > Automagic::createFUGeneratableOperationInfos | ( | const ProGeOptions & | options, |
std::ostream & | verbose | ||
) |
Parses all given hdbs for operation implementations.
Definition at line 305 of file AutomagicTools.cc.
References ProGeTools::findHDBPath(), IDF::FUGenerated::Info::id, HDB::CachedHDBManager::instance(), HDB::HDBManager::OperationImplementationByID(), HDB::HDBManager::OperationImplementationIDs(), and options.
int Automagic::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 233 of file AutomagicTools.cc.
References assert, OperationDAG::isNull(), ProGeTools::maxLatencyToNode(), and BoostGraph< GraphNode, GraphEdge >::sinkNodes().
std::string Automagic::findHDBPath | ( | std::string | name | ) |
Tries to find full path for hdb file.
Definition at line 335 of file AutomagicTools.cc.
References FileSystem::fileExists(), FileSystem::findFileInSearchPaths(), and Environment::hdbPaths().
bool Automagic::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 123 of file AutomagicTools.cc.
References StringTools::stringToLower().
Referenced by checkForGeneratableFU().
std::vector< IDF::FUGenerated::DAGOperation > Automagic::generateableDAGOperations | ( | const std::vector< IDF::FUGenerated::Info > | infos, |
std::ostream & | verbose | ||
) |
Find out all operations we can generate from DAG.
Definition at line 140 of file AutomagicTools.cc.
References ProGeTools::canGenerateFromDAG(), Operation::dag(), Operation::dagCount(), OperationPool::index(), OperationIndex::module(), OperationIndex::moduleCount(), OperationPool::operation(), OperationIndex::operationCount(), OperationIndex::operationName(), and StringTools::stringToLower().
bool Automagic::languageMatches | ( | HDB::BlockImplementationFile::Format | format, |
ProGe::HDL | language | ||
) |
int Automagic::maxLatencyToNode | ( | const OperationDAG & | dag, |
OperationDAGNode & | node, | ||
const std::unordered_map< std::string, int > & | maxOpLatency, | ||
bool | allowDifference = true |
||
) |
Definition at line 273 of file AutomagicTools.cc.
References assert, BoostGraph< GraphNode, GraphEdge >::inEdges(), ProGeTools::maxLatencyToNode(), ProGeTools::nodeLatency(), and BoostGraph< GraphNode, GraphEdge >::tailNode().
int Automagic::nodeLatency | ( | OperationDAGNode & | node, |
const std::unordered_map< std::string, int > & | maxOpLatency | ||
) |
Definition at line 250 of file AutomagicTools.cc.
References Operation::name(), OperationNode::referencedOperation(), and StringTools::stringToLower().