source: trunk/IPs/systemC/Environment/Cache/src/Cache_MultiLevel.cpp @ 80

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

Oups, Environnement is french :P

File size: 749 bytes
Line 
1#include "../include/Cache_MultiLevel.h"
2#include <sstream>
3
4namespace environment {
5namespace cache {
6namespace cache_multilevel {
7
8  Cache_MultiLevel::Cache_MultiLevel (std::string name,
9                                      Parameters * param)
10  {
11    this->name  = name;
12    this->param = param;
13
14    hierarchy_cache = new cache_onelevel::Cache_OneLevel * [param->nb_level];
15   
16    for (uint32_t i=0; i<param->nb_level; i++)
17      {
18        std::stringstream str;
19
20        str << name << "_level_" << i;
21
22        hierarchy_cache[i] = new cache_onelevel::Cache_OneLevel (str.str(), param->param_cache[i]);
23      }
24  }
25
26  Cache_MultiLevel::~Cache_MultiLevel (void)
27  {
28    for (uint32_t i=0; i<param->nb_level; i++)
29      delete hierarchy_cache [i];
30    delete [] hierarchy_cache;
31  }
32};
33};
34};
Note: See TracBrowser for help on using the repository browser.