Changeset 482 for trunk


Ignore:
Timestamp:
Aug 2, 2013, 3:17:15 PM (11 years ago)
Author:
joannou
Message:

Updated llsc memcache table interface for sw operation (now able to invalidate a range of addresses)

Location:
trunk
Files:
3 edited

Legend:

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

    r382 r482  
    432432
    433433    ////////////////////////////////////////////////////////////////////////////
     434    /*
    434435    inline void sw(const addr_t ad)
    435436    //  This method checks if there is a valid registration for the given
     
    448449        //  If there is one, invalidate it
    449450        if(pos >= 0) r_val[pos] = false;
    450 
     451    }
     452    */
     453    inline void sw(const addr_t nline, unsigned int min, unsigned int max)
     454    //  This method checks if there is / are valid registration(s) for the given
     455    //  range and, in case of hit(s), invalidates the registration(s)
     456    {
     457        // increment the sw access counter (for stats)
     458        m_cpt_sw++;
     459        // hit range ?
     460        // YES
     461        //      inval registration(s)
     462        // NO
     463        //      nothing
     464
     465        // for every address in the given range ...
     466        for (unsigned int i = min; i <= max; i++)
     467        {
     468            //  Is there a registration for the given address ?
     469            int pos = hitAddr(nline + i * 4);
     470            //  If there is one, invalidate it
     471            if (pos >= 0)
     472            {
     473                r_val[pos] = false;
     474            }
     475        }
    451476    }
    452477
  • trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp

    r481 r482  
    25902590        // erase any possible new reservation when we release the lock on the
    25912591        // directory
    2592         m_llsc_table.sw(r_write_address.read());
     2592        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());
    25932593
    25942594        r_write_fsm = WRITE_DIR_LOCK;
     
    52835283    {
    52845284      // The CAS is a success => sw access to the llsc_global_table
    5285       m_llsc_table.sw(m_cmd_cas_addr_fifo.read());
     5285      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())]);
    52865286
    52875287      // test coherence request
  • trunk/platforms/tsar_generic_xbar/soclib.conf

    r480 r482  
     1#config.addDescPath("/dsk/l1/misc/joannou/tsar/trunk")
     2config.addDescPath("/users/cao/joannou/tsar")
     3config.addDescPath("/users/cao/joannou/soclib/soclib")
    14
    2 config.addDescPath("/Users/alain/soc/tsar-trunk-svn-2013/")
     5config.systemcass.cflags=config.systemc.cflags+["-fopenmp", "-fpermissive"]
     6config.systemcass.libs=config.systemc.libs+['-ldl', '-lm', '-lpthread', '-L%(libdir)s', '-lsystemc', '-rdynamic', '-fopenmp']
     7#config.default = config.systemcass_
     8#
     9config.systemc.cflags=config.systemc.cflags+["-fopenmp", "-fpermissive"]
     10config.systemc.libs=config.systemc.libs+['-ldl', '-lm', '-lpthread', '-L%(libdir)s', '-lsystemc', '-rdynamic', '-fopenmp']
     11config.default = config.systemc_
Note: See TracChangeset for help on using the changeset viewer.