core.hh (4123:9c80390ea1bb) | core.hh (4167:ce5d0f62f13b) |
---|---|
1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 15 unchanged lines hidden (view full) --- 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Nathan Binkert 29 * Steve Reinhardt 30 */ 31 | 1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 15 unchanged lines hidden (view full) --- 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Nathan Binkert 29 * Steve Reinhardt 30 */ 31 |
32#include <Python.h> | 32#ifndef __SIM_CORE_HH__ 33#define __SIM_CORE_HH__ 34 |
33#include <string> 34 | 35#include <string> 36 |
35#include "base/callback.hh" | 37#include "sim/host.hh" |
36 | 38 |
39/// The universal simulation clock. 40extern Tick curTick; 41const Tick retryTime = 1000; 42 43namespace Clock { 44/// The simulated frequency of curTick. 45extern Tick Frequency; 46 47namespace Float { 48extern double s; 49extern double ms; 50extern double us; 51extern double ns; 52extern double ps; 53 54extern double Hz; 55extern double kHz; 56extern double MHz; 57extern double GHZ; 58/* namespace Float */ } 59 60namespace Int { 61extern Tick s; 62extern Tick ms; 63extern Tick us; 64extern Tick ns; 65extern Tick ps; 66/* namespace Int */ } 67/* namespace Clock */ } 68 69void setClockFrequency(Tick ticksPerSecond); 70 71/// Output stream for simulator messages (e.g., cprintf()). Also used 72/// as default stream for tracing and DPRINTF() messages (unless 73/// overridden with trace:file option). 74extern std::ostream *outputStream; 75void setOutputFile(const std::string &file); |
|
37void setOutputDir(const std::string &dir); 38 | 76void setOutputDir(const std::string &dir); 77 |
78/// Output stream for configuration dump. 79extern std::ostream *configStream; 80 81struct Callback; |
|
39void registerExitCallback(Callback *callback); 40void doExitCleanup(); | 82void registerExitCallback(Callback *callback); 83void doExitCleanup(); |
84 85#endif /* __SIM_CORE_HH__ */ |
|