OpenASIP  2.0
SettingCommand.cc
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2010 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 SettingCommand.cc
26  *
27  * Implementation of SettingCommand class
28  *
29  * @author Pekka Jääskeläinen 2005, 2010
30  * @note rating: red
31  */
32 
33 #include "SettingCommand.hh"
34 
35 #include <iostream>
36 #include <iomanip>
37 
38 #include "SimulatorToolbox.hh"
39 #include "SimulatorFrontend.hh"
40 #include "SimulatorInterpreter.hh"
41 #include "MapTools.hh"
42 #include "StringTools.hh"
43 #include "FileSystem.hh"
44 
45 /**
46  * Setting action that sets the execution trace of simulation.
47  */
49 public:
50 
51  /**
52  * Sets the execution trace of the simulation.
53  *
54  * @param simFront SimulatorFrontend to set the execution trace for.
55  * @param newValue Value to set.
56  * @return True if setting was successful.
57  */
58  static bool execute(
59  SimulatorInterpreter&, SimulatorFrontend& simFront, bool newValue) {
60  simFront.setExecutionTracing(newValue);
61  return true;
62  }
63 
64  /**
65  * Returns the default value of this setting.
66  *
67  * @return The default value.
68  */
69  static const DataObject& defaultValue() {
70  static const DataObject defaultValue_("0");
71  return defaultValue_;
72  }
73 
74  /**
75  * Should the action warn if program & machine exist and value was changed
76  *
77  * @return boolean value on whether or not to warn
78  */
80  return true;
81  }
82 };
83 
84 /**
85  * Setting action that sets the execution trace of simulation.
86  */
87 class SetBusTrace {
88 public:
89 
90  /**
91  * Sets the execution trace of the simulation.
92  *
93  * @param simFront SimulatorFrontend to set the bus trace for.
94  * @param newValue Value to set.
95  * @return True if setting was successful.
96  */
97  static bool execute(
98  SimulatorInterpreter&, SimulatorFrontend& simFront, bool newValue) {
99  simFront.setBusTracing(newValue);
100  return true;
101  }
102 
103  /**
104  * Returns the default value of this setting.
105  *
106  * @return The default value.
107  */
108  static const DataObject& defaultValue() {
109  static const DataObject defaultValue_("0");
110  return defaultValue_;
111  }
112 
113  /**
114  * Should the action warn if program & machine exist and value was changed
115  *
116  * @return boolean value on whether or not to warn
117  */
119  return true;
120  }
121 };
122 
123 /**
124  * Setting action that sets the register file access tracking of simulation.
125  */
127 public:
128 
129  /**
130  * Sets the register file access tracking of simulation.
131  *
132  * @param simFront SimulatorFrontend to set the tracking for.
133  * @param newValue Value to set.
134  * @return True if setting was successful.
135  */
136  static bool execute(
137  SimulatorInterpreter&, SimulatorFrontend& simFront, bool newValue) {
138  simFront.setRFAccessTracing(newValue);
139  return true;
140  }
141 
142  /**
143  * Returns the default value of this setting.
144  *
145  * @return The default value.
146  */
147  static const DataObject& defaultValue() {
148  static const DataObject defaultValue_("0");
149  return defaultValue_;
150  }
151 
152  /**
153  * Should the action warn if program & machine exist and value was changed
154  *
155  * @return boolean value on whether or not to warn
156  */
158  return true;
159  }
160 };
161 
162 /**
163  * Setting action that sets the profile data saving.
164  */
166 public:
167 
168  /**
169  * Sets the profile data saving.
170  *
171  * @param simFront SimulatorFrontend to set the profile data saving for.
172  * @param newValue Value to set.
173  * @return True if setting was successful.
174  */
175  static bool execute(
176  SimulatorInterpreter&, SimulatorFrontend& simFront, bool newValue) {
177  simFront.setProfileDataSaving(newValue);
178  return true;
179  }
180 
181  /**
182  * Returns the default value of this setting.
183  *
184  * @return The default value.
185  */
186  static const DataObject& defaultValue() {
187  static const DataObject defaultValue_("0");
188  return defaultValue_;
189  }
190 
191  /**
192  * Should the action warn if program & machine exist and value was changed
193  *
194  * @return boolean value on whether or not to warn
195  */
197  return false;
198  }
199 };
200 
201 /**
202  * Setting action that sets the FU resource conflict detection.
203  */
205 public:
206 
207  /**
208  * Sets the FU resource conflict detection.
209  *
210  * @param simFront SimulatorFrontend to set the detection for.
211  * @param newValue Value to set.
212  * @return True if setting was successful.
213  */
214  static bool execute(
215  SimulatorInterpreter&, SimulatorFrontend& simFront, bool newValue) {
216  simFront.setFUResourceConflictDetection(newValue);
217  return true;
218  }
219 
220  /**
221  * Returns the default value of this setting.
222  *
223  * @return The default value.
224  */
225  static const DataObject& defaultValue() {
226  static const DataObject defaultValue_("1");
227  return defaultValue_;
228  }
229 
230  /**
231  * Should the action warn if program & machine exist and value was changed
232  *
233  * @return boolean value on whether or not to warn
234  */
236  return false;
237  }
238 };
239 
240 /**
241  * Setting action that sets the printing of the next executed instruction
242  * when simulation stops.
243  */
245 public:
246 
247  /**
248  * Sets the next instruction printing.
249  *
250  * @param simFront SimulatorFrontend to set the detection for.
251  * @param newValue Value to set.
252  * @return True if setting was successful.
253  */
254  static bool execute(
255  SimulatorInterpreter&, SimulatorFrontend& simFront, bool newValue) {
256  simFront.setNextInstructionPrinting(newValue);
257  return true;
258  }
259 
260  /**
261  * Returns the default value of this setting.
262  *
263  * @return The default value.
264  */
265  static const DataObject& defaultValue() {
266  static const DataObject defaultValue_("1");
267  return defaultValue_;
268  }
269 
270  /**
271  * Should the action warn if program & machine exist and value was changed
272  *
273  * @return boolean value on whether or not to warn
274  */
276  return false;
277  }
278 };
279 
280 /**
281  * Setting action that sets the simulation time statistics.
282  *
283  */
285 public:
286  /** Sets the time statistics.
287  *
288  * @param simFront SimulatorFrontend to set the time statistics for.
289  * @param newValue Value to setting
290  * @return True if setting was successful.
291  */
292  static bool execute(
293  SimulatorInterpreter&, SimulatorFrontend& simFront, bool newValue) {
294  simFront.setSimulationTimeStatistics(newValue);
295  return true;
296  }
297 
298  /**
299  * Returns the default value of this setting.
300  *
301  * @return The default value.
302  */
303  static const DataObject& defaultValue() {
304  static const DataObject defaultValue_("0");
305  return defaultValue_;
306  }
307 
308  /**
309  * Should the action warn if program & machine exist and value was changed
310  *
311  * @return boolean value on whether or not to warn
312  */
314  return false;
315  }
316 };
317 
318 /**
319  * Setting action that sets the simulation timeout
320  *
321  */
323 public:
324  /** Sets the simulation timeout in seconds
325  *
326  * @param simFront SimulatorFrontend to set the timeout for.
327  * @param newValue Value to setting
328  * @return True if setting was successful.
329  */
330  static bool execute(
332  SimulatorFrontend& simFront,
333  unsigned int newValue) {
334  simFront.setTimeout(newValue);
335  return true;
336  }
337 
338  /**
339  * Returns the default value of this setting.
340  *
341  * @return The default value.
342  */
343  static const DataObject& defaultValue() {
344  static const DataObject defaultValue_("0");
345  return defaultValue_;
346  }
347 
348  /**
349  * Should the action warn if program & machine exist and value was changed
350  *
351  * @return boolean value on whether or not to warn
352  */
354  return false;
355  }
356 };
357 
358 /**
359  * Setting action that sets the static compilation flag
360  *
361  */
363 public:
364  /** Sets the static compilation flag
365  *
366  * @param simFront SimulatorFrontend to set the flag for.
367  * @param newValue Value to setting
368  * @return True if setting was successful.
369  */
370  static bool execute(
372  SimulatorFrontend& simFront,
373  unsigned int newValue) {
374  simFront.setStaticCompilation(newValue);
375  return true;
376  }
377 
378  /**
379  * Returns the default value of this setting.
380  *
381  * @return The default value.
382  */
383  static const DataObject& defaultValue() {
384  static const DataObject defaultValue_("1");
385  return defaultValue_;
386  }
387 
388  /**
389  * Should the action warn if program & machine exist and value was changed
390  *
391  * @return boolean value on whether or not to warn
392  */
394  return true;
395  }
396 };
397 
398 /**
399  * Setting action that sets the utilization data saving.
400  */
402 public:
403 
404  /**
405  * Sets the utilization data saving.
406  *
407  * @param simFront SimulatorFrontend to set the utilization data saving
408  * for.
409  * @param newValue Value to set.
410  * @return True if setting was successful.
411  */
412  static bool execute(
413  SimulatorInterpreter&, SimulatorFrontend& simFront, bool newValue) {
414  simFront.setUtilizationDataSaving(newValue);
415  return true;
416  }
417 
418  /**
419  * Returns the default value of this setting.
420  *
421  * @return The default value.
422  */
423  static const DataObject& defaultValue() {
424  static const DataObject defaultValue_("0");
425  return defaultValue_;
426  }
427 
428  /**
429  * Should the action warn if program & machine exist and value was changed
430  *
431  * @return boolean value on whether or not to warn
432  */
434  return false;
435  }
436 };
437 
438 
439 /**
440  * Setting action that sets the command history file name.
441  */
443 public:
444 
445  /**
446  * Sets the command history file name.
447  *
448  * @param interpreter To set the history file name for.
449  * @param newValue Value to set.
450  * @return True if setting was successful.
451  */
452  static bool execute(
453  SimulatorInterpreter& interpreter,
455  const std::string& newValue) {
456  if (!(FileSystem::fileIsCreatable(newValue) ||
457  FileSystem::fileIsWritable(newValue)) ||
458  FileSystem::fileIsDirectory(newValue)) {
459  interpreter.lineReader()->outputStream()
460  << "Could not open file for writing." << std::endl;
461  return false;
462  }
463  interpreter.lineReader()->setInputHistoryLog(newValue);
464  return true;
465  }
466 
467  /**
468  * Returns the default value of this setting.
469  *
470  * @return The default value.
471  */
472  static const DataObject& defaultValue() {
473  static const DataObject defaultValue_(SIM_DEFAULT_COMMAND_LOG);
474  return defaultValue_;
475  }
476 
477  /**
478  * Should the action warn if program & machine exist and value was changed
479  *
480  * @return boolean value on whether or not to warn
481  */
483  return false;
484  }
485 };
486 
487 /**
488  * Setting action that sets the command history file name.
489  */
491 public:
492 
493  /**
494  * Makes command history to be saved to a file.
495  *
496  * @param interpreter Used to set the setting.
497  * @param newValue Value to set.
498  * @return True if setting was successful.
499  */
500  static bool execute(
501  SimulatorInterpreter& interpreter,
503  bool newValue) {
504  interpreter.lineReader()->setSaveInputHistoryToFile(newValue);
505  return true;
506  }
507 
508  /**
509  * Returns the default value of this setting.
510  *
511  * @return The default value.
512  */
513  static const DataObject& defaultValue() {
514  static const DataObject defaultValue_("0");
515  return defaultValue_;
516  }
517 
518  /**
519  * Should the action warn if program & machine exist and value was changed
520  *
521  * @return boolean value on whether or not to warn
522  */
524  return false;
525  }
526 };
527 
528 /**
529  * Setting action that sets the command history file name.
530  */
532 public:
533 
534  /**
535  * Sets the command history maximum length.
536  *
537  * @param interpreter To use to set the setting.
538  * @param newValue Value to set.
539  * @return True if setting was successful.
540  */
541  static bool execute(
542  SimulatorInterpreter& interpreter,
544  unsigned int newValue) {
545  interpreter.lineReader()->setInputHistoryLength(newValue);
546  return true;
547  }
548 
549  /**
550  * Returns the default value of this setting.
551  *
552  * @return The default value.
553  */
554  static const DataObject& defaultValue() {
555  static const DataObject defaultValue_(DEFAULT_INPUT_HISTORY_SIZE);
556  return defaultValue_;
557  }
558 
559  /**
560  * Should the action warn if program & machine exist and value was changed
561  *
562  * @return boolean value on whether or not to warn
563  */
565  return false;
566  }
567 };
568 
569 /**
570  * Setting action that sets the procedure execution transfer tracing.
571  */
573 public:
574 
575  /**
576  * Sets the procedure execution transfer tracing.
577  *
578  * @param interpreter To use to set the setting.
579  * @param newValue Value to set.
580  * @return True if setting was successful.
581  */
582  static bool execute(
583  SimulatorInterpreter&, SimulatorFrontend& simFront, bool newValue) {
584  simFront.setProcedureTransferTracing(newValue);
585  return true;
586  }
587 
588  /**
589  * Returns the default value of this setting.
590  *
591  * @return The default value.
592  */
593  static const DataObject& defaultValue() {
594  static DataObject defaultValue_("0");
595  return defaultValue_;
596  }
597 
598  /**
599  * Should the action warn if program & machine exist and value was changed
600  *
601  * @return boolean value on whether or not to warn
602  */
604  return true;
605  }
606 };
607 
608 /**
609  * Setting action that sets the memory access tracking.
610  */
612 public:
613 
614  /**
615  * Sets the memory access tracking.
616  *
617  * @param interpreter To use to set the setting.
618  * @param newValue Value to set.
619  * @return True if setting was successful.
620  */
621  static bool execute(
622  SimulatorInterpreter&, SimulatorFrontend& simFront, bool newValue) {
623  simFront.setMemoryAccessTracking(newValue);
624  return true;
625  }
626 
627  /**
628  * Returns the default value of this setting.
629  *
630  * @return The default value.
631  */
632  static const DataObject& defaultValue() {
633  static DataObject defaultValue_("0");
634  return defaultValue_;
635  }
636 
637  /**
638  * Should the action warn if program & machine exist and value was changed
639  *
640  * @return boolean value on whether or not to warn
641  */
643  return false;
644  }
645 };
646 
648 public:
649  static bool execute(
651  SimulatorFrontend& simFront,
652  unsigned int newValue) {
653  simFront.setCallHistoryLength(newValue);
654  return true;
655  }
656 
657  static const DataObject& defaultValue() {
658  static const DataObject defaultValue_("0");
659  return defaultValue_;
660  }
661 
663  return false;
664  }
665 };
667  SimControlLanguageCommand("setting") {
668 
669  settings_["execution_trace"] =
670  new TemplatedSimulatorSetting<BooleanSetting, SetExecutionTrace>(
673 
674  settings_["bus_trace"] =
675  new TemplatedSimulatorSetting<BooleanSetting, SetBusTrace>(
678 
679  settings_["rf_tracking"] =
680  new TemplatedSimulatorSetting<BooleanSetting, SetRFTracking>(
683 
684  settings_["history_filename"] =
685  new TemplatedSimulatorSetting<StringSetting, SetHistoryFilename>(
688 
689  settings_["history_save"] =
690  new TemplatedSimulatorSetting<BooleanSetting, SetHistorySave>(
693 
694  settings_["history_size"] =
695  new TemplatedSimulatorSetting<PositiveIntegerSetting, SetHistorySize>(
698 
699  settings_["procedure_transfer_tracking"] =
700  new TemplatedSimulatorSetting<
701  BooleanSetting, SetProcedureTransferTracing>(
704  str());
705 
706  settings_["memory_access_tracking"] =
707  new TemplatedSimulatorSetting<
708  BooleanSetting, SetMemoryAccessTracking>(
711  str());
712 
713  settings_["utilization_data_saving"] =
714  new TemplatedSimulatorSetting<
715  BooleanSetting, SetUtilizationSaving>(
718  str());
719 
720  settings_["profile_data_saving"] =
721  new TemplatedSimulatorSetting<
722  BooleanSetting, SetProfileSaving>(
725  str());
726 
727  settings_["fu_conflict_detection"] =
728  new TemplatedSimulatorSetting<
729  BooleanSetting, SetFUConflictDetection>(
732  str());
733 
734  settings_["next_instruction_printing"] =
735  new TemplatedSimulatorSetting<
736  BooleanSetting, SetNextInstructionPrinting>(
739  str());
740 
741  settings_["simulation_time_statistics"] =
742  new TemplatedSimulatorSetting<
743  BooleanSetting, SetSimulationTimeStatistics>(
746 
747  settings_["simulation_timeout"] =
748  new TemplatedSimulatorSetting<
749  PositiveIntegerSetting, SetSimulationTimeout>(
752 
753  settings_["static_compilation"] =
754  new TemplatedSimulatorSetting<
755  BooleanSetting, SetStaticCompilation>(
758 
759  settings_["call_history_length"] =
760  new TemplatedSimulatorSetting<
761  PositiveIntegerSetting, SetCallHistoryLength>(
762  "Sets the length of last procedure transfers to save in\n"
763  "memory for call trace printing.");
764 }
765 
766 /**
767  * Destructor.
768  *
769  * Does nothing.
770  */
773 }
774 
775 /**
776  * Executes the "setting" command.
777  *
778  * Command that allows changing and listing simulator's settings.
779  * If no arguments are given, all simulator settings are listed in
780  * predefined oreder. If one argument is given, it's expected to be
781  * a simulator setting, of which current value is printed. If two
782  * arguments are given, the first argument tells the name of the setting
783  * to modify, and second argument the new value.
784  *
785  * @param arguments Read the comment.
786  * @return True in case arguments are ok.
787  * @exception NumberFormatException Is never thrown by this command.
788  * @todo Use the count for the step.
789  */
790 bool
791 SettingCommand::execute(const std::vector<DataObject>& arguments) {
792  const int argumentCount = arguments.size() -1;
793 
794  if (!checkArgumentCount(argumentCount, 0, 2)) {
795  return false;
796  }
797 
798  // no arguments given, list all the settings and their values,
799  // value types and explanations
800  if (argumentCount == 0) {
801  SettingMap::iterator i = settings_.begin();
802 
803  while (i != settings_.end()) {
804  outputStream().flags(std::ios_base::left);
805  outputStream()
806  << std::setw(30) << (*i).first
807  << std::setw(20) << (*i).second->valueAsString() << " "
808  << (*i).second->description() << std::endl;
809  ++i;
810  }
811  return true;
812  }
813 
814  SettingMap::iterator settingPosition =
815  settings_.find(
816  StringTools::stringToLower(arguments.at(1).stringValue()));
817  if (settingPosition == settings_.end()) {
821  return false;
822  }
823 
824  SimulatorSetting& setting = *((*settingPosition).second);
825 
826  // two arguments given, modify the setting
827  if (arguments.size() - 1 == 2) {
828  try {
829  if (!setting.setValue(
830  *dynamic_cast<SimulatorInterpreter*>(interpreter()),
831  simulatorFrontend(), arguments.at(2))) {
832  return false;
833  }
834  } catch (const Exception& e) {
836  return false;
837  }
838  }
839 
840  DataObject* result = new DataObject();
841  result->setString(setting.valueAsString());
842  interpreter()->setResult(result);
843  return true;
844 }
845 
846 /**
847  * Returns the help text for this command.
848  *
849  * Help text is searched from SimulatorTextGenerator.
850  *
851  * @return The help text.
852  * @todo Use SimulatorTextGenerator to get the help text.
853  */
854 std::string
858 }
CustomCommand::checkArgumentCount
bool checkArgumentCount(int argumentCount, int minimum, int maximum)
Definition: CustomCommand.cc:82
SetStaticCompilation
Definition: SettingCommand.cc:362
SimulatorFrontend::setProcedureTransferTracing
void setProcedureTransferTracing(bool value)
Definition: SimulatorFrontend.cc:1930
SetSimulationTimeStatistics::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:303
SimulatorFrontend::setMemoryAccessTracking
void setMemoryAccessTracking(bool value)
Definition: SimulatorFrontend.cc:2047
SimControlLanguageCommand::outputStream
virtual std::ostream & outputStream()
Definition: SimControlLanguageCommand.cc:351
FileSystem.hh
SetCallHistoryLength::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:662
SetHistorySave::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:523
SetHistoryFilename::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:482
Texts::TXT_INTERP_SETTING_MEMORY_ACCESS_TRACKING
@ TXT_INTERP_SETTING_MEMORY_ACCESS_TRACKING
Definition: SimulatorTextGenerator.hh:199
DataObject
Definition: DataObject.hh:50
SetRFTracking::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:157
SetMemoryAccessTracking::execute
static bool execute(SimulatorInterpreter &, SimulatorFrontend &simFront, bool newValue)
Definition: SettingCommand.cc:621
Texts::TXT_INTERP_SETTING_NEXT_INSTRUCTION_PRINTING
@ TXT_INTERP_SETTING_NEXT_INSTRUCTION_PRINTING
Definition: SimulatorTextGenerator.hh:149
Texts::TXT_INTERP_SETTING_RFTRACKING
@ TXT_INTERP_SETTING_RFTRACKING
Definition: SimulatorTextGenerator.hh:147
MapTools.hh
SetNextInstructionPrinting::execute
static bool execute(SimulatorInterpreter &, SimulatorFrontend &simFront, bool newValue)
Definition: SettingCommand.cc:254
SettingCommand::SettingCommand
SettingCommand()
Definition: SettingCommand.cc:666
SetCallHistoryLength::execute
static bool execute(SimulatorInterpreter &, SimulatorFrontend &simFront, unsigned int newValue)
Definition: SettingCommand.cc:649
MapTools::deleteAllValues
static void deleteAllValues(MapType &aMap)
SetHistoryFilename::execute
static bool execute(SimulatorInterpreter &interpreter, SimulatorFrontend &, const std::string &newValue)
Definition: SettingCommand.cc:452
LineReader::setInputHistoryLog
virtual void setInputHistoryLog(const std::string &historyFilename)
Definition: LineReader.cc:124
SetExecutionTrace::execute
static bool execute(SimulatorInterpreter &, SimulatorFrontend &simFront, bool newValue)
Definition: SettingCommand.cc:58
SimulatorFrontend::setStaticCompilation
void setStaticCompilation(bool value)
Definition: SimulatorFrontend.cc:1977
Texts::TXT_INTERP_SETTING_PROCEDURE_TRANSFER_TRACKING
@ TXT_INTERP_SETTING_PROCEDURE_TRANSFER_TRACKING
Definition: SimulatorTextGenerator.hh:198
SetHistorySize::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:564
SetHistorySave::execute
static bool execute(SimulatorInterpreter &interpreter, SimulatorFrontend &, bool newValue)
Definition: SettingCommand.cc:500
SetRFTracking::execute
static bool execute(SimulatorInterpreter &, SimulatorFrontend &simFront, bool newValue)
Definition: SettingCommand.cc:136
SettingCommand::SimulatorSetting::valueAsString
virtual std::string valueAsString()=0
SetProfileSaving
Definition: SettingCommand.cc:165
SetBusTrace::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:118
SetUtilizationSaving::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:433
Texts::TXT_INTERP_SETTING_HISTORY_SAVE
@ TXT_INTERP_SETTING_HISTORY_SAVE
Definition: SimulatorTextGenerator.hh:150
Texts::TextGenerator::text
virtual boost::format text(int textId)
Definition: TextGenerator.cc:94
SetFUConflictDetection::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:225
SetSimulationTimeStatistics::execute
static bool execute(SimulatorInterpreter &, SimulatorFrontend &simFront, bool newValue)
Definition: SettingCommand.cc:292
SetSimulationTimeout::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:343
SettingCommand::~SettingCommand
virtual ~SettingCommand()
Definition: SettingCommand.cc:771
SetProcedureTransferTracing::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:603
SetHistoryFilename::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:472
Texts::TXT_STATIC_COMPILATION
@ TXT_STATIC_COMPILATION
Use static compilation when using compiled simulator.
Definition: SimulatorTextGenerator.hh:158
Texts::TXT_INTERP_SETTING_BUSTRACE
@ TXT_INTERP_SETTING_BUSTRACE
Definition: SimulatorTextGenerator.hh:146
SimulatorFrontend::setTimeout
void setTimeout(unsigned int value)
Definition: SimulatorFrontend.cc:1965
FileSystem::fileIsCreatable
static bool fileIsCreatable(const std::string fileName)
Definition: FileSystem.cc:123
SettingCommand::SimulatorSetting
Definition: SettingCommand.hh:62
Texts::TXT_NO_SUCH_SETTING
@ TXT_NO_SUCH_SETTING
Definition: TextGenerator.hh:63
SetMemoryAccessTracking::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:632
StringTools.hh
SetCallHistoryLength
Definition: SettingCommand.cc:647
SetUtilizationSaving::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:423
SetUtilizationSaving::execute
static bool execute(SimulatorInterpreter &, SimulatorFrontend &simFront, bool newValue)
Definition: SettingCommand.cc:412
SetProcedureTransferTracing
Definition: SettingCommand.cc:572
SimulatorFrontend::setCallHistoryLength
void setCallHistoryLength(std::size_t length)
Definition: SimulatorFrontend.cc:2372
FileSystem::fileIsDirectory
static bool fileIsDirectory(const std::string fileName)
SetFUConflictDetection
Definition: SettingCommand.cc:204
SettingCommand::settings_
SettingMap settings_
storage for simulator settings
Definition: SettingCommand.hh:80
SimulatorToolbox.hh
Texts::TXT_INTERP_SETTING_HISTORY_SIZE
@ TXT_INTERP_SETTING_HISTORY_SIZE
Description of the execution trace setting.
Definition: SimulatorTextGenerator.hh:152
Texts::TXT_INTERP_SETTING_HISTORY_FILENAME
@ TXT_INTERP_SETTING_HISTORY_FILENAME
Definition: SimulatorTextGenerator.hh:148
SimulatorInterpreter
Definition: SimulatorInterpreter.hh:49
SetSimulationTimeStatistics
Definition: SettingCommand.cc:284
SetHistorySize::execute
static bool execute(SimulatorInterpreter &interpreter, SimulatorFrontend &, unsigned int newValue)
Definition: SettingCommand.cc:541
FileSystem::fileIsWritable
static bool fileIsWritable(const std::string fileName)
SettingCommand::helpText
virtual std::string helpText() const
Definition: SettingCommand.cc:855
SettingCommand::SimulatorSetting::setValue
virtual bool setValue(SimulatorInterpreter &interpreter, SimulatorFrontend &simFront, const DataObject &newValue)=0
SetRFTracking
Definition: SettingCommand.cc:126
SetNextInstructionPrinting::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:265
SetBusTrace
Definition: SettingCommand.cc:87
LineReader::setSaveInputHistoryToFile
virtual void setSaveInputHistoryToFile(bool flag)
Definition: LineReader.cc:114
Texts::TXT_INTERP_SETTING_UTILIZATION_SAVING
@ TXT_INTERP_SETTING_UTILIZATION_SAVING
Definition: SimulatorTextGenerator.hh:200
SimulatorToolbox::textGenerator
static SimulatorTextGenerator & textGenerator()
Definition: SimulatorToolbox.cc:75
SetHistorySize
Definition: SettingCommand.cc:531
SetBusTrace::execute
static bool execute(SimulatorInterpreter &, SimulatorFrontend &simFront, bool newValue)
Definition: SettingCommand.cc:97
SetBusTrace::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:108
Texts::TXT_SIMULATION_TIME_STATISTICS
@ TXT_SIMULATION_TIME_STATISTICS
Description of the simulation time statistics setting.
Definition: SimulatorTextGenerator.hh:154
SimulatorFrontend::setProfileDataSaving
void setProfileDataSaving(bool value)
Definition: SimulatorFrontend.cc:1940
SetFUConflictDetection::execute
static bool execute(SimulatorInterpreter &, SimulatorFrontend &simFront, bool newValue)
Definition: SettingCommand.cc:214
Exception
Definition: Exception.hh:54
SetHistorySave
Definition: SettingCommand.cc:490
SimulatorFrontend.hh
SetProcedureTransferTracing::execute
static bool execute(SimulatorInterpreter &, SimulatorFrontend &simFront, bool newValue)
Definition: SettingCommand.cc:582
LineReader::setInputHistoryLength
virtual void setInputHistoryLength(std::size_t length)
Definition: LineReader.cc:140
Exception::errorMessage
std::string errorMessage() const
Definition: Exception.cc:123
Texts::TXT_SIMULATION_TIMEOUT
@ TXT_SIMULATION_TIMEOUT
Simulation timeout in seconds.
Definition: SimulatorTextGenerator.hh:156
LineReader::outputStream
virtual std::ostream & outputStream()
Definition: LineReader.cc:102
SetProfileSaving::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:196
CustomCommand::interpreter
ScriptInterpreter * interpreter() const
ScriptInterpreter::setResult
virtual void setResult(DataObject *result)
Definition: ScriptInterpreter.cc:128
SimulatorFrontend::setRFAccessTracing
void setRFAccessTracing(bool value)
Definition: SimulatorFrontend.cc:1920
SetExecutionTrace
Definition: SettingCommand.cc:48
SetMemoryAccessTracking::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:642
SettingCommand.hh
SimulatorFrontend::setUtilizationDataSaving
void setUtilizationDataSaving(bool value)
Definition: SimulatorFrontend.cc:2008
SetExecutionTrace::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:79
Texts::TXT_INTERP_SETTING_PROFILE_SAVING
@ TXT_INTERP_SETTING_PROFILE_SAVING
Definition: SimulatorTextGenerator.hh:201
SettingCommand::execute
virtual bool execute(const std::vector< DataObject > &arguments)
Definition: SettingCommand.cc:791
SetMemoryAccessTracking
Definition: SettingCommand.cc:611
SetNextInstructionPrinting::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:275
SimulatorFrontend::setExecutionTracing
void setExecutionTracing(bool value)
Definition: SimulatorFrontend.cc:1900
SetSimulationTimeout::execute
static bool execute(SimulatorInterpreter &, SimulatorFrontend &simFront, unsigned int newValue)
Definition: SettingCommand.cc:330
SimulatorFrontend::setSimulationTimeStatistics
void setSimulationTimeStatistics(bool value)
Definition: SimulatorFrontend.cc:2088
SetSimulationTimeout
Definition: SettingCommand.cc:322
SetSimulationTimeStatistics::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:313
SimulatorInterpreter.hh
SetProfileSaving::execute
static bool execute(SimulatorInterpreter &, SimulatorFrontend &simFront, bool newValue)
Definition: SettingCommand.cc:175
SetNextInstructionPrinting
Definition: SettingCommand.cc:244
SetSimulationTimeout::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:353
SetProcedureTransferTracing::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:593
SetStaticCompilation::execute
static bool execute(SimulatorInterpreter &, SimulatorFrontend &simFront, unsigned int newValue)
Definition: SettingCommand.cc:370
SimulatorFrontend::setNextInstructionPrinting
void setNextInstructionPrinting(bool value)
Definition: SimulatorFrontend.cc:2069
Texts::TXT_INTERP_HELP_SETTING
@ TXT_INTERP_HELP_SETTING
Help text for command "setting" of the CLI.
Definition: SimulatorTextGenerator.hh:77
ScriptInterpreter::setError
virtual void setError(bool state)
Definition: ScriptInterpreter.cc:205
SetHistorySize::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:554
SimulatorFrontend::setFUResourceConflictDetection
void setFUResourceConflictDetection(bool value)
Definition: SimulatorFrontend.cc:2022
SetUtilizationSaving
Definition: SettingCommand.cc:401
SetProfileSaving::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:186
SimControlLanguageCommand
Definition: SimControlLanguageCommand.hh:63
DataObject::setString
virtual void setString(std::string value)
Definition: DataObject.cc:130
SetFUConflictDetection::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:235
Texts::TXT_INTERP_SETTING_EXECTRACE
@ TXT_INTERP_SETTING_EXECTRACE
Definition: SimulatorTextGenerator.hh:145
SimControlLanguageCommand::simulatorFrontend
SimulatorFrontend & simulatorFrontend()
Definition: SimControlLanguageCommand.cc:214
SetStaticCompilation::warnOnExistingProgramAndMachine
static bool warnOnExistingProgramAndMachine()
Definition: SettingCommand.cc:393
SIM_DEFAULT_COMMAND_LOG
#define SIM_DEFAULT_COMMAND_LOG
The default command log file name.
Definition: SimulatorConstants.hh:51
SimulatorFrontend
Definition: SimulatorFrontend.hh:89
ScriptInterpreter::lineReader
virtual LineReader * lineReader() const
Definition: ScriptInterpreter.cc:367
SetHistorySave::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:513
SetExecutionTrace::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:69
SetHistoryFilename
Definition: SettingCommand.cc:442
StringTools::stringToLower
static std::string stringToLower(const std::string &source)
Definition: StringTools.cc:160
SetStaticCompilation::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:383
SimulatorFrontend::setBusTracing
void setBusTracing(bool value)
Definition: SimulatorFrontend.cc:1910
SetCallHistoryLength::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:657
Texts::TXT_INTERP_SETTING_FU_CONFLICT_DETECTION
@ TXT_INTERP_SETTING_FU_CONFLICT_DETECTION
Definition: SimulatorTextGenerator.hh:151
SetRFTracking::defaultValue
static const DataObject & defaultValue()
Definition: SettingCommand.cc:147
DEFAULT_INPUT_HISTORY_SIZE
#define DEFAULT_INPUT_HISTORY_SIZE
Definition: LineReader.hh:112