source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_spr_read.cpp @ 88

Last change on this file since 88 was 88, checked in by rosiere, 15 years ago

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1#ifdef SYSTEMC
2//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
3/*
4 * $Id: Register_unit_Glue_genMealy_spr_read.cpp 88 2008-12-10 18:31:39Z rosiere $
5 *
6 * [ Description ]
7 *
8 */
9
10#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h"
11
12namespace morpheo                    {
13namespace behavioural {
14namespace core {
15namespace multi_execute_loop {
16namespace execute_loop {
17namespace register_unit {
18namespace register_unit_glue {
19
20
21#undef  FUNCTION
22#define FUNCTION "Register_unit_Glue::genMealy_spr_read"
23  void Register_unit_Glue::genMealy_spr_read (void)
24  {
25    log_begin(Register_unit_Glue,FUNCTION);
26    log_function(Register_unit_Glue,FUNCTION,_name.c_str());
27
28//     if (not PORT_READ(in_NRESET))
29//       {
30//      for (uint32_t j=0; j<_param->_nb_spr_read; j++)
31//        PORT_WRITE(out_SPR_READ_ACK      [j], 0);
32//       }
33//     else
34      {
35        for (uint32_t j=0; j<_param->_nb_spr_read; j++)
36          {
37            Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_READ_OOO_ENGINE_ID[j]):0;
38            Tcontrol_t registerfile_ack = PORT_READ(in_SPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]);
39            Tcontrol_t status_ack       = PORT_READ(in_SPR_READ_STATUS_ACK       [ooo_engine_id][j]);
40           
41            // multiplexor
42            PORT_WRITE(out_SPR_READ_ACK      [j], registerfile_ack and status_ack);
43            PORT_WRITE(out_SPR_READ_DATA     [j], PORT_READ(in_SPR_READ_REGISTERFILE_DATA[ooo_engine_id][j]));
44            PORT_WRITE(out_SPR_READ_DATA_VAL [j], PORT_READ(in_SPR_READ_STATUS_DATA_VAL  [ooo_engine_id][j]));
45          }
46      }
47
48    log_end(Register_unit_Glue,FUNCTION);
49  };
50
51}; // end namespace register_unit_glue
52}; // end namespace register_unit
53}; // end namespace execute_loop
54}; // end namespace multi_execute_loop
55}; // end namespace core
56
57}; // end namespace behavioural
58}; // end namespace morpheo             
59#endif
60//#endif
Note: See TracBrowser for help on using the repository browser.