Last change
on this file since 113 was
113,
checked in by rosiere, 15 years ago
|
1) Add modelsim simulation systemC
2) Modelsim cosimulation systemC / VHDL is not finish !!!! (cf execute_queue and write_unit)
3) Add multi architecture
5) Add template for comparator, multiplier and divider
6) Change Message
Warning) Various test macro have change, many selftest can't compile
|
-
Property svn:keywords set to
Id
|
File size:
1.2 KB
|
Line | |
---|
1 | #ifdef SYSTEMC |
---|
2 | /* |
---|
3 | * $Id: Simulation_test_end.cpp 113 2009-04-14 18:39:12Z rosiere $ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/include/Simulation.h" |
---|
10 | #include "Common/include/Systemc.h" |
---|
11 | |
---|
12 | namespace morpheo { |
---|
13 | namespace behavioural { |
---|
14 | |
---|
15 | bool simulation_test_end (void) |
---|
16 | { |
---|
17 | msg("##########[ cycle %d ]\n",static_cast<uint32_t>(simulation_cycle())); |
---|
18 | |
---|
19 | // Test if a stop condition is activate |
---|
20 | if ((_simulation_nb_cycle == 0) and |
---|
21 | (_simulation_nb_instruction == 0) |
---|
22 | ) |
---|
23 | return false; |
---|
24 | |
---|
25 | bool end_cycle; |
---|
26 | bool end_inst ; |
---|
27 | |
---|
28 | if (_simulation_nb_cycle != 0) |
---|
29 | end_cycle = (_simulation_nb_cycle <= simulation_cycle()); |
---|
30 | else |
---|
31 | end_cycle = true; |
---|
32 | |
---|
33 | if (_simulation_nb_instruction != 0) |
---|
34 | { |
---|
35 | end_inst = true; |
---|
36 | |
---|
37 | std::vector<double>::iterator it=_simulation_nb_instruction_commited.begin(); |
---|
38 | |
---|
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; |
---|
48 | |
---|
49 | return end_cycle and end_inst; |
---|
50 | } |
---|
51 | |
---|
52 | }; // end namespace behavioural |
---|
53 | }; // end namespace morpheo |
---|
54 | |
---|
55 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.