Changeset 523


Ignore:
Timestamp:
Sep 14, 2013, 1:06:56 PM (11 years ago)
Author:
cfuguet
Message:

Bugfix in GenericLLSCGlobal table and vci_mem_cache:

  • Two bugs have been fixed in this commit:

The first one is in the Generic LLSC global table. The method SW
does not shift the NLINE during the concatenation with the word
index.

The second one is during the call of this function (SW) in the WRITE
FSM. The max word index passed as argument was incorrectly always over

incremented by one.

To solve this problem, the SW function has been changed. It does not

accept anymore the nline, min and max arguments but two complete
addresses (address min and address max). This way, it is avoided the
add of a new NWORDS argument to the table which would be needed to
shift the NLINE.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/generic_llsc_global_table/include/generic_llsc_global_table.h

    r514 r523  
    453453    }
    454454    */
    455     inline void sw(const addr_t nline, unsigned int min, unsigned int max)
     455    inline void sw(const addr_t ad_min, const addr_t ad_max)
    456456    //  This method checks if there is / are valid registration(s) for the given
    457457    //  range and, in case of hit(s), invalidates the registration(s)
     
    466466
    467467        // for every address in the given range ...
    468         for (unsigned int i = min; i <= max; i++)
     468        for (addr_t i = ad_min; i <= ad_max; i++)
    469469        {
    470470            //  Is there a registration for the given address ?
    471             int pos = hitAddr(nline + i * 4);
     471            int pos = hitAddr(i);
     472
    472473            //  If there is one, invalidate it
    473474            if (pos >= 0)
  • trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp

    r512 r523  
    27572757                        {
    27582758                            // We enter here if it is a SW command or an already tested SC command
    2759 
    2760                             m_llsc_table.sw( m_nline[(addr_t)r_write_address.read()],
    2761                                     r_write_word_index.read(),
    2762                                     r_write_word_index.read() + r_write_word_count.read());
     2759                            addr_t min = r_write_address.read();
     2760                            addr_t max = r_write_address.read() + r_write_word_count.read() - 1;
     2761
     2762                            m_llsc_table.sw(min, max);
    27632763
    27642764                            r_write_fsm = WRITE_DIR_LOCK;
     
    52785278
    52795279                    // The CAS is a success => sw access to the llsc_global_table
    5280                     m_llsc_table.sw( m_nline[(addr_t)m_cmd_cas_addr_fifo.read()],
    5281                             m_x[(addr_t)(m_cmd_cas_addr_fifo.read())],
    5282                             m_x[(addr_t)(m_cmd_cas_addr_fifo.read())] );
     5280                    m_llsc_table.sw(m_cmd_cas_addr_fifo.read(), m_cmd_cas_addr_fifo.read());
    52835281
    52845282                    // test coherence request
Note: See TracChangeset for help on using the changeset viewer.