Last change
on this file since 140 was
81,
checked in by rosiere, 16 years ago
|
- Finish Environment (and test)
- Continue predictor_unit
- Add external tools
- svn keyword "Id" set
|
-
Property svn:keywords set to
Id
|
File size:
793 bytes
|
Line | |
---|
1 | #include "../include/Cache_OneLevel.h" |
---|
2 | |
---|
3 | namespace environment { |
---|
4 | namespace cache { |
---|
5 | namespace cache_onelevel { |
---|
6 | |
---|
7 | // If a instruction is in the write_buffer, return the position |
---|
8 | // else, return the number of elt in the write_buffer |
---|
9 | uint32_t Cache_OneLevel::hit_write_buffer (uint32_t trdid, Address address) |
---|
10 | { |
---|
11 | uint32_t num_write_buffer = 0; |
---|
12 | // Scan the write_buffer |
---|
13 | for (num_write_buffer = 0; num_write_buffer < write_buffer->nb_slot_use(); num_write_buffer ++) |
---|
14 | { |
---|
15 | queue::slot_t<Write_Buffer> val = write_buffer->read(num_write_buffer); |
---|
16 | |
---|
17 | if ( (val._data.trdid == trdid ) && |
---|
18 | (val._data.address.tag == address.tag ) && |
---|
19 | (val._data.address.familly == address.familly)) |
---|
20 | break; |
---|
21 | } |
---|
22 | |
---|
23 | return num_write_buffer; |
---|
24 | } |
---|
25 | |
---|
26 | }; |
---|
27 | }; |
---|
28 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.