33 #include <wx/spinctrl.h>
34 #include <wx/statline.h>
35 #include <wx/valgen.h>
57 wxDialog(parent,
id, _T("Simulator Settings"), wxDefaultPosition),
58 simulator_(simulator), lineReader_(lineReader) {
60 createContents(
this,
true,
true);
62 FindWindow(ID_EXEC_TRACE)->SetValidator(wxGenericValidator(&execTrace_));
63 FindWindow(ID_BUS_TRACE)->SetValidator(wxGenericValidator(&busTrace_));
64 FindWindow(ID_PT_TRACKING)->SetValidator(wxGenericValidator(&ptTrace_));
65 FindWindow(ID_RF_TRACKING)->SetValidator(wxGenericValidator(&rfTrace_));
66 FindWindow(ID_FU_CONFLICT_DETECTION)->SetValidator(
67 wxGenericValidator(&fuConflictDetection_));
69 FindWindow(ID_PROFILE_DATA_SAVING)->SetValidator(
70 wxGenericValidator(&profileDataSaving_));
71 FindWindow(ID_UTILIZATION_DATA_SAVING)->SetValidator(
72 wxGenericValidator(&utilizationDataSaving_));
73 FindWindow(ID_NEXT_INSTRUCTION_PRINTING)->SetValidator(
74 wxGenericValidator(&nextInstructionPrinting_));
75 FindWindow(ID_SIMULATION_TIME_STATISTICS)->SetValidator(
76 wxGenericValidator(&simulationTimeStatistics_));
79 wxGenericValidator(&historySave_));
82 wxGenericValidator(&historyFile_));
85 wxGenericValidator(&historySize_));
118 return wxDialog::TransferDataToWindow();
129 TransferDataFromWindow();
132 std::string historyFile =
188 command += historyFile;
238 wxWindow *parent,
bool call_fit,
bool set_sizer) {
240 wxBoxSizer *item0 =
new wxBoxSizer( wxVERTICAL );
242 wxStaticBox *item2 =
new wxStaticBox( parent, -1, wxT(
"Tracing:") );
243 wxStaticBoxSizer *item1 =
new wxStaticBoxSizer( item2, wxVERTICAL );
245 wxCheckBox *item3 =
new wxCheckBox( parent,
ID_EXEC_TRACE, wxT(
"Write basic execution trace."), wxDefaultPosition, wxDefaultSize, 0 );
246 item1->Add( item3, 0, wxALL, 5 );
248 wxCheckBox *item4 =
new wxCheckBox( parent,
ID_BUS_TRACE, wxT(
"Write bus trace."), wxDefaultPosition, wxDefaultSize, 0 );
249 item1->Add( item4, 0, wxALL, 5 );
251 wxCheckBox *item19 =
new wxCheckBox( parent,
ID_PT_TRACKING, wxT(
"Procedure transfer tracking."), wxDefaultPosition, wxDefaultSize, 0 );
252 item1->Add( item19, 0, wxALL, 5 );
254 wxCheckBox *item5 =
new wxCheckBox( parent,
ID_RF_TRACKING, wxT(
"Concurrent register file access tracking."), wxDefaultPosition, wxDefaultSize, 0 );
255 item1->Add( item5, 0, wxALL, 5 );
257 wxCheckBox *item6 =
new wxCheckBox( parent,
ID_FU_CONFLICT_DETECTION, wxT(
"Function unit resouce conflict detection."), wxDefaultPosition, wxDefaultSize, 0 );
258 item1->Add( item6, 0, wxALL, 5 );
260 wxCheckBox *profiledata =
new wxCheckBox( parent,
ID_PROFILE_DATA_SAVING, wxT(
"Profile data saving."), wxDefaultPosition, wxDefaultSize, 0 );
261 item1->Add( profiledata, 0, wxALL, 5 );
263 wxCheckBox *utildata =
new wxCheckBox( parent,
ID_UTILIZATION_DATA_SAVING, wxT(
"Utilization data saving."), wxDefaultPosition, wxDefaultSize, 0 );
264 item1->Add( utildata, 0, wxALL, 5 );
266 wxCheckBox *nextinstr =
new wxCheckBox( parent,
ID_NEXT_INSTRUCTION_PRINTING, wxT(
"Next instruction printing."), wxDefaultPosition, wxDefaultSize, 0 );
267 item1->Add( nextinstr, 0, wxALL, 5 );
269 wxCheckBox *timestat =
new wxCheckBox( parent,
ID_SIMULATION_TIME_STATISTICS, wxT(
"Simulation time statistics."), wxDefaultPosition, wxDefaultSize, 0 );
270 item1->Add( timestat, 0, wxALL, 5 );
272 item0->Add( item1, 0, wxGROW|wxALL, 5 );
274 wxStaticBox *item8 =
new wxStaticBox( parent, -1, wxT(
"Command history:") );
275 wxStaticBoxSizer *item7 =
new wxStaticBoxSizer( item8, wxVERTICAL );
277 wxBoxSizer *item9 =
new wxBoxSizer( wxHORIZONTAL );
279 wxStaticText *item10 =
new wxStaticText( parent,
ID_LABEL_HISTORY_SIZE, wxT(
"Maximum size of command history:"), wxDefaultPosition, wxDefaultSize, 0 );
280 item9->Add( item10, 0, wxALIGN_CENTER|wxALL, 5 );
282 wxSpinCtrl *item11 =
new wxSpinCtrl( parent,
ID_HISTORY_SIZE, wxT(
"0"), wxDefaultPosition, wxSize(-1,-1), 0, 0, 10000, 0 );
283 item9->Add( item11, 0, wxALIGN_CENTER|wxALL, 5 );
285 item7->Add( item9, 0, wxGROW|wxALL, 5 );
287 wxBoxSizer *item12 =
new wxBoxSizer( wxVERTICAL );
289 wxCheckBox *item13 =
new wxCheckBox( parent,
ID_SAVE_HISTORY, wxT(
"Save command history to file:"), wxDefaultPosition, wxDefaultSize, 0 );
290 item12->Add( item13, 0, wxALL, 5 );
292 wxTextCtrl *item14 =
new wxTextCtrl( parent,
ID_HISTORY_FILE, wxT(
""), wxDefaultPosition, wxSize(300,-1), 0 );
293 item12->Add( item14, 0, wxALIGN_CENTER|wxALL, 5 );
295 item7->Add( item12, 0, wxGROW|wxALL, 5 );
297 item0->Add( item7, 0, wxGROW|wxALL, 5 );
299 wxStaticLine *item15 =
new wxStaticLine( parent,
ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
300 item0->Add( item15, 0, wxGROW|wxALL, 5 );
302 wxBoxSizer *item16 =
new wxBoxSizer( wxHORIZONTAL );
304 wxButton *item17 =
new wxButton( parent, wxID_CANCEL, wxT(
"&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
305 item16->Add( item17, 0, wxALL, 5 );
307 wxButton *item18 =
new wxButton( parent, wxID_OK, wxT(
"&OK"), wxDefaultPosition, wxDefaultSize, 0 );
308 item16->Add( item18, 0, wxALIGN_CENTER|wxALL, 5 );
310 item0->Add( item16, 0, 0, 5 );
314 parent->SetSizer( item0 );
316 item0->SetSizeHints( parent );