packet.hh (13732:43e7199f511f) | packet.hh (13856:c4a7f25aacb4) |
---|---|
1/* 2 * Copyright (c) 2012-2019 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 43 unchanged lines hidden (view full) --- 52 53#ifndef __MEM_PACKET_HH__ 54#define __MEM_PACKET_HH__ 55 56#include <bitset> 57#include <cassert> 58#include <list> 59 | 1/* 2 * Copyright (c) 2012-2019 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 43 unchanged lines hidden (view full) --- 52 53#ifndef __MEM_PACKET_HH__ 54#define __MEM_PACKET_HH__ 55 56#include <bitset> 57#include <cassert> 58#include <list> 59 |
60#include "base/addr_range.hh" |
|
60#include "base/cast.hh" 61#include "base/compiler.hh" 62#include "base/flags.hh" 63#include "base/logging.hh" 64#include "base/printable.hh" 65#include "base/types.hh" 66#include "config/the_isa.hh" 67#include "mem/request.hh" --- 663 unchanged lines hidden (view full) --- 731 * one based on the system configuration. It is intended to remap 732 * an existing address, so it asserts that the current address is 733 * valid. 734 */ 735 void setAddr(Addr _addr) { assert(flags.isSet(VALID_ADDR)); addr = _addr; } 736 737 unsigned getSize() const { assert(flags.isSet(VALID_SIZE)); return size; } 738 | 61#include "base/cast.hh" 62#include "base/compiler.hh" 63#include "base/flags.hh" 64#include "base/logging.hh" 65#include "base/printable.hh" 66#include "base/types.hh" 67#include "config/the_isa.hh" 68#include "mem/request.hh" --- 663 unchanged lines hidden (view full) --- 732 * one based on the system configuration. It is intended to remap 733 * an existing address, so it asserts that the current address is 734 * valid. 735 */ 736 void setAddr(Addr _addr) { assert(flags.isSet(VALID_ADDR)); addr = _addr; } 737 738 unsigned getSize() const { assert(flags.isSet(VALID_SIZE)); return size; } 739 |
740 /** 741 * Get address range to which this packet belongs. 742 * 743 * @return Address range of this packet. 744 */ 745 AddrRange getAddrRange() const; 746 |
|
739 Addr getOffset(unsigned int blk_size) const 740 { 741 return getAddr() & Addr(blk_size - 1); 742 } 743 744 Addr getBlockAddr(unsigned int blk_size) const 745 { 746 return getAddr() & ~(Addr(blk_size - 1)); --- 549 unchanged lines hidden --- | 747 Addr getOffset(unsigned int blk_size) const 748 { 749 return getAddr() & Addr(blk_size - 1); 750 } 751 752 Addr getBlockAddr(unsigned int blk_size) const 753 { 754 return getAddr() & ~(Addr(blk_size - 1)); --- 549 unchanged lines hidden --- |