Ejemplo n.º 1
0
        public DevicePin Create(Circuit circuit, PinType pinType, int bitWidth)
        {
            PinSide   pinSide = BasePin.DefaultSide((circuit is Pin circuitPin) ? (circuitPin.PinType == PinType.Input ? PinType.Output : PinType.Input) : pinType);
            DevicePin pin     = this.CreateItem(Guid.NewGuid(), circuit, bitWidth, pinType, pinSide, false,
                                                this.UniqueName(BasePin.DefaultName(pinType), circuit),
                                                DevicePinData.NoteField.Field.DefaultValue, DevicePinData.JamNotationField.Field.DefaultValue
                                                );

            pin.Order = this.order++;
            return(pin);
        }
Ejemplo n.º 2
0
        public Pin Create(LogicalCircuit logicalCircuit, PinType pinType, int bitWidth)
        {
            Pin pin = this.CreateItem(Guid.NewGuid(), logicalCircuit, bitWidth, pinType,
                                      BasePin.DefaultSide(pinType),
                                      PinData.InvertedField.Field.DefaultValue,
                                      this.UniqueName(BasePin.DefaultName(pinType), logicalCircuit),
                                      PinData.NoteField.Field.DefaultValue,
                                      PinData.JamNotationField.Field.DefaultValue
                                      );

            this.CreateDevicePin(pin);
            return(pin);
        }