public void Initialize() { m_BankService = new MemoryBankService(new List <IMemoryBank>() { new MemoryBank(32) }); m_Reader = new OperationReader(ArchitectureFactory.CreateArchitecture(m_BankService), _CreateReader()); }
public OperationFetcher(IOperationReader Reader, IMemoryBankService BankService, IMemoryLocationAddressReader LocationReader) { m_Reader = Reader; m_BankService = BankService; m_LocationReader = LocationReader; }
public void Initialize() { m_BankService = new MemoryBankService(new List <IMemoryBank>() { _CreateMemoryBank() }); m_Fetcher = new OperationFetcher(_CreateReader(), m_BankService, new MemoryLocationAddressReader()); }
public Machine( ICPU CPU, IOscillator MachineOscillator, IMemoryBankService BankService) { m_Oscillator = MachineOscillator; m_CPU = CPU; m_BankService = BankService; }
public void Initialize() { m_Oscillator = new Clock(); m_CPU = new CPU(); m_Bank = new MemoryBank(512); m_BankService = new MemoryBankService(new List <IMemoryBank> { m_Bank }); m_Machine = new Machine(m_CPU, m_Oscillator, m_BankService); }
private static Dictionary <int, IOperationConverter> _CreateConverters(IMemoryBankService BankService) { return(new Dictionary <int, IOperationConverter> { { 0, new NoOpConverter() }, { 1, new OpAddConverter(BankService) }, { 5, new OpSubConverter(BankService) }, { 10, new OpLoadConstConverter(BankService) }, { 11, new OpLoadConverter(BankService) } }); }
public static IArchitecture CreateArchitecture(IMemoryBankService BankService) { return(new Architecture ( "TestArchitecture", new Dictionary <int, IOperationConverter> { { 0, new NoOpConverter() }, { 1, new OpLoadConstConverter(BankService) }, { 2, new OpLoadConverter(BankService) } }, new List <OperationDefinition> { new OperationDefinition(0, 0), new OperationDefinition(1, 4 * 3), new OperationDefinition(2, 4 * 4) } )); }
public void Initialize() { m_Arch = _CreateArchitecture(); m_CPU = new CPU(); m_Oscillator = new Clock(); m_Bank = new MemoryBank(512); m_BankService = new MemoryBankService(new List <IMemoryBank>() { m_Bank }); m_AddressReader = new MemoryLocationAddressReader(); m_OpDtoReader = new OperationDTOReader(m_Arch); m_OpReader = new OperationReader(m_Arch, m_OpDtoReader); m_Fetcher = new OperationFetcher(m_OpReader, m_BankService, m_AddressReader); m_OpFeeder = new OperationFeeder(m_Fetcher); m_CPUConsumer = new CPUConsumer(m_CPU); SetupComponents(); }
public OpAddConverter(IMemoryBankService BankService) { m_BankService = BankService; }
private IOperationFetcher _CreateFetcher(IMemoryBankService BankService) { return(new OperationFetcher(_CreateReader(), BankService, new MemoryLocationAddressReader())); }
public void Initialize() { m_Service = new MemoryBankService(new List <IMemoryBank> { new MemoryBank(32) }); }
public vCPUArchitecture(IMemoryBankService BankService) : base("vCPU", _CreateConverters(BankService), _CreateDefinitions()) { }
public OpLoadConstConverter(IMemoryBankService Service) { m_BankService = Service; }