38#ifndef __CPU_UTILS_HH__
39#define __CPU_UTILS_HH__
55 return addr & (block_size - 1);
68 return addr & ~(block_size - 1);
92 auto it_tmp = it_start;
93 for (;it_tmp != it_end && !(*it_tmp); ++it_tmp);
94 return (it_tmp != it_end);
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria 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...
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.