diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2013-02-19 05:56:06 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2013-02-19 05:56:06 -0500 |
commit | 7cd49b24d2523eaf21179946e291c46c6acf5bfc (patch) | |
tree | 91c066608dfb6e4ca52dd25e91a61719848d64a7 /src/mem/bus.hh | |
parent | 5c7ebee434a0328802c01b38c19845c50ae75cab (diff) | |
download | gem5-7cd49b24d2523eaf21179946e291c46c6acf5bfc.tar.xz |
sim: Make clock private and access using clockPeriod()
This patch makes the clock member private to the ClockedObject and
forces all children to access it using clockPeriod(). This makes it
impossible to inadvertently change the clock, and also makes it easier
to transition to a situation where the clock is derived from e.g. a
clock domain, or through a multiplier.
Diffstat (limited to 'src/mem/bus.hh')
-rw-r--r-- | src/mem/bus.hh | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mem/bus.hh b/src/mem/bus.hh index 59dabbfe4..015bb51a0 100644 --- a/src/mem/bus.hh +++ b/src/mem/bus.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012 ARM Limited + * Copyright (c) 2011-2013 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -105,9 +105,8 @@ class BaseBus : public MemObject * * @param _bus the bus this layer belongs to * @param _name the layer's name - * @param _clock clock period in ticks */ - Layer(BaseBus& _bus, const std::string& _name, Tick _clock); + Layer(BaseBus& _bus, const std::string& _name); /** * Drain according to the normal semantics, so that the bus @@ -203,9 +202,6 @@ class BaseBus : public MemObject /** track the state of the bus layer */ State state; - /** the clock speed for the bus layer */ - Tick clock; - /** manager to signal when drained */ DrainManager *drainManager; |