f = scf_efunction__alloc("or_gate");
EDA_INST_ADD_COMPONENT(f, B, SCF_EDA_Battery);
f = scf_efunction__alloc("or_gate");
EDA_INST_ADD_COMPONENT(f, B, SCF_EDA_Battery);
B->pins[SCF_EDA_Battery_NEG]->flags = SCF_EDA_PIN_NEG;
B->pins[SCF_EDA_Battery_POS]->flags = SCF_EDA_PIN_POS;
B->pins[SCF_EDA_Battery_NEG]->flags = SCF_EDA_PIN_NEG;
B->pins[SCF_EDA_Battery_POS]->flags = SCF_EDA_PIN_POS;
EDA_INST_ADD_COMPONENT(f, NOR0, SCF_EDA_NOR);
EDA_INST_ADD_COMPONENT(f, NOT0, SCF_EDA_NOT);
EDA_INST_ADD_COMPONENT(f, NOR0, SCF_EDA_NOR);
EDA_INST_ADD_COMPONENT(f, NOT0, SCF_EDA_NOT);
- EDA_PIN_ADD_PIN(B, SCF_EDA_Battery_POS, NOR0, SCF_EDA_NAND_POS);
- EDA_PIN_ADD_PIN(B, SCF_EDA_Battery_NEG, NOR0, SCF_EDA_NAND_NEG);
+ EDA_PIN_ADD_PIN(B, SCF_EDA_Battery_POS, NOR0, SCF_EDA_NOR_POS);
+ EDA_PIN_ADD_PIN(B, SCF_EDA_Battery_NEG, NOR0, SCF_EDA_NOR_NEG);
EDA_PIN_ADD_PIN(B, SCF_EDA_Battery_POS, NOT0, SCF_EDA_NOT_POS);
EDA_PIN_ADD_PIN(B, SCF_EDA_Battery_NEG, NOT0, SCF_EDA_NOT_NEG);
EDA_PIN_ADD_PIN(NOR0, SCF_EDA_NOR_OUT, NOT0, SCF_EDA_NOT_IN);
EDA_PIN_ADD_PIN(B, SCF_EDA_Battery_POS, NOT0, SCF_EDA_NOT_POS);
EDA_PIN_ADD_PIN(B, SCF_EDA_Battery_NEG, NOT0, SCF_EDA_NOT_NEG);
EDA_PIN_ADD_PIN(NOR0, SCF_EDA_NOR_OUT, NOT0, SCF_EDA_NOT_IN);
- NOR0->pins[SCF_EDA_NOR_IN0]->flags = SCF_EDA_PIN_IN | SCF_EDA_PIN_IN0;
- NOR0->pins[SCF_EDA_NOR_IN1]->flags = SCF_EDA_PIN_IN;
+ EDA_PIN_ADD_PIN(R0, 0, NOR0, SCF_EDA_NOR_IN0);
+ EDA_PIN_ADD_PIN(R1, 0, NOR0, SCF_EDA_NOR_IN1);
+
+ R0->pins[1]->flags = SCF_EDA_PIN_IN | SCF_EDA_PIN_IN0;
+ R1->pins[1]->flags = SCF_EDA_PIN_IN;