OpenASIP  2.0
SimulatorConstants.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file SimulatorConstants.hh
26  *
27  * Definitions of constants and types used in simulator engine and its
28  * user interfaces.
29  *
30  * @author Pekka Jääskeläinen 2005 (pjaaskel-no.spam-cs.tut.fi)
31  * @note This file is used in compiled simulation. Keep dependencies *clean*
32  * @note rating: red
33  */
34 
35 #ifndef HH_SIMULATOR_CONSTANTS
36 #define HH_SIMULATOR_CONSTANTS
37 
38 #include "BaseType.hh"
39 //#include <stdint.h>
40 
41 /// The command prompt of the simulator interpreter.
42 #define SIM_COMMAND_PROMPT "(ttasim) "
43 
44 /// The command used to quit the command line interface.
45 #define SIM_INTERP_QUIT_COMMAND "quit"
46 
47 /// The initialization script file name.
48 #define SIM_INIT_FILE_NAME ".ttasim-init"
49 
50 /// The default command log file name.
51 #define SIM_DEFAULT_COMMAND_LOG ".ttasim-history"
52 
53 /// The full title name of the CLI application
54 #define SIM_CLI_TITLE "ttasim - TTA simulator command line interface"
55 
56 /// Alias for ClockCycleCount.
58 
59 /// The reasons to stop simulation.
60 enum StopReason {
61  SRE_AFTER_STEPPING, ///< Stopped after stepping the given count.
62  SRE_AFTER_UNTIL, ///< Stopped after running to the wanted
63  SRE_AFTER_TIMEOUT, ///< Stopped after simulation timeout
64  /// instruction.
65  SRE_BREAKPOINT, ///< Stopped because of at least one breakpoint
66  SRE_USER_REQUESTED, ///< User requested the simulation to stop
67  /// explicitly, e.g., by pressing ctrl-c in the CLI.
68  SRE_RUNTIME_ERROR ///< A fatal runtime error occured in the simulated
69  /// program.
70 };
71 
72 #endif
BaseType.hh
SRE_USER_REQUESTED
@ SRE_USER_REQUESTED
User requested the simulation to stop explicitly, e.g., by pressing ctrl-c in the CLI.
Definition: SimulatorConstants.hh:66
SRE_AFTER_TIMEOUT
@ SRE_AFTER_TIMEOUT
Stopped after simulation timeout instruction.
Definition: SimulatorConstants.hh:63
StopReason
StopReason
The reasons to stop simulation.
Definition: SimulatorConstants.hh:60
SRE_RUNTIME_ERROR
@ SRE_RUNTIME_ERROR
A fatal runtime error occured in the simulated program.
Definition: SimulatorConstants.hh:68
SRE_BREAKPOINT
@ SRE_BREAKPOINT
Stopped because of at least one breakpoint.
Definition: SimulatorConstants.hh:65
SRE_AFTER_UNTIL
@ SRE_AFTER_UNTIL
Stopped after running to the wanted.
Definition: SimulatorConstants.hh:62
CycleCount
long long CycleCount
Type for storing simulation cycle counts.
Definition: BaseType.hh:187
SRE_AFTER_STEPPING
@ SRE_AFTER_STEPPING
Stopped after stepping the given count.
Definition: SimulatorConstants.hh:61
ClockCycleCount
CycleCount ClockCycleCount
Alias for ClockCycleCount.
Definition: SimulatorConstants.hh:57