new public void __dequeue_req(Req req)
        {
            req.ts_departure = cycles;
            Dbg.Assert(req.ts_departure - req.ts_arrival > 0);

            if ((!req.migrated_request) && (Config.proc.cache_insertion_policy == "PFA"))
            {
                RowStat.UpdateMLP(RowStat.DramDict, req);
                Measurement.mem_num_dec(req);
//                   Measurement.DramServiceTimeUpdate (req);
//                   Measurement.DramCoreReqNumDec (req);
            }
            if (Config.proc.cache_insertion_policy == "PFA")
            {
                Measurement.DramCoreReqNumDec(req);
            }

            /*            if (Config.proc.cache_insertion_policy == "RBLAMLP" || Config.proc.cache_insertion_policy == "PFA")
             *                Measurement.DramSetCorePrevRowid (req);
             */
            //sched
            meta_mctrl.dequeue_req(req);

            //load stat management
            if (!req.migrated_request)
            {
                if (req.type == ReqType.RD)
                {
                    rload--;
                    rload_per_proc[req.pid]--;
                    rload_per_procrankbank[req.pid, req.addr.rid, req.addr.bid]--;
                    Dbg.Assert(rload >= 0);
                    Dbg.Assert(rload_per_proc[req.pid] >= 0);
                    Dbg.Assert(rload_per_procrankbank[req.pid, req.addr.rid, req.addr.bid] >= 0);
                }
                else
                {
                    wload--;
                    wload_per_proc[req.pid]--;
                    wload_per_procrankbank[req.pid, req.addr.rid, req.addr.bid]--;
                    Dbg.Assert(wload >= 0);
                    Dbg.Assert(wload_per_proc[req.pid] >= 0);
                    Dbg.Assert(wload_per_procrankbank[req.pid, req.addr.rid, req.addr.bid] >= 0);
                    //                RequestPool.CacheWrite--;
                }
            }
            else
            {
                if (req.type == ReqType.RD)
                {
                    rload--;
                }
                else
                {
                    wload--;
                }
            }

/*            //dequeue proper
 *          if (req.type == ReqType.RD) {
 *              //traverse crossbar
 *              //Sim.xbar.enqueue(req);
 *
 *              Callback cb = req.cache_callback;
 *              cb(req);
 *
 *
 *          }
 *          else {
 *              bool removeok = mctrl_writeq.Remove(req);
 *              Dbg.Assert(removeok);
 *              req.latency = (int)(req.ts_departure - req.ts_arrival);
 *
 *              Callback cb = req.cache_callback;
 *              cb(req);
 *
 *
 *              RequestPool.enpool(req);
 *         }*/


//yang:
            //dequeue proper
            if (req.type == ReqType.RD)
            {
                Callback cb = req.cache_callback;
                cb(req);
            }
            else
            {
                bool removeok = mctrl_writeq.Remove(req);
                Dbg.Assert(removeok);
                req.latency = (int)(req.ts_departure - req.ts_arrival);
                Callback cb = req.cache_callback;
                cb(req);

                /*            Callback cb1 = req.callback;
                 *          if (cb1!=null)
                 *          {
                 *             Console.WriteLine("Position3");
                 *                  RequestPool.CacheWrite--;
                 *          }*/
            }
        }