Last change
on this file since 17 was
16,
checked in by guillaumeb, 15 years ago
|
localisation du problème
|
File size:
539 bytes
|
Rev | Line | |
---|
[2] | 1 | #include <systemc.h> |
---|
| 2 | |
---|
| 3 | SC_MODULE(Monitor) |
---|
| 4 | { |
---|
| 5 | int l1misses; |
---|
| 6 | int l1hits; |
---|
| 7 | |
---|
[16] | 8 | sc_in_clk clock; |
---|
[2] | 9 | |
---|
| 10 | sc_in<bool> l1miss_signal; |
---|
| 11 | sc_in<bool> l1hit_signal; |
---|
| 12 | |
---|
[16] | 13 | sc_in<bool> activate; |
---|
| 14 | |
---|
| 15 | |
---|
[2] | 16 | void count_hit(); |
---|
| 17 | void count_miss(); |
---|
| 18 | void make_my_report(); |
---|
| 19 | |
---|
| 20 | SC_CTOR(Monitor) |
---|
| 21 | { |
---|
| 22 | l1misses = 0; |
---|
| 23 | l1hits = 0; |
---|
| 24 | |
---|
| 25 | SC_METHOD(make_my_report); |
---|
[16] | 26 | sensitive << activate; |
---|
[2] | 27 | |
---|
| 28 | SC_METHOD(count_hit); |
---|
[16] | 29 | sensitive << clock.pos(); |
---|
[2] | 30 | |
---|
| 31 | SC_METHOD(count_miss); |
---|
[16] | 32 | sensitive << clock.pos(); |
---|
[2] | 33 | } |
---|
| 34 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.