path->r = p->pr;
path->jr = p->jpr;
+ if (path->bridges) {
+
+ printf("\033[33mbridges:\033[0m\n");
+
+ for (i = path->bridges->size - 1; i >= 0; i--) {
+ child = path->bridges->data[i];
+
+ int ret = __ses_path_jr(f, child);
+ if (ret < 0)
+ return ret;
+ }
+ }
+
scf_loge("path: %d, r: %lg, r0: %lg\n\n", path->index, path->r, path->r0);
return 0;
}
static void __ses_path_parent_jr(ScfEfunction* f, ses_path_t* path)
{
- if (!path->childs)
- return;
-
- ses_path_t* child;
+ ses_path_t* sp;
int i;
- for (i = 0; i < path->childs->size; i++) {
- child = path->childs->data[i];
+ if (path->childs) {
+
+ for (i = 0; i < path->childs->size; i++) {
+ sp = path->childs->data[i];
+
+ __ses_path_pr(f, path, 0, sp->parent_p0, NULL, &sp->parent_r0, &sp->parent_jr0);
+ __ses_path_pr(f, path, sp->parent_p1, path->pins->size - 1, NULL, &sp->parent_r1, &sp->parent_jr1);
+
+ scf_logw("child: %d, parent_p0: %d, parent_p1: %d, r0: %lg, r1: %lg\n",
+ sp->index, sp->parent_p0, sp->parent_p1, sp->parent_r0, sp->parent_r1);
+
+ __ses_path_parent_jr(f, sp);
+ }
+ }
+
+ if (path->bridges) {
- __ses_path_pr(f, path, 0, child->parent_p0, NULL, &child->parent_r0, &child->parent_jr0);
- __ses_path_pr(f, path, child->parent_p1, path->pins->size - 1, NULL, &child->parent_r1, &child->parent_jr1);
+ for (i = 0; i < path->bridges->size; i++) {
+ sp = path->bridges->data[i];
- scf_logw("child: %d, parent_p0: %d, parent_p1: %d, r0: %lg, r1: %lg\n",
- child->index, child->parent_p0, child->parent_p1, child->parent_r0, child->parent_r1);
+ __ses_path_pr(f, path, 0, sp->parent_p0, NULL, &sp->parent_r0, &sp->parent_jr0);
+ __ses_path_pr(f, path, sp->parent_p1, path->pins->size - 1, NULL, &sp->parent_r1, &sp->parent_jr1);
- __ses_path_parent_jr(f, child);
+ scf_loge("bridges: %d, parent_p0: %d, parent_p1: %d, r0: %lg, r1: %lg\n",
+ sp->index, sp->parent_p0, sp->parent_p1, sp->parent_r0, sp->parent_r1);
+
+ __ses_path_parent_jr(f, sp);
+ }
}
}