38#ifndef __CPU_UTILS_HH__
39#define __CPU_UTILS_HH__
57 return addr & (block_size - 1);
70 return addr & ~(block_size - 1);
94 auto it_tmp = it_start;
95 for (;it_tmp != it_end && !(*it_tmp); ++it_tmp);
96 return (it_tmp != it_end);
110 for (
auto it = rit_start; it != rit_end; ++it) {
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
Copyright (c) 2024 Arm Limited All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Addr addrBlockOffset(Addr addr, Addr block_size)
Calculates the offset of a given address wrt aligned fixed-size blocks.
bool transferNeedsBurst(Addr addr, unsigned int size, unsigned int block_size)
Returns true if the given memory access (address, size) needs to be fragmented across aligned fixed-s...
unsigned inactiveTailSize(const std::vector< bool >::const_iterator &it_start, const std::vector< bool >::const_iterator &it_end)
Get size of inactive tail in an enablement range (0 if none).
bool isAnyActiveElement(const std::vector< bool >::const_iterator &it_start, const std::vector< bool >::const_iterator &it_end)
Test if there is any active element in an enablement range.
Addr addrBlockAlign(Addr addr, Addr block_size)
Returns the address of the closest aligned fixed-size block to the given address.