--- /dev/null
+#include"ses_core.h"
+
+extern ses_step_t ses_step_dc_input;
+//extern ses_step_t ses_step_ac_start;
+
+extern ses_step_t ses_step_dc_diode;
+extern ses_step_t ses_step_dc_transistor;
+
+//extern ses_step_t ses_step_ac_transistor;
+//extern ses_step_t ses_step_ac_diode;
+
+extern ses_step_t ses_step_simplify;
+extern ses_step_t ses_step_va;
+extern ses_step_t ses_step_va_balance;
+
+extern ses_step_t ses_step_output;
+
+
+static ses_step_t* ses_steps[] =
+{
+ &ses_step_dc_input,
+
+ &ses_step_dc_diode,
+ &ses_step_dc_transistor,
+
+ &ses_step_simplify,
+ &ses_step_va,
+ &ses_step_va_balance,
+
+ &ses_step_output,
+};
+
+
+int ses_analyse_function(ScfEfunction* f, int64_t ns, int64_t count)
+{
+ if (!f || ns <= 0 || count < 0)
+ return -EINVAL;
+
+ ses_step_t* s;
+
+ int64_t i;
+ int64_t j;
+
+ for (i = 0; i < count; i++) {
+
+ for (j = 0; j < sizeof(ses_steps) / sizeof(ses_steps[0]); j++) {
+ s = ses_steps[j];
+
+ if (!s || !s->handler)
+ continue;
+
+ int ret = s->handler(f, ns, i);
+ if (ret < 0) {
+ scf_loge("analysis step '%s' ret: %d\n", s->name, ret);
+ return ret;
+ }
+ }
+ }
+
+ return 0;
+}
#include"scf_eda_pb.h"
#include"scf_vector.h"
+typedef struct ses_step_s ses_step_t;
typedef struct ses_loop_s ses_loop_t;
typedef struct ses_edge_s ses_edge_t;
typedef struct ses_pin_s ses_pin_t;
scf_vector_t* pins;
};
+struct ses_step_s
+{
+ const char* name;
+
+ int (*handler)(ScfEfunction* f, int64_t ns, int64_t count);
+
+ void* priv;
+};
+
+
int ses_layout_board (ScfEboard* b);
int ses_loop_function(ScfEfunction* f, scf_vector_t* loops);
+int ses_analyse_function(ScfEfunction* f, int64_t ns, int64_t count);
+
#endif