From: yu.dongliang <18588496441@163.com> Date: Wed, 17 Apr 2024 08:53:24 +0000 (+0800) Subject: change resistance value from complex to real number in native/eda X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=883c1053a318faafa1ee07d225803877f469ee5f;p=scf.git change resistance value from complex to real number in native/eda --- diff --git a/native/eda/scf_eda_pack.c b/native/eda/scf_eda_pack.c index 12c1e89..6eec934 100644 --- a/native/eda/scf_eda_pack.c +++ b/native/eda/scf_eda_pack.c @@ -17,25 +17,25 @@ static int component_pins[SCF_EDA_Components_NB] = static scf_edata_t component_datas[] = { - {SCF_EDA_None, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {SCF_EDA_Battery, 0, SCF_EDA_Battery_POS, 0, 0, 0, 0, 0, 0, 0}, + {SCF_EDA_None, 0, 0, 0, 0, 0, 0, 0, 0}, + {SCF_EDA_Battery, 0, SCF_EDA_Battery_POS, 0, 0, 0, 0, 0, 0}, - {SCF_EDA_Resistor, 0, 0, 0, 0, 10 * 1000, 0, 0, 0, 0}, - {SCF_EDA_Capacitor, 0, 0, 0, 0, 1e12, 0, 0.1, 0, 0}, - {SCF_EDA_Inductor, 0, 0, 0, 0, 0, 0, 0, 1000, 0}, + {SCF_EDA_Resistor, 0, 0, 0, 0, 10 * 1000, 0, 0, 0}, + {SCF_EDA_Capacitor, 0, 0, 0, 0, 1e12, 0.1, 0, 0}, + {SCF_EDA_Inductor, 0, 0, 0, 0, 0, 0, 1000, 0}, }; static scf_edata_t pin_datas[] = { - {SCF_EDA_None, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {SCF_EDA_None, 0, 0, 0, 0, 0, 0, 0, 0}, - {SCF_EDA_Diode, 0, SCF_EDA_Diode_NEG, 0, 0, 750, 0, 0, 0, 0}, + {SCF_EDA_Diode, 0, SCF_EDA_Diode_NEG, 0, 0, 750, 0, 0, 0}, - {SCF_EDA_NPN, 0, SCF_EDA_NPN_B, 0, 0, 750, 0, 0, 0, 0}, - {SCF_EDA_NPN, 0, SCF_EDA_NPN_C, 0, 0, 10, 0, 0, 0, 150}, + {SCF_EDA_NPN, 0, SCF_EDA_NPN_B, 0, 0, 750, 0, 0, 0}, + {SCF_EDA_NPN, 0, SCF_EDA_NPN_C, 0, 0, 10, 0, 0, 150}, - {SCF_EDA_PNP, 0, SCF_EDA_PNP_B, 0, 0, 750, 0, 0, 0, 0}, - {SCF_EDA_PNP, 0, SCF_EDA_PNP_C, 0, 0, 10, 0, 0, 0, 150}, + {SCF_EDA_PNP, 0, SCF_EDA_PNP_B, 0, 0, 750, 0, 0, 0}, + {SCF_EDA_PNP, 0, SCF_EDA_PNP_C, 0, 0, 10, 0, 0, 150}, }; static scf_edata_t* _pin_find_data(const uint64_t type, const uint64_t model, const uint64_t pid) @@ -359,7 +359,6 @@ ScfEcomponent* scf_ecomponent__alloc(uint64_t type) c->v = ed->v; c->a = ed->a; c->r = ed->r; - c->jr = ed->jr; c->uf = ed->uf; c->uh = ed->uh; } @@ -386,7 +385,6 @@ ScfEcomponent* scf_ecomponent__alloc(uint64_t type) pin->v = ed->v; pin->a = ed->a; pin->r = ed->r; - pin->jr = ed->jr; pin->uf = ed->uf; pin->uh = ed->uh; pin->hfe = ed->hfe; diff --git a/native/eda/scf_eda_pack.h b/native/eda/scf_eda_pack.h index 8b3dbd3..e5e6d3b 100644 --- a/native/eda/scf_eda_pack.h +++ b/native/eda/scf_eda_pack.h @@ -77,7 +77,6 @@ typedef struct { double v; double a; double r; - double jr; double uf; double uh; double hfe; @@ -112,24 +111,16 @@ struct scf_epin_s SCF_PACK_DEF_VAR(uint64_t, c_lid); SCF_PACK_DEF_VAR(double, v); - SCF_PACK_DEF_VAR(double, jv); SCF_PACK_DEF_VAR(double, a); - SCF_PACK_DEF_VAR(double, ja); SCF_PACK_DEF_VAR(double, r); - SCF_PACK_DEF_VAR(double, jr); SCF_PACK_DEF_VAR(double, uf); SCF_PACK_DEF_VAR(double, uh); SCF_PACK_DEF_VAR(double, hfe); SCF_PACK_DEF_VAR(double, dr); - SCF_PACK_DEF_VAR(double, jdr); - SCF_PACK_DEF_VAR(double, sr); - SCF_PACK_DEF_VAR(double, jsr); - SCF_PACK_DEF_VAR(double, pr); - SCF_PACK_DEF_VAR(double, jpr); SCF_PACK_DEF_VAR(uint64_t, path); @@ -154,24 +145,15 @@ SCF_PACK_INFO_VARS(ScfEpin, tos, uint64_t), SCF_PACK_INFO_VAR(ScfEpin, c_lid), SCF_PACK_INFO_VAR(ScfEpin, v), -SCF_PACK_INFO_VAR(ScfEpin, jv), SCF_PACK_INFO_VAR(ScfEpin, a), -SCF_PACK_INFO_VAR(ScfEpin, ja), SCF_PACK_INFO_VAR(ScfEpin, r), -SCF_PACK_INFO_VAR(ScfEpin, jr), SCF_PACK_INFO_VAR(ScfEpin, uf), SCF_PACK_INFO_VAR(ScfEpin, uh), SCF_PACK_INFO_VAR(ScfEpin, hfe), SCF_PACK_INFO_VAR(ScfEpin, dr), -SCF_PACK_INFO_VAR(ScfEpin, jdr), - SCF_PACK_INFO_VAR(ScfEpin, sr), -SCF_PACK_INFO_VAR(ScfEpin, jsr), - -SCF_PACK_INFO_VAR(ScfEpin, pr), -SCF_PACK_INFO_VAR(ScfEpin, jpr), SCF_PACK_INFO_VAR(ScfEpin, path), SCF_PACK_INFO_VAR(ScfEpin, x), @@ -206,12 +188,11 @@ typedef struct { SCF_PACK_DEF_OBJS(ScfLine, lines); SCF_PACK_DEF_VAR(double, v); - SCF_PACK_DEF_VAR(double, jv); SCF_PACK_DEF_VAR(double, a); - SCF_PACK_DEF_VAR(double, ja); SCF_PACK_DEF_VAR(uint8_t, vconst); SCF_PACK_DEF_VAR(uint8_t, aconst); SCF_PACK_DEF_VAR(uint8_t, vflag); + SCF_PACK_DEF_VAR(uint8_t, vinit); } ScfEline; SCF_PACK_TYPE(ScfEline) @@ -225,9 +206,7 @@ SCF_PACK_INFO_OBJS(ScfEline, conns, ScfEconn), SCF_PACK_INFO_OBJS(ScfEline, lines, ScfLine), SCF_PACK_INFO_VAR(ScfEline, v), -SCF_PACK_INFO_VAR(ScfEline, jv), SCF_PACK_INFO_VAR(ScfEline, a), -SCF_PACK_INFO_VAR(ScfEline, ja), SCF_PACK_INFO_VAR(ScfEline, vconst), SCF_PACK_INFO_VAR(ScfEline, aconst), SCF_PACK_INFO_VAR(ScfEline, vflag), @@ -241,12 +220,9 @@ struct scf_ecomponent_s SCF_PACK_DEF_OBJS(ScfEpin, pins); SCF_PACK_DEF_VAR(double, v); - SCF_PACK_DEF_VAR(double, jv); SCF_PACK_DEF_VAR(double, a); - SCF_PACK_DEF_VAR(double, ja); SCF_PACK_DEF_VAR(double, r); - SCF_PACK_DEF_VAR(double, jr); SCF_PACK_DEF_VAR(double, uf); SCF_PACK_DEF_VAR(double, uh); @@ -267,12 +243,9 @@ SCF_PACK_INFO_VAR(ScfEcomponent, model), SCF_PACK_INFO_OBJS(ScfEcomponent, pins, ScfEpin), SCF_PACK_INFO_VAR(ScfEcomponent, v), -SCF_PACK_INFO_VAR(ScfEcomponent, jv), SCF_PACK_INFO_VAR(ScfEcomponent, a), -SCF_PACK_INFO_VAR(ScfEcomponent, ja), SCF_PACK_INFO_VAR(ScfEcomponent, r), -SCF_PACK_INFO_VAR(ScfEcomponent, jr), SCF_PACK_INFO_VAR(ScfEcomponent, uf), SCF_PACK_INFO_VAR(ScfEcomponent, uh),