source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation_test_end.cpp @ 110

Last change on this file since 110 was 110, checked in by rosiere, 15 years ago

1) OOO_egine : add stat to depiste low perf source
2) Commit : add stat
3) LSU_Pointer : retire - always ack (else combinatory loop). insert - max nb_inst_memory
4) TopLevel? : add debug_idle_time to stop combinatory loop.
5) Issue_queue : add reexecute_queue, new implementation (routage after issue_queue)
6) Decod / Predictor : add "can_continue"

  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Simulation_test_end.cpp 110 2009-02-19 16:31:47Z rosiere $
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/include/Simulation.h"
10
11namespace morpheo              {
12namespace behavioural          {
13
14  bool simulation_test_end (void)
15  {
16    msg("##########[ cycle %d ]\n",static_cast<uint32_t>(sc_simulation_time()));
17
18    // Test if a stop condition is activate
19    if ((_simulation_nb_cycle == 0) and
20        (_simulation_nb_instruction == 0)
21        )
22      return false;
23
24    bool end_cycle;
25    bool end_inst ;
26
27    if (_simulation_nb_cycle != 0)
28      end_cycle = (_simulation_nb_cycle <= sc_simulation_time());
29    else
30      end_cycle = true;
31
32    if (_simulation_nb_instruction != 0)
33      {
34        end_inst = true;
35
36        std::vector<double>::iterator it=_simulation_nb_instruction_commited.begin();
37       
38        // Scan all context and test if all can finish
39        while (end_inst and it!=_simulation_nb_instruction_commited.end())
40          {
41            end_inst &= (_simulation_nb_instruction <= *it);
42            it ++;
43          }
44      }
45    else
46      end_inst = true;
47   
48    return end_cycle and end_inst;
49  }
50
51}; // end namespace behavioural         
52}; // end namespace morpheo             
53
54#endif
Note: See TracBrowser for help on using the repository browser.