source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim.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.8 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Generic/Victim/include/Victim.h"
9
10namespace morpheo                    {
11namespace behavioural {
12namespace generic {
13namespace victim {
14
15
16#undef  FUNCTION
17#define FUNCTION "Victim::Victim"
18  Victim::Victim
19  (
20#ifdef SYSTEMC
21   sc_module_name name,
22#else
23   string name,
24#endif
25#ifdef STATISTICS
26   morpheo::behavioural::Parameters_Statistics * param_statistics,
27#endif
28   morpheo::behavioural::generic::victim::Parameters * param,
29   morpheo::behavioural::Tusage_t usage
30   ):
31    _name              (name)
32    ,_param            (param)
33    ,_usage            (usage)
34  {
35    log_printf(FUNC,Victim,FUNCTION,"Begin");
36
37    log_printf(INFO,Victim,FUNCTION,"Allocation");
38
39    allocation (
40#ifdef STATISTICS
41                param_statistics
42#endif
43                );
44
45#ifdef STATISTICS
46    if (_usage & USE_STATISTICS)
47      { 
48        switch (_param->_victim_scheme)
49          {
50//        case VICTIM_RANDOM      : _stat = _component_victim_random      ->_stat; break;
51//        case VICTIM_ROUND_ROBIN : _stat = _component_victim_round_robin ->_stat; break;
52//        case VICTIM_NLU         : _stat = _component_victim_nlu         ->_stat; break;
53          case VICTIM_PSEUDO_LRU  : _stat = _component_victim_pseudo_lru  ->_stat; break;
54//        case VICTIM_LRU         : _stat = _component_victim_lru         ->_stat; break;
55//        case VICTIM_FIFO        : _stat = _component_victim_fifo        ->_stat; break;
56          default : break;
57          }
58      }
59#endif
60
61    log_printf(FUNC,Victim,FUNCTION,"End");
62  };
63   
64#undef  FUNCTION
65#define FUNCTION "Victim::~Victim"
66  Victim::~Victim (void)
67  {
68    log_printf(FUNC,Victim,FUNCTION,"Begin");
69
70    log_printf(INFO,Victim,FUNCTION,"Deallocation");
71    deallocation ();
72
73    log_printf(FUNC,Victim,FUNCTION,"End");
74  };
75
76}; // end namespace victim
77}; // end namespace generic
78
79}; // end namespace behavioural
80}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.