Deleted Added
sdiff udiff text old ( 9500:9c3e3d1c7a87 ) new ( 9508:dde110931867 )
full compact
1/*
2 * Copyright (c) 2009 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 37 unchanged lines hidden (view full) ---

46 Address m_ProgramCounter;
47 RubyAccessMode m_AccessMode;
48 int m_Size;
49 PrefetchBit m_Prefetch;
50 uint8_t* data;
51 PacketPtr pkt;
52 unsigned m_contextId;
53
54 RubyRequest(Tick curTime, uint64_t _paddr, uint8_t* _data, int _len,
55 uint64_t _pc, RubyRequestType _type, RubyAccessMode _access_mode,
56 PacketPtr _pkt, PrefetchBit _pb = PrefetchBit_No,
57 unsigned _proc_id = 100)
58 : Message(curTime),
59 m_PhysicalAddress(_paddr),
60 m_Type(_type),
61 m_ProgramCounter(_pc),
62 m_AccessMode(_access_mode),
63 m_Size(_len),
64 m_Prefetch(_pb),
65 data(_data),
66 pkt(_pkt),
67 m_contextId(_proc_id)
68 {
69 m_LineAddress = m_PhysicalAddress;
70 m_LineAddress.makeLineAddress();
71 }
72
73 RubyRequest(Tick curTime) : Message(curTime) {}
74 RubyRequest* clone() const { return new RubyRequest(*this); }
75
76 const Address& getLineAddress() const { return m_LineAddress; }
77 const Address& getPhysicalAddress() const { return m_PhysicalAddress; }
78 const RubyRequestType& getType() const { return m_Type; }
79 const Address& getProgramCounter() const { return m_ProgramCounter; }
80 const RubyAccessMode& getAccessMode() const { return m_AccessMode; }
81 const int& getSize() const { return m_Size; }
82 const PrefetchBit& getPrefetch() const { return m_Prefetch; }
83
84 void print(std::ostream& out) const;
85 bool functionalRead(Packet *pkt);
86 bool functionalWrite(Packet *pkt);
87};
88
89inline std::ostream&
90operator<<(std::ostream& out, const RubyRequest& obj)
91{
92 obj.print(out);
93 out << std::flush;
94 return out;
95}
96
97#endif