Ejemplo n.º 1
0
        //************************************************************************************************************************
        private void Exec(TicTok tictok)
        {
            string cw = SEQ.Instance().ControlWord;

            //  TODO - Find a better way of using the mask to get the value
            //          Currently is using hardcoded magic numbers

            //Allow the ALU to only set flags when the ALU is going to output to the bus.
            FlagEnable = tictok.ClockState == TicTok.State.Tic && cw[9] == '1';

            string temp;

            // Active Hi, SUB on Tic
            if (cw[8] == '1' && tictok.ClockState == TicTok.State.Tic)
            {
                temp = Compute(Areg.ToString(), Breg.ToString(), false);
            }
            else // ADD
            {
                temp = Compute(Areg.ToString(), Breg.ToString(), true);
            }

            // For Frame ToString support
            RegContent = temp;

            // Active Hi, Push on Tic
            if (cw[9] == '1' & tictok.ClockState == TicTok.State.Tic)
            {
                Wbus.Instance().Value = temp;
            }
        }
Ejemplo n.º 2
0
        }                                                 // For ToString()

        private void Exec(TicTok tictok)
        {
            string cw = SEQ.Instance().ControlWord;

            //  TODO - Find a better way of using the mask to get the value
            //          Currently is using hardcoded magic numbers

            // Active Low, Push on Tic
            if (cw[3] == '0' && tictok.ClockState == TicTok.State.Tic)
            {
                string content        = GetWordAt(MARContents);
                Wbus.Instance().Value = content;
            }

            // LR_, Active Low, Pull on Tok
            if (cw[12] == '0' && tictok.ClockState == TicTok.State.Tok)
            {
                string word = Wbus.Instance().Value;
                SetWordAt(MARContents, word);
                RAM_Register_Content = word;
            }
        }