Example #1
0
        public void ResolveAddress()
        {
            var t_Bank = m_Service.ResolveAddress(new MemoryBankAddress(0));

            t_Bank.Should().NotBeNull();
            t_Bank.Size.Should().Be(32);
        }
Example #2
0
        public void SetFetchFromAddress()
        {
            m_BankService.ResolveAddress(new MemoryBankAddress(0))
            .Store(5, new MemoryAddress(1));

            m_Fetcher.SetFetchFromAddress(new MemoryAddress(1), new MemoryBankAddress(0));

            m_Fetcher.FetchFromAddress
            .Should().Be(new MemoryAddress(1), "We set fetch address to 1.");
            m_Fetcher.CurrentReadAddress
            .Should().Be(new MemoryAddress(5), "We stored the address 1 in the FetchAddress location.");
            m_Fetcher.NextReadAddress
            .Should().Be(new MemoryAddress(6),
                         "We stored the address 1 in the FetchAddress location and this should show the address of the next operation to be read.");
        }
Example #3
0
 private IMemoryBank _LookUpMemoryBank(MemoryBankAddress Address)
 {
     return(m_BankService.ResolveAddress(Address));
 }