source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_allocation.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.3 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h"
10#include "Behavioural/include/Allocation.h"
11
12namespace morpheo {
13namespace behavioural {
14namespace generic {
15namespace victim {
16namespace victim_pseudo_lru {
17
18  void Victim_Pseudo_LRU::allocation (void)
19  {
20    _component   = new Component ();
21
22    Entity * entity = _component->set_entity (_name                 
23                                              ,"Select_Priority_Fixed"
24#ifdef POSITION
25                                              ,COMBINATORY           
26#endif
27                                              );
28   
29    _interfaces = entity->set_interfaces();
30
31    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32    {
33      Interface_fifo * interface = _interfaces->set_interface(""
34#ifdef POSITION
35                                                              , IN  ,WEST, "Generalist interface"
36#endif
37                                                              );
38     
39      in_CLOCK        = interface->set_signal_clk              ("clock" ,1);
40      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1);
41    }
42
43    // ~~~~~[ Interface : "access" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44    {
45      ALLOC1_INTERFACE("access",IN,WEST, "Access", _param->_nb_access);
46
47      ALLOC1_VALACK_IN ( in_ACCESS_VAL    ,VAL);
48      ALLOC1_VALACK_OUT(out_ACCESS_ACK    ,ACK);
49      ALLOC1_SIGNAL_IN ( in_ACCESS_HIT    ,"hit"    ,Tcontrol_t,1);
50      ALLOC1_SIGNAL_IN ( in_ACCESS_ADDRESS,"address",Taddress_t,log2(_param->_size_address));
51      ALLOC1_SIGNAL_IN ( in_ACCESS_ENTITY ,"entity" ,Tentity_t ,log2(_param->_nb_entity   ));
52      ALLOC1_SIGNAL_OUT(out_ACCESS_VICTIM ,"victim" ,Tentity_t ,log2(_param->_nb_entity   ));
53    }
54
55    // -----[ Register ]---------------------------------------------------
56    reg_TABLE = new entry_t *  [_param->_size_table];
57
58    for (uint32_t i=0; i<_param->_size_table; i++)
59      reg_TABLE [i] = new entry_t (_param->_nb_entity);
60   
61    // -----[ Internal ]---------------------------------------------------
62    internal_ACCESS_ACK    = new Tcontrol_t [_param->_nb_access];
63    internal_ACCESS_VICTIM = new Tentity_t  [_param->_nb_access];
64
65#ifdef POSITION
66    _component->generate_file();
67#endif
68  };
69
70}; // end namespace victim_pseudo_lru
71}; // end namespace victim
72}; // end namespace generic
73
74}; // end namespace behavioural
75}; // end namespace morpheo             
76#endif
Note: See TracBrowser for help on using the repository browser.