/// <summary>
        /// Adds an entry to the rrfTable
        /// </summary>
        /// <param name="instr">Instruction to be added to the rrfTable</param>
        /// <returns>The index (tag) of where it was added</returns>
        public int addEntry(Instruction instr)
        {
            int rrfTag = -1;
            // We had to create one here because we use emptySlot below
            RRFEntry emptySlot = new RRFEntry();

            // Note we're guaranteed an entry is open because we called spaceAvailable
            // at a higher level
            for (int i = 0; i < Config.numRenamingTableEntries; i++)
            {
                if (this.rrfTable[i].busy == false)
                {
                    emptySlot = rrfTable[i];
                    rrfTag    = i;
                    break;
                }
            }

            emptySlot.busy  = true;
            emptySlot.valid = false;
            // There must be a destination if this instruction requires an RRF entry
            emptySlot.destReg = instr.dest;
            // Data stays null until it's updated by an execution result

            return(rrfTag);
        }
 public RenameRegisterFile()
 {
     this.rrfTable = new RRFEntry[Config.numRenamingTableEntries];
     for (int i = 0; i < Config.numRenamingTableEntries; i++)
     {
         rrfTable[i] = new RRFEntry();
     }
 }
 /// <summary>
 /// Check to see if there is an available entry
 /// </summary>
 /// <returns>True if there is a slot avialable, false otherwise</returns>
 public bool spaceAvailable()
 {
     for (int i = 0; i < Config.numRenamingTableEntries; i++)
     {
         RRFEntry entry = this.rrfTable[i];
         if (entry.busy == false)
         {
             return(true);
         }
     }
     return(false);
 }