Last change
on this file since 102 was
88,
checked in by rosiere, 16 years ago
|
Almost complete design
with Test and test platform
|
-
Property svn:keywords set to
Id
|
File size:
1.1 KB
|
Line | |
---|
1 | #ifdef SYSTEMC |
---|
2 | /* |
---|
3 | * $Id: Simulation_test_end.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/include/Simulation.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace 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 = true; |
---|
25 | // bool end_inst = true; |
---|
26 | |
---|
27 | if (_simulation_nb_cycle != 0) |
---|
28 | end_cycle = (_simulation_nb_cycle <= sc_simulation_time()); |
---|
29 | |
---|
30 | // if (_simulation_nb_instruction != 0) |
---|
31 | // { |
---|
32 | // std::vector<double>::iterator it=_simulation_nb_instruction_commited->begin(); |
---|
33 | |
---|
34 | // // Scan all context and test if all can finish |
---|
35 | // while (end_inst and it!=_simulation_nb_instruction_commited->end()) |
---|
36 | // { |
---|
37 | // end_inst &= (*it <= _simulation_nb_instruction); |
---|
38 | // it ++; |
---|
39 | // } |
---|
40 | // } |
---|
41 | |
---|
42 | return end_cycle // and end_inst |
---|
43 | ; |
---|
44 | } |
---|
45 | |
---|
46 | }; // end namespace behavioural |
---|
47 | }; // end namespace morpheo |
---|
48 | |
---|
49 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.