Changeset 771 for branches/RWT
- Timestamp:
- Aug 26, 2014, 4:40:29 PM (10 years ago)
- Location:
- branches/RWT
- Files:
-
- 8 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/RWT/communication/dspin_dhccp_param/caba/metadata/dspin_rwt_param.sd
r768 r771 1 Module('caba:dspin_ dhccp_param',2 classname = 'soclib::caba::Dspin DhccpParam',3 header_files = ['../source/include/dspin_ dhccp_param.h',]1 Module('caba:dspin_rwt_param', 2 classname = 'soclib::caba::DspinRwtParam', 3 header_files = ['../source/include/dspin_rwt_param.h',] 4 4 ) -
branches/RWT/communication/dspin_dhccp_param/caba/source/include/dspin_rwt_param.h
r768 r771 27 27 28 28 29 #ifndef DSPIN_ DHCCP_PARAMS_H30 #define DSPIN_ DHCCP_PARAMS_H29 #ifndef DSPIN_RWT_PARAMS_H 30 #define DSPIN_RWT_PARAMS_H 31 31 32 32 #include <inttypes.h> … … 141 141 case z: x |= ((y & z##_MASK) << z##_SHIFT);break 142 142 143 class Dspin DhccpParam143 class DspinRwtParam 144 144 { 145 145 public: … … 405 405 SET_FIELD(flit,value,BROADCAST_NLINE); 406 406 407 default: assert(false && "Incorrect DHCCPDSPIN field");407 default: assert(false && "Incorrect RWT DSPIN field"); 408 408 } 409 409 } -
branches/RWT/lib/generic_cache_tsar/include/generic_cache.h
r767 r771 86 86 ////////////////////////// 87 87 { 88 typedef uint32_t 89 typedef uint32_t 90 91 data_t 92 addr_t 93 int 94 bool 95 96 size_t 97 size_t 98 size_t 99 100 const soclib::common::AddressMaskingTable<addr_t> 101 const soclib::common::AddressMaskingTable<addr_t> 102 const soclib::common::AddressMaskingTable<addr_t> 88 typedef uint32_t data_t; 89 typedef uint32_t be_t; 90 91 data_t *r_data ; 92 addr_t *r_tag ; 93 int *r_state; 94 bool *r_lru ; 95 96 size_t m_ways; 97 size_t m_sets; 98 size_t m_words; 99 100 const soclib::common::AddressMaskingTable<addr_t> m_x ; 101 const soclib::common::AddressMaskingTable<addr_t> m_y ; 102 const soclib::common::AddressMaskingTable<addr_t> m_z ; 103 103 104 104 ////////////////////////////////////////////////////////////// … … 134 134 cache_lru(way, set) = true; 135 135 136 for (way2 = 0; way2 < m_ways; way2++ 136 for (way2 = 0; way2 < m_ways; way2++) 137 137 { 138 138 if (cache_lru(way2, set) == false) return; 139 139 } 140 140 // all lines are new -> they all become old 141 for (way2 = 0; way2 < m_ways; way2++ 141 for (way2 = 0; way2 < m_ways; way2++) 142 142 { 143 143 cache_lru(way2, set) = false; … … 146 146 147 147 //////////////////////////////// 148 inline data_t be2mask( be_t be)148 inline data_t be2mask(be_t be) 149 149 { 150 150 data_t mask = 0; … … 159 159 160 160 ////////////////////////////////////////// 161 GenericCache( const std::string&name,162 size_t 163 size_t 164 size_t 161 GenericCache(const std::string &name, 162 size_t nways, 163 size_t nsets, 164 size_t nwords) 165 165 : m_ways(nways), 166 166 m_sets(nsets), … … 186 186 187 187 #ifdef GENERIC_CACHE_DEBUG 188 std::cout << "constructing " << name << std::endl188 std::cout << "constructing " << name << std::endl 189 189 << "- nways = " << nways << std::endl 190 190 << "- nsets = " << nsets << std::endl … … 196 196 #endif 197 197 198 r_data 199 r_tag 200 r_state 201 r_lru 198 r_data = new data_t[nways*nsets*nwords]; 199 r_tag = new addr_t[nways*nsets]; 200 r_state = new int[nways*nsets]; 201 r_lru = new bool[nways*nsets]; 202 202 } 203 203 … … 212 212 213 213 //////////////////// 214 inline void reset( 214 inline void reset() 215 215 { 216 216 std::memset(r_data, 0, sizeof(*r_data)*m_ways*m_sets*m_words); … … 230 230 // Both data & directory are accessed. 231 231 ///////////////////////////////////////////////////////////////////// 232 inline bool read( addr_tad,233 data_t*dt)234 { 235 const addr_t 236 const size_t 237 const size_t 238 239 for ( size_t way = 0; way < m_ways; way++)240 { 241 if ( 242 && ( 232 inline bool read(addr_t ad, 233 data_t* dt) 234 { 235 const addr_t tag = m_z[ad]; 236 const size_t set = m_y[ad]; 237 const size_t word = m_x[ad]; 238 239 for (size_t way = 0; way < m_ways; way++) 240 { 241 if ((tag == cache_tag(way, set)) 242 && ((cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) or (cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC)) ) 243 243 { 244 244 *dt = cache_data(way, set, word); … … 256 256 // The selected way, set and word index are returned in case of hit. 257 257 ///////////////////////////////////////////////////////////////////// 258 inline bool read( addr_tad,259 data_t*dt,260 size_t*selway,261 size_t*selset,262 size_t*selword)263 { 264 const addr_t 265 const size_t 266 const size_t 267 268 for ( size_t way = 0; way < m_ways; way++)269 { 270 if ( 271 ( 258 inline bool read(addr_t ad, 259 data_t* dt, 260 size_t* selway, 261 size_t* selset, 262 size_t* selword) 263 { 264 const addr_t tag = m_z[ad]; 265 const size_t set = m_y[ad]; 266 const size_t word = m_x[ad]; 267 268 for (size_t way = 0; way < m_ways; way++) 269 { 270 if ((tag == cache_tag(way, set)) and 271 ((cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC)or (cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC))) 272 272 { 273 273 *selway = way; … … 292 292 // returned in the other arguments. 293 293 //////////////////////////////////////////////////////////////////// 294 inline void read( addr_tad,295 data_t*dt,296 size_t*selway,297 size_t*selset,298 size_t*selword,299 int* state)300 { 301 const addr_t 302 const size_t 303 const size_t 294 inline void read(addr_t ad, 295 data_t* dt, 296 size_t* selway, 297 size_t* selset, 298 size_t* selword, 299 int* state) 300 { 301 const addr_t tag = m_z[ad]; 302 const size_t set = m_y[ad]; 303 const size_t word = m_x[ad]; 304 304 305 305 // default return values … … 310 310 *dt = 0; 311 311 312 for ( size_t way = 0; way < m_ways; way++)313 { 314 if ( tag == cache_tag(way, set)) // matching tag315 { 316 317 if ( cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC)312 for (size_t way = 0; way < m_ways; way++) 313 { 314 if (tag == cache_tag(way, set)) // matching tag 315 { 316 317 if (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) 318 318 { 319 319 *state = CACHE_SLOT_STATE_VALID_CC; … … 324 324 cache_set_lru(way, set); 325 325 } 326 else if ( cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC)326 else if (cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC) 327 327 { 328 328 *state = CACHE_SLOT_STATE_VALID_NCC; … … 333 333 cache_set_lru(way, set); 334 334 } 335 else if ( cache_state(way, set) == CACHE_SLOT_STATE_ZOMBI)335 else if (cache_state(way, set) == CACHE_SLOT_STATE_ZOMBI) 336 336 { 337 337 *state = CACHE_SLOT_STATE_ZOMBI; … … 350 350 // The selected way, set and word index are returned in case of hit. 351 351 ///////////////////////////////////////////////////////////////////// 352 inline bool read_neutral( addr_tad,353 data_t*dt,354 size_t*selway,355 size_t*selset,356 size_t*selword)357 { 358 const addr_t 359 const size_t 360 const size_t 361 362 for ( size_t way = 0; way < m_ways; way++)363 { 364 if ( 365 && ( (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) or (cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC) ))352 inline bool read_neutral(addr_t ad, 353 data_t* dt, 354 size_t* selway, 355 size_t* selset, 356 size_t* selword) 357 { 358 const addr_t tag = m_z[ad]; 359 const size_t set = m_y[ad]; 360 const size_t word = m_x[ad]; 361 362 for (size_t way = 0; way < m_ways; way++) 363 { 364 if ((tag == cache_tag(way, set)) 365 && ((cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) or (cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC) )) 366 366 { 367 367 *selway = way; … … 384 384 // This function is used by the cc_vcache to get a 64 bits page table entry. 385 385 ///////////////////////////////////////////////////////////////////////////// 386 inline bool read( addr_t 387 data_t* 388 data_t* 389 size_t* 390 size_t* 391 size_t* 392 { 393 const addr_t 394 const size_t 395 const size_t 396 397 for ( size_t way = 0; way < m_ways; way++)398 { 399 if ( 400 &&( (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) ))401 { 402 *dt 403 if ( word+1 < m_words)404 { 405 *dt_next = cache_data(way, set, word +1);386 inline bool read( addr_t ad, 387 data_t* dt, 388 data_t* dt_next, 389 size_t* selway, 390 size_t* selset, 391 size_t* selword) 392 { 393 const addr_t tag = m_z[ad]; 394 const size_t set = m_y[ad]; 395 const size_t word = m_x[ad]; 396 397 for (size_t way = 0; way < m_ways; way++) 398 { 399 if ((tag == cache_tag(way, set)) 400 &&( (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC))) 401 { 402 *dt = cache_data(way, set, word); 403 if (word + 1 < m_words) 404 { 405 *dt_next = cache_data(way, set, word + 1); 406 406 } 407 407 *selway = way; … … 425 425 // returned in the other arguments. 426 426 //////////////////////////////////////////////////////////////////// 427 inline void read( addr_tad,428 data_t*dt,429 data_t*dt_next,430 size_t*selway,431 size_t*selset,432 size_t*selword,433 int* state)434 { 435 const addr_t 436 const size_t 437 const size_t 427 inline void read(addr_t ad, 428 data_t* dt, 429 data_t* dt_next, 430 size_t* selway, 431 size_t* selset, 432 size_t* selword, 433 int* state) 434 { 435 const addr_t tag = m_z[ad]; 436 const size_t set = m_y[ad]; 437 const size_t word = m_x[ad]; 438 438 439 439 // default return values … … 444 444 *dt = 0; 445 445 446 for ( size_t way = 0; way < m_ways; way++)447 { 448 if ( tag == cache_tag(way, set)) // matching tag449 { 450 451 if ( cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC)446 for (size_t way = 0; way < m_ways; way++) 447 { 448 if (tag == cache_tag(way, set)) // matching tag 449 { 450 451 if (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) 452 452 { 453 453 *state = CACHE_SLOT_STATE_VALID_CC; … … 456 456 *selword = word; 457 457 *dt = cache_data(way, set, word); 458 if ( word+1 < m_words)458 if (word + 1 < m_words) 459 459 { 460 460 *dt_next = cache_data(way, set, word+1); … … 463 463 } 464 464 465 else if ( cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC)465 else if (cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC) 466 466 { 467 467 *state = CACHE_SLOT_STATE_VALID_NCC; … … 470 470 *selword = word; 471 471 *dt = cache_data(way, set, word); 472 if ( word+1 < m_words)472 if (word + 1 < m_words) 473 473 { 474 *dt_next = cache_data(way, set, word +1);474 *dt_next = cache_data(way, set, word + 1); 475 475 } 476 476 cache_set_lru(way, set); 477 477 } 478 478 479 else if ( cache_state(way, set) == CACHE_SLOT_STATE_ZOMBI)479 else if (cache_state(way, set) == CACHE_SLOT_STATE_ZOMBI) 480 480 { 481 481 *state = CACHE_SLOT_STATE_ZOMBI; … … 496 496 // while we write in the data part with a different address in the same cycle. 497 497 /////////////////////////////////////////////////////////////////////////////// 498 inline bool hit( addr_tad,499 size_t*selway,500 size_t*selset,501 size_t*selword)502 { 503 const addr_t 504 const size_t 505 const size_t 506 507 for ( size_t way = 0; way < m_ways; way++)508 { 509 if ( 510 && ( (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC)or(cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC) ))498 inline bool hit(addr_t ad, 499 size_t* selway, 500 size_t* selset, 501 size_t* selword) 502 { 503 const addr_t tag = m_z[ad]; 504 const size_t set = m_y[ad]; 505 const size_t word = m_x[ad]; 506 507 for (size_t way = 0; way < m_ways; way++) 508 { 509 if ((tag == cache_tag(way, set)) 510 && ((cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC)or(cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC))) 511 511 { 512 512 *selway = way; … … 531 531 // while we write in the data part with a different address in the same cycle. 532 532 /////////////////////////////////////////////////////////////////////////////// 533 inline void read_dir( addr_tad,534 int*state,535 size_t*way,536 size_t*set,537 size_t*word)538 { 539 const addr_t 540 const size_t 541 const size_t 542 for ( size_t _way = 0; _way < m_ways; _way++)543 { 544 if ( (ad_tag == cache_tag(_way, ad_set)) and545 (cache_state(_way, ad_set) != CACHE_SLOT_STATE_EMPTY))533 inline void read_dir(addr_t ad, 534 int* state, 535 size_t* way, 536 size_t* set, 537 size_t* word) 538 { 539 const addr_t ad_tag = m_z[ad]; 540 const size_t ad_set = m_y[ad]; 541 const size_t ad_word = m_x[ad]; 542 for (size_t _way = 0; _way < m_ways; _way++) 543 { 544 if ((ad_tag == cache_tag(_way, ad_set)) and 545 (cache_state(_way, ad_set) != CACHE_SLOT_STATE_EMPTY)) 546 546 { 547 547 *state = cache_state(_way, ad_set); … … 562 562 // Returns the access status and the tag value in the state and tag argument. 563 563 /////////////////////////////////////////////////////////////////////////////// 564 inline void read_dir( size_tway,565 size_tset,566 addr_t*tag,567 int* state)564 inline void read_dir(size_t way, 565 size_t set, 566 addr_t* tag, 567 int* state) 568 568 { 569 569 *state = cache_state(way, set); … … 581 581 // It does not use the directory and cannot miss. 582 582 ////////////////////////////////////////////////////////////////// 583 inline void write(size_t 584 size_t 585 size_t 586 data_t 583 inline void write(size_t way, 584 size_t set, 585 size_t word, 586 data_t data) 587 587 { 588 588 cache_data(way, set, word) = data; … … 594 594 // It does not use the directory and cannot miss. 595 595 //////////////////////////////////////////////////////////////////////////// 596 inline void write(size_t 597 size_t 598 size_t 599 data_t 600 be_t 596 inline void write(size_t way, 597 size_t set, 598 size_t word, 599 data_t data, 600 be_t be) 601 601 { 602 602 data_t mask = be2mask(be); … … 610 610 // It returns true if the line was valid, and returns the line index. 611 611 ////////////////////////////////////////////////////////////////////////// 612 inline bool inval(size_t 613 size_t 614 addr_t* 615 { 616 if ((cache_state(way,set) == CACHE_SLOT_STATE_VALID_CC) or (cache_state(way,set) == CACHE_SLOT_STATE_VALID_NCC))612 inline bool inval(size_t way, 613 size_t set, 614 addr_t* nline) 615 { 616 if ((cache_state(way,set) == CACHE_SLOT_STATE_VALID_CC) or (cache_state(way,set) == CACHE_SLOT_STATE_VALID_NCC)) 617 617 { 618 618 cache_state(way,set) = CACHE_SLOT_STATE_EMPTY; … … 631 631 // and a Boolean indicating that a cleanup is requested. 632 632 ////////////////////////////////////////////////////////////////////////////////// 633 inline bool victim_select(addr_t 634 addr_t* 635 size_t* 636 size_t* 637 { 638 bool 639 bool 633 inline bool victim_select(addr_t ad, 634 addr_t* victim, 635 size_t* way, 636 size_t* set) 637 { 638 bool found = false; 639 bool cleanup = false; 640 640 641 641 *set = m_y[ad]; … … 643 643 644 644 // Search first empty slot 645 for ( size_t _way = 0 ; _way < m_ways && !found ; _way++)646 { 647 if ( ( cache_state(_way, *set) != CACHE_SLOT_STATE_VALID_CC ) and (cache_state(_way, *set) != CACHE_SLOT_STATE_VALID_NCC )) // empty645 for (size_t _way = 0 ; _way < m_ways && !found ; _way++) 646 { 647 if ((cache_state(_way, *set) != CACHE_SLOT_STATE_VALID_CC) and (cache_state(_way, *set) != CACHE_SLOT_STATE_VALID_NCC )) // empty 648 648 { 649 649 found = true; … … 654 654 655 655 // If no empty slot, search first old slot (lru == false) 656 if ( !found)656 if (!found) 657 657 { 658 for ( size_t _way = 0 ; _way < m_ways && !found ; _way++)659 { 660 if ( not cache_lru(_way, *set))658 for (size_t _way = 0 ; _way < m_ways && !found ; _way++) 659 { 660 if (not cache_lru(_way, *set)) 661 661 { 662 662 found = true; … … 668 668 669 669 assert(found && "all ways can't be new at the same time"); 670 *victim = (addr_t) ((cache_tag(*way,*set) * m_sets) + *set);670 *victim = (addr_t) ((cache_tag(*way,*set) * m_sets) + *set); 671 671 return cleanup; 672 672 } … … 681 681 // and two Boolean indicating success and a required cleanup. 682 682 ////////////////////////////////////////////////////////////////////////////////// 683 inline void read_select(addr_t 684 addr_t* 685 size_t* 686 size_t* 687 bool* 688 bool* cleanup)683 inline void read_select(addr_t ad, 684 addr_t* victim, 685 size_t* way, 686 size_t* set, 687 bool* found, 688 bool* cleanup) 689 689 { 690 690 size_t _set = m_y[ad]; … … 693 693 694 694 // Search first empty slot 695 for ( size_t _way = 0 ; _way < m_ways && !(*found) ; _way++)696 { 697 if ( cache_state(_way, _set) == CACHE_SLOT_STATE_EMPTY)695 for (size_t _way = 0 ; _way < m_ways && !(*found) ; _way++) 696 { 697 if (cache_state(_way, _set) == CACHE_SLOT_STATE_EMPTY) 698 698 { 699 699 *found = true; … … 704 704 } 705 705 } 706 ////////////////////////////////////////////////////////////// 707 /*for ( size_t _way = 0 ; _way < m_ways && !(*found) ; _way++ ) 708 { 709 if ( not cache_lru(_way, _set) and 710 (cache_state(_way, _set) != CACHE_SLOT_STATE_ZOMBI) and 711 (cache_state(_way, _set) == CACHE_SLOT_STATE_VALID_NCC) ) 712 { 713 *found = true; 714 *cleanup = true; 715 *way = _way; 716 *set = m_y[ad]; 717 *victim = (addr_t)((cache_tag(*way,_set) * m_sets) + _set); 718 return; 719 } 720 }*/ 706 721 707 // Search first not zombi old slot 722 for ( size_t _way = 0 ; _way < m_ways && !(*found) ; _way++)723 { 724 if ( 725 (cache_state(_way, _set) != CACHE_SLOT_STATE_ZOMBI) 708 for (size_t _way = 0 ; _way < m_ways && !(*found) ; _way++) 709 { 710 if (not cache_lru(_way, _set) and 711 (cache_state(_way, _set) != CACHE_SLOT_STATE_ZOMBI)) 726 712 { 727 713 *found = true; … … 734 720 } 735 721 // Search first not zombi slot 736 for ( size_t _way = 0 ; _way < m_ways && !(*found) ; _way++)737 { 738 if ( 722 for (size_t _way = 0 ; _way < m_ways && !(*found) ; _way++) 723 { 724 if (cache_state(_way, _set) != CACHE_SLOT_STATE_ZOMBI) 739 725 { 740 726 *found = true; … … 756 742 // identified by the way & set. 757 743 ////////////////////////////////////////////////////////////////// 758 inline void victim_update_tag( addr_tad,759 size_tway,760 size_t set)744 inline void victim_update_tag(addr_t ad, 745 size_t way, 746 size_t set) 761 747 { 762 748 addr_t tag = m_z[ad]; … … 771 757 // identified by the way & set, when using the ZOMBI state. 772 758 ////////////////////////////////////////////////////////////////// 773 inline void write_dir( addr_tad,774 size_tway,775 size_tset,776 intstate)777 { 778 addr_t tag= m_z[ad];759 inline void write_dir(addr_t ad, 760 size_t way, 761 size_t set, 762 int state) 763 { 764 addr_t tag = m_z[ad]; 779 765 780 766 assert( ( (state == CACHE_SLOT_STATE_VALID_CC) or … … 793 779 cache_state(way, set) = state; 794 780 795 if ( (state == CACHE_SLOT_STATE_VALID_CC) or (state == CACHE_SLOT_STATE_VALID_NCC)) cache_set_lru(way, set);781 if ((state == CACHE_SLOT_STATE_VALID_CC) or (state == CACHE_SLOT_STATE_VALID_NCC)) cache_set_lru(way, set); 796 782 } 797 783 … … 801 787 // It does not affect the tag 802 788 ////////////////////////////////////////////////////////////////// 803 inline void write_dir( size_tway,804 size_tset,805 intstate)789 inline void write_dir(size_t way, 790 size_t set, 791 int state) 806 792 { 807 793 assert( ( (state == CACHE_SLOT_STATE_VALID_CC) or … … 827 813 // Both DATA and DIRECTORY are written 828 814 /////////////////////////////////////////////////////////////////// 829 inline void update(addr_t 830 size_t 831 size_t 832 data_t* 815 inline void update(addr_t ad, 816 size_t way, 817 size_t set, 818 data_t* buf) 833 819 { 834 820 addr_t tag = m_z[ad]; … … 837 823 cache_state(way, set) = CACHE_SLOT_STATE_VALID_CC; 838 824 cache_set_lru(way, set); 839 for ( size_t word = 0 ; word < m_words ; word++)825 for (size_t word = 0 ; word < m_words ; word++) 840 826 { 841 827 cache_data(way, set, word) = buf[word] ; … … 846 832 void fileTrace(FILE* file) 847 833 { 848 for (size_t nway = 0 ; nway < m_ways ; nway++)849 { 850 for (size_t nset = 0 ; nset < m_sets ; nset++)834 for (size_t nway = 0 ; nway < m_ways ; nway++) 835 { 836 for (size_t nset = 0 ; nset < m_sets ; nset++) 851 837 { 852 838 fprintf(file, "%d / ", (int)cache_state(nway, nset)); … … 854 840 fprintf(file, "set %d / ", (int)nset); 855 841 fprintf(file, "@ = %08zX / ", 856 ((cache_tag(nway, nset) *m_sets+nset)*m_words*4));857 for (size_t nword = m_words ; nword > 0 ; nword--)858 { 859 unsigned int data = cache_data(nway, nset, nword -1);860 fprintf(file, "%08X ", data 842 ((cache_tag(nway, nset) * m_sets + nset) * m_words * 4)); 843 for (size_t nword = m_words ; nword > 0 ; nword--) 844 { 845 unsigned int data = cache_data(nway, nset, nword - 1); 846 fprintf(file, "%08X ", data); 861 847 } 862 848 fprintf(file, "\n"); … … 868 854 inline void printTrace() 869 855 { 870 for ( size_t way = 0; way < m_ways ; way++)871 { 872 for ( size_t set = 0 ; set < m_sets ; set++)856 for (size_t way = 0; way < m_ways ; way++) 857 { 858 for (size_t set = 0 ; set < m_sets ; set++) 873 859 { 874 860 addr_t addr = (((addr_t)cache_tag(way,set))*m_words*m_sets+m_words*set)*4; … … 878 864 << std::hex << " | @ " << addr; 879 865 880 for ( size_t word = 0 ; word < m_words ; word++)866 for (size_t word = 0 ; word < m_words ; word++) 881 867 { 882 868 std::cout << " | " << cache_data(way,set,word) ; … … 886 872 } 887 873 } 888 889 /////////////////////////////////////////////////////////////////////////// 890 // This function is deprecated as it is difficult to implement in 1 cycle. 891 /////////////////////////////////////////////////////////////////////////// 892 __attribute__((deprecated)) 893 inline bool inval(addr_t ad) 894 { 895 bool hit = false; 896 const addr_t tag = m_z[ad]; 897 const size_t set = m_y[ad]; 898 899 for ( size_t way = 0 ; way < m_ways && !hit ; way++ ) 900 { 901 if ( (tag == cache_tag(way, set)) and 902 (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) ) 903 { 904 hit = true; 905 cache_state(way, set) = CACHE_SLOT_STATE_EMPTY; 906 cache_lru(way, set) = false; 907 } 908 } 909 return hit; 910 } 911 912 //////////////////////////////////////////////////////////////////////////////// 913 // This function is deprecated as it is difficult to implement in 1 cycle. 914 //////////////////////////////////////////////////////////////////////////////// 915 __attribute__((deprecated)) 916 inline bool inval( addr_t ad, 917 size_t* selway, 918 size_t* selset ) 919 { 920 bool hit = false; 921 const addr_t tag = m_z[ad]; 922 const size_t set = m_y[ad]; 923 924 for ( size_t way = 0 ; way < m_ways && !hit ; way++ ) 925 { 926 if ( (tag == cache_tag(way, set)) and 927 (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) ) 928 { 929 hit = true; 930 cache_state(way, set) = CACHE_SLOT_STATE_EMPTY; 931 cache_lru(way, set) = false; 932 *selway = way; 933 *selset = set; 934 } 935 } 936 return hit; 937 } 938 939 //////////////////////////////////////////////////////////////////////////////// 940 // This function is deprecated as the directory must be a dual port RAM... 941 //////////////////////////////////////////////////////////////////////////////// 942 __attribute__((deprecated)) 943 inline bool update( addr_t ad, 944 data_t* buf, 945 addr_t* victim ) 946 { 947 size_t set, way; 948 bool cleanup = victim_select(ad, victim, &way, &set); 949 victim_update_tag (ad, way, set); 950 951 for ( size_t word = 0 ; word < m_words ; word++ ) { 952 cache_data(way, set, word) = buf[word] ; 953 } 954 955 return cleanup; 956 } 957 958 //////////////////////////////////////////////////////////////////////////// 959 // this function is deprecated, as it is difficult to implement in 1 cycle. 960 //////////////////////////////////////////////////////////////////////////// 961 __attribute__((deprecated)) 962 inline bool write(addr_t ad, 963 data_t dt) 964 { 965 const addr_t tag = m_z[ad]; 966 const size_t set = m_y[ad]; 967 const size_t word = m_x[ad]; 968 969 for ( size_t way = 0; way < m_ways; way++ ) 970 { 971 if ( (tag == cache_tag(way, set)) and 972 (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) ) 973 { 974 cache_data(way, set, word) = dt; 975 cache_set_lru(way, set); 976 return true; 977 } 978 } 979 return false; 980 } 981 982 //////////////////////////////////////////////////////////////////////////// 983 // this function is deprecated, as it is difficult to implement in 1 cycle. 984 //////////////////////////////////////////////////////////////////////////// 985 __attribute__((deprecated)) 986 inline bool write(addr_t ad, 987 data_t dt, 988 be_t be) 989 { 990 const addr_t tag = m_z[ad]; 991 const size_t set = m_y[ad]; 992 const size_t word = m_x[ad]; 993 994 for ( size_t way = 0; way < m_ways; way++ ) 995 { 996 if ( (tag == cache_tag(way, set)) and 997 (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) ) 998 { 999 data_t mask = be2mask(be); 1000 data_t prev = cache_data(way, set, word); 1001 cache_data(way, set, word) = (mask & dt) | (~mask & prev); 1002 cache_set_lru(way, set); 1003 return true; 1004 } 1005 } 1006 return false; 1007 } 1008 1009 ///////////////////////////////////////////////////////////////////////////// 1010 // this function is deprecated, as it is difficult to implement in 1 cycle. 1011 ///////////////////////////////////////////////////////////////////////////// 1012 __attribute__((deprecated)) 1013 inline bool write(addr_t ad, 1014 data_t dt, 1015 size_t* nway) 1016 { 1017 const addr_t tag = m_z[ad]; 1018 const size_t set = m_y[ad]; 1019 const size_t word = m_x[ad]; 1020 1021 for ( size_t way = 0; way < m_ways; way++ ) 1022 { 1023 if ( (tag == cache_tag(way, set)) and 1024 (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) ) 1025 { 1026 cache_data(way, set, word) = dt; 1027 cache_set_lru(way, set); 1028 *nway = way; 1029 return true; 1030 } 1031 } 1032 return false; 1033 } 1034 1035 ///////////////////////////////////////////////////////////////////////////// 1036 // this function is deprecated, as it is difficult to implement in 1 cycle. 1037 ///////////////////////////////////////////////////////////////////////////// 1038 __attribute__((deprecated)) 1039 inline bool write(addr_t ad, 1040 data_t dt, 1041 size_t* nway, 1042 be_t be) 1043 { 1044 const addr_t tag = m_z[ad]; 1045 const size_t set = m_y[ad]; 1046 const size_t word = m_x[ad]; 1047 1048 for ( size_t way = 0; way < m_ways; way++ ) 1049 { 1050 if ( (tag == cache_tag(way, set)) and 1051 (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) ) 1052 { 1053 data_t mask = be2mask(be); 1054 data_t prev = cache_data(way, set, word); 1055 cache_data(way, set, word) = (mask & dt) | (~mask & prev); 1056 cache_set_lru(way, set); 1057 *nway = way; 1058 return true; 1059 } 1060 } 1061 return false; 1062 } 1063 874 1064 875 }; 1065 876 -
branches/RWT/lib/generic_cache_tsar/metadata/generic_cache.sd
r297 r771 4 4 __version__ = "$Revision: 917 $" 5 5 6 Module('caba:generic_cache_tsar', 7 classname = 'soclib::GenericCache', 8 header_files = ['../include/generic_cache.h',], 9 tmpl_parameters = [ 10 parameter.Type('addr_t'), 11 ], 12 uses = [Uses('common:mapping_table'), 13 Uses('common:address_masking_table', 14 data_t = parameter.Reference('addr_t')),], 6 Module('caba:generic_cache_tsar_rwt', 7 classname = 'soclib::GenericCache', 8 header_files = ['../include/generic_cache.h',], 9 tmpl_parameters = [ 10 parameter.Type('addr_t'), 11 ], 12 uses = [ 13 Uses('common:mapping_table'), 14 Uses('common:address_masking_table', 15 data_t = parameter.Reference('addr_t')), 16 ], 15 17 ) -
branches/RWT/modules/vci_cc_vcache_wrapper/caba/metadata/vci_cc_vcache_wrapper.sd
r468 r771 3 3 4 4 Module('caba:vci_cc_vcache_wrapper', 5 5 classname = 'soclib::caba::VciCcVCacheWrapper', 6 6 7 7 tmpl_parameters = [ 8 8 parameter.Module('vci_param', default = 'caba:vci_param'), 9 9 parameter.Int('dspin_in_width'), 10 10 parameter.Int('dspin_out_width'), 11 11 parameter.Module('iss_t') 12 12 ], 13 13 14 14 header_files = [ '../source/include/vci_cc_vcache_wrapper.h' ], 15 15 16 16 implementation_files = [ '../source/src/vci_cc_vcache_wrapper.cpp' ], 17 17 18 18 uses = [ 19 19 Uses('caba:base_module'), 20 20 Uses('common:mapping_table'), 21 22 23 24 Uses('caba:generic_cache_tsar',21 Uses('common:iss2'), 22 Uses('caba:multi_write_buffer'), 23 Uses('caba:generic_fifo'), 24 Uses('caba:generic_cache_tsar_rwt', 25 25 addr_t = parameter.StringExt('sc_dt::sc_uint<%d> ', 26 26 parameter.Reference('addr_size'))), … … 32 32 parameter.Reference('addr_size')) 33 33 ), 34 Uses('caba:dspin_dhccp_param'),34 Uses('caba:dspin_rwt_param'), 35 35 ], 36 36 37 37 ports = [ 38 38 Port('caba:vci_initiator', 'p_vci'), 39 39 Port('caba:dspin_input', 'p_dspin_m2p', … … 43 43 Port('caba:dspin_input', 'p_dspin_clack', 44 44 dspin_data_size = parameter.Reference('dspin_in_width')), 45 46 47 45 Port('caba:bit_in','p_irq', parameter.Constant('n_irq')), 46 Port('caba:bit_in', 'p_resetn', auto = 'resetn'), 47 Port('caba:clock_in', 'p_clk', auto = 'clock') 48 48 ], 49 49 50 50 instance_parameters = [ 51 51 parameter.Int('proc_id'), 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 52 parameter.Module('mt', 'common:mapping_table'), 53 parameter.Module('mc', 'common:mapping_table'), 54 parameter.IntTab('initiator_rw_index'), 55 parameter.IntTab('initiator_c_index'), 56 parameter.IntTab('target_index'), 57 parameter.Int('itlb_ways'), 58 parameter.Int('itlb_sets'), 59 parameter.Int('dtlb_ways'), 60 parameter.Int('dtlb_sets'), 61 parameter.Int('icache_ways'), 62 parameter.Int('icache_sets'), 63 parameter.Int('icache_words'), 64 parameter.Int('dcache_ways'), 65 parameter.Int('dcache_sets'), 66 parameter.Int('dcache_words'), 67 parameter.Int('wbuf_nlines'), 68 parameter.Int('wbuf_nwords'), 69 parameter.Int('max_frozen_cycles') 70 70 ], 71 71 ) -
branches/RWT/modules/vci_cc_vcache_wrapper/caba/source/include/vci_cc_vcache_wrapper.h
r767 r771 35 35 #include <inttypes.h> 36 36 #include <systemc> 37 37 38 #include "caba_base_module.h" 38 39 #include "multi_write_buffer.h" … … 42 43 #include "vci_initiator.h" 43 44 #include "dspin_interface.h" 44 #include "dspin_ dhccp_param.h"45 #include "dspin_rwt_param.h" 45 46 #include "mapping_table.h" 46 47 #include "static_assert.h" -
branches/RWT/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp
r767 r771 4289 4289 4290 4290 uint32_t rdata; 4291 size_t way ;4292 size_t set ;4291 size_t way = 0; // To avoid gcc warning 4292 size_t set = 0; // To avoid gcc warning 4293 4293 size_t word; 4294 4294 r_dcache.read_neutral(r_dcache_xtn_data_addr.read(), … … 5379 5379 5380 5380 uint32_t rdata; 5381 size_t way ;5382 size_t set ;5381 size_t way = 0; // to avoid gcc warning 5382 size_t set = 0; // to avoid gcc warning 5383 5383 size_t word; 5384 5384 r_dcache.read_neutral(r_dcache_cc_inval_addr.read(), … … 5399 5399 r_dcache_cc_inval_data_cpt = 0; 5400 5400 r_dcache_fsm = r_dcache_fsm_cc_save.read(); 5401 r_dcache.write_dir( 5402 5403 5401 r_dcache.write_dir(way, 5402 set, 5403 CACHE_SLOT_STATE_ZOMBI ); 5404 5404 } 5405 5405 } … … 6207 6207 uint64_t receive_data = p_dspin_m2p.data.read(); 6208 6208 // initialize coherence packet type 6209 uint64_t receive_type = Dspin DhccpParam::dspin_get(receive_data,6210 Dspin DhccpParam::M2P_TYPE);6209 uint64_t receive_type = DspinRwtParam::dspin_get(receive_data, 6210 DspinRwtParam::M2P_TYPE); 6211 6211 // test for a broadcast 6212 if (Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::M2P_BC))6212 if (DspinRwtParam::dspin_get(receive_data,DspinRwtParam::M2P_BC)) 6213 6213 { 6214 6214 r_cc_receive_fsm = CC_RECEIVE_BRDCAST_HEADER; 6215 6215 } 6216 6216 // test for a multi updt 6217 else if (receive_type == Dspin DhccpParam::TYPE_MULTI_UPDT_DATA)6217 else if (receive_type == DspinRwtParam::TYPE_MULTI_UPDT_DATA) 6218 6218 { 6219 6219 r_cc_receive_fsm = CC_RECEIVE_DATA_UPDT_HEADER; 6220 6220 } 6221 else if (receive_type == Dspin DhccpParam::TYPE_MULTI_UPDT_INST)6221 else if (receive_type == DspinRwtParam::TYPE_MULTI_UPDT_INST) 6222 6222 { 6223 6223 r_cc_receive_fsm = CC_RECEIVE_INS_UPDT_HEADER; 6224 6224 } 6225 6225 // test for a multi inval 6226 else if (receive_type == Dspin DhccpParam::TYPE_MULTI_INVAL_DATA)6226 else if (receive_type == DspinRwtParam::TYPE_MULTI_INVAL_DATA) 6227 6227 { 6228 6228 r_cc_receive_fsm = CC_RECEIVE_DATA_INVAL_HEADER; … … 6257 6257 // request dcache to handle the BROADCAST 6258 6258 r_cc_receive_dcache_req = true; 6259 r_cc_receive_dcache_nline = Dspin DhccpParam::dspin_get(receive_data,6260 Dspin DhccpParam::BROADCAST_NLINE);6259 r_cc_receive_dcache_nline = DspinRwtParam::dspin_get(receive_data, 6260 DspinRwtParam::BROADCAST_NLINE); 6261 6261 r_cc_receive_dcache_type = CC_TYPE_INVAL; 6262 6262 // request icache to handle the BROADCAST 6263 6263 r_cc_receive_icache_req = true; 6264 r_cc_receive_icache_nline = Dspin DhccpParam::dspin_get(receive_data,6265 Dspin DhccpParam::BROADCAST_NLINE);6264 r_cc_receive_icache_nline = DspinRwtParam::dspin_get(receive_data, 6265 DspinRwtParam::BROADCAST_NLINE); 6266 6266 r_cc_receive_icache_type = CC_TYPE_INVAL; 6267 6267 // get back to idle state … … 6279 6279 // sample updt tab index in the HEADER, then skip to second flit 6280 6280 r_cc_receive_fsm = CC_RECEIVE_DATA_INVAL_NLINE; 6281 r_cc_receive_dcache_inval_is_config = Dspin DhccpParam::dspin_get(receive_data,6282 Dspin DhccpParam::MULTI_INVAL_IS_CONFIG);6281 r_cc_receive_dcache_inval_is_config = DspinRwtParam::dspin_get(receive_data, 6282 DspinRwtParam::MULTI_INVAL_IS_CONFIG); 6283 6283 break; 6284 6284 } … … 6301 6301 // request dcache to handle the INVAL 6302 6302 r_cc_receive_dcache_req = true; 6303 r_cc_receive_dcache_nline = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_INVAL_NLINE);6303 r_cc_receive_dcache_nline = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_INVAL_NLINE); 6304 6304 r_cc_receive_dcache_type = CC_TYPE_INVAL; 6305 6305 // get back to idle state … … 6320 6320 // request icache to handle the INVAL 6321 6321 r_cc_receive_icache_req = true; 6322 r_cc_receive_icache_nline = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_INVAL_NLINE);6322 r_cc_receive_icache_nline = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_INVAL_NLINE); 6323 6323 r_cc_receive_icache_type = CC_TYPE_INVAL; 6324 6324 // get back to idle state … … 6337 6337 if (not r_cc_receive_dcache_req.read()) 6338 6338 { 6339 r_cc_receive_dcache_updt_tab_idx = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_UPDT_INDEX);6339 r_cc_receive_dcache_updt_tab_idx = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_UPDT_INDEX); 6340 6340 r_cc_receive_fsm = CC_RECEIVE_DATA_UPDT_NLINE; 6341 6341 break; … … 6352 6352 if (not r_cc_receive_icache_req.read()) 6353 6353 { 6354 r_cc_receive_icache_updt_tab_idx = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_UPDT_INDEX);6354 r_cc_receive_icache_updt_tab_idx = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_UPDT_INDEX); 6355 6355 r_cc_receive_fsm = CC_RECEIVE_INS_UPDT_NLINE; 6356 6356 break; … … 6370 6370 { 6371 6371 r_cc_receive_dcache_req = true; 6372 r_cc_receive_dcache_nline = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_NLINE);6373 r_cc_receive_word_idx = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_WORD_INDEX);6372 r_cc_receive_dcache_nline = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_NLINE); 6373 r_cc_receive_word_idx = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_WORD_INDEX); 6374 6374 r_cc_receive_dcache_type = CC_TYPE_UPDT; 6375 6375 // get back to idle state … … 6390 6390 { 6391 6391 r_cc_receive_icache_req = true; 6392 r_cc_receive_icache_nline = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_NLINE);6393 r_cc_receive_word_idx = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_WORD_INDEX);6392 r_cc_receive_icache_nline = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_NLINE); 6393 r_cc_receive_word_idx = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_WORD_INDEX); 6394 6394 r_cc_receive_icache_type = CC_TYPE_UPDT; 6395 6395 // get back to idle state … … 6407 6407 uint64_t receive_data = p_dspin_m2p.data.read(); 6408 6408 bool receive_eop = p_dspin_m2p.eop.read(); 6409 cc_receive_updt_fifo_be = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_BE);6410 cc_receive_updt_fifo_data = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_DATA);6409 cc_receive_updt_fifo_be = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_BE); 6410 cc_receive_updt_fifo_data = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_DATA); 6411 6411 cc_receive_updt_fifo_eop = receive_eop; 6412 6412 cc_receive_updt_fifo_put = true; … … 6423 6423 uint64_t receive_data = p_dspin_m2p.data.read(); 6424 6424 bool receive_eop = p_dspin_m2p.eop.read(); 6425 cc_receive_updt_fifo_be = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_BE);6426 cc_receive_updt_fifo_data = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_DATA);6425 cc_receive_updt_fifo_be = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_BE); 6426 cc_receive_updt_fifo_data = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_DATA); 6427 6427 cc_receive_updt_fifo_eop = receive_eop; 6428 6428 cc_receive_updt_fifo_put = true; … … 6436 6436 ///////////////// DSPIN CLACK interface /////////////// 6437 6437 6438 uint64_t clack_type = Dspin DhccpParam::dspin_get(r_dspin_clack_flit.read(),6439 Dspin DhccpParam::CLACK_TYPE);6440 6441 size_t clack_way = Dspin DhccpParam::dspin_get(r_dspin_clack_flit.read(),6442 Dspin DhccpParam::CLACK_WAY);6443 6444 size_t clack_set = Dspin DhccpParam::dspin_get(r_dspin_clack_flit.read(),6445 Dspin DhccpParam::CLACK_SET);6438 uint64_t clack_type = DspinRwtParam::dspin_get(r_dspin_clack_flit.read(), 6439 DspinRwtParam::CLACK_TYPE); 6440 6441 size_t clack_way = DspinRwtParam::dspin_get(r_dspin_clack_flit.read(), 6442 DspinRwtParam::CLACK_WAY); 6443 6444 size_t clack_set = DspinRwtParam::dspin_get(r_dspin_clack_flit.read(), 6445 DspinRwtParam::CLACK_SET); 6446 6446 6447 6447 bool dspin_clack_get = false; 6448 bool dcache_clack_request = (clack_type == Dspin DhccpParam::TYPE_CLACK_DATA);6449 bool icache_clack_request = (clack_type == Dspin DhccpParam::TYPE_CLACK_INST);6448 bool dcache_clack_request = (clack_type == DspinRwtParam::TYPE_CLACK_DATA); 6449 bool icache_clack_request = (clack_type == DspinRwtParam::TYPE_CLACK_INST); 6450 6450 6451 6451 if (r_dspin_clack_req.read()) … … 6701 6701 { 6702 6702 // initialize dspin send data 6703 Dspin DhccpParam::dspin_set(dspin_send_data,6703 DspinRwtParam::dspin_set(dspin_send_data, 6704 6704 m_cc_global_id, 6705 Dspin DhccpParam::CLEANUP_SRCID);6706 Dspin DhccpParam::dspin_set(dspin_send_data,6705 DspinRwtParam::CLEANUP_SRCID); 6706 DspinRwtParam::dspin_set(dspin_send_data, 6707 6707 0, 6708 Dspin DhccpParam::P2M_BC);6708 DspinRwtParam::P2M_BC); 6709 6709 6710 6710 if(r_cc_send_last_client.read() == 0) // dcache active request … … 6712 6712 uint64_t dest = (uint64_t) r_dcache_cc_send_nline.read() 6713 6713 >> (m_nline_width - m_x_width - m_y_width) 6714 << (Dspin DhccpParam::GLOBALID_WIDTH - m_x_width - m_y_width);6715 Dspin DhccpParam::dspin_set(dspin_send_data,6714 << (DspinRwtParam::GLOBALID_WIDTH - m_x_width - m_y_width); 6715 DspinRwtParam::dspin_set(dspin_send_data, 6716 6716 dest, 6717 Dspin DhccpParam::CLEANUP_DEST);6718 6719 Dspin DhccpParam::dspin_set(dspin_send_data,6717 DspinRwtParam::CLEANUP_DEST); 6718 6719 DspinRwtParam::dspin_set(dspin_send_data, 6720 6720 (r_dcache_cc_send_nline.read() & 0x300000000ULL)>>32, 6721 Dspin DhccpParam::CLEANUP_NLINE_MSB);6722 6723 Dspin DhccpParam::dspin_set(dspin_send_data,6721 DspinRwtParam::CLEANUP_NLINE_MSB); 6722 6723 DspinRwtParam::dspin_set(dspin_send_data, 6724 6724 r_dcache_cc_send_way.read(), 6725 Dspin DhccpParam::CLEANUP_WAY_INDEX);6726 6727 Dspin DhccpParam::dspin_set(dspin_send_data,6728 Dspin DhccpParam::TYPE_CLEANUP_DATA,6729 Dspin DhccpParam::P2M_TYPE);6730 6731 Dspin DhccpParam::dspin_set(dspin_send_data,6725 DspinRwtParam::CLEANUP_WAY_INDEX); 6726 6727 DspinRwtParam::dspin_set(dspin_send_data, 6728 DspinRwtParam::TYPE_CLEANUP_DATA, 6729 DspinRwtParam::P2M_TYPE); 6730 6731 DspinRwtParam::dspin_set(dspin_send_data, 6732 6732 (r_dcache_cc_cleanup_line_ncc.read() and (r_cc_send_last_client.read() == 0)), 6733 Dspin DhccpParam::CLEANUP_NCC);6733 DspinRwtParam::CLEANUP_NCC); 6734 6734 } 6735 6735 else // icache active request … … 6737 6737 uint64_t dest = (uint64_t) r_icache_cc_send_nline.read() 6738 6738 >> (m_nline_width - m_x_width - m_y_width) 6739 << (Dspin DhccpParam::GLOBALID_WIDTH - m_x_width - m_y_width);6740 6741 Dspin DhccpParam::dspin_set(dspin_send_data,6739 << (DspinRwtParam::GLOBALID_WIDTH - m_x_width - m_y_width); 6740 6741 DspinRwtParam::dspin_set(dspin_send_data, 6742 6742 dest, 6743 Dspin DhccpParam::CLEANUP_DEST);6744 6745 Dspin DhccpParam::dspin_set(dspin_send_data,6743 DspinRwtParam::CLEANUP_DEST); 6744 6745 DspinRwtParam::dspin_set(dspin_send_data, 6746 6746 (r_icache_cc_send_nline.read() & 0x300000000ULL)>>32, 6747 Dspin DhccpParam::CLEANUP_NLINE_MSB);6748 6749 Dspin DhccpParam::dspin_set(dspin_send_data,6747 DspinRwtParam::CLEANUP_NLINE_MSB); 6748 6749 DspinRwtParam::dspin_set(dspin_send_data, 6750 6750 r_icache_cc_send_way.read(), 6751 Dspin DhccpParam::CLEANUP_WAY_INDEX);6752 6753 Dspin DhccpParam::dspin_set(dspin_send_data,6754 Dspin DhccpParam::TYPE_CLEANUP_INST,6755 Dspin DhccpParam::P2M_TYPE);6756 6757 Dspin DhccpParam::dspin_set(dspin_send_data,6751 DspinRwtParam::CLEANUP_WAY_INDEX); 6752 6753 DspinRwtParam::dspin_set(dspin_send_data, 6754 DspinRwtParam::TYPE_CLEANUP_INST, 6755 DspinRwtParam::P2M_TYPE); 6756 6757 DspinRwtParam::dspin_set(dspin_send_data, 6758 6758 0, 6759 Dspin DhccpParam::CLEANUP_NCC);6759 DspinRwtParam::CLEANUP_NCC); 6760 6760 6761 6761 … … 6773 6773 if(r_cc_send_last_client.read() == 0) // dcache active request 6774 6774 { 6775 Dspin DhccpParam::dspin_set(dspin_send_data,6775 DspinRwtParam::dspin_set(dspin_send_data, 6776 6776 r_dcache_cc_send_nline.read() & 0xFFFFFFFFULL, 6777 Dspin DhccpParam::CLEANUP_NLINE_LSB);6777 DspinRwtParam::CLEANUP_NLINE_LSB); 6778 6778 } 6779 6779 else // icache active request 6780 6780 { 6781 Dspin DhccpParam::dspin_set(dspin_send_data,6781 DspinRwtParam::dspin_set(dspin_send_data, 6782 6782 r_icache_cc_send_nline.read() & 0xFFFFFFFFULL, 6783 Dspin DhccpParam::CLEANUP_NLINE_LSB);6783 DspinRwtParam::CLEANUP_NLINE_LSB); 6784 6784 } 6785 6785 // send flit … … 6793 6793 { 6794 6794 6795 Dspin DhccpParam::dspin_set(dspin_send_data,6795 DspinRwtParam::dspin_set(dspin_send_data, 6796 6796 r_cc_send_data_fifo.read(), 6797 Dspin DhccpParam::CLEANUP_DATA_UPDT);6797 DspinRwtParam::CLEANUP_DATA_UPDT); 6798 6798 6799 6799 p_dspin_p2m.data = dspin_send_data; … … 6806 6806 { 6807 6807 // initialize dspin send data 6808 Dspin DhccpParam::dspin_set(dspin_send_data,6808 DspinRwtParam::dspin_set(dspin_send_data, 6809 6809 0, 6810 Dspin DhccpParam::P2M_BC);6811 Dspin DhccpParam::dspin_set(dspin_send_data,6812 Dspin DhccpParam::TYPE_MULTI_ACK,6813 Dspin DhccpParam::P2M_TYPE);6810 DspinRwtParam::P2M_BC); 6811 DspinRwtParam::dspin_set(dspin_send_data, 6812 DspinRwtParam::TYPE_MULTI_ACK, 6813 DspinRwtParam::P2M_TYPE); 6814 6814 6815 6815 if(r_cc_send_last_client.read() == 0) // dcache active request … … 6817 6817 uint64_t dest = (uint64_t) r_dcache_cc_send_nline.read() 6818 6818 >> (m_nline_width - m_x_width - m_y_width) 6819 << (Dspin DhccpParam::GLOBALID_WIDTH - m_x_width - m_y_width);6819 << (DspinRwtParam::GLOBALID_WIDTH - m_x_width - m_y_width); 6820 6820 6821 Dspin DhccpParam::dspin_set(dspin_send_data,6821 DspinRwtParam::dspin_set(dspin_send_data, 6822 6822 dest, 6823 Dspin DhccpParam::MULTI_ACK_DEST);6824 6825 Dspin DhccpParam::dspin_set(dspin_send_data,6823 DspinRwtParam::MULTI_ACK_DEST); 6824 6825 DspinRwtParam::dspin_set(dspin_send_data, 6826 6826 r_dcache_cc_send_updt_tab_idx.read(), 6827 Dspin DhccpParam::MULTI_ACK_UPDT_INDEX);6827 DspinRwtParam::MULTI_ACK_UPDT_INDEX); 6828 6828 } 6829 6829 else // icache active request … … 6831 6831 uint64_t dest = (uint64_t) r_icache_cc_send_nline.read() 6832 6832 >> (m_nline_width - m_x_width - m_y_width) 6833 << (Dspin DhccpParam::GLOBALID_WIDTH - m_x_width - m_y_width);6833 << (DspinRwtParam::GLOBALID_WIDTH - m_x_width - m_y_width); 6834 6834 6835 6835 6836 Dspin DhccpParam::dspin_set(dspin_send_data,6836 DspinRwtParam::dspin_set(dspin_send_data, 6837 6837 dest, 6838 Dspin DhccpParam::MULTI_ACK_DEST);6839 6840 Dspin DhccpParam::dspin_set(dspin_send_data,6838 DspinRwtParam::MULTI_ACK_DEST); 6839 6840 DspinRwtParam::dspin_set(dspin_send_data, 6841 6841 r_icache_cc_send_updt_tab_idx.read(), 6842 Dspin DhccpParam::MULTI_ACK_UPDT_INDEX);6842 DspinRwtParam::MULTI_ACK_UPDT_INDEX); 6843 6843 } 6844 6844 // send flit … … 6938 6938 6939 6939 6940 int clack_type = Dspin DhccpParam::dspin_get(r_dspin_clack_flit.read(),6941 Dspin DhccpParam::CLACK_TYPE);6940 int clack_type = DspinRwtParam::dspin_get(r_dspin_clack_flit.read(), 6941 DspinRwtParam::CLACK_TYPE); 6942 6942 6943 6943 bool dspin_clack_get = false; 6944 bool dcache_clack_request = (clack_type == Dspin DhccpParam::TYPE_CLACK_DATA);6945 bool icache_clack_request = (clack_type == Dspin DhccpParam::TYPE_CLACK_INST);6944 bool dcache_clack_request = (clack_type == DspinRwtParam::TYPE_CLACK_DATA); 6945 bool icache_clack_request = (clack_type == DspinRwtParam::TYPE_CLACK_INST); 6946 6946 6947 6947 if (r_dspin_clack_req.read()) -
branches/RWT/modules/vci_mem_cache/caba/metadata/vci_mem_cache.sd
r468 r771 40 40 Uses('caba:generic_fifo'), 41 41 Uses('caba:generic_llsc_global_table'), 42 Uses('caba:dspin_ dhccp_param')42 Uses('caba:dspin_rwt_param') 43 43 ], 44 44 -
branches/RWT/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h
r767 r771 51 51 #include "update_tab.h" 52 52 #include "dspin_interface.h" 53 #include "dspin_ dhccp_param.h"53 #include "dspin_rwt_param.h" 54 54 55 55 #define TRT_ENTRIES 4 // Number of entries in TRT -
branches/RWT/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
r767 r771 2029 2029 { 2030 2030 uint64_t flit = m_cc_receive_to_multi_ack_fifo.read(); 2031 updt_index = Dspin DhccpParam::dspin_get(flit,2032 Dspin DhccpParam::MULTI_ACK_UPDT_INDEX);2031 updt_index = DspinRwtParam::dspin_get(flit, 2032 DspinRwtParam::MULTI_ACK_UPDT_INDEX); 2033 2033 2034 2034 cc_receive_to_multi_ack_fifo_get = true; … … 5661 5661 5662 5662 uint32_t srcid = 5663 Dspin DhccpParam::dspin_get(5663 DspinRwtParam::dspin_get( 5664 5664 flit, 5665 Dspin DhccpParam::CLEANUP_SRCID);5665 DspinRwtParam::CLEANUP_SRCID); 5666 5666 5667 5667 uint8_t type = 5668 Dspin DhccpParam::dspin_get(5668 DspinRwtParam::dspin_get( 5669 5669 flit, 5670 Dspin DhccpParam::P2M_TYPE);5670 DspinRwtParam::P2M_TYPE); 5671 5671 5672 5672 r_cleanup_way_index = 5673 Dspin DhccpParam::dspin_get(5673 DspinRwtParam::dspin_get( 5674 5674 flit, 5675 Dspin DhccpParam::CLEANUP_WAY_INDEX);5675 DspinRwtParam::CLEANUP_WAY_INDEX); 5676 5676 5677 5677 r_cleanup_nline = 5678 Dspin DhccpParam::dspin_get(5678 DspinRwtParam::dspin_get( 5679 5679 flit, 5680 Dspin DhccpParam::CLEANUP_NLINE_MSB) << 32;5681 5682 r_cleanup_inst = (type == Dspin DhccpParam::TYPE_CLEANUP_INST);5680 DspinRwtParam::CLEANUP_NLINE_MSB) << 32; 5681 5682 r_cleanup_inst = (type == DspinRwtParam::TYPE_CLEANUP_INST); 5683 5683 r_cleanup_srcid = srcid; 5684 5684 r_cleanup_ncc = 5685 Dspin DhccpParam::dspin_get(5685 DspinRwtParam::dspin_get( 5686 5686 flit, 5687 Dspin DhccpParam::CLEANUP_NCC);5687 DspinRwtParam::CLEANUP_NCC); 5688 5688 r_cleanup_contains_data = false; 5689 5689 … … 5710 5710 << " CLEANUP_IDLE> Cleanup request:" << std::hex 5711 5711 << " / owner_id = " << srcid 5712 << " / owner_ins = " << (type == Dspin DhccpParam::TYPE_CLEANUP_INST)5713 << " / ncc = " << Dspin DhccpParam::dspin_get(5712 << " / owner_ins = " << (type == DspinRwtParam::TYPE_CLEANUP_INST) 5713 << " / ncc = " << DspinRwtParam::dspin_get( 5714 5714 flit, 5715 Dspin DhccpParam::CLEANUP_NCC)5715 DspinRwtParam::CLEANUP_NCC) 5716 5716 << std::endl; 5717 5717 } … … 5728 5728 5729 5729 addr_t nline = r_cleanup_nline.read() | 5730 Dspin DhccpParam::dspin_get(flit, DspinDhccpParam::CLEANUP_NLINE_LSB);5730 DspinRwtParam::dspin_get(flit, DspinRwtParam::CLEANUP_NLINE_LSB); 5731 5731 5732 5732 bool eop = 5733 Dspin DhccpParam::dspin_get(flit, DspinDhccpParam::P2M_EOP) == 0x1;5733 DspinRwtParam::dspin_get(flit, DspinRwtParam::P2M_EOP) == 0x1; 5734 5734 5735 5735 if (! eop) … … 5768 5768 5769 5769 uint32_t data = 5770 Dspin DhccpParam::dspin_get (flit, DspinDhccpParam::CLEANUP_DATA_UPDT);5770 DspinRwtParam::dspin_get (flit, DspinRwtParam::CLEANUP_DATA_UPDT); 5771 5771 5772 5772 r_cleanup_data[r_cleanup_data_index] = data; … … 8170 8170 8171 8171 uint8_t type = 8172 Dspin DhccpParam::dspin_get(8172 DspinRwtParam::dspin_get( 8173 8173 p_dspin_p2m.data.read(), 8174 Dspin DhccpParam::P2M_TYPE);8175 8176 if((type == Dspin DhccpParam::TYPE_CLEANUP_DATA) or8177 (type == Dspin DhccpParam::TYPE_CLEANUP_INST))8174 DspinRwtParam::P2M_TYPE); 8175 8176 if((type == DspinRwtParam::TYPE_CLEANUP_DATA) or 8177 (type == DspinRwtParam::TYPE_CLEANUP_INST)) 8178 8178 { 8179 8179 r_cc_receive_fsm = CC_RECEIVE_CLEANUP; … … 8181 8181 } 8182 8182 8183 if(type == Dspin DhccpParam::TYPE_MULTI_ACK)8183 if(type == DspinRwtParam::TYPE_MULTI_ACK) 8184 8184 { 8185 8185 r_cc_receive_fsm = CC_RECEIVE_MULTI_ACK; … … 10261 10261 if(m_config_to_cc_send_inst_fifo.read()) 10262 10262 { 10263 multi_inval_type = Dspin DhccpParam::TYPE_MULTI_INVAL_INST;10263 multi_inval_type = DspinRwtParam::TYPE_MULTI_INVAL_INST; 10264 10264 } 10265 10265 else 10266 10266 { 10267 multi_inval_type = Dspin DhccpParam::TYPE_MULTI_INVAL_DATA;10267 multi_inval_type = DspinRwtParam::TYPE_MULTI_INVAL_DATA; 10268 10268 } 10269 10269 10270 10270 uint64_t flit = 0; 10271 10271 uint64_t dest = m_config_to_cc_send_srcid_fifo.read() << 10272 (Dspin DhccpParam::SRCID_WIDTH - vci_param_int::S);10273 10274 Dspin DhccpParam::dspin_set( flit,10272 (DspinRwtParam::SRCID_WIDTH - vci_param_int::S); 10273 10274 DspinRwtParam::dspin_set( flit, 10275 10275 dest, 10276 Dspin DhccpParam::MULTI_INVAL_DEST);10276 DspinRwtParam::MULTI_INVAL_DEST); 10277 10277 10278 10278 // MODIFIED FOR CONFIG INVAL (solution 1 bit in flit multi_inval) 10279 Dspin DhccpParam::dspin_set( flit,10279 DspinRwtParam::dspin_set( flit, 10280 10280 1, 10281 Dspin DhccpParam::MULTI_INVAL_IS_CONFIG);10282 10283 Dspin DhccpParam::dspin_set( flit,10281 DspinRwtParam::MULTI_INVAL_IS_CONFIG); 10282 10283 DspinRwtParam::dspin_set( flit, 10284 10284 r_config_to_cc_send_trdid.read(), 10285 Dspin DhccpParam::MULTI_INVAL_UPDT_INDEX);10286 10287 Dspin DhccpParam::dspin_set( flit,10285 DspinRwtParam::MULTI_INVAL_UPDT_INDEX); 10286 10287 DspinRwtParam::dspin_set( flit, 10288 10288 multi_inval_type, 10289 Dspin DhccpParam::M2P_TYPE);10289 DspinRwtParam::M2P_TYPE); 10290 10290 p_dspin_m2p.write = true; 10291 10291 p_dspin_m2p.data = flit; … … 10296 10296 { 10297 10297 uint64_t flit = 0; 10298 Dspin DhccpParam::dspin_set( flit,10298 DspinRwtParam::dspin_set( flit, 10299 10299 r_config_to_cc_send_nline.read(), 10300 Dspin DhccpParam::MULTI_INVAL_NLINE);10300 DspinRwtParam::MULTI_INVAL_NLINE); 10301 10301 p_dspin_m2p.eop = true; 10302 10302 p_dspin_m2p.write = true; … … 10312 10312 if(m_xram_rsp_to_cc_send_inst_fifo.read()) 10313 10313 { 10314 multi_inval_type = Dspin DhccpParam::TYPE_MULTI_INVAL_INST;10314 multi_inval_type = DspinRwtParam::TYPE_MULTI_INVAL_INST; 10315 10315 } 10316 10316 else 10317 10317 { 10318 multi_inval_type = Dspin DhccpParam::TYPE_MULTI_INVAL_DATA;10318 multi_inval_type = DspinRwtParam::TYPE_MULTI_INVAL_DATA; 10319 10319 } 10320 10320 10321 10321 uint64_t flit = 0; 10322 10322 uint64_t dest = m_xram_rsp_to_cc_send_srcid_fifo.read() << 10323 (Dspin DhccpParam::SRCID_WIDTH - vci_param_int::S);10324 10325 Dspin DhccpParam::dspin_set( flit,10323 (DspinRwtParam::SRCID_WIDTH - vci_param_int::S); 10324 10325 DspinRwtParam::dspin_set( flit, 10326 10326 dest, 10327 Dspin DhccpParam::MULTI_INVAL_DEST);10328 10329 Dspin DhccpParam::dspin_set( flit,10327 DspinRwtParam::MULTI_INVAL_DEST); 10328 10329 DspinRwtParam::dspin_set( flit, 10330 10330 r_xram_rsp_to_cc_send_trdid.read(), 10331 Dspin DhccpParam::MULTI_INVAL_UPDT_INDEX);10332 10333 Dspin DhccpParam::dspin_set( flit,10331 DspinRwtParam::MULTI_INVAL_UPDT_INDEX); 10332 10333 DspinRwtParam::dspin_set( flit, 10334 10334 multi_inval_type, 10335 Dspin DhccpParam::M2P_TYPE);10335 DspinRwtParam::M2P_TYPE); 10336 10336 p_dspin_m2p.write = true; 10337 10337 p_dspin_m2p.data = flit; … … 10344 10344 uint64_t flit = 0; 10345 10345 10346 Dspin DhccpParam::dspin_set( flit,10346 DspinRwtParam::dspin_set( flit, 10347 10347 r_xram_rsp_to_cc_send_nline.read(), 10348 Dspin DhccpParam::MULTI_INVAL_NLINE);10348 DspinRwtParam::MULTI_INVAL_NLINE); 10349 10349 p_dspin_m2p.eop = true; 10350 10350 p_dspin_m2p.write = true; … … 10358 10358 uint64_t flit = 0; 10359 10359 10360 Dspin DhccpParam::dspin_set( flit,10360 DspinRwtParam::dspin_set( flit, 10361 10361 m_broadcast_boundaries, 10362 Dspin DhccpParam::BROADCAST_BOX);10362 DspinRwtParam::BROADCAST_BOX); 10363 10363 10364 Dspin DhccpParam::dspin_set( flit,10364 DspinRwtParam::dspin_set( flit, 10365 10365 1, 10366 Dspin DhccpParam::MULTI_INVAL_IS_CONFIG);10367 10368 Dspin DhccpParam::dspin_set( flit,10366 DspinRwtParam::MULTI_INVAL_IS_CONFIG); 10367 10368 DspinRwtParam::dspin_set( flit, 10369 10369 1ULL, 10370 Dspin DhccpParam::M2P_BC);10370 DspinRwtParam::M2P_BC); 10371 10371 p_dspin_m2p.write = true; 10372 10372 p_dspin_m2p.data = flit; … … 10380 10380 uint64_t flit = 0; 10381 10381 10382 Dspin DhccpParam::dspin_set( flit,10382 DspinRwtParam::dspin_set( flit, 10383 10383 m_broadcast_boundaries, 10384 Dspin DhccpParam::BROADCAST_BOX);10385 10386 Dspin DhccpParam::dspin_set( flit,10384 DspinRwtParam::BROADCAST_BOX); 10385 10386 DspinRwtParam::dspin_set( flit, 10387 10387 1ULL, 10388 Dspin DhccpParam::M2P_BC);10388 DspinRwtParam::M2P_BC); 10389 10389 p_dspin_m2p.write = true; 10390 10390 p_dspin_m2p.data = flit; … … 10395 10395 { 10396 10396 uint64_t flit = 0; 10397 Dspin DhccpParam::dspin_set( flit,10397 DspinRwtParam::dspin_set( flit, 10398 10398 r_xram_rsp_to_cc_send_nline.read(), 10399 Dspin DhccpParam::BROADCAST_NLINE);10399 DspinRwtParam::BROADCAST_NLINE); 10400 10400 p_dspin_m2p.write = true; 10401 10401 p_dspin_m2p.eop = true; … … 10407 10407 { 10408 10408 uint64_t flit = 0; 10409 Dspin DhccpParam::dspin_set( flit,10409 DspinRwtParam::dspin_set( flit, 10410 10410 r_config_to_cc_send_nline.read(), 10411 Dspin DhccpParam::BROADCAST_NLINE);10411 DspinRwtParam::BROADCAST_NLINE); 10412 10412 p_dspin_m2p.write = true; 10413 10413 p_dspin_m2p.eop = true; … … 10421 10421 uint64_t flit = 0; 10422 10422 10423 uint8_t multi_inval_type;10424 if (r_read_to_cc_send_inst.read())10425 {10426 multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_INST;10427 }10428 else10429 {10430 multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_DATA;10431 }10432 10433 Dspin DhccpParam::dspin_set(10423 //uint8_t multi_inval_type; 10424 //if (r_read_to_cc_send_inst.read()) 10425 //{ 10426 // multi_inval_type = DspinRwtParam::TYPE_MULTI_INVAL_INST; 10427 //} 10428 //else 10429 //{ 10430 // multi_inval_type = DspinRwtParam::TYPE_MULTI_INVAL_DATA; 10431 //} 10432 10433 DspinRwtParam::dspin_set( 10434 10434 flit, 10435 10435 r_read_to_cc_send_dest.read(), 10436 Dspin DhccpParam::MULTI_INVAL_DEST);10437 10438 Dspin DhccpParam::dspin_set(10436 DspinRwtParam::MULTI_INVAL_DEST); 10437 10438 DspinRwtParam::dspin_set( 10439 10439 flit, 10440 Dspin DhccpParam::TYPE_MULTI_INVAL_DATA,10441 Dspin DhccpParam::M2P_TYPE);10440 DspinRwtParam::TYPE_MULTI_INVAL_DATA, 10441 DspinRwtParam::M2P_TYPE); 10442 10442 10443 10443 p_dspin_m2p.write = true; … … 10453 10453 uint64_t flit = 0; 10454 10454 10455 Dspin DhccpParam::dspin_set(10455 DspinRwtParam::dspin_set( 10456 10456 flit, 10457 10457 r_read_to_cc_send_nline.read(), 10458 Dspin DhccpParam::MULTI_INVAL_NLINE);10458 DspinRwtParam::MULTI_INVAL_NLINE); 10459 10459 10460 10460 … … 10471 10471 uint64_t flit = 0; 10472 10472 10473 Dspin DhccpParam::dspin_set(10473 DspinRwtParam::dspin_set( 10474 10474 flit, 10475 10475 r_write_to_cc_send_dest.read(), 10476 Dspin DhccpParam::MULTI_INVAL_DEST);10477 10478 Dspin DhccpParam::dspin_set(10476 DspinRwtParam::MULTI_INVAL_DEST); 10477 10478 DspinRwtParam::dspin_set( 10479 10479 flit, 10480 Dspin DhccpParam::TYPE_MULTI_INVAL_DATA,10481 Dspin DhccpParam::M2P_TYPE);10480 DspinRwtParam::TYPE_MULTI_INVAL_DATA, 10481 DspinRwtParam::M2P_TYPE); 10482 10482 10483 10483 p_dspin_m2p.write = true; … … 10492 10492 uint64_t flit = 0; 10493 10493 10494 Dspin DhccpParam::dspin_set(10494 DspinRwtParam::dspin_set( 10495 10495 flit, 10496 10496 r_write_to_cc_send_nline.read(), 10497 Dspin DhccpParam::MULTI_INVAL_NLINE);10497 DspinRwtParam::MULTI_INVAL_NLINE); 10498 10498 10499 10499 … … 10510 10510 { 10511 10511 uint64_t flit = 0; 10512 Dspin DhccpParam::dspin_set( flit,10512 DspinRwtParam::dspin_set( flit, 10513 10513 r_write_to_cc_send_nline.read(), 10514 Dspin DhccpParam::BROADCAST_NLINE);10514 DspinRwtParam::BROADCAST_NLINE); 10515 10515 p_dspin_m2p.write = true; 10516 10516 p_dspin_m2p.eop = true; … … 10522 10522 { 10523 10523 uint64_t flit = 0; 10524 Dspin DhccpParam::dspin_set( flit,10524 DspinRwtParam::dspin_set( flit, 10525 10525 r_cas_to_cc_send_nline.read(), 10526 Dspin DhccpParam::BROADCAST_NLINE);10526 DspinRwtParam::BROADCAST_NLINE); 10527 10527 p_dspin_m2p.write = true; 10528 10528 p_dspin_m2p.eop = true; … … 10538 10538 if(m_write_to_cc_send_inst_fifo.read()) 10539 10539 { 10540 multi_updt_type = Dspin DhccpParam::TYPE_MULTI_UPDT_INST;10540 multi_updt_type = DspinRwtParam::TYPE_MULTI_UPDT_INST; 10541 10541 } 10542 10542 else 10543 10543 { 10544 multi_updt_type = Dspin DhccpParam::TYPE_MULTI_UPDT_DATA;10544 multi_updt_type = DspinRwtParam::TYPE_MULTI_UPDT_DATA; 10545 10545 } 10546 10546 … … 10548 10548 uint64_t dest = 10549 10549 m_write_to_cc_send_srcid_fifo.read() << 10550 (Dspin DhccpParam::SRCID_WIDTH - vci_param_int::S);10551 10552 Dspin DhccpParam::dspin_set(10550 (DspinRwtParam::SRCID_WIDTH - vci_param_int::S); 10551 10552 DspinRwtParam::dspin_set( 10553 10553 flit, 10554 10554 dest, 10555 Dspin DhccpParam::MULTI_UPDT_DEST);10556 10557 Dspin DhccpParam::dspin_set(10555 DspinRwtParam::MULTI_UPDT_DEST); 10556 10557 DspinRwtParam::dspin_set( 10558 10558 flit, 10559 10559 r_write_to_cc_send_trdid.read(), 10560 Dspin DhccpParam::MULTI_UPDT_UPDT_INDEX);10561 10562 Dspin DhccpParam::dspin_set(10560 DspinRwtParam::MULTI_UPDT_UPDT_INDEX); 10561 10562 DspinRwtParam::dspin_set( 10563 10563 flit, 10564 10564 multi_updt_type, 10565 Dspin DhccpParam::M2P_TYPE);10565 DspinRwtParam::M2P_TYPE); 10566 10566 10567 10567 p_dspin_m2p.write = true; … … 10575 10575 uint64_t flit = 0; 10576 10576 10577 Dspin DhccpParam::dspin_set(10577 DspinRwtParam::dspin_set( 10578 10578 flit, 10579 10579 r_write_to_cc_send_index.read(), 10580 Dspin DhccpParam::MULTI_UPDT_WORD_INDEX);10581 10582 Dspin DhccpParam::dspin_set(10580 DspinRwtParam::MULTI_UPDT_WORD_INDEX); 10581 10582 DspinRwtParam::dspin_set( 10583 10583 flit, 10584 10584 r_write_to_cc_send_nline.read(), 10585 Dspin DhccpParam::MULTI_UPDT_NLINE);10585 DspinRwtParam::MULTI_UPDT_NLINE); 10586 10586 10587 10587 p_dspin_m2p.write = true; … … 10602 10602 uint64_t flit = 0; 10603 10603 10604 Dspin DhccpParam::dspin_set(10604 DspinRwtParam::dspin_set( 10605 10605 flit, 10606 10606 multi_updt_be, 10607 Dspin DhccpParam::MULTI_UPDT_BE);10608 10609 Dspin DhccpParam::dspin_set(10607 DspinRwtParam::MULTI_UPDT_BE); 10608 10609 DspinRwtParam::dspin_set( 10610 10610 flit, 10611 10611 multi_updt_data, 10612 Dspin DhccpParam::MULTI_UPDT_DATA);10612 DspinRwtParam::MULTI_UPDT_DATA); 10613 10613 10614 10614 p_dspin_m2p.write = true; … … 10626 10626 if(m_cas_to_cc_send_inst_fifo.read()) 10627 10627 { 10628 multi_updt_type = Dspin DhccpParam::TYPE_MULTI_UPDT_INST;10628 multi_updt_type = DspinRwtParam::TYPE_MULTI_UPDT_INST; 10629 10629 } 10630 10630 else 10631 10631 { 10632 multi_updt_type = Dspin DhccpParam::TYPE_MULTI_UPDT_DATA;10632 multi_updt_type = DspinRwtParam::TYPE_MULTI_UPDT_DATA; 10633 10633 } 10634 10634 … … 10636 10636 uint64_t dest = 10637 10637 m_cas_to_cc_send_srcid_fifo.read() << 10638 (Dspin DhccpParam::SRCID_WIDTH - vci_param_int::S);10639 10640 Dspin DhccpParam::dspin_set(10638 (DspinRwtParam::SRCID_WIDTH - vci_param_int::S); 10639 10640 DspinRwtParam::dspin_set( 10641 10641 flit, 10642 10642 dest, 10643 Dspin DhccpParam::MULTI_UPDT_DEST);10644 10645 Dspin DhccpParam::dspin_set(10643 DspinRwtParam::MULTI_UPDT_DEST); 10644 10645 DspinRwtParam::dspin_set( 10646 10646 flit, 10647 10647 r_cas_to_cc_send_trdid.read(), 10648 Dspin DhccpParam::MULTI_UPDT_UPDT_INDEX);10649 10650 Dspin DhccpParam::dspin_set(10648 DspinRwtParam::MULTI_UPDT_UPDT_INDEX); 10649 10650 DspinRwtParam::dspin_set( 10651 10651 flit, 10652 10652 multi_updt_type, 10653 Dspin DhccpParam::M2P_TYPE);10653 DspinRwtParam::M2P_TYPE); 10654 10654 10655 10655 p_dspin_m2p.write = true; … … 10663 10663 uint64_t flit = 0; 10664 10664 10665 Dspin DhccpParam::dspin_set(10665 DspinRwtParam::dspin_set( 10666 10666 flit, 10667 10667 r_cas_to_cc_send_index.read(), 10668 Dspin DhccpParam::MULTI_UPDT_WORD_INDEX);10669 10670 Dspin DhccpParam::dspin_set(10668 DspinRwtParam::MULTI_UPDT_WORD_INDEX); 10669 10670 DspinRwtParam::dspin_set( 10671 10671 flit, 10672 10672 r_cas_to_cc_send_nline.read(), 10673 Dspin DhccpParam::MULTI_UPDT_NLINE);10673 DspinRwtParam::MULTI_UPDT_NLINE); 10674 10674 10675 10675 p_dspin_m2p.write = true; … … 10683 10683 uint64_t flit = 0; 10684 10684 10685 Dspin DhccpParam::dspin_set(10685 DspinRwtParam::dspin_set( 10686 10686 flit, 10687 10687 0xF, 10688 Dspin DhccpParam::MULTI_UPDT_BE);10689 10690 Dspin DhccpParam::dspin_set(10688 DspinRwtParam::MULTI_UPDT_BE); 10689 10690 DspinRwtParam::dspin_set( 10691 10691 flit, 10692 10692 r_cas_to_cc_send_wdata.read(), 10693 Dspin DhccpParam::MULTI_UPDT_DATA);10693 DspinRwtParam::MULTI_UPDT_DATA); 10694 10694 10695 10695 p_dspin_m2p.write = true; … … 10704 10704 uint64_t flit = 0; 10705 10705 10706 Dspin DhccpParam::dspin_set(10706 DspinRwtParam::dspin_set( 10707 10707 flit, 10708 10708 0xF, 10709 Dspin DhccpParam::MULTI_UPDT_BE);10710 10711 Dspin DhccpParam::dspin_set(10709 DspinRwtParam::MULTI_UPDT_BE); 10710 10711 DspinRwtParam::dspin_set( 10712 10712 flit, 10713 10713 r_cas_to_cc_send_wdata_high.read(), 10714 Dspin DhccpParam::MULTI_UPDT_DATA);10714 DspinRwtParam::MULTI_UPDT_DATA); 10715 10715 10716 10716 p_dspin_m2p.write = true; … … 10731 10731 if(r_cleanup_inst.read()) 10732 10732 { 10733 cleanup_ack_type = Dspin DhccpParam::TYPE_CLACK_INST;10733 cleanup_ack_type = DspinRwtParam::TYPE_CLACK_INST; 10734 10734 } 10735 10735 else 10736 10736 { 10737 cleanup_ack_type = Dspin DhccpParam::TYPE_CLACK_DATA;10737 cleanup_ack_type = DspinRwtParam::TYPE_CLACK_DATA; 10738 10738 } 10739 10739 10740 10740 uint64_t flit = 0; 10741 10741 uint64_t dest = r_cleanup_srcid.read() << 10742 (Dspin DhccpParam::SRCID_WIDTH - vci_param_int::S);10743 10744 Dspin DhccpParam::dspin_set(10742 (DspinRwtParam::SRCID_WIDTH - vci_param_int::S); 10743 10744 DspinRwtParam::dspin_set( 10745 10745 flit, 10746 10746 dest, 10747 Dspin DhccpParam::CLACK_DEST);10748 10749 Dspin DhccpParam::dspin_set(10747 DspinRwtParam::CLACK_DEST); 10748 10749 DspinRwtParam::dspin_set( 10750 10750 flit, 10751 10751 r_cleanup_nline.read() & 0xFFFF, 10752 Dspin DhccpParam::CLACK_SET);10753 10754 Dspin DhccpParam::dspin_set(10752 DspinRwtParam::CLACK_SET); 10753 10754 DspinRwtParam::dspin_set( 10755 10755 flit, 10756 10756 r_cleanup_way_index.read(), 10757 Dspin DhccpParam::CLACK_WAY);10758 10759 Dspin DhccpParam::dspin_set(10757 DspinRwtParam::CLACK_WAY); 10758 10759 DspinRwtParam::dspin_set( 10760 10760 flit, 10761 10761 cleanup_ack_type, 10762 Dspin DhccpParam::CLACK_TYPE);10762 DspinRwtParam::CLACK_TYPE); 10763 10763 10764 10764 p_dspin_clack.eop = true;
Note: See TracChangeset
for help on using the changeset viewer.