source: branches/RWT/modules/vci_mem_cache/include/soclib/mem_cache.h @ 604

Last change on this file since 604 was 604, checked in by devigne, 9 years ago

Merge with the latest trunk (concurrent access to a register CONFIG_FSM)
Modification processing software invalidations to memcache level.

When a software memcache invalidation, it does not write the dirty data in the
XRAM (and therefore does not reserve space in the TRT). This poses a problem
when processing CLEANUP_DATA on a line NCC because CLEANUP_FSM expects to find
a placeholder in the TRT.

To overcome this problem, the flit DSPIN a multi-inval now contains a bit to
indicate that the invalidation from a control configuration (software
invalidation level memcache).

At the reception of this message invalidation in the L1 cache, it retrieves the
value of the field DSPIN IS_CONFIG. When processing invalidation (
DCACHE_CC_INVAL ), the value of this field is checked. Two scenarios are
possible:

  • 1st case : The INVAL concerns a line NCC but not from a software invalidation (IS_CONFIG = 0), the CLEANUP sent then follows the classical treatment of invalidation of a line NCC (sends a CLEANUP_NCC with or without data).
  • 2nd case : The INVAL provides a line NCC from a software invalidation (IS_CONFIG = 1) : same treatment as was CLEANUP line CC.

Thus in the case of interest (software invalidation on a line NCC), the CLEANUP
received by the memcache will be treated as one line CC.

File size: 1.4 KB
Line 
1/*
2 * SOCLIB_LGPL_HEADER_BEGIN
3 *
4 * This file is part of SoCLib, GNU LGPLv2.1.
5 *
6 * SoCLib is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as published
8 * by the Free Software Foundation; version 2.1 of the License.
9 *
10 * SoCLib is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with SoCLib; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 * 02110-1301 USA
19 *
20 * SOCLIB_LGPL_HEADER_END
21 *
22 * Copyright (c) UPMC, Lip6, Asim
23 *         alain greiner
24 *
25 * Maintainers: alain
26 */
27#ifndef MEM_CACHE_REGS_H
28#define MEM_CACHE_REGS_H
29
30enum SoclibMemCacheConfigRegs
31{
32    MEMC_LOCK,
33    MEMC_ADDR_LO,
34    MEMC_ADDR_HI,
35    MEMC_BUF_LENGTH,
36    MEMC_CMD_TYPE
37};
38
39enum SoclibMemCacheConfigCmd
40{
41    MEMC_CMD_NOP,
42    MEMC_CMD_INVAL,
43    MEMC_CMD_SYNC
44};
45
46#endif /* MEM_CACHE_REGS_H */
47
48// Local Variables:
49// tab-width: 4
50// c-basic-offset: 4
51// c-file-offsets:((innamespace . 0)(inline-open . 0))
52// indent-tabs-mode: nil
53// End:
54
55// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
56
Note: See TracBrowser for help on using the repository browser.