58 int fuPortConnecteds = 0;
59 int fuPortUnconnecteds = 0;
61 for (
int i = 0; i < fuNav.
count(); i++) {
63 for (
int j = 0; j < fu1.
portCount(); j++ ) {
66 for (
int k = 0; k < fuNav.
count(); k++) {
68 for (
int l = 0; l < fu2.
portCount(); l++ ) {
85 float(fuPortConnecteds+fuPortUnconnecteds);
89 int rfCount = regNav.
count();
94 int rfFuConnecteds = 0;
95 int rfFuUnconnecteds = 0;
97 for (
int i = 0; i < fuNav.
count(); i++) {
99 for (
int j = 0; j < fu1.
portCount(); j++ ) {
102 for (
int i = 0; i < rfCount; i++) {
113 for (
int i = 0; i < rfCount; i++) {
127 int rfWritePorts = 0;
129 for (
int i = 0; i < rfCount; i++) {
131 for (
int j = 0; j < rf.
portCount(); j++) {
143 float avgRfWrites = float(rfWritePorts)/pow(rfCount,0.5);
144 float avgRfReads = float(rfReadPorts)/pow(rfCount,0.5);
145 float bypassedRfReadILP = avgRfReads/(1.17-(0.56*
bypassability_));
146 float bypassedRfWriteILP = avgRfWrites/(0.83-(0.415*
bypassability_));
147 float rfReadILP = avgRfReads/1.17;
148 float rfWriteILP = avgRfWrites/0.83;
151 rfILP_ = std::min(rfReadILP, rfWriteILP);
155 float(rfFuConnecteds+rfFuUnconnecteds);
167 float guardedBuses = 0;
168 for (
int i = 0; i < busNav.
count(); i++) {
176 #ifdef DEBUG_MACHINE_ANALYSIS
177 std::cout <<
"Machine analysis done.." << std::endl;
179 std::cout <<
"\tconnectivity: " <<
connectivity_ << std::endl;
180 std::cout <<
"\tguardability: " <<
guardability_ << std::endl;
181 std::cout <<
"\tRF ilp: " <<
rfILP_ << std::endl;
182 std::cout <<
"\t\tread ilp: " << rfReadILP << std::endl;
183 std::cout <<
"\t\twrite ilp: " << rfWriteILP << std::endl;
185 std::cout <<
"\tbus ilp: " <<
busILP_ << std::endl;
186 std::cout <<
"\tfu ilp: " <<
fuILP_ << std::endl;
187 std::cout <<
"total ilp: " <<
averageILP_ << std::endl;