Ignore:
Timestamp:
Aug 15, 2015, 9:02:55 PM (9 years ago)
Author:
cfuguet
Message:

reconf: introduce a scratchpad mode in the memory cache.

  • Initialize the memory cache directory with all slots valid. The cache lines correspond to the lowest local memory segment (i.e. the first 256 Kbytes).
  • If there is a read or write miss while in scratchpad mode, the request is dropped (black-hole behavior).
  • In scratchpad mode, when a broadcast invalidate is triggered by a write, the line is not invalidated. The Read FSM needs to check in the IVT if there is a pending invalidate during a read. The same for the Cleanup FSM. This additional IVT check is only performed when in scratchpad mode.
  • TODO: Support of the scratchpad mode on the CAS FSM. But probably not needed because the distributed bootloader initializes the Local, Remote and Dirty flags to 1 before enabling the MMU.
Location:
branches/reconfiguration/modules/vci_mem_cache/caba/source/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/modules/vci_mem_cache/caba/source/include/mem_cache_directory.h

    r861 r1011  
    305305               const DirectoryEntry &entry)
    306306    {
    307         assert((set < m_sets) && "Cache Directory write : The set index is invalid");
    308         assert((way < m_ways) && "Cache Directory write : The way index is invalid");
    309 
    310         // update Directory
    311         m_dir_tab[set][way].copy(entry);
     307        write_neutral(set, way, entry);
    312308
    313309        // update LRU bits
     
    326322        }
    327323    } // end write()
     324
     325    /////////////////////////////////////////////////////////////////////
     326    // The write_neutral function writes a new entry,
     327    // without changing the LRU.
     328    // Arguments :
     329    // - set : the set of the entry
     330    // - way : the way of the entry
     331    // - entry : the entry value
     332    /////////////////////////////////////////////////////////////////////
     333    void write_neutral(const size_t &set,
     334                       const size_t &way,
     335                       const DirectoryEntry &entry)
     336    {
     337        assert((set < m_sets) && "Cache Directory write : The set index is invalid");
     338        assert((way < m_ways) && "Cache Directory write : The way index is invalid");
     339
     340        // update Directory
     341        m_dir_tab[set][way].copy(entry);
     342    } // end write_neutral()
    328343
    329344    /////////////////////////////////////////////////////////////////////
  • branches/reconfiguration/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h

    r985 r1011  
    202202        READ_TRT_LOCK,
    203203        READ_TRT_SET,
    204         READ_TRT_REQ
     204        READ_TRT_REQ,
     205        READ_IVT_LOCK
    205206      };
    206207
     
    367368        ALLOC_IVT_CLEANUP,
    368369        ALLOC_IVT_CAS,
    369         ALLOC_IVT_CONFIG
     370        ALLOC_IVT_CONFIG,
     371        ALLOC_IVT_READ
    370372      };
    371373
     
    540542      private:
    541543
     544      void scratchpad_reset();
    542545      void transition();
    543546      void genMoore();
     
    644647      //////////////////////////////////////////////////
    645648
    646       sc_signal<int>         r_tgt_cmd_fsm;
     649      sc_signal<int>      r_tgt_cmd_fsm;
    647650
    648651      ///////////////////////////////////////////////////////
     
    668671      sc_signal<size_t>   r_config_trt_index;         // selected entry in TRT
    669672      sc_signal<size_t>   r_config_ivt_index;         // selected entry in IVT
     673      sc_signal<bool>     r_config_scratchpad;        // enable scratchpad mode
    670674
    671675      // Buffer between CONFIG fsm and IXR_CMD fsm
     
    820824      sc_signal<size_t>   r_cleanup_next_ptr;      // next pointer to the heap
    821825      sc_signal<tag_t>    r_cleanup_tag;           // cache line tag (in directory)
     826      sc_signal<bool>     r_cleanup_valid;         // valid bit (in directory)
    822827      sc_signal<bool>     r_cleanup_is_cnt;        // inst bit (in directory)
    823828      sc_signal<bool>     r_cleanup_lock;          // lock bit (in directory)
Note: See TracChangeset for help on using the changeset viewer.