From 7cd49b24d2523eaf21179946e291c46c6acf5bfc Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 19 Feb 2013 05:56:06 -0500 Subject: 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. --- src/mem/coherent_bus.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mem/coherent_bus.cc') diff --git a/src/mem/coherent_bus.cc b/src/mem/coherent_bus.cc index f74ca48e9..409f69229 100644 --- a/src/mem/coherent_bus.cc +++ b/src/mem/coherent_bus.cc @@ -55,9 +55,9 @@ #include "sim/system.hh" CoherentBus::CoherentBus(const CoherentBusParams *p) - : BaseBus(p), reqLayer(*this, ".reqLayer", p->clock), - respLayer(*this, ".respLayer", p->clock), - snoopRespLayer(*this, ".snoopRespLayer", p->clock), + : BaseBus(p), reqLayer(*this, ".reqLayer"), + respLayer(*this, ".respLayer"), + snoopRespLayer(*this, ".snoopRespLayer"), system(p->system) { // create the ports based on the size of the master and slave -- cgit v1.2.3