source: trunk/IPs/systemC/Environnement/Cache/src/Cache_OneLevel.cpp @ 78

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

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
File size: 1.1 KB
Line 
1#include "../include/Cache_OneLevel.h"
2
3namespace environnement {
4namespace cache {
5namespace cache_onelevel {
6
7  Cache_OneLevel::Cache_OneLevel (std::string name,
8                                  Parameters * param)
9  {
10    this->name  = name;
11    this->param = param;
12
13    access_port = new Access_Port [param->nb_port];
14    tag         = new Tag *       [param->nb_line/param->associativity];
15    for (uint32_t it = 0; it < param->nb_line/param->associativity; it ++)
16      tag [it] = new Tag [param->associativity];
17   
18    size_address.offset  = (uint32_t) log2(param->size_line * param->size_word);
19    size_address.familly = (uint32_t) log2(param->nb_line/param->associativity);
20    size_address.tag     = 32 - size_address.familly - size_address.offset;
21   
22    param_write_buffer = new queue::Parameters (2);
23   
24    write_buffer = new queue::Sort_Queue_Dynamic<Write_Buffer> (name+"_write_buffer",param_write_buffer);
25  }
26
27  Cache_OneLevel::~Cache_OneLevel (void)
28  {
29    delete    write_buffer;
30    delete    param_write_buffer;
31    for (uint32_t it = 0; it < param->nb_line/param->associativity; it ++)
32      delete [] tag [it];
33    delete [] tag;
34    delete [] access_port;
35  }
36};
37};
38};
Note: See TracBrowser for help on using the repository browser.