예제 #1
0
 public void Signal(PinWire pin, bool signal)
 {
     if(pin == PinWire.A)
         A(signal);
     else if(pin == PinWire.B)
         B(signal);
     else if(pin == PinWire.Both)
     {
         A(signal);
         B(signal);
     }
 }
예제 #2
0
파일: FPGA.cs 프로젝트: stefc/evogate
 private Action<bool> Connect(int src, PinWire pin)
 {
     return signal =>
         this.network[src].Signal(pin,signal);
 }
예제 #3
0
파일: Wiring.cs 프로젝트: stefc/evogate
 private void AddPin(PinWire pin, Action<char> emmit)
 {
     if(pin==PinWire.A) emmit('A');
     else if(pin == PinWire.B) emmit('B');
     else if(pin == PinWire.Both) emmit('*');
     else emmit('-');
 }