From 9c239fd8a8b3da22d6629f82bdd8869368374488 Mon Sep 17 00:00:00 2001
From: "yu.dongliang" <18588496441@163.com>
Date: Tue, 31 Oct 2023 23:48:58 +0800
Subject: [PATCH] delete ses_loop.c

---
 ses_core.h   |  12 ------
 ses_layout.c |   2 +-
 ses_loop.c   | 104 ---------------------------------------------------
 3 files changed, 1 insertion(+), 117 deletions(-)
 delete mode 100644 ses_loop.c

diff --git a/ses_core.h b/ses_core.h
index 69a49f9..882f9fc 100644
--- a/ses_core.h
+++ b/ses_core.h
@@ -7,20 +7,9 @@
 typedef struct ses_step_s    ses_step_t;
 typedef struct ses_path_s    ses_path_t;
 typedef struct ses_flow_s    ses_flow_t;
-typedef struct ses_edge_s    ses_edge_t;
 typedef struct ses_info_s    ses_info_t;
 typedef struct ses_ctx_s     ses_ctx_t;
 
-struct ses_edge_s
-{
-	ScfEline*      el0;
-	ScfEline*      el1;
-
-	ScfEcomponent* c;
-	ScfEpin*       p0;
-	ScfEpin*       p1;
-};
-
 struct ses_flow_s
 {
 	scf_vector_t*  paths;
@@ -124,7 +113,6 @@ void        ses_ctx_free (ses_ctx_t* ctx);
 
 
 int ses_layout_board (ScfEboard*    b);
-int ses_loop_function(ScfEfunction* f, scf_vector_t* loops);
 int ses_steps_analyse(ScfEfunction* f, int64_t ns, int64_t count);
 
 void __ses_path_split_i(ScfEfunction* f, ses_path_t* path, int i, int j, double la, double jla, double* a, double* ja);
diff --git a/ses_layout.c b/ses_layout.c
index 849a8fe..b41f696 100644
--- a/ses_layout.c
+++ b/ses_layout.c
@@ -1476,7 +1476,7 @@ int ses_layout_board(ScfEboard* b)
 			return ret;
 		}
 
-		ses_steps_analyse(f, 5, 1);
+//		ses_steps_analyse(f, 5, 1);
 
 		x = f->x;
 		y = f->y;
diff --git a/ses_loop.c b/ses_loop.c
deleted file mode 100644
index 1a67213..0000000
--- a/ses_loop.c
+++ /dev/null
@@ -1,104 +0,0 @@
-#include"ses_core.h"
-
-static int __ses_dfs_tree(ScfEfunction* f, ScfEline* root, scf_vector_t* edges, int64_t* total)
-{
-    ScfEcomponent* c;
-    ScfEline*      el;
-    ScfEpin*       p0;
-    ScfEpin*       p1;
-
-	ses_edge_t*    e;
-
-    size_t i;
-    size_t j;
-
-	root->vflag = 1;
-
-	for (i = 0; i + 1 < root->n_pins; i += 2) {
-
-		c  = f->components[root->pins[i]];
-		p0 = c->pins      [root->pins[i + 1]];
-
-		if (p0->vflag)
-			continue;
-		p0->vflag = 1;
-
-		for (j = 0; j < c->n_pins; j++) {
-			p1 =        c->pins[j];
-
-			if (p1->vflag)
-				continue;
-			p1->vflag = 1;
-
-			el = f->elines[p1->lid];
-
-			if (el->vflag)
-				continue;
-			el->vflag = 1;
-
-			e = malloc(sizeof(ses_edge_t));
-			if (!e)
-				return -ENOMEM;
-
-			e->c   = c;
-			e->p0  = p0;
-			e->p1  = p1;
-
-			e->el0 = root;
-			e->el1 = el;
-
-			scf_loge("l%ld --- c%ld_p%ld_p%ld --> l%ld\n", root->id, c->id, p0->id, p1->id, el->id);
-
-			int ret = scf_vector_add(edges, e);
-			if ( ret < 0)
-				return ret;
-
-			ret = __ses_dfs_tree(f, el, edges, total);
-			if ( ret < 0)
-				return ret;
-		}
-	}
-
-    root->dfo = --*total;
-
-	scf_logw("root->id: %ld, root->dfo: %ld\n", root->id, root->dfo);
-    return 0;
-}
-
-int ses_loop_function(ScfEfunction* f, scf_vector_t* loops)
-{
-	if (!f || !loops || f->n_elines < 2)
-		return -EINVAL;
-
-	ScfEcomponent* c;
-	ScfEline*      el;
-	ScfEpin*       p;
-
-	scf_vector_t*  edges = scf_vector_alloc();
-	if (!edges)
-		return -ENOMEM;
-
-	size_t i;
-	size_t j;
-	size_t k;
-
-	int64_t total = f->n_elines;
-
-	for (i = 0; i < f->n_components; i++) {
-		c         = f->components[i];
-		c->vflag  = 0;
-
-		for (j = 0; j < c->n_pins; j++) {
-			p         = c->pins[j];
-			p->vflag  = 0;
-		}
-	}
-
-	for (i = 0; i < f->n_elines; i++) {
-		el        = f->elines[i];
-		el->vflag = 0;
-	}
-
-	__ses_dfs_tree(f, f->elines[0], edges, &total);
-	return 0;
-}
-- 
2.25.1