コード例 #1
0
 public ByteRegisterFactory(IByteMemoryGateFactory byteMemoryGateFactory, IByteEnabler byteEnabler,
                            IByteFactory byteFactory)
 {
     _byteMemoryGateFactory = byteMemoryGateFactory;
     _byteEnabler           = byteEnabler;
     _byteFactory           = byteFactory;
 }
コード例 #2
0
 public Bus1Factory(IAnd and, INot not, IOr or, IByteFactory byteFactory)
 {
     _and         = and;
     _not         = not;
     _or          = or;
     _byteFactory = byteFactory;
 }
コード例 #3
0
 public Bus1(IAnd and, INot not, IOr or, IByteFactory byteFactory, Action <IByte> updateWire)
 {
     _and         = and;
     _not         = not;
     _or          = or;
     _byteFactory = byteFactory;
     _updateWire  = updateWire;
     Input        = _byteFactory.Create(0);
     Output       = _byteFactory.Create(0);
 }
コード例 #4
0
 public CpuPinStates(
     IClock clock,
     IStepper stepper,
     IByte instruction,
     Caez caez,
     IAnd and,
     IOr or,
     INot not,
     IDecoder decoder,
     IByteFactory byteFactory)
 {
     _clock       = clock;
     _stepper     = stepper;
     _instruction = instruction;
     _caez        = caez;
     _and         = and;
     _or          = or;
     _not         = not;
     _decoder     = decoder;
     _byteFactory = byteFactory;
 }
コード例 #5
0
        public ArithmeticLogicUnit(
            IByteXOr byteXOr,
            IByteOr byteOr,
            IByteAnd byteAnd,
            IInverter inverter,
            IByteAdder byteAdder,
            IByteEnabler byteEnabler,
            IAnd and,
            IIsZeroGate isZeroGate,
            IByteDecoder byteDecoder,
            IRightByteShifter rightByteShifter,
            ILeftByteShifter leftByteShifter,
            IOr or,
            IAluWire aluWire,
            IByteComparator byteComparator,
            Action <Caez> updateFlags,
            Action <IByte> updateAcc,
            IByteFactory byteFactory)
        {
            _byteXOr          = byteXOr;
            _byteOr           = byteOr;
            _byteAnd          = byteAnd;
            _inverter         = inverter;
            _byteAdder        = byteAdder;
            _byteEnabler      = byteEnabler;
            _and              = and;
            _isZeroGate       = isZeroGate;
            _byteDecoder      = byteDecoder;
            _rightByteShifter = rightByteShifter;
            _leftByteShifter  = leftByteShifter;
            _or             = or;
            _aluWire        = aluWire;
            _byteComparator = byteComparator;
            _updateFlags    = updateFlags;
            _updateAcc      = updateAcc;

            InputA = byteFactory.Create();
            InputB = byteFactory.Create();
            Op     = new Op();
        }
コード例 #6
0
 public AluWire(IByteFactory byteFactory)
 {
     _byteFactory = byteFactory;
 }
コード例 #7
0
 public ByteAnd(IAnd and, IByteFactory byteFactory)
 {
     _and         = and;
     _byteFactory = byteFactory;
 }
コード例 #8
0
 public ByteMemoryGateFactory(IMemoryGateFactory memoryGateFactory, IByteFactory byteFactory)
 {
     _memoryGateFactory = memoryGateFactory;
     _byteFactory       = byteFactory;
 }
コード例 #9
0
 public ByteMemoryGate(IMemoryGateFactory memoryGateFactory, IByteFactory byteFactory)
 {
     _byteFactory = byteFactory;
     _memoryGates = Enumerable.Range(0, 8).Select(_ => memoryGateFactory.Create()).ToList();
 }
コード例 #10
0
 public ByteAdder(IBitAdder bitAdder, IByteFactory byteFactory)
 {
     _bitAdder    = bitAdder;
     _byteFactory = byteFactory;
 }
コード例 #11
0
 public ByteRightShifter(IByteFactory byteFactory)
 {
     _byteFactory = byteFactory;
 }
コード例 #12
0
 public Inverter(INot not, IByteFactory byteFactory)
 {
     _not         = not;
     _byteFactory = byteFactory;
 }
コード例 #13
0
 public ByteDecoder(IDecoder decoder, IByteFactory byteFactory)
 {
     _decoder     = decoder;
     _byteFactory = byteFactory;
 }
コード例 #14
0
 public ByteToBase10Converter(IByteFactory byteFactory, IBase10Converter base10Converter)
 {
     _byteFactory     = byteFactory;
     _base10Converter = base10Converter;
 }
コード例 #15
0
 public ByteRegister(IByteMemoryGate byteMemoryGate, IByteEnabler byteEnabler, IByteFactory byteFactory, Action <IByte> updateWire)
 {
     _byteMemoryGate = byteMemoryGate;
     _byteEnabler    = byteEnabler;
     _updateWire     = updateWire;
     Input           = byteFactory.Create();
     Output          = byteFactory.Create();
     Data            = byteFactory.Create();
     Set             = false;
     Enable          = false;
 }
コード例 #16
0
 public ByteLeftShifter(IByteFactory byteFactory)
 {
     _byteFactory = byteFactory;
 }
コード例 #17
0
 public ByteComparator(IBitComparator bitComparator, IByteFactory byteFactory)
 {
     _bitComparator = bitComparator;
     _byteFactory   = byteFactory;
 }
コード例 #18
0
 public ByteEnabler(IAnd andGate, IByteFactory byteFactory)
 {
     _andGate     = andGate;
     _byteFactory = byteFactory;
 }
コード例 #19
0
 public ByteXOr(IXOr xOr, IByteFactory byteFactory)
 {
     _xOr         = xOr;
     _byteFactory = byteFactory;
 }
コード例 #20
0
 public ByteOr(IOr or, IByteFactory byteFactory)
 {
     _or          = or;
     _byteFactory = byteFactory;
 }