Esempio n. 1
0
        public void TestMethod3()
        {
            // test sub
            RegisterFile <int> iRF = new RegisterFile <int>(16);
            Memory             m   = new Memory(5000);
            subi a = new subi(0, 1, 15);

            a.Process(iRF, m);
            Assert.AreEqual <int>(-15, iRF[0]);
        }
Esempio n. 2
0
        public void TestMethod14()
        {
            // test ble (take branch with rd < 0)
            RegisterFile <int> iRF = new RegisterFile <int>(16);
            Memory             m   = new Memory(5000);
            subi a = new subi(2, 0, 1);
            ble  b = new ble(2, 10);

            a.Process(iRF, m);
            b.Process(iRF, m);
            Assert.AreEqual <int>(10, iRF[15]);
        }