1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * Copyright (c) 2011 Advanced Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 19 unchanged lines hidden (view full) --- 28 * 29 * Authors: Nathan Binkert 30 * Steve Reinhardt 31 * Gabe Black 32 */ 33 34#include "base/misc.hh" 35#include "debug/TimeSync.hh" |
36#include "sim/full_system.hh" |
37#include "sim/root.hh" 38 39Root *Root::_root = NULL; 40 41/* 42 * This function is called periodically by an event in M5 and ensures that 43 * at least as much real time has passed between invocations as simulated time. 44 * If not, the function either sleeps, or if the difference is small enough --- 74 unchanged lines hidden (view full) --- 119} 120 121void 122Root::loadState(Checkpoint *cp) 123{ 124 timeSyncEnable(params()->time_sync_enable); 125} 126 |
127bool FullSystem; 128 |
129Root * 130RootParams::create() 131{ 132 static bool created = false; 133 if (created) 134 panic("only one root object allowed!"); 135 136 created = true; 137 |
138 FullSystem = full_system; 139 |
140 return new Root(this); 141} |