+++ /dev/null
-#include<stdio.h>
-#include<stdlib.h>
-#include<string.h>
-#include"ses_core.h"
-
-int main(int argc, char* argv[])
-{
- ScfEcomponent* B;
-
- ScfEcomponent* R0;
- ScfEcomponent* T0;
- ScfEcomponent* T1;
-
- ScfEfunction* f;
-
- f = scf_efunction__alloc("nor.cpk");
-
- EDA_INST_ADD_COMPONENT(f, R0, SCF_EDA_Resistor);
- EDA_INST_ADD_COMPONENT(f, T0, SCF_EDA_NPN);
- EDA_INST_ADD_COMPONENT(f, T1, SCF_EDA_NPN);
-
- EDA_PIN_ADD_PIN(R0, 0, T0, SCF_EDA_NPN_C);
- EDA_PIN_ADD_PIN(R0, 0, T1, SCF_EDA_NPN_C);
- EDA_PIN_ADD_PIN(T0, SCF_EDA_NPN_E, T1, SCF_EDA_NPN_E);
-
- R0->pins[1]->flags = SCF_EDA_PIN_POS;
- T0->pins[SCF_EDA_NPN_E]->flags = SCF_EDA_PIN_NEG;
-
- T0->pins[SCF_EDA_NPN_B]->flags = SCF_EDA_PIN_IN | SCF_EDA_PIN_IN0;
- T1->pins[SCF_EDA_NPN_B]->flags = SCF_EDA_PIN_IN;
- R0->pins[0]->flags = SCF_EDA_PIN_OUT;
-
- R0->pins[1]->ic_lid = SCF_EDA_NOR_POS;
- T0->pins[SCF_EDA_NPN_E]->ic_lid = SCF_EDA_NOR_NEG;
-
- T0->pins[SCF_EDA_NPN_B]->ic_lid = SCF_EDA_NOR_IN0;
- T1->pins[SCF_EDA_NPN_B]->ic_lid = SCF_EDA_NOR_IN1;
- R0->pins[0]->ic_lid = SCF_EDA_NOR_OUT;
-
- int ret = scf_pins_same_line(f);
- if (ret < 0)
- return ret;
-
- long len = 0;
- uint8_t* buf = NULL;
-
- ScfEfunction_pack(f, &buf, &len);
- ScfEfunction_free(f);
- f = NULL;
-
- FILE* fp = fopen("./nor.cpk", "wb");
- if (!fp)
- return -EINVAL;
-
- fwrite(buf, len, 1, fp);
- fclose(fp);
- return 0;
-}
+++ /dev/null
-#include<stdio.h>
-#include<stdlib.h>
-#include<string.h>
-#include"ses_core.h"
-
-int main(int argc, char* argv[])
-{
- ScfEcomponent* B;
-
- ScfEcomponent* R0;
- ScfEcomponent* T0;
-
- ScfEfunction* f;
-
- f = scf_efunction__alloc("not.cpk");
-
- EDA_INST_ADD_COMPONENT(f, R0, SCF_EDA_Resistor);
- EDA_INST_ADD_COMPONENT(f, T0, SCF_EDA_NPN);
-
- EDA_PIN_ADD_PIN(R0, 0, T0, SCF_EDA_NPN_C);
-
- R0->pins[1]->flags = SCF_EDA_PIN_POS;
- T0->pins[SCF_EDA_NPN_E]->flags = SCF_EDA_PIN_NEG;
-
- T0->pins[SCF_EDA_NPN_B]->flags = SCF_EDA_PIN_IN | SCF_EDA_PIN_IN0;
- R0->pins[0]->flags = SCF_EDA_PIN_OUT;
-
- R0->pins[1]->ic_lid = SCF_EDA_NOT_POS;
- T0->pins[SCF_EDA_NPN_E]->ic_lid = SCF_EDA_NOT_NEG;
-
- T0->pins[SCF_EDA_NPN_B]->ic_lid = SCF_EDA_NOT_IN;
- R0->pins[0]->ic_lid = SCF_EDA_NOT_OUT;
-
- int ret = scf_pins_same_line(f);
- if (ret < 0)
- return ret;
-
- long len = 0;
- uint8_t* buf = NULL;
-
- ScfEfunction_pack(f, &buf, &len);
- ScfEfunction_free(f);
- f = NULL;
-
- FILE* fp = fopen("./not.cpk", "wb");
- if (!fp)
- return -EINVAL;
-
- fwrite(buf, len, 1, fp);
- fclose(fp);
- return 0;
-}