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

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

1) Platforms : add new organization for test
2) Load_Store_Unit : add array to count nb_check in store_queue
3) Issue_queue and Core_Glue : rewrite the issue network
4) Special_Register_Unit : add reset value to register CID
5) Softwares : add multicontext test
6) Softwares : add SPECINT
7) Softwares : add MiBench?
7) Read_queue : inhib access for r0
8) Change Core_Glue (network) - dont yet support priority and load balancing scheme

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