21 static const unsigned char ones_in_4b[] = {0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4};
22 #define get_ones_in_8b(v) (ones_in_4b[v & 0x0f] + ones_in_4b[v >> 4])
33 #define FP 1 // janders selectable FP or INT ALU
35 RIKEN_PE_Elastic::RIKEN_PE_Elastic(std::string name,
int pe_conn_in,
int pe_conn_out,
int II,
int latency,
Location loc,
int type,
int buffer_depth,
bool eb_enable,
int contexts,
bool pred, std::string pred_type)
37 , pe_conn_in(pe_conn_in)
38 , pe_conn_out(pe_conn_out)
39 , buffer_depth(buffer_depth)
46 throw cgrame_error (
"RIKEN CGRA must be single context.\n");
48 int num_ALU_inputs = 2;
54 int num_Possible_Ports = 8;
83 }, size, 1, latency, pred,
isElastic), 0, 0.75, 0.5, 0.25);
90 OpCode::SQRT,}, size, II, latency, pred,
isElastic), 0.5, 0.4, 0.5, 0.1);
94 int numCrossbarInputs = num_inPorts + 1;
95 int numCrossbarOutputs = num_outPorts + num_ALU_inputs;
96 addSubModule(
new ElasticCrossbar(
"crossbar",
loc, numCrossbarInputs, numCrossbarOutputs, size, type, pred, pred_type), 0.5, 0.375, 0.4, 0.4);
99 for (
int i = 0; i < num_Possible_Ports; i++)
117 for(
int i = 0; i < num_Possible_Ports; i++)
140 for(
int i = 0; i < num_Possible_Ports; i++)
148 for (
int i = 0; i < num_Possible_Ports; i++)
156 for(
int i = 0; i < num_Possible_Ports; i++)
165 int crossbarInputCounter = 0;
166 for(
int i = 0; i < num_Possible_Ports; i++)
171 crossbarInputCounter += 1;
176 int crossbarOutputCounter = 0;
177 for(
int i = 0; i < num_Possible_Ports; i++)
182 crossbarOutputCounter += 1;