source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU.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: 2.1 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h"
9
10namespace morpheo {
11namespace behavioural {
12namespace generic {
13namespace victim {
14namespace victim_pseudo_lru {
15
16#ifdef SYSTEMC
17  Victim_Pseudo_LRU::Victim_Pseudo_LRU (sc_module_name name,
18#else
19  Victim_Pseudo_LRU::Victim_Pseudo_LRU (std::string name,
20#endif
21#ifdef STATISTICS
22                          morpheo::behavioural::Parameters_Statistics * param_statistics,
23#endif
24                          morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters * param ):
25                          _name   (name)
26                          ,_param (param)
27  {
28    log_printf(FUNC,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Begin");
29
30#ifdef SYSTEMC
31    log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Allocation");
32    allocation ();
33#endif
34
35#ifdef STATISTICS
36    log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Allocation of statistics");
37   
38    // Allocation of statistics
39    statistics_declaration(param_statistics);
40#endif
41
42#ifdef VHDL
43    // generate the vhdl
44    log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Generation of VHDL");
45    vhdl();
46#endif
47
48#ifdef SYSTEMC
49    log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Definition of sc_method");
50    SC_METHOD (transition);
51    dont_initialize ();
52    sensitive << (*(in_CLOCK)).pos();
53
54    SC_METHOD (genMoore);
55    dont_initialize ();
56    sensitive << (*(in_CLOCK)).neg();
57
58#ifdef SYSTEMCASS_SPECIFIC
59#endif   
60
61    // Constant - ack is always at one
62    for (uint32_t i=0; i<_param->_nb_access; i++)
63      {
64        internal_ACCESS_ACK [i] = 1;
65        PORT_WRITE (out_ACCESS_ACK [i], internal_ACCESS_ACK [i]);
66      }
67
68#endif
69    log_printf(FUNC,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","End");
70  };
71 
72  Victim_Pseudo_LRU::~Victim_Pseudo_LRU (void)
73  {
74    log_printf(FUNC,Victim_Pseudo_LRU,"~Victim_Pseudo_LRU","Begin");
75#ifdef SYSTEMC
76    deallocation ();
77#endif
78
79#ifdef STATISTICS
80    delete _stat;
81#endif
82    log_printf(FUNC,Victim_Pseudo_LRU,"~Victim_Pseudo_LRU","End");
83  };
84
85}; // end namespace victim_pseudo_lru
86}; // end namespace victim
87}; // end namespace generic
88}; // end namespace behavioural
89}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.