Changeset 1011


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
Files:
4 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)
  • branches/reconfiguration/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp

    r985 r1011  
    172172        "READ_TRT_LOCK",
    173173        "READ_TRT_SET",
    174         "READ_TRT_REQ"
     174        "READ_TRT_REQ",
     175        "READ_IVT_LOCK",
    175176    };
    176177    const char *write_fsm_str[] =
     
    317318        "ALLOC_IVT_CLEANUP",
    318319        "ALLOC_IVT_CAS",
    319         "ALLOC_IVT_CONFIG"
     320        "ALLOC_IVT_CONFIG",
     321        "ALLOC_IVT_READ",
    320322    };
    321323    const char *alloc_heap_fsm_str[] =
     
    10171019
    10181020    //////////////////////////////////
     1021    tmpl(void)::scratchpad_reset()
     1022    //////////////////////////////////
     1023    {
     1024        const uint32_t xy = (m_x_self << m_y_width) | m_y_self;
     1025        const uint32_t offset = m_z.getUse() - m_x_width - m_y_width;
     1026        for (size_t set = 0; set < m_sets; ++set) {
     1027            for (size_t way = 0; way < m_ways; ++way) {
     1028                DirectoryEntry entry;
     1029                entry.valid = true;
     1030                entry.tag = (xy << offset) | way;
     1031                m_cache_directory.write(set, way, entry);
     1032            }
     1033        }
     1034    }
     1035
     1036    //////////////////////////////////
    10191037    tmpl(void)::transition()
    10201038    //////////////////////////////////
     
    10801098            m_cmd_cas_eop_fifo.init()   ;
    10811099
    1082             r_config_cmd  = MEMC_CMD_NOP;
     1100            r_config_cmd = MEMC_CMD_NOP;
     1101            r_config_scratchpad = true;
    10831102
    10841103            m_config_to_cc_send_inst_fifo.init();
     
    15161535                            r_config_trdid = p_vci_tgt.trdid.read();
    15171536                            r_config_pktid = p_vci_tgt.pktid.read();
     1537                        }
     1538                        else if ((p_vci_tgt.cmd.read() == vci_param_int::CMD_WRITE)
     1539                                and (regr == MEMC_SCRATCHPAD))                        // enable/disable
     1540                                                                                      // scratchpad mode
     1541                        {
     1542                            need_rsp = true;
     1543                            error    = 0;
     1544                            r_config_scratchpad = wdata > 0 ? true : false;
     1545
     1546                            // prepare delayed response from CONFIG FSM
     1547                            r_config_srcid = p_vci_tgt.srcid.read();
     1548                            r_config_trdid = p_vci_tgt.trdid.read();
     1549                            r_config_pktid = p_vci_tgt.pktid.read();
     1550
     1551#if DEBUG_MEMC_TGT_CMD
     1552                            if (m_debug)
     1553                            {
     1554                                std::cout << "  <MEMC " << name() << " TGT_CMD_CONFIG> ";
     1555                                if (wdata) std::cout << "ENABLE the memory cache scratchpad mode";
     1556                                else       std::cout << "DISABLE the memory cache scratchpad mode";
     1557                                std::cout << std::endl;
     1558                            }
     1559#endif
    15181560                        }
    15191561                        else
     
    20562098        // - Write MEMC_BUF_LENGTH : set buffer length (bytes)
    20572099        // - Write MEMC_CMD_TYPE   : launch the actual operation
     2100        // - Write MEMC_SCRATCHPAD : enable/disable the scratchpad mode
    20582101        ////////////////////////////////////////////////////////////////////////////////////
    20592102
     
    26872730                if (entry.valid)    // hit
    26882731                {
     2732                    // check the IVT for pending invalidation when scratchpad mode and
     2733                    // line in counter mode.
     2734                    if (r_config_scratchpad.read() and entry.is_cnt)
     2735                    {
     2736                        r_read_fsm = READ_IVT_LOCK;
     2737                    }
    26892738                    // test if we need to register a new copy in the heap
    2690                     if (entry.is_cnt or (entry.count == 0) or !cached_read)
     2739                    else if (entry.is_cnt or (entry.count == 0) or !cached_read)
    26912740                    {
    26922741                        r_read_fsm = READ_DIR_HIT;
     
    26992748                else      // miss
    27002749                {
     2750                    // miss in scratchpad mode: this shouldn't happen. Drop the request
     2751                    // (black-hole behavior).
     2752                    if (r_config_scratchpad.read())
     2753                    {
     2754#if DEBUG_MEMC_READ
     2755                        if (m_debug)
     2756                        {
     2757                            std::cout << " WARNING: <MEMC " << name()
     2758                                      << " READ_DIR_LOCK> READ MISS in scratchpad mode: "
     2759                                      << " address = " << std::hex << m_cmd_read_addr_fifo.read()
     2760                                      << std::dec << std::endl;
     2761                        }
     2762#endif
     2763
     2764                        cmd_read_fifo_get = true;
     2765                        r_read_fsm = READ_IDLE;
     2766                        break;
     2767                    }
     2768
    27012769                    r_read_fsm = READ_TRT_LOCK;
    27022770                }
     
    31193187#endif
    31203188                }
     3189                break;
     3190            }
     3191            ///////////////////
     3192            case READ_IVT_LOCK:
     3193            {
     3194                if (r_alloc_ivt_fsm.read() != ALLOC_IVT_READ) break;
     3195
     3196                assert((r_alloc_dir_fsm.read() == ALLOC_DIR_READ) and
     3197                       "MEMC ERROR in READ_IVT_LOCK state: Bad DIR allocation");
     3198
     3199                size_t index = 0;
     3200                size_t nline = m_nline[m_cmd_read_addr_fifo.read()];
     3201                if (m_ivt.search_inval(nline, index))
     3202                {
     3203                    // There is a pending invalidation on the requested address.
     3204                    // Return to IDLE to release all locks and retry.
     3205                    r_read_fsm = READ_IDLE;
     3206
     3207#if DEBUG_MEMC_READ
     3208                    if (m_debug)
     3209                    {
     3210                        std::cout << "  <MEMC " << name() << " READ_IVT_LOCK>"
     3211                                  << " Got acces to IVT, and there is a pending invalidation"
     3212                                  << " / address = " << std::hex << m_cmd_read_addr_fifo.read()
     3213                                  << " / index = " << std::dec << index << std::endl;
     3214                    }
     3215#endif
     3216                    break;
     3217                }
     3218
     3219                // no pending inval
     3220                r_read_fsm = READ_DIR_HIT;
    31213221                break;
    31223222            }
     
    33263426                    r_write_way       = way;
    33273427
    3328                     if (entry.is_cnt and entry.count) r_write_fsm = WRITE_BC_DIR_READ;
    3329                     else                              r_write_fsm = WRITE_DIR_HIT;
     3428                    // in scratchpad mode, when a line is in counter mode, a broadcast is
     3429                    // triggered but the line is kept in the directory.
     3430                    if (entry.is_cnt and (entry.count > 0))
     3431                    {
     3432                        if (r_config_scratchpad.read())
     3433                        {
     3434                            r_write_fsm = WRITE_BC_IVT_LOCK;
     3435
     3436#if DEBUG_MEMC_WRITE
     3437                            if (m_debug)
     3438                            {
     3439                                std::cout << " <MEMC " << name()
     3440                                          << " WRITE_DIR_LOCK> BROADCAST in scratchpad mode: "
     3441                                          << " address = " << std::hex << r_write_address.read()
     3442                                          << std::dec << std::endl;
     3443                            }
     3444#endif
     3445                        }
     3446                        else
     3447                        {
     3448                            r_write_fsm = WRITE_BC_DIR_READ;
     3449                        }
     3450                    }
     3451                    else
     3452                    {
     3453                        r_write_fsm = WRITE_DIR_HIT;
     3454                    }
    33303455                }
    33313456                else  // miss
    33323457                {
     3458                    // miss in scratchpad mode: this shouldn't happen. Drop the request
     3459                    // (black-hole behavior).
     3460                    if (r_config_scratchpad.read())
     3461                    {
     3462#if DEBUG_MEMC_WRITE
     3463                        if (m_debug)
     3464                        {
     3465                            std::cout << " WARNING: <MEMC " << name()
     3466                                      << " WRITE_DIR_LOCK> WRITE MISS in scratchpad mode: "
     3467                                      << " address = " << std::hex << r_write_address.read()
     3468                                      << std::dec << std::endl;
     3469                        }
     3470#endif
     3471
     3472                        r_write_fsm = WRITE_IDLE;
     3473                        break;
     3474                    }
     3475
    33333476                    r_write_fsm = WRITE_MISS_TRT_LOCK;
    33343477                }
     
    40254168                        "MEMC ERROR in WRITE_BC_IVT_LOCK state: Bad DIR allocation");
    40264169
    4027                 assert((r_alloc_trt_fsm.read() == ALLOC_TRT_WRITE) and
     4170                assert((r_config_scratchpad.read() or
     4171                       (r_alloc_trt_fsm.read() == ALLOC_TRT_WRITE)) and
    40284172                        "MEMC ERROR in WRITE_BC_IVT_LOCK state: Bad TRT allocation");
    40294173
     
    40694213                        "MEMC ERROR in WRITE_BC_DIR_INVAL state: Bad DIR allocation");
    40704214
    4071                 assert((r_alloc_trt_fsm.read() == ALLOC_TRT_WRITE) and
     4215                assert((r_config_scratchpad.read() or
     4216                       (r_alloc_trt_fsm.read() == ALLOC_TRT_WRITE)) and
    40724217                        "MEMC ERROR in WRITE_BC_DIR_INVAL state: Bad TRT allocation");
    40734218
     
    40754220                        "MEMC ERROR in WRITE_BC_DIR_INVAL state: Bad IVT allocation");
    40764221
    4077                 // register PUT request in TRT
    4078                 std::vector<data_t> data_vector;
    4079                 data_vector.clear();
    4080                 for (size_t i = 0; i < m_words; i++)
    4081                 {
    4082                     data_vector.push_back(r_write_data[i].read());
    4083                 }
    4084                 m_trt.set(r_write_trt_index.read(),
    4085                         false,             // PUT request
    4086                         m_nline[(addr_t) (r_write_address.read())],
    4087                         0,                 // unused
    4088                         0,                 // unused
    4089                         0,                 // unused
    4090                         false,             // not a processor read
    4091                         0,                 // unused
    4092                         0,                 // unused
    4093                         std::vector<be_t> (m_words, 0),
    4094                         data_vector);
    4095 
    4096                 // invalidate directory entry
     4222                size_t set = m_y[(addr_t) (r_write_address.read())];
     4223                size_t way = r_write_way.read();
    40974224                DirectoryEntry entry;
    4098                 entry.valid       = false;
    4099                 entry.dirty       = false;
    4100                 entry.tag         = 0;
    4101                 entry.is_cnt      = false;
    4102                 entry.lock        = false;
    4103                 entry.owner.srcid = 0;
    4104                 entry.owner.inst  = false;
    4105                 entry.ptr         = 0;
    4106                 entry.count       = 0;
    4107                 size_t set        = m_y[(addr_t) (r_write_address.read())];
    4108                 size_t way        = r_write_way.read();
     4225                if (not r_config_scratchpad.read())
     4226                {
     4227                    // register PUT request in TRT
     4228                    std::vector<data_t> data_vector;
     4229                    data_vector.clear();
     4230                    for (size_t i = 0; i < m_words; i++)
     4231                    {
     4232                        data_vector.push_back(r_write_data[i].read());
     4233                    }
     4234                    m_trt.set(r_write_trt_index.read(),
     4235                              false,             // PUT request
     4236                              m_nline[(addr_t) (r_write_address.read())],
     4237                              0,                 // unused
     4238                              0,                 // unused
     4239                              0,                 // unused
     4240                              false,             // not a processor read
     4241                              0,                 // unused
     4242                              0,                 // unused
     4243                              std::vector<be_t> (m_words, 0),
     4244                              data_vector);
     4245
     4246                    // invalidate directory entry
     4247                    entry.valid       = false;
     4248                    entry.dirty       = false;
     4249                    entry.tag         = 0;
     4250                    entry.is_cnt      = false;
     4251                    entry.lock        = false;
     4252                    entry.owner.srcid = 0;
     4253                    entry.owner.inst  = false;
     4254                    entry.ptr         = 0;
     4255                    entry.count       = 0;
     4256
     4257#if DEBUG_MEMC_WRITE
     4258                    if (m_debug)
     4259                    {
     4260                        std::cout << "  <MEMC " << name()
     4261                                  << " WRITE_BC_DIR_INVAL> Inval DIR and register in TRT:"
     4262                                  << " address = " << std::hex << r_write_address.read()
     4263                                  << std::dec << std::endl;
     4264                    }
     4265#endif
     4266
     4267                }
     4268                else
     4269                {
     4270                    // update the data when in scratchpad mode
     4271                    for (size_t word = 0; word < m_words; word++)
     4272                    {
     4273                        m_cache_data.write(way,
     4274                                           set,
     4275                                           word,
     4276                                           r_write_data[word].read(),
     4277                                           r_write_be[word].read());
     4278                    }
     4279
     4280                    // keep the directory entry, but reset the number of copies
     4281                    entry.valid       = true;
     4282                    entry.dirty       = true;
     4283                    entry.tag         = r_write_tag.read();
     4284                    entry.is_cnt      = r_write_is_cnt.read();
     4285                    entry.lock        = r_write_lock.read();
     4286                    entry.owner.srcid = 0;
     4287                    entry.owner.inst  = false;
     4288                    entry.ptr         = 0;
     4289                    entry.count       = 0;
     4290                }
    41094291
    41104292                m_cache_directory.write(set, way, entry);
     
    41154297                }
    41164298
    4117 #if DEBUG_MEMC_WRITE
    4118                 if (m_debug)
    4119                 {
    4120                     std::cout << "  <MEMC " << name() << " WRITE_BC_DIR_INVAL> Inval DIR and register in TRT:"
    4121                         << " address = " << std::hex << r_write_address.read() << std::endl;
    4122                 }
    4123 #endif
    41244299                r_write_fsm = WRITE_BC_CC_SEND;
    41254300                break;
     
    41434318                        r_write_to_cc_send_data[i] = 0;
    41444319                    }
    4145                     r_write_fsm = WRITE_BC_XRAM_REQ;
     4320
     4321                    if (r_config_scratchpad.read())
     4322                    {
     4323                        r_write_fsm = WRITE_IDLE;
     4324                    }
     4325                    else
     4326                    {
     4327                        r_write_fsm = WRITE_BC_XRAM_REQ;
     4328                    }
    41464329
    41474330#if DEBUG_MEMC_WRITE
     
    54065589                addr_t cleanup_address = r_cleanup_nline.read() * m_words * 4;
    54075590                DirectoryEntry entry   = m_cache_directory.read(cleanup_address , way);
     5591                r_cleanup_valid        = entry.valid;
    54085592                r_cleanup_is_cnt       = entry.is_cnt;
    54095593                r_cleanup_dirty        = entry.dirty;
     
    54185602                if (entry.valid) // hit : the copy must be cleared
    54195603                {
    5420                     assert((entry.count > 0) and
     5604                    assert((r_config_scratchpad.read() or (entry.count > 0)) and
    54215605                            "MEMC ERROR in CLEANUP_DIR_LOCK state, CLEANUP on valid entry with no copies");
    54225606
    5423                     if ((entry.count == 1) or (entry.is_cnt)) // no access to the heap
     5607                    // when in scratchpad mode, if a line is in counter mode, check first
     5608                    // if there is a pending inval
     5609                    if (r_config_scratchpad.read() and entry.is_cnt)
     5610                    {
     5611                        r_cleanup_fsm = CLEANUP_IVT_LOCK;
     5612                    }
     5613                    else if ((entry.count == 1) or (entry.is_cnt)) // no access to the heap
    54245614                    {
    54255615                        r_cleanup_fsm = CLEANUP_DIR_WRITE;
     
    57535943                if (not match_inval) // no pending inval in IVT
    57545944                {
     5945                    if (r_config_scratchpad.read() and r_cleanup_valid.read())
     5946                    {
     5947#if DEBUG_MEMC_CLEANUP
     5948                        if (m_debug)
     5949                        {
     5950                            std::cout << "  <MEMC " << name() << " CLEANUP_IVT_LOCK>"
     5951                                      << " Cleanup in scratchpad mode with no corresponding IVT entry"
     5952                                      << " but valid in directory"
     5953                                      << " / address = " << std::hex << (r_cleanup_nline.read() * 4 * m_words)
     5954                                      << std::dec << std::endl;
     5955                        }
     5956#endif
     5957
     5958                        r_cleanup_fsm = CLEANUP_DIR_WRITE;
     5959                        break;
     5960                    }
     5961
    57555962                    r_cleanup_fsm = CLEANUP_SEND_CLACK;
    57565963
     
    80468253        // The ALLOC_IVT FSM allocates the access to the Invalidate Table (IVT),
    80478254        // with a round robin priority between five FSMs, with the following order:
    8048         //  WRITE -> XRAM_RSP -> CLEANUP -> CAS -> CONFIG
     8255        //  WRITE -> XRAM_RSP -> CLEANUP -> CAS -> CONFIG -> READ
    80498256        // - The WRITE FSM initiates broadcast invalidate transactions and sets a new entry
    80508257        //   in IVT.
     
    80548261        // - The CONFIG FSM does the same thing as the XRAM_RSP FSM
    80558262        // - The CLEANUP FSM complete those trasactions and erase the IVT entry.
     8263        // - The READ FSM checks for pending invalidations when in scratchpad mode.
    80568264        // The resource is always allocated.
    80578265        /////////////////////////////////////////////////////////////////////////////////////
     
    80768284                    else if (r_config_fsm.read() == CONFIG_IVT_LOCK)
    80778285                        r_alloc_ivt_fsm = ALLOC_IVT_CONFIG;
     8286
     8287                    else if (r_read_fsm.read() == READ_IVT_LOCK)
     8288                        r_alloc_ivt_fsm = ALLOC_IVT_READ;
     8289
    80788290                }
    80798291                break;
     
    80918303                    else if (r_config_fsm.read() == CONFIG_IVT_LOCK)
    80928304                        r_alloc_ivt_fsm = ALLOC_IVT_CONFIG;
     8305
     8306                    else if (r_read_fsm.read() == READ_IVT_LOCK)
     8307                        r_alloc_ivt_fsm = ALLOC_IVT_READ;
    80938308
    80948309                    else if (r_write_fsm.read() == WRITE_BC_IVT_LOCK)
     
    81088323                        r_alloc_ivt_fsm = ALLOC_IVT_CONFIG;
    81098324
     8325                    else if (r_read_fsm.read() == READ_IVT_LOCK)
     8326                        r_alloc_ivt_fsm = ALLOC_IVT_READ;
     8327
    81108328                    else if (r_write_fsm.read() == WRITE_BC_IVT_LOCK)
    81118329                        r_alloc_ivt_fsm = ALLOC_IVT_WRITE;
     
    81238341                        r_alloc_ivt_fsm = ALLOC_IVT_CONFIG;
    81248342
     8343                    else if (r_read_fsm.read() == READ_IVT_LOCK)
     8344                        r_alloc_ivt_fsm = ALLOC_IVT_READ;
     8345
    81258346                    else if (r_write_fsm.read() == WRITE_BC_IVT_LOCK)
    81268347                        r_alloc_ivt_fsm = ALLOC_IVT_WRITE;
     
    81388359                if (r_config_fsm.read() != CONFIG_IVT_LOCK)
    81398360                {
     8361                    if (r_read_fsm.read() == READ_IVT_LOCK)
     8362                        r_alloc_ivt_fsm = ALLOC_IVT_READ;
     8363
     8364                    else if (r_write_fsm.read() == WRITE_BC_IVT_LOCK)
     8365                        r_alloc_ivt_fsm = ALLOC_IVT_WRITE;
     8366
     8367                    else if (r_xram_rsp_fsm.read() == XRAM_RSP_IVT_LOCK)
     8368                        r_alloc_ivt_fsm = ALLOC_IVT_XRAM_RSP;
     8369
     8370                    else if (r_cleanup_fsm.read() == CLEANUP_IVT_LOCK)
     8371                        r_alloc_ivt_fsm = ALLOC_IVT_CLEANUP;
     8372
     8373                    else if (r_cas_fsm.read() == CAS_BC_IVT_LOCK)
     8374                        r_alloc_ivt_fsm = ALLOC_IVT_CAS;
     8375                }
     8376                break;
     8377
     8378            case ALLOC_IVT_READ:           // allocated to READ FSM
     8379                if (r_read_fsm.read() != READ_IVT_LOCK)
     8380                {
    81408381                    if (r_write_fsm.read() == WRITE_BC_IVT_LOCK)
    81418382                        r_alloc_ivt_fsm = ALLOC_IVT_WRITE;
     
    81498390                    else if (r_cas_fsm.read() == CAS_BC_IVT_LOCK)
    81508391                        r_alloc_ivt_fsm = ALLOC_IVT_CAS;
     8392
     8393                    else if (r_config_fsm.read() == CONFIG_IVT_LOCK)
     8394                        r_alloc_ivt_fsm = ALLOC_IVT_CONFIG;
    81518395                }
    81528396                break;
     
    81758419                if (r_alloc_dir_reset_cpt.read() == (m_sets - 1))
    81768420                {
    8177                     m_cache_directory.init();
     8421                    scratchpad_reset();
    81788422                    r_alloc_dir_fsm = ALLOC_DIR_READ;
    81798423                }
     
    82098453                if (((r_read_fsm.read() != READ_DIR_REQ) and
    82108454                     (r_read_fsm.read() != READ_DIR_LOCK) and
     8455                     (r_read_fsm.read() != READ_IVT_LOCK) and
    82118456                     (r_read_fsm.read() != READ_TRT_LOCK) and
    82128457                     (r_read_fsm.read() != READ_HEAP_REQ))
    82138458                    or
    82148459                     ((r_read_fsm.read() == READ_TRT_LOCK) and
    8215                      (r_alloc_trt_fsm.read() == ALLOC_TRT_READ)))
     8460                      (r_alloc_trt_fsm.read() == ALLOC_TRT_READ)))
    82168461                {
    82178462                    if (r_write_fsm.read() == WRITE_DIR_REQ)
     
    83058550                ///////////////////////
    83068551            case ALLOC_DIR_CLEANUP:    // allocated to CLEANUP FSM
    8307                 if ((r_cleanup_fsm.read() != CLEANUP_DIR_REQ) and
     8552                if (((r_cleanup_fsm.read() != CLEANUP_DIR_REQ) and
    83088553                        (r_cleanup_fsm.read() != CLEANUP_DIR_LOCK) and
     8554                        (r_cleanup_fsm.read() != CLEANUP_IVT_LOCK) and
    83098555                        (r_cleanup_fsm.read() != CLEANUP_HEAP_REQ) and
    83108556                        (r_cleanup_fsm.read() != CLEANUP_HEAP_LOCK))
     8557                    or
     8558                        ((r_cleanup_fsm.read() == CLEANUP_IVT_LOCK) and
     8559                         (not r_config_scratchpad.read())))
    83118560                {
    83128561                    if (r_xram_rsp_fsm.read() == XRAM_RSP_DIR_LOCK)
  • branches/reconfiguration/modules/vci_mem_cache/include/soclib/mem_cache.h

    r925 r1011  
    4242    MEMC_ADDR_HI,
    4343    MEMC_BUF_LENGTH,
    44     MEMC_CMD_TYPE
     44    MEMC_CMD_TYPE,
     45    MEMC_SCRATCHPAD
    4546};
    4647
Note: See TracChangeset for help on using the changeset viewer.