public NOTX(string parameters) : base(2) { var size = byte.Parse(parameters); IOGroups.Add(Input, new SchemeIOGroup(size, IO.Input)); IOGroups.Add(Output, new SchemeIOGroup(size, IO.Output)); IOGroups[Output].IOArray.SetAll(true); }
public void AddIOGroup(UIIOGroupBuildInfo ioGroupBuildInfo) { var ioGroupContainer = new IOGroupContainer(ioGroupBuildInfo, Self); IOGroups.Add(ioGroupContainer.BuildInfo.BuildString.Name, ioGroupContainer.IOGroup); IOGroupsInfo.Add(ioGroupContainer); ioGroupContainer.Design = SchemeDesigner.Instance.CreateSelfIOGroupDesign(ioGroupContainer); }
public RAMX(string parameters) : base(4) { var sizes = parameters.Split(' '); var valueSize = byte.Parse(sizes[0]); var addressSize = byte.Parse(sizes[1]); var valuesTotal = Extensions.Pow(2, addressSize); var totalSize = valuesTotal * valueSize; if (totalSize > MaxSize) { throw new UnityException("Превышен максимальный размер RAM"); } IOGroups.Add(Input, new SchemeIOGroup(valueSize, IO.Input)); IOGroups.Add(Address, new SchemeIOGroup(addressSize, IO.Input)); IOGroups.Add(Load, new SchemeIOGroup(1, IO.Input)); IOGroups.Add(Output, new SchemeIOGroup(valueSize, IO.Output)); CycleManager.Instance.Tick += OnTick; mRam = new BitArray[valuesTotal]; for (int i = 0; i < valuesTotal; i++) { mRam[i] = new BitArray(valueSize); } }
public SimulationStop(bool enabled) : base(1) { IOGroups.Add(Input, new SchemeIOGroup(1, IO.Input)); CycleManager.Instance.Tick += OnTick; Enabled = enabled; }
public DFF() : base(2) { IOGroups.Add(Input, new SchemeIOGroup(1, IO.Input)); IOGroups.Add(Output, new SchemeIOGroup(1, IO.Output)); CycleManager.Instance.Tick += OnTick; }
public NumberDisplay(Parameters parameters) : base(1) { mSchemeParameters = parameters; IOGroups.Add(Input, new SchemeIOGroup(mSchemeParameters.Size, IO.Input)); }
public IntConst(int value) : base(1) { IOGroups.Add(Output, new SchemeIOGroup(32, IO.Output)); Number = value; }
public CONST() : base(1) { IOGroups.Add(Output, new SchemeIOGroup(1, IO.Output)); IOGroups[Output].IOArray[0] = true; }
public NAND() : base(2) { IOGroups.Add(Input, new SchemeIOGroup(2, IO.Input)); IOGroups.Add(Output, new SchemeIOGroup(1, IO.Output)); IOGroups[Output].IOArray[0] = true; }