mem: Add a class to describe a back door request.
In cases where a back door is not being requested alongside a packet or request, there needs to be a structure which describes the address range to use, and what type of access the back door should support. It would be possible to make a Packet/Request to carry that information, but those types are actually pretty big, and have a lot of extra overhead which would be overkill for this purpose. Change-Id: I3638361ffa758ee959cb3bc57f7c35f2aa34a36c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65751 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -126,6 +126,25 @@ class MemBackdoor
|
||||
|
||||
typedef MemBackdoor *MemBackdoorPtr;
|
||||
|
||||
class MemBackdoorReq
|
||||
{
|
||||
private:
|
||||
AddrRange _range;
|
||||
MemBackdoor::Flags _flags;
|
||||
|
||||
public:
|
||||
MemBackdoorReq(AddrRange r, MemBackdoor::Flags new_flags) :
|
||||
_range(r), _flags(new_flags)
|
||||
{}
|
||||
|
||||
const AddrRange &range() const { return _range; }
|
||||
|
||||
bool readable() const { return _flags & MemBackdoor::Readable; }
|
||||
bool writeable() const { return _flags & MemBackdoor::Writeable; }
|
||||
|
||||
MemBackdoor::Flags flags() const { return _flags; }
|
||||
};
|
||||
|
||||
} // namespace gem5
|
||||
|
||||
#endif //__MEM_BACKDOOR_HH__
|
||||
|
||||
Reference in New Issue
Block a user