source: trunk/IPs/systemC/Environment/Data/src/Data_entity.cpp @ 115

Last change on this file since 115 was 101, checked in by rosiere, 16 years ago

1) Add soc test
2) fix bug (Pc management, Decod and execute, Update prediction ...)

  • Property svn:keywords set to Id
File size: 767 bytes
Line 
1#include "../include/Data.h"
2#include "../../Common/include/Debug.h"
3
4namespace environment {
5namespace data {
6
7  Entity Data::entity (uint32_t address, uint32_t size)
8  {
9//     _cout(DATA, "  * Data::entity\n");
10//     _cout(DATA, "    * address      : %.8x\n",address);
11//     _cout(DATA, "    * size         : %d\n"  ,size   );
12
13    for (uint32_t num_seg = 0; num_seg < nb_seg; num_seg ++)
14      if (segment[num_seg]->test (address,size) == true)
15        return Entity (true,segment[num_seg]);
16   
17    return Entity (false);
18  }
19 
20  Entity Data::entity (std::string name)
21  {
22    for (uint32_t num_seg = 0; num_seg < nb_seg; num_seg ++)
23      if (segment[num_seg]->test(name) == true)
24        return Entity (true,segment[num_seg]);
25   
26    return Entity (false);
27  }
28
29};
30};
Note: See TracBrowser for help on using the repository browser.