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

Last change on this file since 146 was 146, checked in by rosiere, 13 years ago

1) Integration of RegisterFile_Internal_Banked in RegisterFile?
2) Erase "read_write" interface in RegisterFile_Monolithic component
3) Add smith predictor parameters in Load_store_pointer_unit.
4) Fix not statistics flags

  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: RegisterFile_Monolithic_genMealy_read.cpp 146 2011-02-01 20:57:54Z rosiere $
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
10
11namespace morpheo                    {
12namespace behavioural                {
13namespace generic                    {
14namespace registerfile               {
15namespace registerfile_monolithic    {
16
17#undef  FUNCTION
18#define FUNCTION "RegisterFile_Monolithic::genMealy_read"
19  void RegisterFile_Monolithic::genMealy_read (void)
20  {
21    log_begin(RegisterFile_Monolithic,FUNCTION);
22    log_function(RegisterFile_Monolithic,FUNCTION,_name.c_str());
23
24    if (PORT_READ(in_NRESET))
25      {
26    for (uint32_t i=0; i<_param->_nb_port_read; i++)
27      {
28        // Have a write?
29        if ( PORT_READ(in_READ_VAL [i]) == 1)
30          {
31            Taddress_t address;
32            if (_param->_have_port_address)
33              address = PORT_READ(in_READ_ADDRESS[i]);
34            else
35              address = 0;
36            Tdata_t    data    = reg_DATA[address];
37
38            log_printf(TRACE,RegisterFile,FUNCTION,"  * [%d] -> %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));
39
40            // Write in registerFile
41            PORT_WRITE(out_READ_DATA[i],data);
42          }
43        else
44          {
45            //log_printf(TRACE,RegisterFile,FUNCTION,"Read  [%d] : No   transaction",i);
46            PORT_WRITE(out_READ_DATA[i],0);
47          }
48      }
49      }
50
51    log_end(RegisterFile_Monolithic,FUNCTION);
52  };
53
54}; // end namespace registerfile_monolithic
55}; // end namespace registerfile
56}; // end namespace generic
57}; // end namespace behavioural         
58}; // end namespace morpheo             
59#endif
Note: See TracBrowser for help on using the repository browser.