Beispiel #1
0
        public override bool preCheck(out ulong addr)
        {
            addr = 0;

            if (m_eof)
            {
                return(false);
            }

            try
            {
                ulong t_addr      = m_reader.ReadUInt64();
                int   t_preceding = m_reader.ReadInt32();
                //if (m_group == 1)
                //    Console.WriteLine("group: {2} addr {0:X} count {1}", t_addr, t_preceding, m_group);

                Trace.Type t_type = (t_addr >> 63) != 0 ?
                                    Trace.Type.Rd : Trace.Type.Wr;
                t_addr &= 0x7FFFFFFFFFFFFFFF;

                t_addr |= ((ulong)m_group) << 48;

                TraceFile_Old_Entry entry = new TraceFile_Old_Entry(t_type, t_addr, t_preceding);
                preCheck_queue.Add(entry);

                if (m_group == 17)
                {
                    Console.WriteLine("Precheck addr:{0:x}", t_addr);
                }
                addr = t_addr;
                return(true);
            }
            catch (EndOfStreamException)
            {
                m_eof = true;
                return(false);
            }
        }
Beispiel #2
0
	public override bool preCheck( out ulong addr )
	{
	    addr = 0;

	    if( m_eof ) return false;

	    try
	    {
		ulong t_addr = m_reader.ReadUInt64();
		int t_preceding = m_reader.ReadInt32();
		//if (m_group == 1)
		//    Console.WriteLine("group: {2} addr {0:X} count {1}", t_addr, t_preceding, m_group);

		Trace.Type t_type = (t_addr >> 63) != 0 ?
		    Trace.Type.Rd : Trace.Type.Wr;
		t_addr &= 0x7FFFFFFFFFFFFFFF;

		t_addr |= ((ulong)m_group) << 48;

		TraceFile_Old_Entry entry = new TraceFile_Old_Entry(t_type,t_addr,t_preceding);
		preCheck_queue.Add(entry);

		if( m_group == 17 )
		    Console.WriteLine("Precheck addr:{0:x}", t_addr);
		addr = t_addr;
		return true;
	    }
	    catch (EndOfStreamException)
	    {
		m_eof = true;
		return false;
	    }
	}