clock_domain.hh (10905:a6ca6831e775) clock_domain.hh (11009:32e374b7cbdb)
1/*
2 * Copyright (c) 2013-2014 ARM Limited
3 * Copyright (c) 2013 Cornell University
4 * All rights reserved
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

--- 48 unchanged lines hidden (view full) ---

57#include "params/SrcClockDomain.hh"
58#include "sim/sim_object.hh"
59
60/**
61 * Forward declaration
62 */
63class DerivedClockDomain;
64class VoltageDomain;
1/*
2 * Copyright (c) 2013-2014 ARM Limited
3 * Copyright (c) 2013 Cornell University
4 * All rights reserved
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

--- 48 unchanged lines hidden (view full) ---

57#include "params/SrcClockDomain.hh"
58#include "sim/sim_object.hh"
59
60/**
61 * Forward declaration
62 */
63class DerivedClockDomain;
64class VoltageDomain;
65class ClockedObject;
65class Clocked;
66
67/**
68 * The ClockDomain provides clock to group of clocked objects bundled
69 * under the same clock domain. The clock domains, in turn, are
70 * grouped into voltage domains. The clock domains provide support for
71 * a hierarchial structure with source and derived domains.
72 */
73class ClockDomain : public SimObject

--- 24 unchanged lines hidden (view full) ---

98 * changes.
99 */
100 std::vector<DerivedClockDomain*> children;
101
102 /**
103 * Pointers to members of this clock domain, so that when the clock
104 * period changes, we can update each member's tick.
105 */
66
67/**
68 * The ClockDomain provides clock to group of clocked objects bundled
69 * under the same clock domain. The clock domains, in turn, are
70 * grouped into voltage domains. The clock domains provide support for
71 * a hierarchial structure with source and derived domains.
72 */
73class ClockDomain : public SimObject

--- 24 unchanged lines hidden (view full) ---

98 * changes.
99 */
100 std::vector<DerivedClockDomain*> children;
101
102 /**
103 * Pointers to members of this clock domain, so that when the clock
104 * period changes, we can update each member's tick.
105 */
106 std::vector<ClockedObject*> members;
106 std::vector<Clocked *> members;
107
108 public:
109
110 typedef ClockDomainParams Params;
111 ClockDomain(const Params *p, VoltageDomain *voltage_domain) :
112 SimObject(p),
113 _clockPeriod(0),
114 _voltageDomain(voltage_domain) {}
115
116 void regStats();
117
118 /**
119 * Get the clock period.
120 *
121 * @return Clock period in ticks
122 */
123 Tick clockPeriod() const { return _clockPeriod; }
124
125 /**
107
108 public:
109
110 typedef ClockDomainParams Params;
111 ClockDomain(const Params *p, VoltageDomain *voltage_domain) :
112 SimObject(p),
113 _clockPeriod(0),
114 _voltageDomain(voltage_domain) {}
115
116 void regStats();
117
118 /**
119 * Get the clock period.
120 *
121 * @return Clock period in ticks
122 */
123 Tick clockPeriod() const { return _clockPeriod; }
124
125 /**
126 * Register a ClockedObject to this ClockDomain.
126 * Register a Clocked object with this ClockDomain.
127 *
127 *
128 * @param ClockedObject to add as a member
128 * @param Clocked to add as a member
129 */
129 */
130 void registerWithClockDomain(ClockedObject *c)
130 void registerWithClockDomain(Clocked *c)
131 {
132 assert(c != NULL);
133 assert(std::find(members.begin(), members.end(), c) == members.end());
134 members.push_back(c);
135 }
136
137 /**
138 * Get the voltage domain.

--- 166 unchanged lines hidden ---
131 {
132 assert(c != NULL);
133 assert(std::find(members.begin(), members.end(), c) == members.end());
134 members.push_back(c);
135 }
136
137 /**
138 * Get the voltage domain.

--- 166 unchanged lines hidden ---