public void Fetch(int TAG) {
        
       String DATA="", sMsg="";          
       int block;
       String sTag = "";
          
        // Choose the new block to be inserted
        block = TAG%16; 
        
        SetDataBitsIntheBlock("0000000", block, 0, 6); //valid-dirty-index-offset bits
        sTag = Long.toBinaryString(TAG); //TAG (physical address) of the first word in the cache
        sTag = String.format("%0" + (13- sTag.length()) + "d", 0) + sTag;
        SetDataBitsIntheBlock(sTag, block, 7, 19); //Tag bits

       int indexStart=20, indexEnd=39; // first word in the CACHE
            
       for (int i=1;i<=4;i++) {
           DATA = ControlPanel.MEMORY.getDirect(Long.toBinaryString(TAG+i-1));
           SetDataBitsIntheBlock(DATA,block, i*indexStart, indexEnd+((i-1)*indexStart));
           sMsg = sMsg + String.format("%s",TAG+i-1) + "-";
           
       }
      // ControlPanel.jMessages.append("CACHE(" + block + ") --> " + sMsg.substring(0, sMsg.length()-1) + "\n");
             
    }