From: yu.dongliang <18588496441@163.com> Date: Tue, 5 Sep 2023 08:20:47 +0000 (+0800) Subject: scf_eda.proto X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=5765429d29a9c20b61590e7e7febdbfa7d10460b;p=ses.git scf_eda.proto --- diff --git a/scf_eda.pb-c.c b/scf_eda.pb-c.c index f81f035..156000f 100644 --- a/scf_eda.pb-c.c +++ b/scf_eda.pb-c.c @@ -385,7 +385,7 @@ const ProtobufCMessageDescriptor scf_line__descriptor = (ProtobufCMessageInit) scf_line__init, NULL,NULL,NULL /* reserved[123] */ }; -static const ProtobufCFieldDescriptor scf_epin__field_descriptors[20] = +static const ProtobufCFieldDescriptor scf_epin__field_descriptors[22] = { { "id", @@ -556,33 +556,57 @@ static const ProtobufCFieldDescriptor scf_epin__field_descriptors[20] = 0,NULL,NULL /* reserved1,reserved2, etc */ }, { - "tr", + "sr", 15, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_DOUBLE, 0, /* quantifier_offset */ - offsetof(ScfEpin, tr), + offsetof(ScfEpin, sr), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { - "jtr", + "jsr", 16, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_DOUBLE, 0, /* quantifier_offset */ - offsetof(ScfEpin, jtr), + offsetof(ScfEpin, jsr), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { - "x", + "pr", 17, PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_DOUBLE, + 0, /* quantifier_offset */ + offsetof(ScfEpin, pr), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "jpr", + 18, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_DOUBLE, + 0, /* quantifier_offset */ + offsetof(ScfEpin, jpr), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "x", + 19, + PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_INT32, 0, /* quantifier_offset */ offsetof(ScfEpin, x), @@ -593,7 +617,7 @@ static const ProtobufCFieldDescriptor scf_epin__field_descriptors[20] = }, { "y", - 18, + 20, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_INT32, 0, /* quantifier_offset */ @@ -605,7 +629,7 @@ static const ProtobufCFieldDescriptor scf_epin__field_descriptors[20] = }, { "vflag", - 19, + 21, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_BOOL, 0, /* quantifier_offset */ @@ -617,7 +641,7 @@ static const ProtobufCFieldDescriptor scf_epin__field_descriptors[20] = }, { "pflag", - 20, + 22, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_BOOL, 0, /* quantifier_offset */ @@ -635,25 +659,27 @@ static const unsigned scf_epin__field_indices_by_name[] = { 3, /* field[3] = flags */ 0, /* field[0] = id */ 9, /* field[9] = ja */ + 17, /* field[17] = jpr */ 11, /* field[11] = jr */ - 15, /* field[15] = jtr */ + 15, /* field[15] = jsr */ 7, /* field[7] = jv */ 2, /* field[2] = lid */ - 19, /* field[19] = pflag */ + 21, /* field[21] = pflag */ + 16, /* field[16] = pr */ 10, /* field[10] = r */ + 14, /* field[14] = sr */ 4, /* field[4] = tos */ - 14, /* field[14] = tr */ 12, /* field[12] = uF */ 13, /* field[13] = uH */ 6, /* field[6] = v */ - 18, /* field[18] = vflag */ - 16, /* field[16] = x */ - 17, /* field[17] = y */ + 20, /* field[20] = vflag */ + 18, /* field[18] = x */ + 19, /* field[19] = y */ }; static const ProtobufCIntRange scf_epin__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 20 } + { 0, 22 } }; const ProtobufCMessageDescriptor scf_epin__descriptor = { @@ -663,7 +689,7 @@ const ProtobufCMessageDescriptor scf_epin__descriptor = "ScfEpin", "", sizeof(ScfEpin), - 20, + 22, scf_epin__field_descriptors, scf_epin__field_indices_by_name, 1, scf_epin__number_ranges, @@ -721,7 +747,7 @@ const ProtobufCMessageDescriptor scf_econn__descriptor = (ProtobufCMessageInit) scf_econn__init, NULL,NULL,NULL /* reserved[123] */ }; -static const ProtobufCFieldDescriptor scf_eline__field_descriptors[14] = +static const ProtobufCFieldDescriptor scf_eline__field_descriptors[12] = { { "id", @@ -855,33 +881,9 @@ static const ProtobufCFieldDescriptor scf_eline__field_descriptors[14] = 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, - { - "r", - 12, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_DOUBLE, - 0, /* quantifier_offset */ - offsetof(ScfEline, r), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "jr", - 13, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_DOUBLE, - 0, /* quantifier_offset */ - offsetof(ScfEline, jr), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, { "vflag", - 14, + 12, PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_TYPE_BOOL, 0, /* quantifier_offset */ @@ -900,18 +902,16 @@ static const unsigned scf_eline__field_indices_by_name[] = { 3, /* field[3] = flags */ 0, /* field[0] = id */ 10, /* field[10] = ja */ - 12, /* field[12] = jr */ 8, /* field[8] = jv */ 6, /* field[6] = lines */ 1, /* field[1] = pins */ - 11, /* field[11] = r */ 7, /* field[7] = v */ - 13, /* field[13] = vflag */ + 11, /* field[11] = vflag */ }; static const ProtobufCIntRange scf_eline__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 14 } + { 0, 12 } }; const ProtobufCMessageDescriptor scf_eline__descriptor = { @@ -921,7 +921,7 @@ const ProtobufCMessageDescriptor scf_eline__descriptor = "ScfEline", "", sizeof(ScfEline), - 14, + 12, scf_eline__field_descriptors, scf_eline__field_indices_by_name, 1, scf_eline__number_ranges, diff --git a/scf_eda.pb-c.h b/scf_eda.pb-c.h index 465d09c..41b1b70 100644 --- a/scf_eda.pb-c.h +++ b/scf_eda.pb-c.h @@ -60,8 +60,10 @@ struct _ScfEpin double jr; double uf; double uh; - double tr; - double jtr; + double sr; + double jsr; + double pr; + double jpr; int32_t x; int32_t y; protobuf_c_boolean vflag; @@ -69,7 +71,7 @@ struct _ScfEpin }; #define SCF_EPIN__INIT \ { PROTOBUF_C_MESSAGE_INIT (&scf_epin__descriptor) \ - , 0, 0, 0, 0, 0,NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + , 0, 0, 0, 0, 0,NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } struct _ScfEconn @@ -101,13 +103,11 @@ struct _ScfEline double jv; double a; double ja; - double r; - double jr; protobuf_c_boolean vflag; }; #define SCF_ELINE__INIT \ { PROTOBUF_C_MESSAGE_INIT (&scf_eline__descriptor) \ - , 0, 0,NULL, 0, 0, 0, 0,NULL, 0,NULL, 0, 0, 0, 0, 0, 0, 0 } + , 0, 0,NULL, 0, 0, 0, 0,NULL, 0,NULL, 0, 0, 0, 0, 0 } struct _ScfEcomponent diff --git a/scf_eda.proto b/scf_eda.proto index af4d150..f14d7be 100644 --- a/scf_eda.proto +++ b/scf_eda.proto @@ -27,13 +27,16 @@ message scf_epin required double uF = 13; required double uH = 14; - required double tr = 15; - required double jtr = 16; + required double sr = 15; + required double jsr = 16; - required int32 x = 17; - required int32 y = 18; - required bool vflag = 19; - required bool pflag = 20; + required double pr = 17; + required double jpr = 18; + + required int32 x = 19; + required int32 y = 20; + required bool vflag = 21; + required bool pflag = 22; } message scf_econn @@ -57,10 +60,8 @@ message scf_eline required double jv = 9; required double a = 10; required double ja = 11; - required double r = 12; - required double jr = 13; - required bool vflag = 14; + required bool vflag = 12; } message scf_ecomponent diff --git a/ses_step_va.c b/ses_step_va.c index 065e086..d78d97d 100644 --- a/ses_step_va.c +++ b/ses_step_va.c @@ -42,10 +42,13 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path) jr += c->jr; } - p->tr = r; - p->jtr = jr; + p->sr = r; + p->jsr = jr; - scf_loge("i: %d, c%ldp%ld, p->tr: %lg, p->jtr: %lg\n", i, p->cid, p->id, p->tr, p->jtr); + p->pr = r; + p->jpr = jr; + + scf_loge("i: %d, c%ldp%ld, p->tr: %lg, p->jtr: %lg\n", i, p->cid, p->id, p->sr, p->jsr); } printf("\n"); @@ -94,8 +97,8 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path) double _r = child->r / R; double _jr = -child->jr / R; - r = p1->tr - p0->tr; - jr = p1->jtr - p0->jtr; + r = p1->pr - p0->pr; + jr = p1->jpr - p0->jpr; R = r * r + jr * jr; r = r / R; @@ -108,16 +111,16 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path) r = r / R; jr = -jr / R; - double dr = p1->tr - (p0->tr + r); - double jdr = p1->jtr - (p0->jtr + jr); + double dr = p1->pr - (p0->pr + r); + double jdr = p1->jpr - (p0->jpr + jr); for ( ; j < path->pins->size; j++) { p = path->pins->data[j]; - p->tr -= dr; - p->jtr -= jdr; + p->pr -= dr; + p->jpr -= jdr; - scf_logw("j: %d, c%ldp%ld, p->tr: %lg, p->jtr: %lg\n", j, p->cid, p->id, p->tr, p->jtr); + scf_logw("j: %d, c%ldp%ld, p->pr: %lg + j%lg\n", j, p->cid, p->id, p->pr, p->jpr); } scf_loge("child: %d, r: %lg, jr: %lg, r0: %lg, jr0: %lg, _r: %lg, _jr: %lg, dr: %lg, jdr: %lg\n\n", @@ -127,8 +130,8 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path) p = path->pins->data[path->pins->size - 1]; - path->r = p->tr; - path->jr = p->jtr; + path->r = p->pr; + path->jr = p->jpr; scf_loge("path: %d, r: %lg, jr: %lg, r0: %lg, jr0: %lg\n", path->index, path->r, path->jr, path->r0, path->jr0); @@ -186,8 +189,8 @@ static int __ses_path_va(ScfEfunction* f, ses_path_t* path) for (i = 0; i < path->pins->size; i++) { p = path->pins->data[i]; - v = a * p->tr - ja * p->jtr; - jv = ja * p->tr + a * p->jtr; + v = a * p->pr - ja * p->jpr; + jv = ja * p->pr + a * p->jpr; p->v = p0->v - v; p->jv = p0->jv - jv;