From 4c92708b48d51bfb6592ff48925f5a7a0157da5b Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Wed, 25 Apr 2012 10:41:23 -0400 Subject: MEM: Add the PortId type and a corresponding id field to Port This patch introduces the PortId type, moves the definition of INVALID_PORT_ID to the Port class, and also gives every port an id to reflect the fact that each element in a vector port has an identifier/index. Previously the bus and Ruby testers (and potentially other users of the vector ports) added the id field in their port subclasses, and now this functionality is always present as it is moved to the base class. --- src/cpu/testers/directedtest/RubyDirectedTester.hh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/cpu/testers/directedtest/RubyDirectedTester.hh') diff --git a/src/cpu/testers/directedtest/RubyDirectedTester.hh b/src/cpu/testers/directedtest/RubyDirectedTester.hh index bd0b52a90..08b034d3f 100644 --- a/src/cpu/testers/directedtest/RubyDirectedTester.hh +++ b/src/cpu/testers/directedtest/RubyDirectedTester.hh @@ -54,12 +54,10 @@ class RubyDirectedTester : public MemObject public: CpuPort(const std::string &_name, RubyDirectedTester *_tester, - uint32_t _idx) - : MasterPort(_name, _tester), tester(_tester), idx(_idx) + Port::PortId _id) + : MasterPort(_name, _tester, _id), tester(_tester) {} - uint32_t idx; - protected: virtual bool recvTiming(PacketPtr pkt); virtual void recvRetry() -- cgit v1.2.3