/*
+ * Copyright (c) 2021 ARM Limited
+ * All rights reserved.
+ *
+ * The license below extends only to copyright in the software and shall
+ * not be construed as granting a license to any other intellectual
+ * property including but not limited to intellectual property relating
+ * to a hardware implementation of the functionality of the software
+ * licensed hereunder. You may use the software subject to the license
+ * terms below provided that you ensure that this notice is replicated
+ * unmodified and in its entirety in all distributions of the software,
+ * modified or unmodified, in source code or in binary form.
+ *
* Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
* All rights reserved.
*
memcpy(&m_data[offset], data, len);
}
+void
+DataBlock::setData(PacketPtr pkt)
+{
+ int offset = getOffset(pkt->getAddr());
+ assert(offset + pkt->getSize() <= RubySystem::getBlockSizeBytes());
+ pkt->writeData(&m_data[offset]);
+}
+
DataBlock &
DataBlock::operator=(const DataBlock & obj)
{
/*
+ * Copyright (c) 2021 ARM Limited
+ * All rights reserved.
+ *
+ * The license below extends only to copyright in the software and shall
+ * not be construed as granting a license to any other intellectual
+ * property including but not limited to intellectual property relating
+ * to a hardware implementation of the functionality of the software
+ * licensed hereunder. You may use the software subject to the license
+ * terms below provided that you ensure that this notice is replicated
+ * unmodified and in its entirety in all distributions of the software,
+ * modified or unmodified, in source code or in binary form.
+ *
* Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
* All rights reserved.
*
#include <iomanip>
#include <iostream>
+#include "mem/packet.hh"
+
class WriteMask;
class DataBlock
uint8_t *getDataMod(int offset);
void setByte(int whichByte, uint8_t data);
void setData(const uint8_t *data, int offset, int len);
+ void setData(PacketPtr pkt);
void copyPartial(const DataBlock &dblk, int offset, int len);
void copyPartial(const DataBlock &dblk, const WriteMask &mask);
void atomicPartial(const DataBlock & dblk, const WriteMask & mask);
/*
+ * Copyright (c) 2021 ARM Limited
+ * All rights reserved.
+ *
+ * The license below extends only to copyright in the software and shall
+ * not be construed as granting a license to any other intellectual
+ * property including but not limited to intellectual property relating
+ * to a hardware implementation of the functionality of the software
+ * licensed hereunder. You may use the software subject to the license
+ * terms below provided that you ensure that this notice is replicated
+ * unmodified and in its entirety in all distributions of the software,
+ * modified or unmodified, in source code or in binary form.
+ *
* Copyright (c) 2008 Mark D. Hill and David A. Wood
* All rights reserved.
*
int len = pkt->getSize();
bool write = pkt->isWrite();
+ // Should DMA be allowed to generate this ?
+ assert(!pkt->isMaskedWrite());
+
assert(m_outstanding_count < m_max_outstanding_requests);
Addr line_addr = makeLineAddress(paddr);
auto emplace_pair =
/*
- * Copyright (c) 2019-2020 ARM Limited
+ * Copyright (c) 2019-2021 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
// update the data unless it is a non-data-carrying flush
if (RubySystem::getWarmupEnabled()) {
- data.setData(pkt->getConstPtr<uint8_t>(),
- getOffset(request_address), pkt->getSize());
+ data.setData(pkt);
} else if (!pkt->isFlush()) {
if ((type == RubyRequestType_LD) ||
(type == RubyRequestType_IFETCH) ||
data.getData(getOffset(request_address), pkt->getSize()));
DPRINTF(RubySequencer, "read data %s\n", data);
} else if (pkt->req->isSwap()) {
+ assert(!pkt->isMaskedWrite());
std::vector<uint8_t> overwrite_val(pkt->getSize());
pkt->writeData(&overwrite_val[0]);
pkt->setData(
} else if (type != RubyRequestType_Store_Conditional || llscSuccess) {
// Types of stores set the actual data here, apart from
// failed Store Conditional requests
- data.setData(pkt->getConstPtr<uint8_t>(),
- getOffset(request_address), pkt->getSize());
+ data.setData(pkt);
DPRINTF(RubySequencer, "set data %s\n", data);
}
}