TestCircuit.java 886 B

123456789101112131415161718192021222324252627282930313233
  1. // by Boyang Wei
  2. package YaoGC;
  3. public class TestCircuit extends CompositeCircuit {
  4. public TestCircuit() {
  5. super(2, 2, 1, "TestCircuit");
  6. }
  7. protected void createSubCircuits() throws Exception {
  8. subCircuits[0] = new FF10_2_2(1);
  9. super.createSubCircuits();
  10. }
  11. protected void connectWires() throws Exception {
  12. // Enable wires
  13. inputWires[0].connectTo(subCircuits[0].inputWires, 0);
  14. inputWires[1].connectTo(subCircuits[0].inputWires, 1);
  15. }
  16. protected void defineOutputWires() {
  17. outputWires[0] = subCircuits[0].outputWires[0];
  18. outputWires[1] = subCircuits[0].outputWires[1];
  19. }
  20. /*
  21. * public void sendOutBitsLookup(boolean send) { //sendOutBitsLookup = send;
  22. * if (send) for (int i=0; i<outputWires.length; i++)
  23. * outputWires[i].outBitEncPair = new BigInteger[2]; else for (int i=0;
  24. * i<outputWires.length; i++) outputWires[i].outBitEncPair = null; }
  25. */
  26. }