diff options
author | Gabe Black <gabeblack@google.com> | 2019-03-22 14:23:21 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-03-26 18:17:09 +0000 |
commit | 599d2c91f88ba74098a917eb0b7f901add49276a (patch) | |
tree | 7018c702b25b008893d97959aa7ead613f2d6462 /src/mem/noncoherent_xbar.hh | |
parent | fcc4c4fed945d0575d40fe314573a2081d66b2ee (diff) | |
download | gem5-599d2c91f88ba74098a917eb0b7f901add49276a.tar.xz |
mem: Clean up the xbars a little.
Get rid of comments which just restate the code, get rid of redundant
"virtual" keywords, add "override"s, fix style, and get rid of
xbar::init which was empty and hiding the parent class init.
Change-Id: I8ce20abee340baa88084d142f2fb8c633ee54ba9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17592
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/mem/noncoherent_xbar.hh')
-rw-r--r-- | src/mem/noncoherent_xbar.hh | 99 |
1 files changed, 41 insertions, 58 deletions
diff --git a/src/mem/noncoherent_xbar.hh b/src/mem/noncoherent_xbar.hh index 4ff1ec4fc..9d4efbee2 100644 --- a/src/mem/noncoherent_xbar.hh +++ b/src/mem/noncoherent_xbar.hh @@ -104,30 +104,29 @@ class NoncoherentXBar : public BaseXBar protected: - /** - * When receiving a timing request, pass it to the crossbar. - */ - virtual bool recvTimingReq(PacketPtr pkt) - { return xbar.recvTimingReq(pkt, id); } - - /** - * When receiving an atomic request, pass it to the crossbar. - */ - virtual Tick recvAtomic(PacketPtr pkt) - { return xbar.recvAtomic(pkt, id); } - - /** - * When receiving a functional request, pass it to the crossbar. - */ - virtual void recvFunctional(PacketPtr pkt) - { xbar.recvFunctional(pkt, id); } - - /** - * Return the union of all adress ranges seen by this crossbar. - */ - virtual AddrRangeList getAddrRanges() const - { return xbar.getAddrRanges(); } - + bool + recvTimingReq(PacketPtr pkt) override + { + return xbar.recvTimingReq(pkt, id); + } + + Tick + recvAtomic(PacketPtr pkt) override + { + return xbar.recvAtomic(pkt, id); + } + + void + recvFunctional(PacketPtr pkt) override + { + xbar.recvFunctional(pkt, id); + } + + AddrRangeList + getAddrRanges() const override + { + return xbar.getAddrRanges(); + } }; /** @@ -151,42 +150,29 @@ class NoncoherentXBar : public BaseXBar protected: - /** - * When receiving a timing response, pass it to the crossbar. - */ - virtual bool recvTimingResp(PacketPtr pkt) - { return xbar.recvTimingResp(pkt, id); } - - /** When reciving a range change from the peer port (at id), - pass it to the crossbar. */ - virtual void recvRangeChange() - { xbar.recvRangeChange(id); } - - /** When reciving a retry from the peer port (at id), - pass it to the crossbar. */ - virtual void recvReqRetry() - { xbar.recvReqRetry(id); } - + bool + recvTimingResp(PacketPtr pkt) override + { + return xbar.recvTimingResp(pkt, id); + } + + void + recvRangeChange() override + { + xbar.recvRangeChange(id); + } + + void + recvReqRetry() override + { + xbar.recvReqRetry(id); + } }; - /** Function called by the port when the crossbar is recieving a Timing - request packet.*/ virtual bool recvTimingReq(PacketPtr pkt, PortID slave_port_id); - - /** Function called by the port when the crossbar is recieving a Timing - response packet.*/ virtual bool recvTimingResp(PacketPtr pkt, PortID master_port_id); - - /** Timing function called by port when it is once again able to process - * requests. */ void recvReqRetry(PortID master_port_id); - - /** Function called by the port when the crossbar is recieving a Atomic - transaction.*/ Tick recvAtomic(PacketPtr pkt, PortID slave_port_id); - - /** Function called by the port when the crossbar is recieving a Functional - transaction.*/ void recvFunctional(PacketPtr pkt, PortID slave_port_id); public: @@ -195,10 +181,7 @@ class NoncoherentXBar : public BaseXBar virtual ~NoncoherentXBar(); - /** - * stats - */ - virtual void regStats(); + void regStats() override; Stats::Scalar totPktSize; }; |