Go to the documentation of this file.
53 "Arranges architecture FUs into a Blocks-like interconnection");
87 virtual std::vector<RowID>
89 std::vector<RowID> result;
101 std::ostringstream msg(std::ostringstream::out);
103 <<
"Error loading the adf." << std::endl;
111 for (
int i = 0; i < socketNavi.
count(); i++) {
112 if (socketNavi.
item(i)->portCount() == 0) {
122 for (
int i = 0; i < socketNavi.
count(); i++) {
126 assert(width == 32 &&
"ADF has Socket != 32-bit");
130 std::vector<Socket::Direction> directions;
131 std::vector<int> readSockets, writeSockets;
132 int gcu_ra_input = -1, gcu_ra_output = -1, gcu_pc = -1;
134 for (
int i = 0; i < socketNavi.
count(); i++) {
137 directions.push_back(dir);
142 port_count > 0 && port_count <= 2 &&
143 "Socket is not connected or connected to more than 2 FUs");
148 if (gcu != NULL && sock->
port(0)->
name() ==
"ra") {
151 readSockets.push_back(i);
154 writeSockets.push_back(i);
155 if (gcu != NULL && sock->
port(0)->
name() ==
"ra") {
163 for (
int i = 0; i < busNavi.
count(); i++) {
171 std::vector<int> readBuses, writeBuses;
174 std::srand(time(NULL));
175 for (
unsigned int i = 0; i < readSockets.size(); i++) {
176 int rd_soc_idx = readSockets[i];
177 Socket* input_sock = socketNavi.
item(rd_soc_idx);
185 if (
dynamic_cast<ControlUnit*
>(parentUnit) != NULL &&
186 input_sock->
port(0)->
name() ==
"pc") {
187 assert(gcu_ra_input != -1);
188 Socket* ra_sock = socketNavi.
item(gcu_ra_input);
193 readBuses.push_back(busCount++);
196 int output_socket_count = writeSockets.size();
197 int req_connections = std::min(output_socket_count, 4);
198 while (req_connections > 0) {
201 writeSockets[std::rand() % writeSockets.size()];
202 Socket* output_sock = socketNavi.
item(wr_soc_idx);
237 assert(gcu_ra_input != -1);
239 assert(gcu_ra_output != -1);
250 result.push_back(confID);
void attachSocket(Socket &socket)
Port * port(int index) const
virtual bool requiresStartingPointArchitecture() const
virtual void deleteInstructionTemplate(InstructionTemplate &instrTempl)
virtual TCEString name() const
TTAMachine::Machine * architecture(RowID id) const
virtual void addSlot(const std::string &slotName, int width, ImmediateUnit &dstUnit)
virtual int width() const =0
virtual void removeBus(Bus &bus)
virtual bool requiresSimulationData() const
int RowID
Type definition of row ID in relational databases.
virtual std::vector< RowID > explore(const RowID &configurationID, const unsigned int &)
Direction direction() const
static std::string toString(const T &source)
#define assert(condition)
const std::string PLUGIN_DESCRIPTION
#define EXPORT_DESIGN_SPACE_EXPLORER_PLUGIN(PLUGIN_NAME__)
virtual ImmediateUnitNavigator immediateUnitNavigator() const
TTAMachine::Segment * createBus(TTAMachine::Machine *mach, int width)
virtual bool requiresApplication() const
bool isConnectedTo(const Socket &socket) const
virtual SocketNavigator socketNavigator() const
void setDirection(Direction direction)
virtual void addBus(Bus &bus)
RowID addConfiguration(const MachineConfiguration &conf)
virtual bool requiresHDB() const
RowID addArchitecture(const TTAMachine::Machine &mom)
MachineConfiguration configuration(RowID id) const
static std::ostream & errorStream()
virtual bool producesArchitecture() const
virtual std::string name() const
virtual BusNavigator busNavigator() const
virtual void removeSocket(Socket &socket)
ComponentType * item(int index) const
virtual InstructionTemplateNavigator instructionTemplateNavigator() const
@ INPUT
Data goes from bus to port.
Unit * parentUnit() const