Changeset 68
- Timestamp:
- Aug 2, 2010, 6:53:05 PM (14 years ago)
- Location:
- trunk/modules/vci_cc_vcache_wrapper2_v1/caba/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_cc_vcache_wrapper2_v1/caba/source/include/vci_cc_vcache_wrapper2_v1.h
r50 r68 114 114 DCACHE_SC_DIRTY_WAIT, // 19 115 115 DCACHE_WRITE_UPDT, // 1a 116 DCACHE_WRITE_DIRTY, // 1b 117 DCACHE_WRITE_REQ, // 1c 118 DCACHE_MISS_WAIT, // 1d 119 DCACHE_MISS_UPDT, // 1e 120 DCACHE_UNC_WAIT, // 1f 121 DCACHE_ERROR, // 20 122 DCACHE_ITLB_READ, // 21 123 DCACHE_ITLB_UPDT, // 22 124 DCACHE_ITLB_LL_WAIT, // 23 125 DCACHE_ITLB_SC_WAIT, // 24 126 DCACHE_CC_CHECK, // 25 127 DCACHE_CC_INVAL, // 26 128 DCACHE_CC_UPDT, // 27 129 DCACHE_CC_NOP, // 28 130 DCACHE_TLB_CC_INVAL, // 29 131 DCACHE_ITLB_CLEANUP, // 2a 116 DCACHE_WRITE_REQ, // 1b 117 DCACHE_MISS_WAIT, // 1c 118 DCACHE_MISS_UPDT, // 1d 119 DCACHE_UNC_WAIT, // 1e 120 DCACHE_ERROR, // 1f 121 DCACHE_ITLB_READ, // 20 122 DCACHE_ITLB_UPDT, // 21 123 DCACHE_ITLB_LL_WAIT, // 22 124 DCACHE_ITLB_SC_WAIT, // 23 125 DCACHE_CC_CHECK, // 24 126 DCACHE_CC_INVAL, // 25 127 DCACHE_CC_UPDT, // 26 128 DCACHE_CC_NOP, // 27 129 DCACHE_TLB_CC_INVAL, // 28 130 DCACHE_ITLB_CLEANUP, // 29 132 131 }; 133 132 -
trunk/modules/vci_cc_vcache_wrapper2_v1/caba/source/src/vci_cc_vcache_wrapper2_v1.cpp
r62 r68 85 85 "DCACHE_SC_DIRTY_WAIT", 86 86 "DCACHE_WRITE_UPDT", 87 "DCACHE_WRITE_DIRTY",88 87 "DCACHE_WRITE_REQ", 89 88 "DCACHE_MISS_WAIT", … … 3057 3056 else 3058 3057 { 3059 r_dcache_fsm = DCACHE_WRITE_DIRTY; 3058 /* 3059 * SC succeeded, but has updated the cache and 3060 * invalidated the TLB entry. Redo the translation 3061 */ 3062 r_dcache_fsm = DCACHE_IDLE; 3060 3063 } 3061 3064 } … … 4482 4485 break; 4483 4486 } 4484 ////////////////////////4485 case DCACHE_WRITE_DIRTY:4486 {4487 m_cost_data_tlb_update_dirty_frz++;4488 4489 // external cache invalidate request4490 if ( r_tgt_dcache_req )4491 {4492 r_dcache_fsm = DCACHE_CC_CHECK;4493 r_dcache_fsm_save = r_dcache_fsm;4494 break;4495 }4496 4497 if ( r_dcache_inval_tlb_rsp ) // Miss read response and tlb invalidation4498 {4499 r_dcache_fsm = DCACHE_IDLE;4500 r_dcache_inval_tlb_rsp = false;4501 break;4502 }4503 4504 if ( r_dcache_inval_rsp ) // TLB miss response and cache invalidation4505 {4506 r_dcache_fsm = DCACHE_IDLE;4507 r_dcache_inval_rsp = false;4508 break;4509 }4510 4511 m_cpt_dcache_data_write++;4512 r_dcache.write(r_dcache_tlb_paddr, r_dcache_pte_update);4513 dcache_tlb.setdirty(r_dcache_tlb_way_save, r_dcache_tlb_set_save);4514 r_dcache_fsm = DCACHE_WRITE_REQ;4515 drsp.valid = true;4516 drsp.rdata = 0;4517 break;4518 }4519 4487 ///////////////// 4520 4488 case DCACHE_ERROR: … … 4758 4726 } 4759 4727 4760 // DCACHE_TLB1_LL_WAIT DCACHE_TLB1_SC_WAIT DCACHE_LL_DIRTY_WAIT DCACHE_ WRITE_DIRTY DCACHE_ITLB_LL_WAIT DCACHE_ITLB_SC_WAIT4728 // DCACHE_TLB1_LL_WAIT DCACHE_TLB1_SC_WAIT DCACHE_LL_DIRTY_WAIT DCACHE_ITLB_LL_WAIT DCACHE_ITLB_SC_WAIT 4761 4729 // DCACHE_TLB2_LL_WAIT DCACHE_TLB2_SC_WAIT DCACHE_SC_DIRTY_WAIT 4762 4730 if((( /*( r_dcache_fsm_save == DCACHE_UNC_WAIT ) ||*/ … … 4768 4736 ( r_dcache_fsm_save == DCACHE_TLB1_LL_WAIT ) || ( r_dcache_fsm_save == DCACHE_TLB2_LL_WAIT ) || 4769 4737 ( r_dcache_fsm_save == DCACHE_TLB1_SC_WAIT ) || ( r_dcache_fsm_save == DCACHE_TLB2_SC_WAIT ) || 4770 ( r_dcache_fsm_save == DCACHE_LL_DIRTY_WAIT ) || ( r_dcache_fsm_save == DCACHE_SC_DIRTY_WAIT ) || 4771 ( r_dcache_fsm_save == DCACHE_WRITE_DIRTY )*/ ) && 4738 ( r_dcache_fsm_save == DCACHE_LL_DIRTY_WAIT ) || ( r_dcache_fsm_save == DCACHE_SC_DIRTY_WAIT ) */ ) && 4772 4739 ( (r_dcache_tlb_paddr.read() & ~((m_dcache_words<<2)-1)) == (r_tgt_addr.read() & ~((m_dcache_words<<2)-1))) ) 4773 4740 || (( ( r_dcache_fsm_save == DCACHE_ITLB_READ ) || ( r_dcache_fsm_save == DCACHE_ITLB_UPDT ) /*|| … … 4775 4742 ( (r_icache_paddr_save.read() & ~((m_dcache_words<<2)-1)) == (r_tgt_addr.read() & ~((m_dcache_words<<2)-1))) ) ) 4776 4743 { 4744 data_t dcache_rdata = 0; 4745 size_t way = 0; 4746 size_t set = 0; 4747 bool dcache_hit = r_dcache.read(r_tgt_addr.read(), &dcache_rdata, way, &set);; 4748 assert(!dcache_hit && "ignored update req should not be in dcache"); 4749 4777 4750 r_dcache_inval_rsp = true; 4778 4751 r_tgt_dcache_req = false; … … 4941 4914 ( r_dcache_fsm_save == DCACHE_TLB1_UPDT ) || ( r_dcache_fsm_save == DCACHE_TLB2_UPDT ) || 4942 4915 ( r_dcache_fsm_save == DCACHE_DTLB1_READ_CACHE ) || ( r_dcache_fsm_save == DCACHE_DTLB2_READ_CACHE ) || 4943 ( r_dcache_fsm_save == DCACHE_LL_DIRTY_WAIT ) || ( r_dcache_fsm_save == DCACHE_SC_DIRTY_WAIT ) || 4944 ( r_dcache_fsm_save == DCACHE_WRITE_DIRTY )) && 4916 ( r_dcache_fsm_save == DCACHE_LL_DIRTY_WAIT ) || ( r_dcache_fsm_save == DCACHE_SC_DIRTY_WAIT ) ) && 4945 4917 (((r_dcache_tlb_paddr.read() & ~((m_dcache_words<<2)-1)) >> (uint32_log2(m_dcache_words) + 2)) == r_dcache_dtlb_inval_line.read()) ) 4946 4918 {
Note: See TracChangeset
for help on using the changeset viewer.