#include "../include/Cache_MultiLevel.h"
#include <sstream>

namespace environnement {
namespace cache {
namespace cache_multilevel {

  uint32_t Cache_MultiLevel::update_access (Access cur_access)
  {
    if (cur_access.last_nb_level > 0)
      {
	uint32_t latence = cur_access.latence;
	
	for (uint32_t it = 0; it <= cur_access.last_nb_level; it ++)
	  latence = hierarchy_cache [it]->update_latence (cur_access.num_port,latence);
	
// 	if (latence != 0)
// 	  {
// 	    std::cout << "<Cache_MultiLevel::update_access> after all update, latence must be null." << std::endl;
// 	    exit(1);
// 	  }
      }

    return cur_access.latence;
  }

};
};
};
