Changeset 492 for branches/ODCCP
- Timestamp:
- Aug 12, 2013, 11:43:13 AM (11 years ago)
- Location:
- branches/ODCCP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ODCCP/lib/generic_tlb_odccp/include/generic_tlb.h
r452 r492 44 44 * - bool R remotely accessed 45 45 * - bool C cachable 46 * - bool CCCoherente46 * - bool NCC Non Coherente 47 47 * - bool W writable 48 48 * - bool X executable … … 94 94 bool r; // remotely accessed 95 95 bool c; // cacheable 96 bool cc; //Coherent (for ODCCP)96 bool ncc; // Non Coherent (for ODCCP) 97 97 bool w; // writable 98 98 bool x; // executable … … 128 128 PTE_G_MASK = 0x00800000, // global bit in PTE 129 129 PTE_D_MASK = 0x00400000, // dirty bit in PTE 130 PTE_ CC_MASK = 0x00200000, //Coherent bit in PTE (for ODCCP)130 PTE_NCC_MASK = 0x00200000, // Non Coherent bit in PTE (for ODCCP) 131 131 }; 132 132 … … 143 143 PTE_G_SHIFT = 23, 144 144 PTE_D_SHIFT = 22, 145 PTE_ CC_SHIFT = 21,145 PTE_NCC_SHIFT = 21, 146 146 }; 147 147 … … 178 178 bool *m_big; 179 179 bool *m_recent; 180 bool *m_ coherent; // for ODCCP180 bool *m_non_coherent; // for ODCCP 181 181 182 182 // bypass registers … … 254 254 } 255 255 ////////////////////////////////////// 256 bool get_ coherent(size_t way, size_t set)257 { 258 return m_ coherent[(way*m_nsets)+set];256 bool get_non_coherent(size_t way, size_t set) 257 { 258 return m_non_coherent[(way*m_nsets)+set]; 259 259 } 260 260 ////////////////////////////////////// … … 307 307 m_big = new bool[nways * nsets]; 308 308 m_recent = new bool[nways * nsets]; 309 m_ coherent= new bool[nways * nsets];309 m_non_coherent = new bool[nways * nsets]; 310 310 311 311 } // end constructor … … 328 328 delete [] m_big; 329 329 delete [] m_recent; 330 delete [] m_ coherent;330 delete [] m_non_coherent; 331 331 } 332 332 … … 367 367 (get_vpn(way,m_set) == (vaddress >> (PAGE_M_NBITS + m_sets_shift))) ) 368 368 { 369 pte_info->v = get_valid(way,m_set);370 pte_info->l = get_local(way,m_set);371 pte_info->r = get_remote(way,m_set);372 pte_info->c = get_cacheable(way,m_set);373 pte_info->w = get_writable(way,m_set);374 pte_info->x = get_executable(way,m_set);375 pte_info->u = get_unprotected(way,m_set);376 pte_info->g = get_global(way,m_set);377 pte_info->d = get_dirty(way,m_set);378 pte_info->b = get_big(way,m_set);379 pte_info->z = get_recent(way,m_set);380 pte_info-> cc = get_coherent(way,m_set); // coherent/not coherent bit for ODCCP369 pte_info->v = get_valid(way,m_set); 370 pte_info->l = get_local(way,m_set); 371 pte_info->r = get_remote(way,m_set); 372 pte_info->c = get_cacheable(way,m_set); 373 pte_info->w = get_writable(way,m_set); 374 pte_info->x = get_executable(way,m_set); 375 pte_info->u = get_unprotected(way,m_set); 376 pte_info->g = get_global(way,m_set); 377 pte_info->d = get_dirty(way,m_set); 378 pte_info->b = get_big(way,m_set); 379 pte_info->z = get_recent(way,m_set); 380 pte_info->ncc = get_non_coherent(way,m_set); // coherent/not coherent bit for ODCCP 381 381 382 382 *nline = get_nline(way,m_set); … … 395 395 (get_vpn(way,k_set) == (vaddress >> (PAGE_K_NBITS + m_sets_shift))) ) 396 396 { 397 pte_info->v = get_valid(way,k_set);398 pte_info->l = get_local(way,k_set);399 pte_info->r = get_remote(way,k_set);400 pte_info->c = get_cacheable(way,k_set);401 pte_info->w = get_writable(way,k_set);402 pte_info->x = get_executable(way,k_set);403 pte_info->u = get_unprotected(way,k_set);404 pte_info->g = get_global(way,k_set);405 pte_info->d = get_dirty(way,k_set);406 pte_info->b = get_big(way,k_set);407 pte_info->z = get_recent(way,k_set);408 pte_info-> cc = get_coherent(way,k_set);// coherent/not coherent bit for ODCCP397 pte_info->v = get_valid(way,k_set); 398 pte_info->l = get_local(way,k_set); 399 pte_info->r = get_remote(way,k_set); 400 pte_info->c = get_cacheable(way,k_set); 401 pte_info->w = get_writable(way,k_set); 402 pte_info->x = get_executable(way,k_set); 403 pte_info->u = get_unprotected(way,k_set); 404 pte_info->g = get_global(way,k_set); 405 pte_info->d = get_dirty(way,k_set); 406 pte_info->b = get_big(way,k_set); 407 pte_info->z = get_recent(way,k_set); 408 pte_info->ncc = get_non_coherent(way,k_set);// coherent/not coherent bit for ODCCP 409 409 410 410 *nline = get_nline(way,k_set); … … 489 489 paddr_t* nline) 490 490 { 491 flags->v = m_valid[way*m_nsets+set];492 flags->l = m_local[way*m_nsets+set];493 flags->r = m_remote[way*m_nsets+set];494 flags->c = m_cacheable[way*m_nsets+set];495 flags->w = m_writable[way*m_nsets+set];496 flags->x = m_executable[way*m_nsets+set];497 flags->u = m_unprotected[way*m_nsets+set];498 flags->g = m_global[way*m_nsets+set];499 flags->d = m_dirty[way*m_nsets+set];500 flags->b = m_big[way*m_nsets+set];501 flags->z = m_recent[way*m_nsets+set];502 flags-> cc = m_coherent[way*m_nsets+set]; // flag coherent/not coherent for ODCCP491 flags->v = m_valid[way*m_nsets+set]; 492 flags->l = m_local[way*m_nsets+set]; 493 flags->r = m_remote[way*m_nsets+set]; 494 flags->c = m_cacheable[way*m_nsets+set]; 495 flags->w = m_writable[way*m_nsets+set]; 496 flags->x = m_executable[way*m_nsets+set]; 497 flags->u = m_unprotected[way*m_nsets+set]; 498 flags->g = m_global[way*m_nsets+set]; 499 flags->d = m_dirty[way*m_nsets+set]; 500 flags->b = m_big[way*m_nsets+set]; 501 flags->z = m_recent[way*m_nsets+set]; 502 flags->ncc = m_non_coherent[way*m_nsets+set]; // flag coherent/not coherent for ODCCP 503 503 504 504 *ppn = m_ppn[way*m_nsets+set]; … … 592 592 m_big[way*m_nsets+set] = false; 593 593 } 594 m_nline[way*m_nsets+set] = nline;595 m_valid[way*m_nsets+set] = true;596 m_recent[way*m_nsets+set] = true;597 m_local[way*m_nsets+set] = (((pte_flags & PTE_L_MASK) >> PTE_L_SHIFT) == 1) ? true : false;598 m_remote[way*m_nsets+set] = (((pte_flags & PTE_R_MASK) >> PTE_R_SHIFT) == 1) ? true : false;599 m_cacheable[way*m_nsets+set] = (((pte_flags & PTE_C_MASK) >> PTE_C_SHIFT) == 1) ? true : false;600 m_writable[way*m_nsets+set] = (((pte_flags & PTE_W_MASK) >> PTE_W_SHIFT) == 1) ? true : false;601 m_executable[way*m_nsets+set] = (((pte_flags & PTE_X_MASK) >> PTE_X_SHIFT) == 1) ? true : false;602 m_unprotected[way*m_nsets+set] = (((pte_flags & PTE_U_MASK) >> PTE_U_SHIFT) == 1) ? true : false;603 m_global[way*m_nsets+set] = (((pte_flags & PTE_G_MASK) >> PTE_G_SHIFT) == 1) ? true : false;604 m_dirty[way*m_nsets+set] = (((pte_flags & PTE_D_MASK) >> PTE_D_SHIFT) == 1) ? true : false;605 m_ coherent[way*m_nsets+set] = (((pte_flags & PTE_CC_MASK) >> PTE_CC_SHIFT) == 1) ? true : false; // for ODCCP594 m_nline[way*m_nsets+set] = nline; 595 m_valid[way*m_nsets+set] = true; 596 m_recent[way*m_nsets+set] = true; 597 m_local[way*m_nsets+set] = (((pte_flags & PTE_L_MASK) >> PTE_L_SHIFT) == 1) ? true : false; 598 m_remote[way*m_nsets+set] = (((pte_flags & PTE_R_MASK) >> PTE_R_SHIFT) == 1) ? true : false; 599 m_cacheable[way*m_nsets+set] = (((pte_flags & PTE_C_MASK) >> PTE_C_SHIFT) == 1) ? true : false; 600 m_writable[way*m_nsets+set] = (((pte_flags & PTE_W_MASK) >> PTE_W_SHIFT) == 1) ? true : false; 601 m_executable[way*m_nsets+set] = (((pte_flags & PTE_X_MASK) >> PTE_X_SHIFT) == 1) ? true : false; 602 m_unprotected[way*m_nsets+set] = (((pte_flags & PTE_U_MASK) >> PTE_U_SHIFT) == 1) ? true : false; 603 m_global[way*m_nsets+set] = (((pte_flags & PTE_G_MASK) >> PTE_G_SHIFT) == 1) ? true : false; 604 m_dirty[way*m_nsets+set] = (((pte_flags & PTE_D_MASK) >> PTE_D_SHIFT) == 1) ? true : false; 605 m_non_coherent[way*m_nsets+set] = (((pte_flags & PTE_NCC_MASK) >> PTE_NCC_SHIFT) == 1) ? true : false; // for ODCCP 606 606 } // end write() 607 607 … … 754 754 void printTrace() 755 755 { 756 std::cout << " set way V L R C W X U G D B Z CC"756 std::cout << " set way V L R C W X U G D B Z NCC" 757 757 << " TAG PPN NLINE" << std::endl; 758 758 … … 776 776 << m_big[m_nsets*way+set] << "][" 777 777 << m_recent[m_nsets*way+set] << "][" 778 << m_ coherent[m_nsets*way+set] << "]["778 << m_non_coherent[m_nsets*way+set] << "][" 779 779 << std::hex << std::showbase 780 780 << std::setw(7) << m_vpn[m_nsets*way+set] << "][" -
branches/ODCCP/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp
r479 r492 36 36 #define DEBUG_CLEANUP 1 37 37 #define INSTRUMENTATION 1 38 #define FETCH_ON_WRITE_ENABLE 138 #define FETCH_ON_WRITE_ENABLE 0 39 39 #define DEBUG_CMD 0 40 40 … … 1093 1093 1094 1094 // coherence interrupt 1095 if ( r_cc_receive_icache_req.read() )1095 if ( r_cc_receive_icache_req.read() and not r_icache_cc_send_req.read() ) 1096 1096 { 1097 1097 r_icache_fsm = ICACHE_CC_CHECK; … … 1330 1330 1331 1331 // coherence interrupt 1332 if ( r_cc_receive_icache_req.read() )1332 if ( r_cc_receive_icache_req.read() and not r_icache_cc_send_req.read() ) 1333 1333 { 1334 1334 r_icache_fsm = ICACHE_CC_CHECK; … … 1382 1382 1383 1383 // coherence request (from CC_RECEIVE FSM) 1384 if ( r_cc_receive_icache_req.read() )1384 if ( r_cc_receive_icache_req.read() and not r_icache_cc_send_req.read() ) 1385 1385 { 1386 1386 r_icache_fsm = ICACHE_CC_CHECK; … … 1589 1589 1590 1590 // coherence interrupt 1591 if ( r_cc_receive_icache_req.read() )1591 if ( r_cc_receive_icache_req.read() and not r_icache_cc_send_req.read() ) 1592 1592 { 1593 1593 r_icache_fsm = ICACHE_CC_CHECK; … … 1686 1686 1687 1687 // coherence interrupt 1688 if ( r_cc_receive_icache_req.read() )1688 if ( r_cc_receive_icache_req.read() and not r_icache_cc_send_req.read() ) 1689 1689 { 1690 1690 r_icache_fsm = ICACHE_CC_CHECK; … … 1765 1765 1766 1766 // coherence interrupt 1767 if ( r_cc_receive_icache_req.read() )1767 if ( r_cc_receive_icache_req.read() and not r_icache_cc_send_req.read() ) 1768 1768 { 1769 1769 r_icache_fsm = ICACHE_CC_CHECK; … … 1844 1844 1845 1845 // coherence interrupt 1846 if ( r_cc_receive_icache_req.read() )1846 if ( r_cc_receive_icache_req.read() and not r_icache_cc_send_req.read() ) 1847 1847 { 1848 1848 r_icache_fsm = ICACHE_CC_CHECK; … … 1883 1883 paddr_t mask = ~((m_icache_words<<2)-1); 1884 1884 1885 // CLACK handler 1886 // We switch the directory slot to EMPTY state 1887 // and reset r_icache_miss_clack if the cleanup ack 1888 // is matching a pending miss. 1889 if ( r_icache_clack_req.read() ) 1890 { 1891 1892 if ( m_ireq.valid ) m_cost_ins_miss_frz++; 1893 1894 #ifdef INSTRUMENTATION 1895 m_cpt_icache_dir_write++; 1896 #endif 1897 r_icache.write_dir( 0, 1898 r_icache_clack_way.read(), 1899 r_icache_clack_set.read(), 1900 CACHE_SLOT_STATE_EMPTY); 1901 1902 if ( (r_icache_miss_set.read() == r_icache_clack_set.read()) and 1903 (r_icache_miss_way.read() == r_icache_clack_way.read()) ) 1904 { 1905 r_icache_miss_clack = false; 1906 } 1907 1908 r_icache_clack_req = false; 1909 1910 // return to cc_save state 1911 r_icache_fsm = r_icache_fsm_save.read(); 1912 1913 #if DEBUG_ICACHE 1914 if ( m_debug_activated ) 1915 { 1916 std::cout << " <PROC " << name() 1917 << " ICACHE_CC_CHECK> CC_TYPE_CLACK slot returns to empty state" 1918 << " set = " << r_icache_clack_set.read() 1919 << " / way = " << r_icache_clack_way.read() << std::endl; 1920 } 1921 #endif 1922 1923 break; 1924 } 1885 1925 1886 1926 // Match between MISS address and CC address … … 1922 1962 } 1923 1963 1924 // CLACK handler 1925 // We switch the directory slot to EMPTY state 1926 // and reset r_icache_miss_clack if the cleanup ack 1927 // is matching a pending miss. 1928 if ( r_icache_clack_req.read() ) 1929 { 1930 1931 if ( m_ireq.valid ) m_cost_ins_miss_frz++; 1932 1933 #ifdef INSTRUMENTATION 1934 m_cpt_icache_dir_write++; 1935 #endif 1936 r_icache.write_dir( 0, 1937 r_icache_clack_way.read(), 1938 r_icache_clack_set.read(), 1939 CACHE_SLOT_STATE_EMPTY); 1940 1941 if ( (r_icache_miss_set.read() == r_icache_clack_set.read()) and 1942 (r_icache_miss_way.read() == r_icache_clack_way.read()) ) 1943 { 1944 r_icache_miss_clack = false; 1945 } 1946 1947 r_icache_clack_req = false; 1948 1949 // return to cc_save state if no pending CC request 1950 if ( not r_cc_receive_icache_req.read() ) 1951 r_icache_fsm = r_icache_fsm_save.read(); 1952 1953 #if DEBUG_ICACHE 1954 if ( m_debug_activated ) 1955 { 1956 std::cout << " <PROC " << name() 1957 << " ICACHE_CC_CHECK> CC_TYPE_CLACK slot returns to empty state" 1958 << " set = " << r_icache_clack_set.read() 1959 << " / way = " << r_icache_clack_way.read() << std::endl; 1960 } 1961 #endif 1962 1963 break; 1964 } 1965 1966 // wait if pending request to CC_SEND. This way if there are pending 1967 // CLACK they can be treated in this state and then a deadlock 1968 // situation is avoided 1969 if ( r_icache_cc_send_req.read() ) break; 1964 1965 assert ( not r_icache_cc_send_req.read() and "CC_SEND must be available in ICACHE_CC_CHECK"); 1970 1966 1971 1967 // CC request handler … … 2407 2403 } 2408 2404 // coherence request (from CC_RECEIVE FSM) 2409 else if ( r_cc_receive_dcache_req.read() )2405 else if ( r_cc_receive_dcache_req.read() and not r_dcache_cc_send_req.read()) 2410 2406 { 2411 2407 r_dcache_fsm = DCACHE_CC_CHECK; … … 2762 2758 r_dcache_fsm = DCACHE_MISS_SELECT; 2763 2759 2764 /*ODCCP*/ // if tlb's flag cc egal 0that means line is no coherent2765 bool ncc = ((tlb_flags. cc == 0) and (r_mmu_mode.read() & DATA_TLB_MASK));2760 /*ODCCP*/ // if tlb's flag ncc egal 1 that means line is no coherent 2761 bool ncc = ((tlb_flags.ncc == 1) and (r_mmu_mode.read() & DATA_TLB_MASK)); 2766 2762 2767 2763 if(ncc) … … 2880 2876 #endif 2881 2877 // check if line is ncc or cc. 2882 bool ncc = ((tlb_flags. cc == 0) and (r_mmu_mode.read() & DATA_TLB_MASK));2878 bool ncc = ((tlb_flags.ncc == 1) and (r_mmu_mode.read() & DATA_TLB_MASK)); 2883 2879 2884 2880 // cleaning llsc buffer if address matching … … 3111 3107 3112 3108 // coherence request (from CC_RECEIVE FSM) 3113 if ( r_cc_receive_dcache_req.read() )3109 if ( r_cc_receive_dcache_req.read() and not r_dcache_cc_send_req.read() ) 3114 3110 { 3115 3111 r_dcache_fsm = DCACHE_CC_CHECK; … … 3418 3414 3419 3415 // coherence request (from CC_RECEIVE FSM) 3420 if ( r_cc_receive_dcache_req.read() )3416 if ( r_cc_receive_dcache_req.read() and not r_dcache_cc_send_req.read() ) 3421 3417 { 3422 3418 r_dcache_fsm = DCACHE_CC_CHECK; … … 3725 3721 3726 3722 // coherence request (from CC_RECEIVE FSM) 3727 if ( r_cc_receive_dcache_req.read() )3723 if ( r_cc_receive_dcache_req.read() and not r_dcache_cc_send_req.read() ) 3728 3724 { 3729 3725 r_dcache_fsm = DCACHE_CC_CHECK; … … 3804 3800 3805 3801 // coherence request (from CC_RECEIVE FSM) 3806 if ( r_cc_receive_dcache_req.read() )3802 if ( r_cc_receive_dcache_req.read() and not r_dcache_cc_send_req.read() ) 3807 3803 { 3808 3804 r_dcache_fsm = DCACHE_CC_CHECK; … … 3834 3830 3835 3831 // coherence request (from CC_RECEIVE FSM) 3836 if ( r_cc_receive_dcache_req.read() )3832 if ( r_cc_receive_dcache_req.read() and not r_dcache_cc_send_req.read() ) 3837 3833 { 3838 3834 r_dcache_fsm = DCACHE_CC_CHECK; … … 3877 3873 3878 3874 // coherence request (from CC_RECEIVE FSM) 3879 if ( r_cc_receive_dcache_req.read() )3875 if ( r_cc_receive_dcache_req.read() and not r_dcache_cc_send_req.read() ) 3880 3876 { 3881 3877 r_dcache_fsm = DCACHE_CC_CHECK; … … 4285 4281 4286 4282 // coherence request (from CC_RECEIVE FSM) 4287 if ( r_cc_receive_dcache_req.read() )4283 if ( r_cc_receive_dcache_req.read() and not r_dcache_cc_send_req.read() ) 4288 4284 { 4289 4285 r_dcache_fsm = DCACHE_CC_CHECK; … … 4479 4475 4480 4476 // coherence request (from CC_RECEIVE FSM) 4481 if ( r_cc_receive_dcache_req.read() )4477 if ( r_cc_receive_dcache_req.read() and not r_dcache_cc_send_req.read() ) 4482 4478 { 4483 4479 r_dcache_fsm = DCACHE_CC_CHECK; … … 4602 4598 4603 4599 // coherence request (from CC_RECEIVE FSM) 4604 if ( r_cc_receive_dcache_req.read() )4600 if ( r_cc_receive_dcache_req.read() and not r_dcache_cc_send_req.read() ) 4605 4601 { 4606 4602 r_dcache_fsm = DCACHE_CC_CHECK; … … 4716 4712 4717 4713 // coherence request (from CC_RECEIVE FSM) 4718 if ( r_cc_receive_dcache_req.read() )4714 if ( r_cc_receive_dcache_req.read() and not r_dcache_cc_send_req.read() ) 4719 4715 { 4720 4716 r_dcache_fsm = DCACHE_CC_CHECK; … … 4761 4757 4762 4758 // coherence request (from CC_RECEIVE FSM) 4763 if ( r_cc_receive_dcache_req.read() )4759 if ( r_cc_receive_dcache_req.read() and not r_dcache_cc_send_req.read() ) 4764 4760 { 4765 4761 r_dcache_fsm = DCACHE_CC_CHECK; … … 4815 4811 4816 4812 // coherence request (from CC_RECEIVE FSM) 4817 if ( r_cc_receive_dcache_req.read() )4813 if ( r_cc_receive_dcache_req.read() and not r_dcache_cc_send_req.read() ) 4818 4814 { 4819 4815 r_dcache_fsm = DCACHE_CC_CHECK; … … 4915 4911 4916 4912 // coherence request (from CC_RECEIVE FSM) 4917 if ( r_cc_receive_dcache_req.read() )4913 if ( r_cc_receive_dcache_req.read() and not r_dcache_cc_send_req.read() ) 4918 4914 { 4919 4915 r_dcache_fsm = DCACHE_CC_CHECK; … … 4971 4967 } 4972 4968 #endif 4969 // CLACK handler 4970 // We switch the directory slot to EMPTY state and reset 4971 // r_dcache_miss_clack if the cleanup ack is matching a pending miss. 4972 if ( r_dcache_clack_req.read() ) 4973 { 4974 if ( m_dreq.valid ) m_cost_data_miss_frz++; 4975 4976 #ifdef INSTRUMENTATION 4977 m_cpt_dcache_dir_write++; 4978 #endif 4979 r_dcache.write_dir( 0, 4980 r_dcache_clack_way.read(), 4981 r_dcache_clack_set.read(), 4982 CACHE_SLOT_STATE_EMPTY); 4983 /*STATS DIRTY*/ 4984 for (size_t word = 0; word < m_dcache_words; word++) 4985 { 4986 dirty_stats[(r_cc_receive_dcache_way * m_dcache_sets + r_cc_receive_dcache_set) * m_dcache_words + word] = false; 4987 } 4988 4989 if ( (r_dcache_miss_set.read() == r_dcache_clack_set.read()) and 4990 (r_dcache_miss_way.read() == r_dcache_clack_way.read()) ) 4991 { 4992 r_dcache_miss_clack = false; 4993 } 4994 4995 r_dcache_clack_req = false; 4996 4997 // return to cc_save state 4998 r_dcache_fsm = r_dcache_fsm_cc_save.read() ; 4999 5000 #if DEBUG_DCACHE 5001 if ( m_debug_activated ) 5002 { 5003 std::cout << " <PROC " << name() 5004 << " DCACHE_CC_CHECK> CC_TYPE_CLACK Switch slot to EMPTY state" 5005 << " set = " << r_dcache_clack_set.read() 5006 << " / way = " << r_dcache_clack_way.read() << std::endl; 5007 } 5008 #endif 5009 break; 5010 } 4973 5011 4974 5012 … … 5012 5050 } 5013 5051 5014 // CLACK handler 5015 // We switch the directory slot to EMPTY state and reset 5016 // r_dcache_miss_clack if the cleanup ack is matching a pending miss. 5017 if ( r_dcache_clack_req.read() ) 5018 { 5019 if ( m_dreq.valid ) m_cost_data_miss_frz++; 5020 5021 #ifdef INSTRUMENTATION 5022 m_cpt_dcache_dir_write++; 5023 #endif 5024 r_dcache.write_dir( 0, 5025 r_dcache_clack_way.read(), 5026 r_dcache_clack_set.read(), 5027 CACHE_SLOT_STATE_EMPTY); 5028 /*STATS DIRTY*/ 5029 for (size_t word = 0; word < m_dcache_words; word++) 5030 { 5031 dirty_stats[(r_cc_receive_dcache_way * m_dcache_sets + r_cc_receive_dcache_set) * m_dcache_words + word] = false; 5032 } 5033 5034 if ( (r_dcache_miss_set.read() == r_dcache_clack_set.read()) and 5035 (r_dcache_miss_way.read() == r_dcache_clack_way.read()) ) 5036 { 5037 r_dcache_miss_clack = false; 5038 } 5039 5040 r_dcache_clack_req = false; 5041 5042 // return to cc_save state if no pending CC request 5043 if ( not r_cc_receive_dcache_req.read() ) 5044 { 5045 r_dcache_fsm = r_dcache_fsm_cc_save.read() ; 5046 } 5047 5048 #if DEBUG_DCACHE 5049 if ( m_debug_activated ) 5050 { 5051 std::cout << " <PROC " << name() 5052 << " DCACHE_CC_CHECK> CC_TYPE_CLACK Switch slot to EMPTY state" 5053 << " set = " << r_dcache_clack_set.read() 5054 << " / way = " << r_dcache_clack_way.read() << std::endl; 5055 } 5056 #endif 5057 break; 5058 } 5059 5060 // wait if pending request to CC_SEND. This way if there are pending 5061 // CLACK they can be treated in this state and then a deadlock 5062 // situation is avoided 5063 if ( r_dcache_cc_send_req.read() ) break; 5052 5053 assert ( not r_dcache_cc_send_req.read() and "CC_SEND must be available in DCACHE_CC_CHECK"); 5064 5054 5065 5055 // CC request handler -
branches/ODCCP/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
r479 r492 2770 2770 // erase any possible new reservation when we release the lock on the 2771 2771 // directory 2772 m_llsc_table.sw( r_write_address.read());2772 m_llsc_table.sw(m_nline[(addr_t)r_write_address.read()],r_write_word_index.read(),r_write_word_index.read()+r_write_word_count.read()); 2773 2773 2774 2774 r_write_fsm = WRITE_DIR_LOCK; … … 5882 5882 { 5883 5883 // The CAS is a success => sw access to the llsc_global_table 5884 m_llsc_table.sw(m_ cmd_cas_addr_fifo.read());5884 m_llsc_table.sw(m_nline[(addr_t)m_cmd_cas_addr_fifo.read()],m_x[(addr_t)(m_cmd_cas_addr_fifo.read())],m_x[(addr_t)(m_cmd_cas_addr_fifo.read())]); 5885 5885 5886 5886 // test coherence request
Note: See TracChangeset
for help on using the changeset viewer.