26 int inode, iedge, switch_index, to_node, maxlen;
27 int icblock, isblock, iseg_low, iseg_high;
30 boolean * cblock_counted;
36 cblock_counted = (
boolean *)
my_calloc(maxlen,
sizeof(
boolean));
37 buffer_Cin = (
float *)
my_calloc(maxlen,
sizeof(
float));
43 if (from_rr_type ==
CHANX || from_rr_type ==
CHANY) {
50 if (to_rr_type ==
CHANX || to_rr_type ==
CHANY) {
74 if (!buffered && inode < to_node) {
87 buffer_Cin[isblock] =
std::max(buffer_Cin[isblock], Cin);
92 else if (to_rr_type ==
IPIN) {
100 if (cblock_counted[icblock] ==
FALSE) {
102 cblock_counted[icblock] =
TRUE;
120 if (from_rr_type ==
CHANX) {
128 for (icblock = iseg_low; icblock <= iseg_high; icblock++) {
129 cblock_counted[icblock] =
FALSE;
132 for (isblock = iseg_low - 1; isblock <= iseg_high; isblock++) {
133 rr_node[inode].
C += buffer_Cin[isblock];
134 buffer_Cin[isblock] = 0.;
139 else if (from_rr_type ==
OPIN) {
146 assert(to_rr_type ==
CHANX || to_rr_type ==
CHANY || to_rr_type ==
IPIN);
161 Couts_to_add = (
float *)
my_calloc(num_rr_nodes,
sizeof(
float));
167 if (to_rr_type ==
CHANX || to_rr_type ==
CHANY) {
170 if (Couts_to_add[to_node] != 0) {
174 if (Couts_to_add[to_node]
176 vpr_printf(TIO_MESSAGE_ERROR,
"A single driver resource (%i) is driven by different Cout's (%e!=%e)\n",
177 to_node, Couts_to_add[to_node],
189 rr_node[inode].
C += Couts_to_add[inode];
192 free(cblock_counted);
int seg_index_of_cblock(t_rr_type from_rr_type, int to_node)
void * my_calloc(size_t nelem, size_t size)
int seg_index_of_sblock(int from_node, int to_node)
struct s_switch_inf * switch_inf
void add_rr_graph_C_from_switches(float C_ipin_cblock)