ruby: some small changes
This commit is contained in:
parent
a212844f67
commit
9853ef6651
|
@ -167,7 +167,6 @@ def create_system(options, system, piobus = None, dma_ports = []):
|
||||||
#
|
#
|
||||||
total_mem_size = MemorySize('0B')
|
total_mem_size = MemorySize('0B')
|
||||||
|
|
||||||
dir_bits = int(math.log(options.num_dirs, 2))
|
|
||||||
ruby.block_size_bytes = options.cacheline_size
|
ruby.block_size_bytes = options.cacheline_size
|
||||||
block_size_bits = int(math.log(options.cacheline_size, 2))
|
block_size_bits = int(math.log(options.cacheline_size, 2))
|
||||||
|
|
||||||
|
@ -177,6 +176,7 @@ def create_system(options, system, piobus = None, dma_ports = []):
|
||||||
# if the numa_bit is not specified, set the directory bits as the
|
# if the numa_bit is not specified, set the directory bits as the
|
||||||
# lowest bits above the block offset bits, and the numa_bit as the
|
# lowest bits above the block offset bits, and the numa_bit as the
|
||||||
# highest of those directory bits
|
# highest of those directory bits
|
||||||
|
dir_bits = int(math.log(options.num_dirs, 2))
|
||||||
numa_bit = block_size_bits + dir_bits - 1
|
numa_bit = block_size_bits + dir_bits - 1
|
||||||
|
|
||||||
for dir_cntrl in dir_cntrls:
|
for dir_cntrl in dir_cntrls:
|
||||||
|
|
|
@ -275,3 +275,13 @@ NetDest::print(std::ostream& out) const
|
||||||
out << "]";
|
out << "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
NetDest::isEqual(const NetDest& n) const
|
||||||
|
{
|
||||||
|
assert(m_bits.size() == n.m_bits.size());
|
||||||
|
for (unsigned int i = 0; i < m_bits.size(); ++i) {
|
||||||
|
if (!m_bits[i].isEqual(n.m_bits[i]))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ class NetDest
|
||||||
void broadcast();
|
void broadcast();
|
||||||
void broadcast(MachineType machine);
|
void broadcast(MachineType machine);
|
||||||
int count() const;
|
int count() const;
|
||||||
bool isEqual(const NetDest& netDest);
|
bool isEqual(const NetDest& netDest) const;
|
||||||
|
|
||||||
// return the logical OR of this netDest and orNetDest
|
// return the logical OR of this netDest and orNetDest
|
||||||
NetDest OR(const NetDest& orNetDest) const;
|
NetDest OR(const NetDest& orNetDest) const;
|
||||||
|
|
|
@ -68,7 +68,7 @@ DirectoryMemory::init()
|
||||||
}
|
}
|
||||||
|
|
||||||
m_num_directories++;
|
m_num_directories++;
|
||||||
m_num_directories_bits = floorLog2(m_num_directories);
|
m_num_directories_bits = ceilLog2(m_num_directories);
|
||||||
m_total_size_bytes += m_size_bytes;
|
m_total_size_bytes += m_size_bytes;
|
||||||
|
|
||||||
if (m_numa_high_bit == 0) {
|
if (m_numa_high_bit == 0) {
|
||||||
|
|
Loading…
Reference in a new issue