Index: trunk/scconfig/Rev.h =================================================================== --- trunk/scconfig/Rev.h (revision 7920) +++ trunk/scconfig/Rev.h (revision 7921) @@ -1 +1 @@ -static const int myrev = 7737; +static const int myrev = 7921; Index: trunk/scconfig/Rev.tab =================================================================== --- trunk/scconfig/Rev.tab (revision 7920) +++ trunk/scconfig/Rev.tab (revision 7921) @@ -1,4 +1,5 @@ -7737 configure new plugins: export_spice, target_spice +7921 configure new plugins for high level sim support +7737 configure new plugins: export_spice, target_spice 7469 configure new plugin for non-graphical fawk sheets 7468 configure new plugin for non-graphical tEDAx sheets 7370 configure cleanup: get rid of local "inline" defs Index: trunk/scconfig/plugins.h =================================================================== --- trunk/scconfig/plugins.h (revision 7920) +++ trunk/scconfig/plugins.h (revision 7921) @@ -7,6 +7,7 @@ plugin_header("\nEngine plugins (concrete->abstract compilation):\n") plugin_def("std_cschem", "standard cschem attributes", sbuildin, 1) plugin_def("std_devmap", "standard device mapper", sbuildin, 1) +plugin_def("std_devmap", "standard device mapper", sbuildin, 1) plugin_def("std_forge", "standard cschem attr forge", sbuildin, 1) plugin_def("target_none", "dummy attr. xform", sbuildin, 1) plugin_def("target_pcb", "attr. xform for PCB workflow", sbuildin, 1) @@ -22,6 +23,9 @@ plugin_def("propedit", "object property editor", sbuildin, 1) plugin_def("query", "query language", sbuildin, 1) plugin_def("renumber", "renumber symbols", sbuildin, 1) +plugin_def("sim_gui", "high level simulation GUI", sdisable, 0) +plugin_def("sim_ngspice", "sim exec for ngspice", sdisable, 0) +plugin_def("sim", "high level simulation", sdisable, 0) plugin_def("std_tools", "standard drawing tools", sbuildin, 1) plugin_header("\nSymbol library accessors:\n") @@ -50,6 +54,7 @@ plugin_header("\nGUI:\n") plugin_def("gui", "Graphical User Interface", sbuildin, 1) +plugin_def("lib_plot", "graph plotting", sdisable, 0) plugin_def("sch_dialogs", "base dialogs", sbuildin, 1) @@ -67,4 +72,6 @@ plugin_dep("io_ngrp_tedax", "lib_ngrp") plugin_dep("io_tinycad", "lib_alien") plugin_dep("lib_alien", "query") +plugin_dep("lib_plot", "query") plugin_dep("sch_dialogs", "lib_hid_common") +plugin_dep("sim_gui", "lib_plot") Index: trunk/src/plugins/lib_plot/Makefile =================================================================== --- trunk/src/plugins/lib_plot/Makefile (nonexistent) +++ trunk/src/plugins/lib_plot/Makefile (revision 7921) @@ -0,0 +1,2 @@ +all: + cd ../../sch-rnd && make mod_lib_plot Index: trunk/src/plugins/lib_plot/Plug.tmpasm =================================================================== --- trunk/src/plugins/lib_plot/Plug.tmpasm (nonexistent) +++ trunk/src/plugins/lib_plot/Plug.tmpasm (revision 7921) @@ -0,0 +1,10 @@ +put /local/rnd/mod {lib_plot} +put /local/rnd/mod/OBJS [@ + $(PLUGDIR)/lib_plot/lib_plot.o +@] + +switch /local/module/lib_plot/controls + case {buildin} include /local/csch/tmpasm/buildin; end; + case {plugin} include /local/csch/tmpasm/plugin; end; + case {disable} include /local/csch/tmpasm/disable; end; +end Index: trunk/src/plugins/lib_plot/lib_plot.c =================================================================== --- trunk/src/plugins/lib_plot/lib_plot.c (nonexistent) +++ trunk/src/plugins/lib_plot/lib_plot.c (revision 7921) @@ -0,0 +1,46 @@ +/* + * COPYRIGHT + * + * cschem - modular/flexible schematics editor - generic graph plotting + * Copyright (C) 2023 Tibor 'Igor2' Palinkas + * + * (Supported by NLnet NGI0 Entrust in 2023) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Contact: + * Project page: http://repo.hu/projects/sch-rnd + * contact lead developer: http://www.repo.hu/projects/sch-rnd/contact.html + * mailing list: http://www.repo.hu/projects/sch-rnd/contact.html + */ + + +#include +#include +#include + +int pplg_check_ver_lib_plot(int ver_needed) { return 0; } + +void pplg_uninit_lib_plot(void) +{ +} + +int pplg_init_lib_plot(void) +{ + RND_API_CHK_VER; + + return 0; +} + Index: trunk/src/plugins/lib_plot/lib_plot.pup =================================================================== --- trunk/src/plugins/lib_plot/lib_plot.pup (nonexistent) +++ trunk/src/plugins/lib_plot/lib_plot.pup (revision 7921) @@ -0,0 +1,8 @@ +$class gui +$short graph plotting +$long subdialog for plottng and navigating graphs +$state WIP +$package lib-gui +default disable-all +dep query +autoload 1 Index: trunk/src/plugins/plugins_ALL.tmpasm =================================================================== --- trunk/src/plugins/plugins_ALL.tmpasm (revision 7920) +++ trunk/src/plugins/plugins_ALL.tmpasm (revision 7921) @@ -21,11 +21,15 @@ include {../src/plugins/lib_alien/Plug.tmpasm} include {../src/plugins/lib_netlist_exp/Plug.tmpasm} include {../src/plugins/lib_ngrp/Plug.tmpasm} +include {../src/plugins/lib_plot/Plug.tmpasm} include {../src/plugins/place/Plug.tmpasm} include {../src/plugins/propedit/Plug.tmpasm} include {../src/plugins/query/Plug.tmpasm} include {../src/plugins/renumber/Plug.tmpasm} include {../src/plugins/sch_dialogs/Plug.tmpasm} +include {../src/plugins/sim/Plug.tmpasm} +include {../src/plugins/sim_gui/Plug.tmpasm} +include {../src/plugins/sim_ngspice/Plug.tmpasm} include {../src/plugins/std_cschem/Plug.tmpasm} include {../src/plugins/std_devmap/Plug.tmpasm} include {../src/plugins/std_forge/Plug.tmpasm} @@ -35,3 +39,4 @@ include {../src/plugins/target_none/Plug.tmpasm} include {../src/plugins/target_pcb/Plug.tmpasm} include {../src/plugins/target_spice/Plug.tmpasm} +include {../src/plugins/target_spice/std_devmap/Plug.tmpasm} Index: trunk/src/plugins/sim/Makefile =================================================================== --- trunk/src/plugins/sim/Makefile (nonexistent) +++ trunk/src/plugins/sim/Makefile (revision 7921) @@ -0,0 +1,2 @@ +all: + cd ../../sch-rnd && make mod_sim Index: trunk/src/plugins/sim/Plug.tmpasm =================================================================== --- trunk/src/plugins/sim/Plug.tmpasm (nonexistent) +++ trunk/src/plugins/sim/Plug.tmpasm (revision 7921) @@ -0,0 +1,10 @@ +put /local/rnd/mod {sim} +put /local/rnd/mod/OBJS [@ + $(PLUGDIR)/sim/sim.o +@] + +switch /local/module/sim/controls + case {buildin} include /local/csch/tmpasm/buildin; end; + case {plugin} include /local/csch/tmpasm/plugin; end; + case {disable} include /local/csch/tmpasm/disable; end; +end Index: trunk/src/plugins/sim/sim.c =================================================================== --- trunk/src/plugins/sim/sim.c (nonexistent) +++ trunk/src/plugins/sim/sim.c (revision 7921) @@ -0,0 +1,53 @@ +/* + * COPYRIGHT + * + * cschem - modular/flexible schematics editor - high level sim (non-GUI) + * Copyright (C) 2023 Tibor 'Igor2' Palinkas + * + * (Supported by NLnet NGI0 Entrust in 2023) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Contact: + * Project page: http://repo.hu/projects/sch-rnd + * contact lead developer: http://www.repo.hu/projects/sch-rnd/contact.html + * mailing list: http://www.repo.hu/projects/sch-rnd/contact.html + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char sim_cookie[] = "sim"; + +int pplg_check_ver_sim(int ver_needed) { return 0; } + +void pplg_uninit_sim(void) +{ +} + +int pplg_init_sim(void) +{ + RND_API_CHK_VER; + + return 0; +} + Index: trunk/src/plugins/sim/sim.pup =================================================================== --- trunk/src/plugins/sim/sim.pup (nonexistent) +++ trunk/src/plugins/sim/sim.pup (revision 7921) @@ -0,0 +1,7 @@ +$class feature +$short high level simulation +$long abstract differences of circuit simiulation implementations, provide an unified interface (infrastructure, CLI and actions) +$state WIP +$package sim +default disable-all +autoload 1 Index: trunk/src/plugins/sim_gui/Makefile =================================================================== --- trunk/src/plugins/sim_gui/Makefile (nonexistent) +++ trunk/src/plugins/sim_gui/Makefile (revision 7921) @@ -0,0 +1,2 @@ +all: + cd ../../sch-rnd && make mod_sim_gui Index: trunk/src/plugins/sim_gui/Plug.tmpasm =================================================================== --- trunk/src/plugins/sim_gui/Plug.tmpasm (nonexistent) +++ trunk/src/plugins/sim_gui/Plug.tmpasm (revision 7921) @@ -0,0 +1,10 @@ +put /local/rnd/mod {sim_gui} +put /local/rnd/mod/OBJS [@ + $(PLUGDIR)/sim_gui/sim_gui.o +@] + +switch /local/module/sim_gui/controls + case {buildin} include /local/csch/tmpasm/buildin; end; + case {plugin} include /local/csch/tmpasm/plugin; end; + case {disable} include /local/csch/tmpasm/disable; end; +end Index: trunk/src/plugins/sim_gui/sim_gui.c =================================================================== --- trunk/src/plugins/sim_gui/sim_gui.c (nonexistent) +++ trunk/src/plugins/sim_gui/sim_gui.c (revision 7921) @@ -0,0 +1,53 @@ +/* + * COPYRIGHT + * + * cschem - modular/flexible schematics editor - high level sim, GUI + * Copyright (C) 2023 Tibor 'Igor2' Palinkas + * + * (Supported by NLnet NGI0 Entrust in 2023) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Contact: + * Project page: http://repo.hu/projects/sch-rnd + * contact lead developer: http://www.repo.hu/projects/sch-rnd/contact.html + * mailing list: http://www.repo.hu/projects/sch-rnd/contact.html + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char sim_gui_cookie[] = "sim_gui"; + +int pplg_check_ver_sim_gui(int ver_needed) { return 0; } + +void pplg_uninit_sim_gui(void) +{ +} + +int pplg_init_sim_gui(void) +{ + RND_API_CHK_VER; + + return 0; +} + Index: trunk/src/plugins/sim_gui/sim_gui.pup =================================================================== --- trunk/src/plugins/sim_gui/sim_gui.pup (nonexistent) +++ trunk/src/plugins/sim_gui/sim_gui.pup (revision 7921) @@ -0,0 +1,8 @@ +$class feature +$short high level simulation GUI +$long GUI for the the a unified high level simulation interface +$state WIP +$package sim +default disable-all +dep lib_plot +autoload 1 Index: trunk/src/plugins/sim_ngspice/Makefile =================================================================== --- trunk/src/plugins/sim_ngspice/Makefile (nonexistent) +++ trunk/src/plugins/sim_ngspice/Makefile (revision 7921) @@ -0,0 +1,2 @@ +all: + cd ../../sch-rnd && make mod_sim_ngspice Index: trunk/src/plugins/sim_ngspice/Plug.tmpasm =================================================================== --- trunk/src/plugins/sim_ngspice/Plug.tmpasm (nonexistent) +++ trunk/src/plugins/sim_ngspice/Plug.tmpasm (revision 7921) @@ -0,0 +1,10 @@ +put /local/rnd/mod {sim_ngspice} +put /local/rnd/mod/OBJS [@ + $(PLUGDIR)/sim_ngspice/sim_ngspice.o +@] + +switch /local/module/sim_ngspice/controls + case {buildin} include /local/csch/tmpasm/buildin; end; + case {plugin} include /local/csch/tmpasm/plugin; end; + case {disable} include /local/csch/tmpasm/disable; end; +end Index: trunk/src/plugins/sim_ngspice/sim_ngspice.c =================================================================== --- trunk/src/plugins/sim_ngspice/sim_ngspice.c (nonexistent) +++ trunk/src/plugins/sim_ngspice/sim_ngspice.c (revision 7921) @@ -0,0 +1,96 @@ +/* + * COPYRIGHT + * + * cschem - modular/flexible schematics editor - ngspice to high level sim glue + * Copyright (C) 2023 Tibor 'Igor2' Palinkas + * + * (Supported by NLnet NGI0 Entrust in 2023) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Contact: + * Project page: http://repo.hu/projects/sch-rnd + * contact lead developer: http://www.repo.hu/projects/sch-rnd/contact.html + * mailing list: http://www.repo.hu/projects/sch-rnd/contact.html + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if 0 +typedef struct { +} sim_ngspice_ctx_t; /* per view data */ +#endif + +static const char sim_ngspice_cookie[] = "sim_ngspice"; +static gds_t stmp = {0}; + + +/*** hooks ***/ + +static int on_load(fgw_obj_t *obj, const char *filename, const char *opts) +{ +/* fgw_func_reg(obj, "compile_component1", sim_ngspice_compile_comp1);*/ + + /* initialize view-local cache */ + obj->script_data = /*calloc(sizeof(sim_ngspice_ctx_t), 1)*/ NULL; + + return 0; +} + +static int on_unload(fgw_obj_t *obj) +{ +/* sim_ngspice_ctx_t *ctx = obj->script_data; + free(ctx);*/ + return 0; +} + + +static const fgw_eng_t fgw_sim_ngspice_eng = { + "sim_ngspice", + csch_c_call_script, + NULL, + on_load, + on_unload +}; + +int pplg_check_ver_sim_ngspice(int ver_needed) { return 0; } + +void pplg_uninit_sim_ngspice(void) +{ + gds_uninit(&stmp); +} + +int pplg_init_sim_ngspice(void) +{ + RND_API_CHK_VER; + fgw_eng_reg(&fgw_sim_ngspice_eng); + + return 0; +} + Index: trunk/src/plugins/sim_ngspice/sim_ngspice.pup =================================================================== --- trunk/src/plugins/sim_ngspice/sim_ngspice.pup (nonexistent) +++ trunk/src/plugins/sim_ngspice/sim_ngspice.pup (revision 7921) @@ -0,0 +1,7 @@ +$class feature +$short sim exec for ngspice +$long ngspice specific execution glue (for the GUI) +$state WIP +$package sim +default disable-all +autoload 1