source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_allocation.cpp @ 145

Last change on this file since 145 was 145, checked in by rosiere, 14 years ago

1) add test with SPECINT2K
2) new config of Selftest
3) modif RAT to support multiple depth_save ... but not finish (need fix Update Prediction Table)
4) add Function_pointer but need fix

  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1/*
2 * $Id: RegisterFile_Monolithic_allocation.cpp 145 2010-10-13 18:15:51Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
9#include "Behavioural/include/Allocation.h"
10#include "Behavioural/include/Component.h"
11
12namespace morpheo                    {
13namespace behavioural                {
14namespace generic                    {
15namespace registerfile               {
16namespace registerfile_monolithic    {
17
18  void RegisterFile_Monolithic::allocation (void)
19  {
20    _component   = new Component (_usage);
21
22    Entity * entity = _component->set_entity (_name                   
23                                             ,"RegisterFile_Monolithic"
24#ifdef POSITION
25                                             ,REGISTER                 
26#endif
27                                              );
28   
29    _interfaces = entity->set_interfaces();
30
31    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32    {
33      Interface * interface = _interfaces->set_interface(""
34#ifdef POSITION
35                                                         , IN
36                                                         ,SOUTH
37                                                         ,_("Generalist interface")
38#endif
39                                                         );
40     
41      in_CLOCK              = interface->set_signal_clk              ("clock" ,1);
42      in_NRESET             = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
43    }
44
45    // ~~~~~[ Interface : "read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46    { 
47      ALLOC1_INTERFACE_BEGIN("read",IN,WEST,_("Interface Read"),_param->_nb_port_read);
48
49      ALLOC1_VALACK_IN ( in_READ_VAL    ,VAL);
50      ALLOC1_VALACK_OUT(out_READ_ACK    ,ACK);
51      ALLOC1_SIGNAL_IN ( in_READ_ADDRESS,"address",Taddress_t,_param->_size_address);
52      ALLOC1_SIGNAL_OUT(out_READ_DATA   ,"data"   ,Tdata_t   ,_param->_size_word);
53
54      ALLOC1_INTERFACE_END(_param->_nb_port_read);
55    }
56
57    // ~~~~~[ Interface : "write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58    {
59      ALLOC1_INTERFACE_BEGIN("write",IN,EAST,_("Interface Write"),_param->_nb_port_write);
60
61      ALLOC1_VALACK_IN ( in_WRITE_VAL    ,VAL);
62      ALLOC1_VALACK_OUT(out_WRITE_ACK    ,ACK);
63      ALLOC1_SIGNAL_IN ( in_WRITE_ADDRESS,"address",Taddress_t,_param->_size_address);
64      ALLOC1_SIGNAL_IN ( in_WRITE_DATA   ,"data"   ,Tdata_t   ,_param->_size_word);
65
66      ALLOC1_INTERFACE_END(_param->_nb_port_write);
67    }
68
69    // ~~~~~[ Interface : "read_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70    { 
71      ALLOC1_INTERFACE_BEGIN("read_write",IN,WEST,_("Interface Read_Write"),_param->_nb_port_read_write);
72
73      ALLOC1_VALACK_IN ( in_READ_WRITE_VAL    ,VAL);
74      ALLOC1_VALACK_OUT(out_READ_WRITE_ACK    ,ACK);
75      ALLOC1_SIGNAL_IN ( in_READ_WRITE_RW     ,"rw"     ,Tcontrol_t,1);
76      ALLOC1_SIGNAL_IN ( in_READ_WRITE_ADDRESS,"address",Taddress_t,_param->_size_address);
77      ALLOC1_SIGNAL_IN ( in_READ_WRITE_WDATA  ,"wdata"  ,Tdata_t   ,_param->_size_word);
78      ALLOC1_SIGNAL_OUT(out_READ_WRITE_RDATA  ,"rdata"  ,Tdata_t   ,_param->_size_word);
79
80      ALLOC1_INTERFACE_END(_param->_nb_port_read_write);
81    }
82
83    if (usage_is_set(_usage,USE_SYSTEMC))
84      ALLOC1(reg_DATA,Tdata_t,_param->_nb_word);
85   
86#ifdef POSITION
87    if (usage_is_set(_usage,USE_POSITION))
88      _component->generate_file();
89#endif
90  };
91
92}; // end namespace registerfile_monolithic
93}; // end namespace registerfile
94}; // end namespace generic
95}; // end namespace behavioural         
96}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.