Changeset 90
- Timestamp:
- Sep 13, 2010, 5:17:41 PM (14 years ago)
- Location:
- trunk/modules/vci_cc_xcache_wrapper_v4/caba/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_cc_xcache_wrapper_v4/caba/source/include/vci_cc_xcache_wrapper_v4.h
r2 r90 52 52 : public soclib::caba::BaseModule 53 53 { 54 typedef sc_dt::sc_uint<40> addr_40;55 typedef uint32_t data_t;56 typedef uint32_t tag_t;57 typedef uint32_t be_t;54 typedef sc_dt::sc_uint<40> addr_40; 55 typedef uint32_t data_t; 56 typedef uint32_t tag_t; 57 typedef uint32_t be_t; 58 58 typedef typename vci_param::fast_addr_t vci_addr_t; 59 59 enum dcache_fsm_state_e { … … 194 194 195 195 sc_signal<int> r_vci_tgt_fsm; 196 sc_signal<addr_40> 196 sc_signal<addr_40> r_tgt_addr; 197 197 sc_signal<size_t> r_tgt_word; 198 198 sc_signal<bool> r_tgt_update; … … 274 274 ~VciCcXCacheWrapperV4(); 275 275 276 void print_trace(); 276 277 void print_cpi(); 277 278 void print_stats(); -
trunk/modules/vci_cc_xcache_wrapper_v4/caba/source/src/vci_cc_xcache_wrapper_v4.cpp
r83 r90 64 64 namespace caba { 65 65 66 #if DEBUG_CC_XCACHE_WRAPPER67 66 namespace { 68 67 const char *dcache_fsm_state_str[] = { … … 126 125 }; 127 126 } 128 #endif129 127 130 128 #define tmpl(...) template<typename vci_param, typename iss_t> __VA_ARGS__ VciCcXCacheWrapperV4<vci_param, iss_t> … … 134 132 ///////////////////////////////// 135 133 tmpl(/**/)::VciCcXCacheWrapperV4( 136 134 ///////////////////////////////// 137 135 sc_module_name name, 138 136 int proc_id, … … 248 246 /////////////////////////////////// 249 247 tmpl(/**/)::~VciCcXCacheWrapperV4() 250 248 /////////////////////////////////// 251 249 { 252 250 delete [] r_icache_miss_buf; … … 258 256 //////////////////////// 259 257 tmpl(void)::print_cpi() 260 258 //////////////////////// 261 259 { 262 260 std::cout << "CPU " << m_srcid_rw << " : CPI = " … … 265 263 //////////////////////// 266 264 tmpl(void)::print_stats() 267 265 //////////////////////// 268 266 { 269 267 float run_cycles = (float)(m_cpt_total_cycles - m_cpt_frz_cycles); … … 287 285 std::cout << "- WRITE LENGTH = " << (float)m_length_write_transaction/m_cpt_write_transaction << std::endl; 288 286 } 289 287 ///////////////////////// 288 tmpl(void)::print_trace() 289 ///////////////////////// 290 { 291 typename iss_t::InstructionRequest ireq; 292 typename iss_t::DataRequest dreq; 293 m_iss.getRequests( ireq, dreq ); 294 295 std::cout << std::dec << "CC_XCACHE_WRAPPER " << m_srcid_rw << std::endl; 296 std::cout << " cache state : " << icache_fsm_state_str[r_icache_fsm] << " / " 297 << dcache_fsm_state_str[r_dcache_fsm] << " / " 298 << cmd_fsm_state_str[r_vci_cmd_fsm] << " / " 299 << rsp_fsm_state_str[r_vci_rsp_fsm] << " / " 300 << tgt_fsm_state_str[r_vci_tgt_fsm] << std::endl; 301 std::cout << " proc state : PC = " << ireq.addr << " / AD = " << dreq.addr 302 << " / V = " << dreq.valid << " TYPE = " << dreq.type << std::endl; 303 } 290 304 ////////////////////////// 291 305 tmpl(void)::transition() 292 306 ////////////////////////// 293 307 { 294 308 if ( ! p_resetn.read() ) { … … 1644 1658 ////////////////////////////////////////////////////////////////////////////////// 1645 1659 tmpl(void)::genMoore() 1646 1660 ////////////////////////////////////////////////////////////////////////////////// 1647 1661 { 1648 1662 // VCI initiator response
Note: See TracChangeset
for help on using the changeset viewer.