19 static const unsigned char ones_in_4b[] = {0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4};
20 #define get_ones_in_8b(v) (ones_in_4b[v & 0x0f] + ones_in_4b[v >> 4])
41 int pred_conn_in,
int pred_conn_out,
int fu_II,
int II,
int latency,
Location loc, std::string pred_scheme)
43 , predExist(predExist)
44 , pe_conn_in(pe_conn_in)
45 , pe_conn_out(pe_conn_out)
46 , pred_conn_in(pred_conn_in)
47 , pred_conn_out(pred_conn_out)
57 int num_Possible_Ports = 8;
73 }, size, fu_II, latency), 0, 0.75, 0.5, 0.25);
77 int numCrossbarInputs = num_inPorts + 3;
78 int numCrossbarOutputs = num_outPorts + 2;
79 bool crossbarSelect =
predExist & pred_scheme.find(
"event") == std::string::npos;
80 addSubModule(
new Crossbar(
"crossbar",
loc, numCrossbarInputs, numCrossbarOutputs, size, crossbarSelect, II), 0.5, 0.375, 0.4, 0.4);
93 for (
int i = 0; i < num_Possible_Ports; i++) {
113 for(
int i = 0; i < num_Possible_Ports; i++)
129 for(
int i = 0; i < num_Possible_Ports; i++) {
141 for(
int i = 0; i < num_Possible_Ports; i++)
160 for(
int i = 0; i < num_Possible_Ports; i++)
173 int crossbarInputCounter = 0;
175 for(
int i = 0; i < num_Possible_Ports; i++)
180 crossbarInputCounter += 1;
194 int crossbarOutputCounter = 0;
196 for(
int i = 0; i < num_Possible_Ports; i++)
201 crossbarOutputCounter += 1;
234 int numPredCrossbarInputs = num_pred_inPorts + 2 + 2;
236 int numPredCrossbarOutputs = num_pred_outPorts + 2 + 1;
245 }, size, 1, latency), 0, 0.75, 0.5, 0.25);
249 addSubModule(
new Crossbar(
"crossbar_pred",
loc, numPredCrossbarInputs, numPredCrossbarOutputs, size,
false, II), 0.5, 0.375, 0.4, 0.4);
261 for (
int i = 0; i < num_Possible_Ports; i++) {
272 for(
int i = 0; i < num_Possible_Ports; i++)
299 for(
int i = 0; i < num_Possible_Ports; i++) {
309 addConnection(
"this.Context" ,
"ALUconfig_pred.Context",
false);
310 addConnection(
"this.Context" ,
"RegAConfig_pred.Context",
false);
311 addConnection(
"this.Context" ,
"RegBConfig_pred.Context",
false);
312 addConnection(
"this.Context" ,
"RESConfig_pred.Context",
false);
313 for(
int i = 0; i < num_Possible_Ports; i++) {
320 addConnection(
"this.Context" ,
"crossbar_pred.Context",
false);
329 for(
int i = 0; i < num_Possible_Ports; i++)
342 crossbarInputCounter = 0;
344 for(
int i = 0; i < num_Possible_Ports; i++)
349 crossbarInputCounter += 1;
365 crossbarOutputCounter = 0;
367 for(
int i = 0; i < num_Possible_Ports; i++)
372 crossbarOutputCounter += 1;
388 if (pred_scheme.find(
"event") == std::string::npos) {