Rename port methods:
sendBlockSizeQuery() -> peerBlockSize() recvBlockSizeQuery() -> deviceBlockSize() After seeing how this gets used in practice, the send/recv*Query names just don't make a lot of sense. dev/io_device.cc: mem/port.cc: sendBlockSizeQuery() -> peerBlockSize() mem/port.hh: sendBlockSizeQuery() -> peerBlockSize() recvBlockSizeQuery() -> deviceBlockSize() --HG-- extra : convert_revision : e96349fb443979b85899a5248bd7cd8665e23ef0
This commit is contained in:
parent
8a753f6ae2
commit
00264ff1b8
3 changed files with 9 additions and 5 deletions
|
@ -98,7 +98,8 @@ DmaPort::dmaAction(Memory::Command cmd, DmaPort port, Addr addr, int size,
|
||||||
|
|
||||||
completionEvent = event;
|
completionEvent = event;
|
||||||
|
|
||||||
for (ChunkGenerator gen(addr, size, sendBlockSizeQuery()); !gen.done(); gen.next()) {
|
for (ChunkGenerator gen(addr, size, peerBlockSize());
|
||||||
|
!gen.done(); gen.next()) {
|
||||||
Packet *pkt = new Packet(basePkt);
|
Packet *pkt = new Packet(basePkt);
|
||||||
Request *req = new Request(baseReq);
|
Request *req = new Request(baseReq);
|
||||||
pkt->addr = gen.addr();
|
pkt->addr = gen.addr();
|
||||||
|
|
|
@ -41,8 +41,8 @@ Port::blobHelper(Addr addr, uint8_t *p, int size, Command cmd)
|
||||||
pkt.req = &rqst;
|
pkt.req = &rqst;
|
||||||
pkt.cmd = cmd;
|
pkt.cmd = cmd;
|
||||||
|
|
||||||
for (ChunkGenerator gen(addr, size, sendBlockSizeQuery()); !gen.done(); gen.next())
|
for (ChunkGenerator gen(addr, size, peerBlockSize());
|
||||||
{
|
!gen.done(); gen.next()) {
|
||||||
pkt.addr = rqst.paddr = gen.addr();
|
pkt.addr = rqst.paddr = gen.addr();
|
||||||
pkt.size = rqst.size = gen.size();
|
pkt.size = rqst.size = gen.size();
|
||||||
pkt.data = p;
|
pkt.data = p;
|
||||||
|
|
|
@ -86,6 +86,9 @@ class Port
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
/** These functions are protected because they should only be
|
||||||
|
* called by a peer port, never directly by any outside object. */
|
||||||
|
|
||||||
/** Called to recive a timing call from the peer port. */
|
/** Called to recive a timing call from the peer port. */
|
||||||
virtual bool recvTiming(Packet &pkt) = 0;
|
virtual bool recvTiming(Packet &pkt) = 0;
|
||||||
|
|
||||||
|
@ -109,7 +112,7 @@ class Port
|
||||||
this function to be called, a DMA interface doesn't really have a
|
this function to be called, a DMA interface doesn't really have a
|
||||||
block size, so it is defaulted to a panic.
|
block size, so it is defaulted to a panic.
|
||||||
*/
|
*/
|
||||||
virtual int recvBlockSizeQuery() { panic("??"); }
|
virtual int deviceBlockSize() { panic("??"); }
|
||||||
|
|
||||||
/** The peer port is requesting us to reply with a list of the ranges we
|
/** The peer port is requesting us to reply with a list of the ranges we
|
||||||
are responsible for.
|
are responsible for.
|
||||||
|
@ -164,7 +167,7 @@ class Port
|
||||||
/** Called by the associated device if it wishes to find out the blocksize
|
/** Called by the associated device if it wishes to find out the blocksize
|
||||||
of the device on attached to the peer port.
|
of the device on attached to the peer port.
|
||||||
*/
|
*/
|
||||||
int sendBlockSizeQuery() { return peer->recvBlockSizeQuery(); }
|
int peerBlockSize() { return peer->deviceBlockSize(); }
|
||||||
|
|
||||||
/** Called by the associated device if it wishes to find out the address
|
/** Called by the associated device if it wishes to find out the address
|
||||||
ranges connected to the peer ports devices.
|
ranges connected to the peer ports devices.
|
||||||
|
|
Loading…
Reference in a new issue