Example #1
0
File: DRAM.cs Project: hirous/test
        public bool RequestCanIssue(SchedBuf buf)
        {
            ulong pageIndex = buf.mreq.shift_row;

//            uint burst = buf.burstLength;
            if (IsOpen(pageIndex))
            {
                if (buf.mreq.isWrite)
                {
                    return((nextWrite <= Now) && mem.BusAvailable(cDQS, buf.burstLength));
                }
                else
                {
                    return((nextRead <= Now) && mem.BusAvailable(cCAS, buf.burstLength));
                }
            }
            else if (IsClosed) // need to issue activation
            {
                return((nextActivation <= Now) && (rank.nextActivation <= Now));
            }
            else // conflict
            {
                return(nextPrecharge <= Now);
            }
        }