Ignore:
Timestamp:
Oct 17, 2013, 8:50:46 PM (11 years ago)
Author:
alain
Message:

Compliance with mapping_table defined in release 2462
Introducing the dspin_router_tsar component used in tsar_generic_iob
platform to implement the RAM networt (between L2 & L3).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp

    r537 r549  
    654654
    655655    //////////////////////////////////////////////////
    656     tmpl(void)::print_trace()
     656    tmpl(void)::print_trace( size_t detailed )
    657657    //////////////////////////////////////////////////
    658658    {
     
    676676            << " | " << alloc_ivt_fsm_str[r_alloc_ivt_fsm.read()]
    677677            << " | " << alloc_heap_fsm_str[r_alloc_heap_fsm.read()] << std::endl;
     678
     679        if ( detailed ) m_trt.print(0);
    678680    }
    679681
     
    40114013
    40124014                        assert( ((p_vci_ixr.rerror.read() & 0x1) == 0) and
    4013                                 "MEMC ERROR in IXR_RSP state: XRAM response error !");
     4015                        "MEMC ERROR in IXR_RSP state: XRAM response error !");
    40144016
    40154017                        if (p_vci_ixr.reop.read())   // PUT
     
    40184020
    40194021#if DEBUG_MEMC_IXR_RSP
    4020                             if (m_debug)
    4021                                 std::cout << "  <MEMC " << name()
    4022                                     << " IXR_RSP_IDLE> Response from XRAM to a put transaction" << std::endl;
     4022if (m_debug)
     4023std::cout << "  <MEMC " << name()
     4024          << " IXR_RSP_IDLE> Response from XRAM to a put transaction" << std::endl;
    40234025#endif
    40244026                        }
     
    40284030
    40294031#if DEBUG_MEMC_IXR_RSP
    4030                             if (m_debug)
    4031                                 std::cout << "  <MEMC " << name()
    4032                                     << " IXR_RSP_IDLE> Response from XRAM to a get transaction" << std::endl;
    4033 #endif
    4034                         }
    4035                     }
    4036                     break;
    4037                 }
    4038                 ////////////////////////
     4032if (m_debug)
     4033std::cout << "  <MEMC " << name()
     4034          << " IXR_RSP_IDLE> Response from XRAM to a get transaction" << std::endl;
     4035#endif
     4036                        }
     4037                    }
     4038                    break;
     4039                }
     4040            ////////////////////////
    40394041            case IXR_RSP_TRT_ERASE:   // erase the entry in the TRT
    4040                 // decrease the line counter if config request
    4041                 {
    4042                     if (r_alloc_trt_fsm.read() == ALLOC_TRT_IXR_RSP)
    4043                     {
    4044                         size_t  index = r_ixr_rsp_trt_index.read();
    4045                         if (m_trt.is_config(index)) r_config_rsp_lines = r_config_rsp_lines.read() - 1;
    4046                         m_trt.erase(index);
     4042                                      // decrease the line counter if config request
     4043            {
     4044                if (r_alloc_trt_fsm.read() == ALLOC_TRT_IXR_RSP)
     4045                {
     4046                    size_t  index = r_ixr_rsp_trt_index.read();
     4047                    if (m_trt.is_config(index))
     4048                        r_config_rsp_lines = r_config_rsp_lines.read() - 1;
     4049                    m_trt.erase(index);
     4050                    r_ixr_rsp_fsm = IXR_RSP_IDLE;
     4051
     4052#if DEBUG_MEMC_IXR_RSP
     4053if (m_debug)
     4054std::cout << "  <MEMC " << name() << " IXR_RSP_TRT_ERASE> Erase TRT entry "
     4055          << r_ixr_rsp_trt_index.read() << std::endl;
     4056#endif
     4057                }
     4058                break;
     4059            }
     4060            //////////////////////
     4061            case IXR_RSP_TRT_READ:    // write a 64 bits data word in TRT
     4062            {
     4063                if ((r_alloc_trt_fsm.read() == ALLOC_TRT_IXR_RSP) and  p_vci_ixr.rspval)
     4064                {
     4065                    size_t      index    = r_ixr_rsp_trt_index.read();
     4066                    size_t      word     = r_ixr_rsp_cpt.read();
     4067                    bool        eop      = p_vci_ixr.reop.read();
     4068                    wide_data_t data     = p_vci_ixr.rdata.read();
     4069                    bool        error    = ((p_vci_ixr.rerror.read() & 0x1) == 1);
     4070
     4071                    assert(((eop == (word == (m_words-2))) or error) and
     4072                    "MEMC ERROR in IXR_RSP_TRT_READ state : invalid response from XRAM");
     4073
     4074                    m_trt.write_rsp( index, word, data );
     4075
     4076                    r_ixr_rsp_cpt = word + 2;
     4077
     4078                    if (eop )
     4079                    {
     4080                        r_ixr_rsp_to_xram_rsp_rok[r_ixr_rsp_trt_index.read()] = true;
    40474081                        r_ixr_rsp_fsm = IXR_RSP_IDLE;
     4082                    }
    40484083
    40494084#if DEBUG_MEMC_IXR_RSP
    4050                         if (m_debug)
    4051                             std::cout << "  <MEMC " << name() << " IXR_RSP_TRT_ERASE> Erase TRT entry "
    4052                                 << r_ixr_rsp_trt_index.read() << std::endl;
    4053 #endif
    4054                     }
    4055                     break;
    4056                 }
    4057                 //////////////////////
    4058             case IXR_RSP_TRT_READ:    // write a 64 bits data word in TRT
    4059                 {
    4060                     if ((r_alloc_trt_fsm.read() == ALLOC_TRT_IXR_RSP) and  p_vci_ixr.rspval)
    4061                     {
    4062                         size_t      index    = r_ixr_rsp_trt_index.read();
    4063                         size_t      word     = r_ixr_rsp_cpt.read();
    4064                         bool        eop      = p_vci_ixr.reop.read();
    4065                         wide_data_t data     = p_vci_ixr.rdata.read();
    4066                         bool        error    = ((p_vci_ixr.rerror.read() & 0x1) == 1);
    4067 
    4068                         assert(((eop == (word == (m_words-2))) or error) and
    4069                                 "MEMC ERROR in IXR_RSP_TRT_READ state : invalid response from XRAM");
    4070 
    4071                         m_trt.write_rsp( index,
    4072                                 word,
    4073                                 data );
    4074 
    4075                         r_ixr_rsp_cpt = word + 2;
    4076 
    4077                         if (eop )
    4078                         {
    4079                             r_ixr_rsp_to_xram_rsp_rok[r_ixr_rsp_trt_index.read()] = true;
    4080                             r_ixr_rsp_fsm = IXR_RSP_IDLE;
    4081                         }
    4082 
    4083 #if DEBUG_MEMC_IXR_RSP
    4084                         if (m_debug)
    4085                             std::cout << "  <MEMC " << name() << " IXR_RSP_TRT_READ> Writing 2 words in TRT : "
    4086                                 << " index = " << std::dec << index
    4087                                 << " / word = " << word
    4088                                 << " / data = " << std::hex << data << std::endl;
    4089 #endif
    4090                     }
    4091                     break;
    4092                 }
     4085if (m_debug)
     4086std::cout << "  <MEMC " << name() << " IXR_RSP_TRT_READ> Writing 2 words in TRT : "
     4087          << " index = " << std::dec << index
     4088          << " / word = " << word
     4089          << " / data = " << std::hex << data << std::endl;
     4090#endif
     4091                }
     4092                break;
     4093            }
    40934094        } // end swich r_ixr_rsp_fsm
    40944095
Note: See TracChangeset for help on using the changeset viewer.