Ignore:
Timestamp:
Jun 18, 2010, 4:07:34 PM (14 years ago)
Author:
guthmull
Message:

Fix a bug with uncached reads, add more debug capabilities

Location:
trunk/modules/vci_mem_cache_v3/caba/source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/vci_mem_cache_v3/caba/source/include/mem_cache_directory_v3.h

    r31 r57  
    445445
    446446    /////////////////////////////////////////////////////////////////////
     447    // The print_list() function prints a list from selected directory entry
     448    // Arguments :
     449    // - ptr : the pointer to the first entry to print
     450    /////////////////////////////////////////////////////////////////////
     451      void print_list(const size_t &ptr){
     452        bool end = false;
     453        size_t ptr_temp = ptr;
     454        std::cout << "Heap, printing the list from : " << std::dec << ptr << std::endl;
     455        while(!end){
     456            m_heap_tab[ptr_temp].print();
     457            if(ptr_temp == m_heap_tab[ptr_temp].next) end = true;
     458            ptr_temp = m_heap_tab[ptr_temp].next;
     459        }
     460      } // end print_list()
     461
     462
     463    /////////////////////////////////////////////////////////////////////
    447464    // The is_full() function return true if the heap is full.
    448465    /////////////////////////////////////////////////////////////////////
  • trunk/modules/vci_mem_cache_v3/caba/source/src/vci_mem_cache_v3.cpp

    r19 r57  
    892892            entry.tag     = r_read_tag.read();
    893893            entry.lock    = r_read_lock.read();
    894             entry.ptr     = 0;
     894            entry.ptr     = r_read_ptr.read();
    895895            if(cached_read){  // Cached read, we update the copy
    896896              if(!is_cnt){ // Not counter mode
Note: See TracChangeset for help on using the changeset viewer.