source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/RegisterFile_Multi_Banked_Glue/src/RegisterFile_Multi_Banked_Glue_genMealy_read_in.cpp @ 48

Last change on this file since 48 was 23, checked in by rosiere, 17 years ago

Documentation pour chaque composant.
Documentation : ajout d'un poster et d'un article.
RegisterFile_Multi_Banked_Glue - non encore stable.

File size: 2.4 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/RegisterFile_Multi_Banked_Glue/include/RegisterFile_Multi_Banked_Glue.h"
10
11namespace morpheo {
12namespace behavioural {
13namespace generic {
14namespace registerfile{
15namespace registerfile_multi_banked {
16namespace registerfile_multi_banked_glue {
17
18  void RegisterFile_Multi_Banked_Glue::genMealy_read_in (void)
19  {
20    log_printf(FUNC,RegisterFile_Multi_Banked_Glue,"genMealy_read_in","Begin");
21   
22    for (uint32_t i=0; i<_param._nb_port_read; i++)
23      {
24        log_printf(ALL,RegisterFile_Multi_Banked_Glue,"genMealy_read_in","read_in [%d]",i);
25
26        uint32_t num_bank        = PORT_READ(in_READ_IN_ADDRESS [i])>>_param._shift_address;
27        uint32_t num_port_out    = *link_port_read_in_to_out    (i,num_bank);
28        uint32_t num_port_select = *link_port_read_in_to_select (i,num_bank);
29
30        if (_param._crossbar == FULL_CROSSBAR) 
31          {
32            // scearch in all possible destination the good
33            // if not found : num_port = 0
34            for (num_port = _param._nb_port_read_by_bank-1; num_port > 0; num_port --)
35              {
36                log_printf(ALL,RegisterFile_Multi_Banked_Glue,"genMealy_read_in","test read_out_port   %d",num_port);           
37               
38                for (uint32_t j=0; j<_param._nb_port_select_by_bank_read_port [num_port]; j++)
39                  {
40                log_printf(ALL,RegisterFile_Multi_Banked_Glue,"genMealy_read_in","test read_out_select %d",j);
41                    if (PORT_READ(in_READ_SELECT_ACK [num_bank][num_port][j])==1)
42                      goto end_FULL_CROSSBAR;
43                  }
44              }
45          }
46       
47        end_FULL_CROSSBAR :     
48         
49        log_printf(TRACE,RegisterFile_Multi_Banked_Glue,"genMealy_read_in","read_in [%d] address : %.8x - num_bank %d, num_port %d",i,static_cast<uint32_t>(PORT_READ(in_READ_IN_ADDRESS [i])),num_bank,num_port);
50       
51        PORT_WRITE(out_READ_IN_ACK  [i],PORT_READ(in_READ_SELECT_ACK [num_bank][num_port]));
52        PORT_WRITE(out_READ_IN_DATA [i],PORT_READ(in_READ_OUT_DATA   [num_bank][num_port]));
53//      (*(out_READ_IN_ACK  [l])) (*(in_READ_IN_ADDRESS [i][j]));
54//      (*(out_READ_IN_DATA [l])) (*(in_READ_IN_ADDRESS [i][j]));
55      }
56
57
58    log_printf(FUNC,RegisterFile_Multi_Banked_Glue,"genMealy_read_in","End");
59  };
60
61}; // end namespace registerfile_multi_banked_glue
62}; // end namespace registerfile_multi_banked
63}; // end namespace registerfile
64}; // end namespace generic
65}; // end namespace behavioural
66}; // end namespace morpheo             
67#endif
Note: See TracBrowser for help on using the repository browser.