2, make the layout show more clearly.
ses_path_t* ses_path_alloc();
void ses_path_free (ses_path_t* path);
void ses_path_print(ses_path_t* path);
-int ses_path_add (ses_path_t* path, ses_path_t* child);
+int ses_path_add (ses_path_t* path, ses_path_t* child, ScfEfunction* f);
+int ses_path_xchg (ses_path_t* path0, int k0, ses_path_t* path1, int k1);
ses_path_t* ses_path_save (ses_path_t* src);
int ses_path_load (ses_path_t* dst, ses_path_t* src);
// printf("\n");
}
- f->w = tx1 + d;
+ f->w = tx1 + d * 3;
f->h += d;
scf_loge("f->x: %d, y: %d, w: %d, h: %d, tx0: %d, tx1: %d\n", f->x, f->y, f->w, f->h, tx0, tx1);
ses_lines_same_components(f);
- int ret = ses_layout_function(f, 50);
+ int ret = ses_layout_function(f, 60);
if (ret < 0) {
scf_loge("\n");
return ret;
cairo_set_line_width(cr, 2.5);
uint8_t text[64];
- snprintf(text, sizeof(text) - 1, "%ld", c->id);
+ int n = snprintf(text, sizeof(text) - 1, "%ld", c->id);
cairo_set_source_rgb (cr, 0, 0, 0);
- cairo_select_font_face(cr, "Georgia", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
+ cairo_select_font_face(cr, "Calibri", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 20);
- cairo_move_to (cr, c->x + 10, c->y - 5);
+ cairo_move_to (cr, c->x - 10 - n * 10, c->y - 5);
cairo_show_text (cr, text);
cairo_stroke(cr);
- if (SCF_EDA_Capacitor == c->type) {
-
- if (c->v > 0)
- cairo_set_source_rgb(cr, 0.7, 0.0, 0.0);
- else
- cairo_set_source_rgb(cr, 0.0, 0.0, 0.7);
-
- if (c->v > 1e-3 || c->v < -1e-3)
- snprintf(text, sizeof(text) - 1, "%lgv", (int)(c->v * 1000) / 1000.0);
-
- else if (c->v > 1e-6 || c->v < -1e-6)
- snprintf(text, sizeof(text) - 1, "%lgmV", (int)(c->v * 1000000) / 1000.0);
- else
- snprintf(text, sizeof(text) - 1, "%lguV", (int)(c->v * 1000000) / 1000000.0);
-
- cairo_move_to (cr, c->x + 10, c->y + 10);
- cairo_show_text(cr, text);
- cairo_stroke(cr);
- }
-
if ((SCF_EDA_Diode == c->type || SCF_EDA_NPN == c->type) && SCF_EDA_Status_OFF == c->status)
cairo_set_source_rgb(cr, 0.0, 0.6, 0.6);
else
}
cairo_line_to(cr, p->x, p->y);
cairo_stroke(cr);
+
+ if (c->v > 0)
+ cairo_set_source_rgb(cr, 0.7, 0.0, 0.0);
+ else
+ cairo_set_source_rgb(cr, 0.0, 0.0, 0.7);
+ cairo_select_font_face(cr, "Georgia", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
+
+ if (c->v > 1e-3 || c->v < -1e-3) {
+ snprintf(text, sizeof(text) - 1, "%lgv", (int)(c->v * 1000) / 1000.0);
+
+ cairo_move_to (cr, c->x + 10, c->y + 10);
+ cairo_show_text(cr, text);
+
+ } else if (c->v > 1e-6 || c->v < -1e-6) {
+ snprintf(text, sizeof(text) - 1, "%lgmV", (int)(c->v * 1000000) / 1000.0);
+
+ cairo_move_to (cr, c->x + 10, c->y + 10);
+ cairo_show_text(cr, text);
+ }
+
+ cairo_set_source_rgb(cr, 0.0, 0.0, 0.0);
+
+ snprintf(text, sizeof(text) - 1, "%lguf", c->uf);
+
+ cairo_move_to (cr, c->x + 4, c->y - 5);
+ cairo_show_text(cr, text);
+ cairo_stroke(cr);
break;
case SCF_EDA_Resistor:
p = c->pins[1];
cairo_move_to (cr, p->x, p->y);
cairo_line_to (cr, c->x + dx1, c->y + dy1);
+ cairo_stroke(cr);
+
+ if (c->r > 1e6)
+ snprintf(text, sizeof(text) - 1, "%dM", (int)(c->r / 1000000.0));
+ else
+ snprintf(text, sizeof(text) - 1, "%dk", (int)(c->r / 1000.0));
+
+ cairo_set_source_rgb(cr, 0.0, 0.0, 0.0);
+ cairo_select_font_face(cr, "Georgia", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
+ cairo_move_to (cr, c->x + 4, c->y - 5);
+ cairo_show_text(cr, text);
cairo_stroke(cr);
break;
else
cairo_set_source_rgb(cr, 1, 0.5, 0.1);
- uint8_t text[64];
-
cairo_select_font_face(cr, "Georgia", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
- cairo_set_font_size (cr, 28);
+ uint8_t text[64];
ScfLine* prev = NULL;
for (k = 0; k < el->n_lines; k++) {
continue;
if (!prev) {
- snprintf(text, sizeof(text) - 1, "%ld", el->id);
+ cairo_set_font_size(cr, 28);
+ int n = snprintf(text, sizeof(text) - 1, "%ld", el->id);
- cairo_move_to (cr, l->x0 - 30, l->y0 + 5);
+ cairo_move_to (cr, l->x0 - 10 - n * 12, l->y0 + 10);
cairo_show_text(cr, text);
cairo_stroke(cr);
if (el->v < SCF_EDA_V_MIN)
- snprintf(text, sizeof(text) - 1, "%lg", B->pins[SCF_EDA_Battery_NEG]->v);
+ snprintf(text, sizeof(text) - 1, "%lgv", B->pins[SCF_EDA_Battery_NEG]->v);
else if (el->v > SCF_EDA_V_MAX)
- snprintf(text, sizeof(text) - 1, "%lg", B->pins[SCF_EDA_Battery_POS]->v);
+ snprintf(text, sizeof(text) - 1, "%lgv", B->pins[SCF_EDA_Battery_POS]->v);
else if (el->v > 1e-3 || el->v < -1e-3)
snprintf(text, sizeof(text) - 1, "%lgv", (int)(el->v * 1000) / 1000.0);
else
snprintf(text, sizeof(text) - 1, "%lguV", (int)(el->v * 1000000) / 1000000.0);
- cairo_set_font_size(cr, 20);
-
int cx = INT_MAX;
int cy = l->y0;
}
}
- if (cy > l->y0)
- cairo_move_to(cr, l->x0 + 12, l->y0 - 8);
- else
- cairo_move_to(cr, l->x0 + 12, l->y0 + 24);
+ cairo_set_font_size(cr, 20);
- cairo_show_text(cr, text);
- cairo_stroke(cr);
+ if (cy > l->y0) {
+ cairo_move_to (cr, cx - 20, l->y0 - 8);
+ cairo_show_text(cr, text);
+ cairo_stroke(cr);
+ } else {
+ cairo_move_to (cr, cx - 20, l->y0 + 24);
+ cairo_show_text(cr, text);
+ cairo_stroke(cr);
+ }
}
cairo_set_line_width(cr, 4);
}
*ppath = NULL;
- return 0;
+
+ if (SCF_EDA_PIN_NEG & el->flags)
+ return 0;
}
ret = 0;
p = c->pins [el->pins[j + 1]];
if (p->pflag) {
-
if (p != np && *ppath) {
scf_logd("branch: c%ld_p%ld, l%ld\n", c->id, p->id, el->id);
return __topo_path_bridges(f, path);
}
-static int __topo_path_xchg(ses_path_t* path0, int k0, ses_path_t* path1, int k1)
-{
- ScfEpin* p;
-
- int i;
-
- scf_logd("path0: %d, k0: %d ... path1: %d, k1: %d\n", path0->pins->size, k0, path1->pins->size, k1);
-
- for (i = 0; i + k0 < path0->pins->size && i + k1 < path1->pins->size; i++)
- SCF_XCHG(path0->pins->data[i + k0], path1->pins->data[i + k1]);
-
- scf_logd("path0: %d, k0: %d ... path1: %d, k1: %d, i: %d\n", path0->pins->size, k0, path1->pins->size, k1, i);
-
- if (i + k0 < path0->pins->size) {
-
- while (i + k0 < path0->pins->size) {
- p = path0->pins->data[i + k0];
-
- if (scf_vector_del(path0->pins, p) < 0)
- return -1;
-
- if (scf_vector_add(path1->pins, p) < 0)
- return -ENOMEM;
- }
-
- } else if (i + k1 < path1->pins->size) {
-
- while (i + k1 < path1->pins->size) {
- p = path1->pins->data[i + k1];
-
- if (scf_vector_del(path1->pins, p) < 0)
- return -1;
-
- if (scf_vector_add(path0->pins, p) < 0)
- return -ENOMEM;
- }
- }
-
- return 0;
-}
-
static int _topo_path_connect(ScfEfunction* f, scf_vector_t* paths)
{
if (!f || !paths)
p2->cid, p2->id, p->cid, p->id, path1->pins->size,
p0->cid, p0->id, p1->cid, p1->id, path0->pins->size);
- int ret = __topo_path_xchg(path0, 0, path1, k + 1);
+ int ret = ses_path_xchg(path0, 0, path1, k + 1);
if (ret < 0)
return ret;
p2->cid, p2->id, p3->cid, p3->id, path1->pins->size,
p ->cid, p ->id, p1->cid, p1->id, path0->pins->size);
- int ret = __topo_path_xchg(path0, k, path1, path1->pins->size);
+ int ret = ses_path_xchg(path0, k, path1, path1->pins->size);
if (ret < 0)
return ret;
if (scf_vector_del(paths, child) < 0)
return -1;
- if (ses_path_add(parent, child) < 0) {
+ if (ses_path_add(parent, child, f) < 0) {
ses_path_free(child);
return -ENOMEM;
}
return 0;
}
-int __ses_topo_paths(ScfEfunction* f, scf_vector_t* paths)
+static int __ses_topo_layers(ScfEfunction* f, scf_vector_t* paths)
{
- if (!f || !paths)
- return -EINVAL;
+ ses_path_t* path;
- ses_path_t* path;
- ScfEline* el;
- ScfEpin* p;
+ int size;
+ int i;
- size_t i;
+ do {
+ do {
+ size = paths->size;
- _topo_clear(f);
+ for (i = 0; i < paths->size; i++) {
+ path = paths->data[i];
- scf_vector_clear(paths, ( void (*)(void*) )ses_path_free);
+ _topo_key_components(f, path);
+ }
- for (i = 0; i < f->n_elines; i++) {
- el = f->elines[i];
+ int ret = _topo_layers(f, paths);
+ if (ret < 0)
+ return ret;
- if (!(el->flags & (SCF_EDA_PIN_POS | SCF_EDA_PIN_IN)))
- continue;
+ ret = _topo_path_completes(f, paths);
+ if (ret < 0)
+ return ret;
+ } while (size > paths->size);
- int ret = _topo_paths(f, el, paths);
+ int ret = _topo_path_connect(f, paths);
if (ret < 0)
return ret;
- }
+ } while (size > paths->size);
- for (i = 0; i < paths->size; i++) {
- path = paths->data[i];
-
- scf_vector_clear(path->infos, ( void (*)(void*) )free);
-
- _topo_key_components(f, path);
- }
-
- int ret = _topo_layers(f, paths);
- if (ret < 0)
- return ret;
-
-// _topo_print(paths);
return 0;
}
-static int _topo_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx_t* ctx)
+int __ses_topo_paths(ScfEfunction* f, scf_vector_t* paths)
{
+ if (!f || !paths)
+ return -EINVAL;
+
ses_path_t* path;
ScfEcomponent* B;
ScfEline* el;
_topo_clear(f);
- scf_vector_clear(ctx->paths, ( void (*)(void*) )ses_path_free);
+ scf_vector_clear(paths, ( void (*)(void*) )ses_path_free);
B = f->components[0];
el = f->elines[B->pins[SCF_EDA_Battery_POS]->lid];
- int ret = _topo_paths(f, el, ctx->paths);
+ int ret = _topo_paths(f, el, paths);
if (ret < 0)
return ret;
- int size;
int i;
+ for (i = 0; i < f->n_elines; i++) {
+ el = f->elines[i];
- do {
- do {
- size = ctx->paths->size;
+ if (el->flags & SCF_EDA_PIN_IN) {
+
+ ret = _topo_paths(f, el, paths);
+ if (ret < 0)
+ return ret;
+ }
+ }
- for (i = 0; i < ctx->paths->size; i++) {
- path = ctx->paths->data[i];
+ return __ses_topo_layers(f, paths);
+}
- _topo_key_components(f, path);
- }
+static int _topo_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx_t* ctx)
+{
+ ses_path_t* path;
+ ScfEcomponent* B;
+ ScfEline* el;
- scf_logd("size: %d, paths->size: %d\n", size, ctx->paths->size);
+ _topo_clear(f);
- ret = _topo_layers(f, ctx->paths);
- if (ret < 0)
- return ret;
+ scf_vector_clear(ctx->paths, ( void (*)(void*) )ses_path_free);
- ret = _topo_path_completes(f, ctx->paths);
- if (ret < 0)
- return ret;
- } while (size > ctx->paths->size);
+ B = f->components[0];
+ el = f->elines[B->pins[SCF_EDA_Battery_POS]->lid];
- ret = _topo_path_connect(f, ctx->paths);
- if (ret < 0)
- return ret;
- } while (size > ctx->paths->size);
+ int ret = _topo_paths(f, el, ctx->paths);
+ if (ret < 0)
+ return ret;
+ ret = __ses_topo_layers(f, ctx->paths);
+ if (ret < 0)
+ return ret;
+ int i;
for (i = 0; i < ctx->paths->size; i++) {
path = ctx->paths->data[i];
p0 = bridge->pins->data[0];
p1 = bridge->pins->data[bridge->pins->size - 1];
- el = f->elines[p0->lid];
- p0->v = el->v;
+ if (p0->lid == Bp->lid && p1->lid == Bn->lid)
+ return 0;
- el = f->elines[p1->lid];
- p1->v = el->v;
+ __ses_path_jr(f, bridge);
flow0 = ses_flow_alloc();
if (!flow0)
double cv;
double ja;
+ el = f->elines[p0->lid];
+ p0->v = el->v;
+
+ el = f->elines[p1->lid];
+ p1->v = el->v;
+
cv = __ses_path_v_capacitor(f, bridge);
scf_logw("c%ldp%ld-c%ldp%ld, cv: %lg, p0->v: %lg, p1->v: %lg\n", p0->cid, p0->id, p1->cid, p1->id, cv, p0->v, p1->v);
if (bridge->n_capacitors > 0) {
- __ses_path_jr(f, bridge);
-
ret = __ses_path_va_capacitor(f, paths, bridge, changed, ns, count);
if (ret < 0)
return ret;
}
}
-int ses_path_add(ses_path_t* parent, ses_path_t* child)
+int ses_path_xchg(ses_path_t* path0, int k0, ses_path_t* path1, int k1)
+{
+ ScfEpin* p;
+
+ int i;
+
+ for (i = 0; i + k0 < path0->pins->size && i + k1 < path1->pins->size; i++)
+ SCF_XCHG(path0->pins->data[i + k0], path1->pins->data[i + k1]);
+
+ scf_logd("path0: %d, k0: %d ... path1: %d, k1: %d, i: %d\n", path0->pins->size, k0, path1->pins->size, k1, i);
+
+ if (i + k0 < path0->pins->size) {
+
+ while (i + k0 < path0->pins->size) {
+ p = path0->pins->data[i + k0];
+
+ assert(0 == scf_vector_del(path0->pins, p));
+
+ if (scf_vector_add(path1->pins, p) < 0)
+ return -ENOMEM;
+ }
+
+ } else if (i + k1 < path1->pins->size) {
+
+ while (i + k1 < path1->pins->size) {
+ p = path1->pins->data[i + k1];
+
+ assert(0 == scf_vector_del(path1->pins, p));
+
+ if (scf_vector_add(path0->pins, p) < 0)
+ return -ENOMEM;
+ }
+ }
+
+ return 0;
+}
+
+int ses_path_add(ses_path_t* parent, ses_path_t* child, ScfEfunction* f)
{
if (!parent || !child)
return -EINVAL;
child->parent_p1 = path->parent_p1;
child->type = SES_PATH_BRANCH;
- return ses_path_add(child, path);
+ return ses_path_add(child, path, f);
} else
- return ses_path_add(path, child);
+ return ses_path_add(path, child, f);
}
}
for (j = 0; j < parent->pins->size; j++) {
p0 = parent->pins->data[j];
- if (p0->lid == cp0->lid)
- child->parent_p0 = j;
+ if (p0->lid == cp0->lid) {
+ child->parent_p0 = (j + 1) & ~0x1;
+ break;
+ }
+ }
+ assert(j < parent->pins->size);
+
+ int n_capacitors = 0;
+
+ for ( ; j < parent->pins->size; j++) {
+ p0 = parent->pins->data[j];
+
+ if (!(j & 0x1)) {
+ ScfEcomponent* c = f->components[p0->cid];
+
+ if (SCF_EDA_Capacitor == c->type)
+ n_capacitors++;
+ }
if (p0->lid == cp1->lid) {
child->parent_p1 = j;
break;
}
}
- assert(child->parent_p0 >= 0 && child->parent_p1 >= 0);
+ assert(j < parent->pins->size);
+
+ if (n_capacitors > 0 && 0 == child->n_capacitors) {
+
+ int ret = ses_path_xchg(parent, child->parent_p0, child, 0);
+ if (ret < 0)
+ return ret;
+
+ j = child->parent_p1 - child->parent_p0 + 1;
+ child->parent_p1 = parent->pins->size - 1;
+
+ while (j < child->pins->size) {
+ p0 = child->pins->data[j];
+
+ assert(0 == scf_vector_del(child->pins, p0));
+
+ ret = scf_vector_add(parent->pins, p0);
+ if (ret < 0)
+ return ret;
+ }
+
+ child ->n_capacitors = n_capacitors;
+ parent->n_capacitors -= n_capacitors;
+ }
child->parent = parent;
child->type = SES_PATH_BRANCH;
free(ctx);
}
}
-
int main(int argc, char* argv[])
{
ScfEcomponent* B;
+
ScfEcomponent* R0;
+ ScfEcomponent* C0;
+ ScfEcomponent* T0;
+
ScfEcomponent* R1;
ScfEcomponent* R2;
ScfEcomponent* R3;
- ScfEcomponent* T0;
- ScfEcomponent* T1;
- ScfEcomponent* C0;
ScfEcomponent* C1;
+ ScfEcomponent* C2;
+ ScfEcomponent* C3;
+
+ ScfEcomponent* R4;
+ ScfEcomponent* R5;
+
ScfEfunction* f;
ScfEboard* b;
b = scf_eboard__alloc();
- f = scf_efunction__alloc("oscillator");
+ f = scf_efunction__alloc("sin_oscillator");
EDA_INST_ADD_COMPONENT(f, B, SCF_EDA_Battery);
B->pins[SCF_EDA_Battery_POS]->flags = SCF_EDA_PIN_POS;
EDA_INST_ADD_COMPONENT(f, R0, SCF_EDA_Resistor);
+ EDA_INST_ADD_COMPONENT(f, C0, SCF_EDA_Capacitor);
+ EDA_INST_ADD_COMPONENT(f, T0, SCF_EDA_NPN);
+
EDA_INST_ADD_COMPONENT(f, R1, SCF_EDA_Resistor);
EDA_INST_ADD_COMPONENT(f, R2, SCF_EDA_Resistor);
EDA_INST_ADD_COMPONENT(f, R3, SCF_EDA_Resistor);
- EDA_INST_ADD_COMPONENT(f, T0, SCF_EDA_NPN);
- EDA_INST_ADD_COMPONENT(f, T1, SCF_EDA_NPN);
- EDA_INST_ADD_COMPONENT(f, C0, SCF_EDA_Capacitor);
EDA_INST_ADD_COMPONENT(f, C1, SCF_EDA_Capacitor);
+ EDA_INST_ADD_COMPONENT(f, C2, SCF_EDA_Capacitor);
+ EDA_INST_ADD_COMPONENT(f, C3, SCF_EDA_Capacitor);
+
+ EDA_INST_ADD_COMPONENT(f, R4, SCF_EDA_Resistor);
+ EDA_INST_ADD_COMPONENT(f, R5, SCF_EDA_Resistor);
+
+ EDA_PIN_ADD_PIN(B, SCF_EDA_Battery_POS, R4, 1);
+ EDA_PIN_ADD_PIN(B, SCF_EDA_Battery_POS, R5, 1);
- EDA_PIN_ADD_PIN(B, SCF_EDA_Battery_POS, R0, 1);
- EDA_PIN_ADD_PIN(B, SCF_EDA_Battery_POS, R1, 1);
- EDA_PIN_ADD_PIN(B, SCF_EDA_Battery_POS, R2, 1);
- EDA_PIN_ADD_PIN(B, SCF_EDA_Battery_POS, R3, 1);
+ EDA_PIN_ADD_PIN(R5, 0, T0, SCF_EDA_NPN_C);
+ EDA_PIN_ADD_PIN(T0, SCF_EDA_NPN_E, R0, 1);
+ EDA_PIN_ADD_PIN(R0, 1, C0, 1);
+ EDA_PIN_ADD_PIN(R0, 0, C0, 0);
+ EDA_PIN_ADD_PIN(R0, 0, B, SCF_EDA_Battery_NEG);
- EDA_PIN_ADD_PIN(R0, 0, T0, SCF_EDA_NPN_C);
- EDA_PIN_ADD_PIN(T0, SCF_EDA_NPN_E, B, SCF_EDA_Battery_NEG);
- EDA_PIN_ADD_PIN(R0, 0, C0, 1);
- EDA_PIN_ADD_PIN(R1, 0, C0, 0);
+ EDA_PIN_ADD_PIN(R4, 0, R3, 1);
+ EDA_PIN_ADD_PIN(R3, 1, T0, SCF_EDA_NPN_B);
+ EDA_PIN_ADD_PIN(R3, 0, B, SCF_EDA_Battery_NEG);
- EDA_PIN_ADD_PIN(R3, 0, T1, SCF_EDA_NPN_C);
- EDA_PIN_ADD_PIN(T1, SCF_EDA_NPN_E, B, SCF_EDA_Battery_NEG);
- EDA_PIN_ADD_PIN(R3, 0, C1, 1);
- EDA_PIN_ADD_PIN(R2, 0, C1, 0);
+ EDA_PIN_ADD_PIN(C1, 1, T0, SCF_EDA_NPN_C);
+ EDA_PIN_ADD_PIN(C1, 0, C2, 1);
+ EDA_PIN_ADD_PIN(C2, 0, C3, 1);
+ EDA_PIN_ADD_PIN(C3, 0, T0, SCF_EDA_NPN_B);
- EDA_PIN_ADD_PIN(C0, 0, T1, SCF_EDA_NPN_B);
- EDA_PIN_ADD_PIN(C1, 0, T0, SCF_EDA_NPN_B);
+ EDA_PIN_ADD_PIN(C1, 0, R1, 1);
+ EDA_PIN_ADD_PIN(C2, 0, R2, 1);
+ EDA_PIN_ADD_PIN(R1, 0, B, SCF_EDA_Battery_NEG);
+ EDA_PIN_ADD_PIN(R2, 0, B, SCF_EDA_Battery_NEG);
T0->pins[SCF_EDA_NPN_C]->flags |= SCF_EDA_PIN_OUT;
- T1->pins[SCF_EDA_NPN_C]->flags |= SCF_EDA_PIN_OUT;
+ R4->r = 1000 * 47;
+ R5->r = 1000 * 27;
+ R3->r = 1000 * 10;
+ R2->r = 1000 * 10;
+ R1->r = 1000 * 10;
R0->r = 1000;
- R3->r = 1000;
- C0->uf = 0.001;
- C1->uf = 0.001;
+ C0->uf = 10;
+ C1->uf = 0.01;
+ C2->uf = 0.01;
+ C3->uf = 0.01;
scf_eboard__add_function(b, f);
ScfEboard_free(b);
b = NULL;
- FILE* fp = fopen("./oscillator.pack", "wb");
+ FILE* fp = fopen("./sin_oscillator.pack", "wb");
if (!fp)
return -EINVAL;