Changeset 492 for branches/ODCCP/lib
- Timestamp:
- Aug 12, 2013, 11:43:13 AM (11 years ago)
- File:
-
- 1 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] << "]["
Note: See TracChangeset
for help on using the changeset viewer.