Ignore:
Timestamp:
Apr 15, 2008, 8:40:01 PM (17 years ago)
Author:
rosiere
Message:
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/Environment/Cache/src/Cache_latence.cpp

    • Property svn:keywords set to Id
    r80 r81  
    2222
    2323    cache_multilevel::Cache_MultiLevel * cache;
     24    cache_multilevel::Parameters * param_cache_dedicated;
     25    _cout(CACHE," * Access Cache_Dedicated_");
    2426    if (type_cache == INSTRUCTION_CACHE)
    25       cache = icache_dedicated [num_entity];
     27      {
     28        _cout(CACHE,"Instruction");
     29        cache                 = icache_dedicated [num_entity];
     30        param_cache_dedicated = param->param_icache_dedicated [num_entity];
     31      }
    2632    else
    27       cache = dcache_dedicated [num_entity];
     33      {
     34        _cout(CACHE,"Data");
     35        cache                 = dcache_dedicated [num_entity];
     36        param_cache_dedicated = param->param_dcache_dedicated [num_entity];
     37      }
     38    _cout(CACHE," [%d] - entity : %d, address : 0x%.x\n",num_port,num_entity,address);
    2839
    2940    if (num_port >= cache->param->nb_port)
     
    3445
    3546    // Make a access with this level "dedicated"
    36     std::cout << "cache dedicated : access" << std::endl;
    3747    cache_multilevel::Access access_dedicated = cache->access(num_port,address,trdid,type,dir);
    3848
    3949    if (access_dedicated.hit == MISS)
    4050      {
    41         std::cout << "cache shared    : access" << std::endl;
     51        _cout(CACHE," * Access Cache_shared");
     52
    4253        // Make a access with this level "shared"
    4354        cache_multilevel::Access access_shared  = cache_shared->access(range_port (type_cache,num_entity)+num_port,address,trdid,type,dir);
     
    4556        cache_shared->update_access (access_shared);
    4657       
    47         access_dedicated.last_nb_level = param->nb_cache_dedicated-1; // Update all cache
     58        access_dedicated.last_nb_level = param_cache_dedicated->nb_level; // Update all cache
    4859        access_dedicated.latence += access_shared.latence;
    4960      }
    5061
    51     std::cout << "end access, update access" << std::endl;
    52 
    5362    cache->update_access (access_dedicated);
    5463
    55     std::cout << "end access, update access" << std::endl;
    56 
     64    _cout(CACHE,"Access latence : %d\n",access_dedicated.latence);
    5765    return access_dedicated.latence;
    5866  }
Note: See TracChangeset for help on using the changeset viewer.