OpenASIP
2.0
|
Enumerations | |
enum | FU_TYPE { FU_TYPE::ID, FU_TYPE::IU, FU_TYPE::ALU, FU_TYPE::RF, FU_TYPE::MUL, FU_TYPE::LSU, FU_TYPE::ABU } |
Functions | |
void | BuildTTAModel (BlocksModel &blocksModel, const std::string &outputName) |
TTAMachine::Bus * | CreateConnection (TTAMachine::Machine &mach, TTAMachine::Socket *inputSocket, TTAMachine::Socket *outputSocket, BlocksGCU &gcu) |
void | Deinitialize (TTAMachine::Machine &mach, std::list< BlocksALUPair * > aluList, std::list< BlocksLSUPair * > lsuList, std::list< BlocksRF * > rfList, std::list< BlocksIMM * > iuList, std::list< BlocksMULPair * > mulList) |
void | ConnectInputs (TTAMachine::Machine &mach, BlocksGCU &gcu, std::list< BlocksALUPair * > aluList, std::list< BlocksLSUPair * > lsuList, std::list< BlocksRF * > rfList, std::list< BlocksMULPair * > mulList) |
TTAMachine::Socket * | FindOutputSocket (TTAMachine::Machine::SocketNavigator nav, std::string source) |
|
strong |
void BlocksTranslator::BuildTTAModel | ( | BlocksModel & | blocksModel, |
const std::string & | outputName | ||
) |
Build the TTA model (adf file) from the Blocks model.
BlocksModel | The Blocks model created from the Blocks 'architecture.xml'. |
outputName | The name of the output adf. |
Definition at line 54 of file BlocksTranslator.cc.
References TTAMachine::InstructionTemplate::addSlot(), ConnectInputs(), Deinitialize(), IU, BlocksModel::mFunctionalUnitList, RF, TTAMachine::Machine::setLittleEndian(), BlocksGCU::sources, and TTAMachine::Machine::writeToADF().
Referenced by main().
void BlocksTranslator::ConnectInputs | ( | TTAMachine::Machine & | mach, |
BlocksGCU & | gcu, | ||
std::list< BlocksALUPair * > | aluList, | ||
std::list< BlocksLSUPair * > | lsuList, | ||
std::list< BlocksRF * > | rfList, | ||
std::list< BlocksMULPair * > | mulList | ||
) |
Create all the connectivity in the TTA model.
mach | The TTA machine where the connections need to be made. |
gcu | A reference to the TTA GCU (ABU) model. |
aluList | A list with all ALU pairs currently in the TTA model. |
lsuList | A list with all LSU pairs currently in the TTA model. |
rfList | A list with all RFs currently in the TTA model. |
mulList | A list with all MUL pairs currently in the TTA model. |
Definition at line 225 of file BlocksTranslator.cc.
References CreateConnection(), FindOutputSocket(), BlocksGCU::pcIn, TTAMachine::Machine::socketNavigator(), BlocksGCU::sources, and BlocksGCU::valIn.
Referenced by BuildTTAModel().
Bus * BlocksTranslator::CreateConnection | ( | TTAMachine::Machine & | mach, |
TTAMachine::Socket * | inputSocket, | ||
TTAMachine::Socket * | outputSocket, | ||
BlocksGCU & | gcu | ||
) |
Create a connection between two different sockets. Note: Input := Bus to port, output := Port to bus.
mach | The TTA machine where the connection needs to be made. |
inputSocket | A pointer to the TTA input socket that needs to be connected. |
outputSocket | A pointer to the TTA output socket that needs to be connected. |
gcu | A reference to the TTA GCU (ABU) model. |
Definition at line 160 of file BlocksTranslator.cc.
References TTAMachine::Machine::addBus(), TTAMachine::Socket::attachBus(), TTAMachine::Machine::busNavigator(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Component::name(), TTAMachine::Segment::parentBus(), BlocksGCU::pcIn, BlocksGCU::raIn, TTAMachine::Socket::segment(), TTAMachine::Socket::segmentCount(), and TTAMachine::Socket::setDirection().
Referenced by ConnectInputs().
void BlocksTranslator::Deinitialize | ( | TTAMachine::Machine & | mach, |
std::list< BlocksALUPair * > | aluList, | ||
std::list< BlocksLSUPair * > | lsuList, | ||
std::list< BlocksRF * > | rfList, | ||
std::list< BlocksIMM * > | iuList, | ||
std::list< BlocksMULPair * > | mulList | ||
) |
Clean up the memory, deletes all FUs and busses.
mach | The TTA machine where the connections need to be made. |
aluList | A list with all ALU pairs currently in the TTA model. |
lsuList | A list with all LSU pairs currently in the TTA model. |
rfList | A list with all RFs currently in the TTA model. |
mulList | A list with all MUL pairs currently in the TTA model. |
Definition at line 304 of file BlocksTranslator.cc.
References TTAMachine::Machine::busNavigator(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::Navigator< ComponentType >::item(), and TTAMachine::Bus::segment().
Referenced by BuildTTAModel().
Socket * BlocksTranslator::FindOutputSocket | ( | TTAMachine::Machine::SocketNavigator | nav, |
std::string | source | ||
) |
Find the output socket corresponding to a FU name.
nav | An instance of a socketnavigator. |
source | The source of which the handle to the output socket needs to be returned. |
Definition at line 284 of file BlocksTranslator.cc.
References assert, TTAMachine::Machine::Navigator< ComponentType >::hasItem(), and TTAMachine::Machine::Navigator< ComponentType >::item().
Referenced by ConnectInputs().