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);