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(ses_path_t* path, ScfEpin* p0, ScfEpin* p1, ScfEline* el, double* a, double* ja);
+void __ses_path_dr (ScfEpin* p0, ScfEpin* p1, ScfEpin* p);
static inline void vertical(int* px, int* py, int dx, int dy, int d)
{
#include"ses_core.h"
-static void __ses_path_split_i(ses_path_t* path, ScfEpin* p0, ScfEpin* p1, ScfEline* el, double* a, double* ja)
+void __ses_path_split_i(ses_path_t* path, ScfEpin* p0, ScfEpin* p1, ScfEline* el, double* a, double* ja)
{
ses_path_t* child;
ScfEpin* cp0;
}
}
-static void __ses_path_dr(ScfEpin* p0, ScfEpin* p1, ScfEpin* p)
+void __ses_path_dr(ScfEpin* p0, ScfEpin* p1, ScfEpin* p)
{
double v = p0->v - p1->v;
double jv = p0->jv - p1->jv;
#include"ses_core.h"
-static void __ses_path_split_i(ses_path_t* path, ScfEpin* p0, ScfEpin* p1, ScfEline* el, double* a, double* ja)
-{
- ses_path_t* child;
- ScfEpin* cp0;
- ScfEpin* cp1;
-
- double v = p0->v - p1->v;
- double jv = p0->jv - p1->jv;
-
- double r = p1->pr - p0->pr;
- double jr = p1->jpr - p0->jpr;
-
- int j;
- for (j = 0; j < path->childs->size; j++) {
- child = path->childs->data[j];
-
- cp0 = child->pins->data[0];
- cp1 = child->pins->data[child->pins->size - 1];
-
- if (cp0->lid != p0->lid || cp1->lid != p1->lid)
- continue;
-
- ses_split_i(&child->a, &child->ja, el->a, el->ja, child->r, child->jr, r, jr);
-
- *a -= child->a;
- *ja -= child->ja;
-
- cp0->a = child->a;
- cp0->ja = child->ja;
- cp1->a = child->a;
- cp1->ja = child->ja;
-
- double cr;
- double jcr;
-
- ses_ui_r(&cp1->dr, &cp1->jdr, v, jv, child->a, child->ja);
-
- cp1->dr -= child->r;
- cp1->jdr -= child->jr;
-
- scf_loge("j: %d, c%ldp%ld--c%ldp%ld, v: %lg + j%lg, child->r: %lg + j%lg, child->a: %lg + j%lg, el->a: %lg + j%lg, cp1->dr: %lg + j%lg\n",
- j, cp0->cid, cp0->id, cp1->cid, cp1->id, v, jv, child->r, child->jr, child->a, child->ja, el->a, el->ja, cp1->dr, cp1->jdr);
- }
-}
-
-static void __ses_path_dr(ScfEpin* p0, ScfEpin* p1, ScfEpin* p)
-{
- double v = p0->v - p1->v;
- double jv = p0->jv - p1->jv;
-
- double r = p1->sr - p0->sr;
- double jr = p1->jsr - p0->jsr;
-
- ses_ui_r(&p->dr, &p->jdr, v, jv, p->a, p->ja);
-
- scf_logd("c%ldp%ld, v: %lg + j%lg, r: %lg + j%lg, p->a: %lg + j%lg, p->dr: %lg + j%lg\n", p->cid, p->id,
- v, jv, r, jr, p->a, p->ja, p->dr, p->jdr);
-
- p->dr -= r;
- p->jdr -= jr;
-}
-
static int __ses_path_va_transistor(ScfEfunction* f, ses_path_t* path)
{
ses_path_t* child;