Last change
on this file since 79 was
78,
checked in by rosiere, 16 years ago
|
Add :
- Execute_loop (must be test systemC)
- Prediction
- Direction : predifined scheme
- Branch Target Buffer
- iFetch_unit
- ifetch_queue
- pc management
- Decod_unit
- coming soon : support for custom operation
- Rename_unit
- RAT
- Free_list
- Dependence RAW check
- Load store unit pointer
- New Environnement (hierarchy_memory will remove in a next version)
Modif :
- Manage Custom Operation
- All component in execute_loop to use the new statistics management
Not Finish :
- Return Address Stack
- Environnement
|
File size:
1.1 KB
|
Line | |
---|
1 | #include <iostream> |
---|
2 | #include "../include/RamLock.h" |
---|
3 | |
---|
4 | using namespace std; |
---|
5 | using namespace environnement; |
---|
6 | using namespace environnement::ramlock; |
---|
7 | |
---|
8 | |
---|
9 | #define TEST(x,y) \ |
---|
10 | { \ |
---|
11 | cout << "Line " << __LINE__ << " : "; \ |
---|
12 | if (x==y) \ |
---|
13 | { \ |
---|
14 | cout << "Test OK"; \ |
---|
15 | } \ |
---|
16 | else \ |
---|
17 | { \ |
---|
18 | cout << "Test KO"; \ |
---|
19 | exit (EXIT_FAILURE); \ |
---|
20 | } \ |
---|
21 | cout << endl; \ |
---|
22 | } while (0) |
---|
23 | |
---|
24 | |
---|
25 | |
---|
26 | int main (void) |
---|
27 | { |
---|
28 | cout << "<main> Begin" << endl; |
---|
29 | |
---|
30 | cout << " * Create a Ramlock with a size of 70" << endl; |
---|
31 | |
---|
32 | Parameters * param = new Parameters (70); |
---|
33 | RamLock * my_ramlock = new RamLock("my_ramlock",param); |
---|
34 | |
---|
35 | my_ramlock->reset(); |
---|
36 | |
---|
37 | cout << *my_ramlock << endl; |
---|
38 | |
---|
39 | TEST (my_ramlock->read (10) , UNLOCK); cout << *my_ramlock << endl; |
---|
40 | TEST (my_ramlock->read (10) , LOCK); cout << *my_ramlock << endl; |
---|
41 | TEST (my_ramlock->write(10) , LOCK); cout << *my_ramlock << endl; |
---|
42 | TEST (my_ramlock->write(10) , UNLOCK); cout << *my_ramlock << endl; |
---|
43 | |
---|
44 | delete param ; |
---|
45 | delete my_ramlock ; |
---|
46 | |
---|
47 | cout << "<main> End" << endl; |
---|
48 | |
---|
49 | return EXIT_SUCCESS; |
---|
50 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.