Changeset 423 for trunk/modules/vci_cc_vcache_wrapper/caba
- Timestamp:
- Jun 28, 2013, 6:16:48 PM (12 years ago)
- Location:
- trunk/modules/vci_cc_vcache_wrapper/caba/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_cc_vcache_wrapper/caba/source/include/vci_cc_vcache_wrapper.h
r421 r423 677 677 678 678 uint32_t m_cpt_stop_simulation; // used to stop simulation if frozen 679 bool m_monitor_ok; // used to stop simulation if frozen 680 uint32_t m_monitor_base; // used to stop simulation if frozen 681 uint32_t m_monitor_length; // used to stop simulation if frozen 679 682 680 683 protected: … … 713 716 void print_trace(size_t mode = 0); 714 717 void cache_monitor(paddr_t addr); 718 void start_monitor(paddr_t,paddr_t); 719 void stop_monitor(); 715 720 inline void iss_set_debug_mask(uint v) 716 721 { -
trunk/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp
r421 r423 128 128 "CMD_DATA_SC", 129 129 "CMD_DATA_CAS", 130 }; 131 132 const char *vci_pktid_type_str[] = { 133 "TYPE_READ_DATA_UNC", 134 "TYPE_READ_DATA_MISS", 135 "TYPE_READ_INS_UNC", 136 "TYPE_READ_INS_MISS", 137 "TYPE_WRITE", 138 "TYPE_CAS", 139 "TYPE_LL", 140 "TYPE_SC", 141 }; 142 143 const char *vci_cmd_type_str[] = { 144 "NOP or STORE_COND", 145 "READ", 146 "WRITE", 147 "LOCKED_READ" 130 148 }; 131 149 … … 888 906 // init the llsc reservation buffer 889 907 r_dcache_llsc_valid = false; 908 m_monitor_ok = false; 890 909 891 910 return; … … 1804 1823 else // no match 1805 1824 { 1806 int state ;1807 size_t way ;1808 size_t set ;1809 size_t word ;1825 int state = 0; 1826 size_t way = 0; 1827 size_t set = 0; 1828 size_t word = 0; 1810 1829 1811 1830 #ifdef INSTRUMENTATION … … 3885 3904 if ( not r_dcache_cc_send_req.read() ) // blocked until previous cc_send request is sent 3886 3905 { 3887 bool found ;3888 bool cleanup ;3889 size_t way ;3890 size_t set ;3891 paddr_t victim ;3906 bool found = false; 3907 bool cleanup = false; 3908 size_t way = 0; 3909 size_t set = 0; 3910 paddr_t victim = 0; 3892 3911 3893 3912 #ifdef INSTRUMENTATION … … 4481 4500 else // no match 4482 4501 { 4483 int state ;4484 size_t way ;4485 size_t set ;4486 size_t word ;4502 int state = 0; 4503 size_t way = 0; 4504 size_t set = 0; 4505 size_t word = 0; 4487 4506 4488 4507 #ifdef INSTRUMENTATION … … 4920 4939 //////////////////////////////////////////////////////////////////////////////////// 4921 4940 4941 4922 4942 switch ( r_vci_cmd_fsm.read() ) 4923 4943 { … … 5059 5079 { 5060 5080 // all read VCI commands contain one single flit 5061 if ( p_vci.cmdack.read() ) r_vci_cmd_fsm = CMD_IDLE; 5081 if ( p_vci.cmdack.read() ) { 5082 r_vci_cmd_fsm = CMD_IDLE; 5083 } 5062 5084 break; 5063 5085 } … … 5720 5742 p_vci.cfixed = false; 5721 5743 5744 if ( m_monitor_ok ) { 5745 if ( p_vci.cmdack.read() == true and p_vci.cmdval == true) { 5746 if (((p_vci.address.read()) >= m_monitor_base) and 5747 ((p_vci.address.read()) < m_monitor_base + m_monitor_length) ) { 5748 std::cout << "CC_VCACHE Monitor " << name() << std::hex 5749 << " Access type = " << vci_cmd_type_str[p_vci.cmd.read()] 5750 << " Pktid type = " << vci_pktid_type_str[p_vci.pktid.read()] 5751 << " : address = " << p_vci.address.read() 5752 << " / be = " << p_vci.be.read(); 5753 if ( p_vci.cmd.read() == vci_param::CMD_WRITE ) { 5754 std::cout << " / data = " << p_vci.wdata.read(); 5755 } 5756 std::cout << std::dec << std::endl; 5757 } 5758 } 5759 } 5760 5722 5761 switch ( r_vci_cmd_fsm.read() ) { 5723 5762 … … 6064 6103 r_cc_receive_updt_fifo_be.empty()) 6065 6104 or 6066 (( r_cc_receive_data_ins.read() == 1) and6105 (((r_cc_receive_data_ins.read() == 1) and 6067 6106 not r_cc_receive_icache_req.read()) and 6068 r_cc_receive_updt_fifo_be.empty()) 6107 r_cc_receive_updt_fifo_be.empty())) 6069 6108 p_dspin_in.read = true; 6070 6109 else … … 6100 6139 } // end genMoore 6101 6140 6141 tmpl(void)::start_monitor(paddr_t base, paddr_t length) 6142 // This version of monitor print both Read and Write request 6143 { 6144 m_monitor_ok = true; 6145 m_monitor_base = base; 6146 m_monitor_length = length; 6147 } 6148 6149 tmpl(void)::stop_monitor() 6150 { 6151 m_monitor_ok = false; 6152 } 6153 6102 6154 }} 6103 6155
Note: See TracChangeset
for help on using the changeset viewer.