Exemple #1
0
        // Perform initialization
        private void Init()
        {
            bPos = bZero = bNeg = bCarry = bNOT_CDAV = false;

            state        = MSstate.Get_MSstate();
            mseq         = MSmicrosequencer.Get_MSmicrosequencer();
            ControlTable = new MScontrolTable();
        }
Exemple #2
0
        /// <summary>
        /// Gets the only instance of the Get_MSmicrosequencer class that may exist.  If a single
        /// instance of Get_MSmicrosequencer has not yet been created, one is created.
        /// PRE:    None.
        /// POST:   An MSmicrosequencer (reference) has been returned, or created and returned.
        /// </summary>
        /// <returns>Returns a reference to the only existing instance of MSmicrosequencer.</returns>
        public static MSmicrosequencer Get_MSmicrosequencer()
        {
            lock (c_seqLock)
            {
                // if this is the first request, initialize the one instance
                if (c_microSeq == null)
                {
                    // create the single object instance
                    c_microSeq = new MSmicrosequencer();
                    c_microSeq.LoadInitStates();
                } // if null

                // whether new or old, return a reference to the only instance
                return(c_microSeq);
            } // lock
        }
Exemple #3
0
        public override string ToString()
        {
            string ret = "";

            // ToString("X") alternatively prints the integer address as hexadecimal; this should also print the *contents* at the current MAR address TODO
            ret += string.Format("MAR:  {0,2} {1,2:}", RegisterContent[RegSet.MARhi].ToString("X"), RegisterContent[RegSet.MARlo].ToString("X"));
            ret += System.Environment.NewLine;

            // Print the remaining register contents
            foreach (RegSet rs in aRegisters)
            {
                ret += string.Format("{0}:{1,2}  ", rs.ToString(), RegisterContent[rs].ToString("X"));
            }

            // Add the state of the microsequencer
            ret += System.Environment.NewLine;
            ret += MSmicrosequencer.Get_MSmicrosequencer().ToString();

            // Add the status word from the ALU
            ret += MS_ALU.Get_MS_ALU().ToString();
            ret += System.Environment.NewLine;

            return(ret);
        }