source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU.cpp @ 82

Last change on this file since 82 was 82, checked in by rosiere, 16 years ago
  • support locale (now must "just" translate)
  • update all component with new test format
  • update all component with usage
  • New component : decod queue and prediction_unit
  • Property svn:keywords set to Id
File size: 2.2 KB
RevLine 
[10]1/*
2 * $Id: Victim_Pseudo_LRU.cpp 82 2008-05-01 16:48:45Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
[15]8#include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h"
[10]9
10namespace morpheo {
11namespace behavioural {
12namespace generic {
13namespace victim {
[15]14namespace victim_pseudo_lru {
[10]15
[82]16  Victim_Pseudo_LRU::Victim_Pseudo_LRU
17  (
[10]18#ifdef SYSTEMC
[82]19   sc_module_name name,
[10]20#else
[82]21   std::string name,
[10]22#endif
23#ifdef STATISTICS
[82]24   morpheo::behavioural::Parameters_Statistics * param_statistics,
[10]25#endif
[82]26   morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters * param ,
27   morpheo::behavioural::Tusage_t usage):
28    _name   (name)
29    ,_param (param)
30    ,_usage (usage)
[10]31  {
[15]32    log_printf(FUNC,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Begin");
[10]33
[42]34#ifdef SYSTEMC
35    log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Allocation");
36    allocation ();
37#endif
38
[10]39#ifdef STATISTICS
[15]40    log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Allocation of statistics");
[10]41   
42    // Allocation of statistics
[75]43    statistics_declaration(param_statistics);
[10]44#endif
45
46#ifdef VHDL
47    // generate the vhdl
[15]48    log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Generation of VHDL");
[10]49    vhdl();
50#endif
51
52#ifdef SYSTEMC
[15]53    log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Definition of sc_method");
[10]54    SC_METHOD (transition);
55    dont_initialize ();
[66]56    sensitive << (*(in_CLOCK)).pos();
[10]57
[78]58    SC_METHOD (genMoore);
[10]59    dont_initialize ();
[66]60    sensitive << (*(in_CLOCK)).neg();
[10]61
62#ifdef SYSTEMCASS_SPECIFIC
63#endif   
64
65    // Constant - ack is always at one
[78]66    for (uint32_t i=0; i<_param->_nb_access; i++)
67      {
68        internal_ACCESS_ACK [i] = 1;
69        PORT_WRITE (out_ACCESS_ACK [i], internal_ACCESS_ACK [i]);
70      }
[10]71
72#endif
[15]73    log_printf(FUNC,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","End");
[10]74  };
75 
[15]76  Victim_Pseudo_LRU::~Victim_Pseudo_LRU (void)
[10]77  {
[15]78    log_printf(FUNC,Victim_Pseudo_LRU,"~Victim_Pseudo_LRU","Begin");
[10]79#ifdef SYSTEMC
80    deallocation ();
81#endif
82
83#ifdef STATISTICS
84    delete _stat;
85#endif
[15]86    log_printf(FUNC,Victim_Pseudo_LRU,"~Victim_Pseudo_LRU","End");
[10]87  };
88
[15]89}; // end namespace victim_pseudo_lru
[10]90}; // end namespace victim
91}; // end namespace generic
92}; // end namespace behavioural
93}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.