- Timestamp:
- Oct 17, 2013, 8:50:46 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
r537 r549 654 654 655 655 ////////////////////////////////////////////////// 656 tmpl(void)::print_trace( )656 tmpl(void)::print_trace( size_t detailed ) 657 657 ////////////////////////////////////////////////// 658 658 { … … 676 676 << " | " << alloc_ivt_fsm_str[r_alloc_ivt_fsm.read()] 677 677 << " | " << alloc_heap_fsm_str[r_alloc_heap_fsm.read()] << std::endl; 678 679 if ( detailed ) m_trt.print(0); 678 680 } 679 681 … … 4011 4013 4012 4014 assert( ((p_vci_ixr.rerror.read() & 0x1) == 0) and 4013 4015 "MEMC ERROR in IXR_RSP state: XRAM response error !"); 4014 4016 4015 4017 if (p_vci_ixr.reop.read()) // PUT … … 4018 4020 4019 4021 #if DEBUG_MEMC_IXR_RSP 4020 4021 4022 4022 if (m_debug) 4023 std::cout << " <MEMC " << name() 4024 << " IXR_RSP_IDLE> Response from XRAM to a put transaction" << std::endl; 4023 4025 #endif 4024 4026 } … … 4028 4030 4029 4031 #if DEBUG_MEMC_IXR_RSP 4030 4031 4032 4033 #endif 4034 } 4035 } 4036 break; 4037 } 4038 4032 if (m_debug) 4033 std::cout << " <MEMC " << name() 4034 << " IXR_RSP_IDLE> Response from XRAM to a get transaction" << std::endl; 4035 #endif 4036 } 4037 } 4038 break; 4039 } 4040 //////////////////////// 4039 4041 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 4053 if (m_debug) 4054 std::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; 4047 4081 r_ixr_rsp_fsm = IXR_RSP_IDLE; 4082 } 4048 4083 4049 4084 #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 } 4085 if (m_debug) 4086 std::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 } 4093 4094 } // end swich r_ixr_rsp_fsm 4094 4095
Note: See TracChangeset
for help on using the changeset viewer.