Ejemplo n.º 1
0
 public VirtualMachine(ICPU cpu,IRAM ram)
 {
     this.cpu = cpu;
     this.ram = ram;
     cpu.machine = this;
     ram.machine = this;
 }
Ejemplo n.º 2
0
 protected Computer(ICPU cpu, IRAM ram, IVideoCard videoCard, RAID hardDriveRaid, IMotherboard motherBoard)
 {
     this.cpu           = cpu;
     this.ram           = ram;
     this.videoCard     = videoCard;
     this.hardDriveRaid = hardDriveRaid;
     this.motherBoard   = motherBoard;
 }
Ejemplo n.º 3
0
 protected Computer(ICPU cpu, IRAM ram, IVideoCard videoCard, RAID hardDriveRaid, IMotherboard motherBoard)
 {
     this.cpu = cpu;
     this.ram = ram;
     this.videoCard = videoCard;
     this.hardDriveRaid = hardDriveRaid;
     this.motherBoard = motherBoard;
 }
Ejemplo n.º 4
0
        public String CreateAndDisplay()
        {
            IComputer computer   = factory.CreateComputer();
            IRAM      RAM        = factory.CreateRAM();
            IStorage  storage    = factory.CreateStorage();
            decimal   totalPrice = computer.getPrice() + RAM.getPrice() + storage.getPrice();

            return("Your " + computer.getDescription() +
                   "\n" + RAM.getDescription() +
                   "\n" + storage.getDescription() +
                   "\n* Price: " + totalPrice + ",-");
        }
Ejemplo n.º 5
0
 public RAMController(IRAM Iproduct, ICategoryRAM Icategories)
 {
     product     = Iproduct;
     _categories = Icategories;
 }
Ejemplo n.º 6
0
 public CPU128(IRAM ram, int coreCount)
 {
     this.ram           = ram;
     this.NumberOfCores = coreCount;
 }
Ejemplo n.º 7
0
 public PC(ICPU cpu, IRAM ram, IVideoCard videoCard, RAID hardDriveRaid, IMotherboard motherBoard)
     : base(cpu, ram, videoCard, hardDriveRaid, motherBoard)
 {
 }
Ejemplo n.º 8
0
 public CPU128(IRAM ram, int coreCount)
 {
     this.ram = ram;
     this.NumberOfCores = coreCount;
 }
Ejemplo n.º 9
0
 public Laptop(ICPU cpu, IRAM ram, IVideoCard videoCard, RAID hardDriveRaid, IMotherboard motherBoard, IBattery battery)
     : base(cpu, ram, videoCard, hardDriveRaid, motherBoard)
 {
     this.battery = battery;
 }
Ejemplo n.º 10
0
 public Server(ICPU cpu, IRAM ram, MonochromeVideoCard videoCard, RAID hardDriveRaid, MonochromeVideoCard motherBoard)
     : base(cpu, ram, videoCard, hardDriveRaid, motherBoard)
 {
 }
Ejemplo n.º 11
0
 public Server(ICPU cpu, IRAM ram, MonochromeVideoCard videoCard, RAID hardDriveRaid, MonochromeVideoCard motherBoard)
     : base(cpu, ram, videoCard, hardDriveRaid, motherBoard)
 {
 }
Ejemplo n.º 12
0
 public Desktop(ICPU cpu, IRAM ram)
 {
     _cpu = cpu;
     _ram = ram;
 }
Ejemplo n.º 13
0
 public void CreateRAM(int addrWidth, int dataWidth, int capacity, int readLatency, int writeLatency, out Component part, out IRAM ram)
 {
     throw new NotSupportedException("Only ROM can be created");
 }
Ejemplo n.º 14
0
 public Desktop_AMD()
 {
     _cpu = new AMD_CPU();
     _ram = new Hynix_RAM();
 }
Ejemplo n.º 15
0
 public Desktop_Intel()
 {
     _cpu = new Intel_CPU();
     _ram = new SAMSUNG_RAM();
 }
Ejemplo n.º 16
0
 public void CreateRAM(int addrWidth, int dataWidth, int capacity, int readLatency, int writeLatency, out Component part, out IRAM ram)
 {
     throw new NotSupportedException("Only ROM can be created");
 }
Ejemplo n.º 17
0
 public PC(ICPU cpu, IRAM ram, IVideoCard videoCard, RAID hardDriveRaid, IMotherboard motherBoard) 
     : base(cpu, ram, videoCard, hardDriveRaid, motherBoard)
 {
 }
Ejemplo n.º 18
0
        public void CreateRAM(int addrWidth, int dataWidth, int capacity, int readLatency, int writeLatency,
            out Component part, out IRAM ram)
        {
            if (writeLatency != 1)
                throw new NotSupportedException();

            bool regPrim, regOut;
            switch (readLatency)
            {
                case 1:
                    regPrim = false;
                    regOut = false;
                    break;

                case 2:
                    regPrim = true;
                    regOut = false;
                    break;

                case 3:
                    regPrim = true;
                    regOut = true;
                    break;

                default:
                    throw new NotSupportedException();
            }

            BlockMem bmem = new BlockMem()
            {
                IPAlgorithm = BlockMem.EIPAlgorithm.MinimumArea,
                AssumeSynchronousClk = false,
                ECC = false,
                ECCType = BlockMem.EECCType.NoECC,
                EnableA = BlockMem.EENAUsage.UseENAPin,
                EnableB = BlockMem.EENBUsage.AlwaysEnabled,
                ErrorInjectionType = BlockMem.EErrorInjectionType.SingleBitErrorInjection,
                MemoryType = BlockMem.EMemoryType.SinglePortRAM,
                OperatingModeA = BlockMem.EOperatingMode.WriteFirst,
                OperatingModeB = BlockMem.EOperatingMode.WriteFirst,
                PipelineStages = 0,
                ReadWidthA = dataWidth,
                ReadWidthB = dataWidth,
                RegisterPortAInputOfSoftECC = false,
                RegisterPortAOutputOfMemoryCore = regOut,
                RegisterPortAOutputOfMemoryPrimitives = regPrim,
                RegisterPortBOutputOfMemoryCore = false,
                RegisterPortBOutputOfMemoryPrimitives = false,
                RegisterPortBOutputOfSoftECC = false,
                ResetMemoryLatchA = false,
                ResetMemoryLatchB = false,
                ResetPriorityA = BlockMem.EResetPriority.CE,
                ResetPriorityB = BlockMem.EResetPriority.CE,
                ResetType = BlockMem.EResetType.Sync,
                SoftECC = false,
                UseByteWriteEnable = false,
                UseErrorInjectionPins = false,
                UseRegCeAPin = false,
                UseRegCeBPin = false,
                UseRstAPin = false,
                UseRstBPin = false,
                WriteDepthA = MathExt.CeilPow2(capacity),
                WriteWidthA = dataWidth,
                WriteWidthB = dataWidth
            };
            part = bmem;
            ram = bmem.SideA;
        }