for (k = 0; k < c->n_pins; k++) {
p = c->pins[k];
- printf("cid: %ld, pid: %ld\n", p->cid, p->id);
+ printf("cid: %ld, pid: %ld, flags: %#lx\n", p->cid, p->id, p->flags);
for (m = 0; m + 1 < p->n_tos; m += 2)
printf("to cid: %ld, pid: %ld\n", p->tos[m], p->tos[m + 1]);
m = j * d % f->w;
assert(m < l->x1);
- p->x = l->x0 + m;
+ p->x = l->x0 + m + rand() % 5;
p->y = l->y0;
}
}
}
}
+
+
for (i = 0; i < b->n_functions; i++) {
f = b->functions[i];
for (j = 0; j < f->n_components; j++) {
c = f->components[j];
+ scf_logw("j: %ld, c->id: %ld, n_pins: %ld, ", j, c->id, c->n_pins);
+
+ uint8_t text[64];
+ snprintf(text, sizeof(text) - 1, "%ld", c->id);
+
+ cairo_set_source_rgb (cr, 0, 0, 0);
+ cairo_select_font_face(cr, "Georgia", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
+ cairo_set_font_size (cr, 20);
+ cairo_move_to (cr, c->x + 5, c->y - 5);
+ cairo_show_text (cr, text);
+ cairo_stroke(cr);
+
cairo_set_source_rgb(cr, 0.5, 0.5, 0.0);
- scf_logw("j: %ld, c->id: %ld, n_pins: %ld, ", j, c->id, c->n_pins);
int dx0;
int dy0;