clocked_object.hh (9356:b279bad40aa3) | clocked_object.hh (9418:9923a5ab8c13) |
---|---|
1/* 2 * Copyright (c) 2012 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 32 unchanged lines hidden (view full) --- 41 * @file 42 * ClockedObject declaration and implementation. 43 */ 44 45#ifndef __SIM_CLOCKED_OBJECT_HH__ 46#define __SIM_CLOCKED_OBJECT_HH__ 47 48#include "base/intmath.hh" | 1/* 2 * Copyright (c) 2012 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 32 unchanged lines hidden (view full) --- 41 * @file 42 * ClockedObject declaration and implementation. 43 */ 44 45#ifndef __SIM_CLOCKED_OBJECT_HH__ 46#define __SIM_CLOCKED_OBJECT_HH__ 47 48#include "base/intmath.hh" |
49#include "base/misc.hh" |
|
49#include "params/ClockedObject.hh" 50#include "sim/core.hh" 51#include "sim/sim_object.hh" 52 53/** 54 * The ClockedObject class extends the SimObject with a clock and 55 * accessor functions to relate ticks to the cycles of the object. 56 */ --- 51 unchanged lines hidden (view full) --- 108 Tick clock; 109 110 /** 111 * Create a clocked object and set the clock based on the 112 * parameters. 113 */ 114 ClockedObject(const ClockedObjectParams* p) : 115 SimObject(p), tick(0), cycle(0), clock(p->clock) | 50#include "params/ClockedObject.hh" 51#include "sim/core.hh" 52#include "sim/sim_object.hh" 53 54/** 55 * The ClockedObject class extends the SimObject with a clock and 56 * accessor functions to relate ticks to the cycles of the object. 57 */ --- 51 unchanged lines hidden (view full) --- 109 Tick clock; 110 111 /** 112 * Create a clocked object and set the clock based on the 113 * parameters. 114 */ 115 ClockedObject(const ClockedObjectParams* p) : 116 SimObject(p), tick(0), cycle(0), clock(p->clock) |
116 { } | 117 { 118 if (clock == 0) { 119 fatal("%s has a clock period of zero\n", name()); 120 } 121 } |
117 118 /** 119 * Virtual destructor due to inheritance. 120 */ 121 virtual ~ClockedObject() { } 122 123 /** 124 * Reset the object's clock using the current global tick value. Likely --- 63 unchanged lines hidden --- | 122 123 /** 124 * Virtual destructor due to inheritance. 125 */ 126 virtual ~ClockedObject() { } 127 128 /** 129 * Reset the object's clock using the current global tick value. Likely --- 63 unchanged lines hidden --- |