Changeset 429 for trunk/modules


Ignore:
Timestamp:
Jul 1, 2013, 1:54:12 PM (11 years ago)
Author:
cfuguet
Message:

Modifications in vci_mem_cache:

  • Modifying MULTI_ACK_IDLE state to verify also that in the case of WRITE FSM request, the update table index is valid (this is already the case for a CC_RECEIVE request).
  • Fixing some indentation and non desired spaces
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp

    r427 r429  
    290290  const IntTab        &srcid_x,          // global index on external network
    291291  const IntTab        &tgtid_d,          // global index on direct network
    292   const size_t        cc_global_id,      // global index on cc network 
     292  const size_t        cc_global_id,      // global index on cc network
    293293  const size_t        nways,             // number of ways per set
    294   const size_t        nsets,             // number of associative sets 
     294  const size_t        nsets,             // number of associative sets
    295295  const size_t        nwords,            // number of words in cache line
    296296  const size_t        max_copies,        // max number of copies in heap
     
    430430    assert( (vci_param_int::B == 4 ) and
    431431    "MEMC ERROR : VCI internal data width must be 32 bits");
    432          
     432
    433433    assert( (vci_param_ext::B == 8) and
    434434    "MEMC ERROR : VCI external data width must be 64 bits");
     
    437437    assert( (vci_param_int::N == vci_param_ext::N) and
    438438    "MEMC ERROR : VCI internal & external addresses must have the same width");
    439          
     439
    440440    // Get the segments associated to the MemCache
    441441    std::list<soclib::common::Segment>::iterator seg;
     
    446446        std::cout << "    => segment " << seg->name()
    447447                  << " / base = " << std::hex << seg->baseAddress()
    448                   << " / size = " << seg->size() << std::endl; 
     448                  << " / size = " << seg->size() << std::endl;
    449449        m_nseg++;
    450450    }
     
    509509
    510510////////////////////////////////////////////////
    511 tmpl(void) ::check_monitor( const char  *buf, 
    512                             addr_t      addr, 
     511tmpl(void) ::check_monitor( const char  *buf,
     512                            addr_t      addr,
    513513                            data_t      data,
    514514                            bool        read )
     
    519519  {
    520520    if ( read ) std::cout << " Monitor MEMC Read  ";
    521     else        std::cout << " Monitor MEMC Write "; 
    522     std::cout << buf 
     521    else        std::cout << " Monitor MEMC Write ";
     522    std::cout << buf
    523523              << " / Address = " << std::hex << addr
    524               << " / Data = " << data 
     524              << " / Data = " << data
    525525              << " at cycle " << std::dec << m_cpt_cycles << std::endl;
    526526  }
     
    780780  bool    cc_receive_to_cleanup_fifo_get = false;
    781781  bool    cc_receive_to_cleanup_fifo_put = false;
    782    
     782
    783783  bool    cc_receive_to_multi_ack_fifo_get = false;
    784784  bool    cc_receive_to_multi_ack_fifo_put = false;
     
    830830    std::cout
    831831        << "---------------------------------------------"           << std::dec << std::endl
    832         << "MEM_CACHE "            << name() 
     832        << "MEM_CACHE "            << name()
    833833        << " ; Time = "            << m_cpt_cycles                                << std::endl
    834834        << " - TGT_CMD FSM    = "  << tgt_cmd_fsm_str[r_tgt_cmd_fsm.read()]       << std::endl
     
    969969      // This test checks that the read does not cross a cache line limit.
    970970      // It must not be taken into account when dealing with an LL CMD.
    971       if(((m_x[(addr_t) p_vci_tgt.address.read()]+ (p_vci_tgt.plen.read() >>2)) > 16) && 
     971      if(((m_x[(addr_t) p_vci_tgt.address.read()]+ (p_vci_tgt.plen.read() >>2)) > 16) &&
    972972          (p_vci_tgt.cmd.read() != vci_param_int::CMD_LOCKED_READ))
    973973      {
     
    11031103
    11041104        // No CC_RECEIVE FSM request and no WRITE FSM request
    1105         if( not multi_ack_fifo_rok and not r_write_to_multi_ack_req.read()) break;
    1106 
    1107         // handling WRITE FSM request to decrement update table response counter
    1108         // if no CC_RECEIVE FSM request
     1105        if( not multi_ack_fifo_rok and not r_write_to_multi_ack_req.read())
     1106          break;
     1107
     1108        uint8_t updt_index;
     1109
     1110        // handling WRITE FSM request to decrement update table response
     1111        // counter if no CC_RECEIVE FSM request
    11091112        if(not multi_ack_fifo_rok)
    11101113        {
     1114          updt_index               = r_write_to_multi_ack_upt_index.read();
    11111115          r_write_to_multi_ack_req = false;
    1112           r_multi_ack_upt_index    = r_write_to_multi_ack_upt_index.read();
    1113           r_multi_ack_fsm          = MULTI_ACK_UPT_LOCK;
    1114 
    1115           break;
    1116         }
    1117 
    1118         // Handling CC_RECEIVE FSM request
    1119         uint64_t flit = m_cc_receive_to_multi_ack_fifo.read();
    1120 
    1121         uint8_t updt_index =
    1122           DspinDhccpParam::dspin_get(flit, DspinDhccpParam::MULTI_ACK_UPDT_INDEX);
    1123 
    1124         assert( (updt_index < m_upt.size()) and
    1125         "VCI_MEM_CACHE ERROR in MULTI_ACK_IDLE : index too large for UPT");
    1126 
    1127         cc_receive_to_multi_ack_fifo_get = true;
    1128         r_multi_ack_upt_index           = updt_index;
    1129         r_multi_ack_fsm                 = MULTI_ACK_UPT_LOCK;
     1116        }
     1117        // Handling CC_RECEIVE FSM request
     1118        else
     1119        {
     1120          uint64_t flit = m_cc_receive_to_multi_ack_fifo.read();
     1121          updt_index    = DspinDhccpParam::dspin_get(flit,
     1122                            DspinDhccpParam::MULTI_ACK_UPDT_INDEX);
     1123
     1124          cc_receive_to_multi_ack_fifo_get = true;
     1125        }
     1126
     1127        assert((updt_index < m_upt.size()) and
     1128               "VCI_MEM_CACHE ERROR in MULTI_ACK_IDLE : "
     1129               "index too large for UPT");
     1130
     1131        r_multi_ack_upt_index = updt_index;
     1132        r_multi_ack_fsm       = MULTI_ACK_UPT_LOCK;
    11301133
    11311134#if DEBUG_MEMC_MULTI_ACK
    11321135        if(m_debug_multi_ack_fsm)
    11331136        {
    1134           std::cout
    1135             <<  "  <MEMC " << name()
    1136             << " MULTI_ACK_IDLE> Response for UPT entry "
    1137             << updt_index
    1138             << std::endl;
     1137          if (multi_ack_fifo_rok)
     1138          {
     1139            std::cout
     1140              << "  <MEMC " << name()
     1141              << " MULTI_ACK_IDLE> Response for UPT entry "
     1142              << updt_index
     1143              << std::endl;
     1144          }
     1145          else
     1146          {
     1147            std::cout
     1148              << "  <MEMC " << name()
     1149              << " MULTI_ACK_IDLE> Write FSM request to decrement UPT entry "
     1150              << updt_index
     1151              << std::endl;
     1152          }
    11391153        }
    11401154#endif
     
    13831397      else
    13841398      {
    1385         std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_DIR_LOCK state" 
     1399        std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_DIR_LOCK state"
    13861400                  << "Bad DIR allocation"   << std::endl;
    13871401        exit(0);
     
    14711485          {
    14721486            char buf[80];
    1473             snprintf(buf, 80, "READ_DIR_HIT srcid %d, ins %d", 
    1474                      (int)m_cmd_read_srcid_fifo.read(), 
     1487            snprintf(buf, 80, "READ_DIR_HIT srcid %d, ins %d",
     1488                     (int)m_cmd_read_srcid_fifo.read(),
    14751489                     (int)((m_cmd_read_pktid_fifo.read()&0x2)!=0));
    14761490            check_monitor(buf, m_cmd_read_addr_fifo.read(), r_read_data[0], true);
     
    14941508#if DEBUG_MEMC_READ
    14951509if(m_debug_read_fsm)
    1496 std::cout << "  <MEMC " << name() << " READ_HEAP_REQ>" 
     1510std::cout << "  <MEMC " << name() << " READ_HEAP_REQ>"
    14971511          << " Requesting HEAP lock " << std::endl;
    14981512#endif
     
    15911605      else
    15921606      {
    1593         std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_LOCK" 
     1607        std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_LOCK"
    15941608                  << "Bad HEAP allocation"   << std::endl;
    15951609        exit(0);
     
    16321646      else
    16331647      {
    1634         std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_WRITE" 
     1648        std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_WRITE"
    16351649                  << "Bad HEAP allocation" << std::endl;
    16361650        exit(0);
     
    16561670      else
    16571671      {
    1658         std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_ERASE" 
     1672        std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_ERASE"
    16591673                  << "Bad HEAP allocation" << std::endl;
    16601674        exit(0);
     
    16891703      else
    16901704      {
    1691         std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_LAST" 
     1705        std::cout << "VCI_MEM_CACHE ERROR " << name() << " READ_HEAP_LAST"
    16921706                  << "Bad HEAP allocation" << std::endl;
    16931707        exit(0);
     
    21392153            addr_t address = (r_write_address.read() & ~(addr_t) 0x3F) | word<<2;
    21402154            char buf[80];
    2141             snprintf(buf, 80, "WRITE_DIR_HIT srcid %d", 
     2155            snprintf(buf, 80, "WRITE_DIR_HIT srcid %d",
    21422156                     (int)r_write_srcid.read());
    21432157            check_monitor(buf, address, r_write_data[word].read(), false);
     
    22192233          for(size_t word=0 ; word<m_words ; word++)
    22202234          {
    2221             m_cache_data.write(way, 
    2222                                set, 
    2223                                word, 
    2224                                r_write_data[word].read(), 
     2235            m_cache_data.write(way,
     2236                               set,
     2237                               word,
     2238                               r_write_data[word].read(),
    22252239                               r_write_be[word].read());
    22262240
     
    22762290      // and write the first copy in the FIFO
    22772291      // send the request if only one copy
    2278      
     2292
    22792293      assert(not r_write_to_cc_send_multi_req.read()   and
    22802294             not r_write_to_cc_send_brdcast_req.read() and
     
    27892803if(m_debug_write_fsm)
    27902804{
    2791     std::cout << "  <MEMC " << name() 
     2805    std::cout << "  <MEMC " << name()
    27922806              << " WRITE_BC_CC_SEND> Post a broadcast request to CC_SEND FSM" << std::endl;
    27932807}
     
    28142828if(m_debug_write_fsm)
    28152829{
    2816      std::cout << "  <MEMC " << name() 
     2830     std::cout << "  <MEMC " << name()
    28172831               << " WRITE_BC_XRAM_REQ> Post a put request to IXR_CMD FSM" << std::endl;
    28182832}
     
    30423056if(m_debug_ixr_rsp_fsm)
    30433057{
    3044     std::cout << "  <MEMC " << name() 
     3058    std::cout << "  <MEMC " << name()
    30453059              << " IXR_RSP_IDLE> Response from XRAM to a put transaction" << std::endl;
    30463060}
     
    30543068if(m_debug_ixr_rsp_fsm)
    30553069{
    3056     std::cout << "  <MEMC " << name() 
     3070    std::cout << "  <MEMC " << name()
    30573071              << " IXR_RSP_IDLE> Response from XRAM to a get transaction" << std::endl;
    30583072}
     
    31923206        // copy the TRT entry in the r_xram_rsp_trt_buf local buffer
    31933207        size_t  index = r_xram_rsp_trt_index.read();
    3194         r_xram_rsp_trt_buf.copy( m_trt.read(index) ); 
     3208        r_xram_rsp_trt_buf.copy( m_trt.read(index) );
    31953209
    31963210        r_xram_rsp_fsm = XRAM_RSP_TRT_COPY;
     
    32603274      else
    32613275      {
    3262         std::cout << "VCI_MEM_CACHE ERROR " << name() << " XRAM_RSP_TRT_COPY" 
     3276        std::cout << "VCI_MEM_CACHE ERROR " << name() << " XRAM_RSP_TRT_COPY"
    32633277                  << " bad TRT or DIR allocation" << std::endl;
    32643278        exit(0);
     
    32793293if(m_debug_xram_rsp_fsm)
    32803294std::cout << "  <MEMC " << name() << " XRAM_RSP_INVAL_LOCK>"
    3281           << " Get acces to UPT, but line invalidation registered" 
    3282           << " / nline = " << std::hex << r_xram_rsp_trt_buf.nline 
     3295          << " Get acces to UPT, but line invalidation registered"
     3296          << " / nline = " << std::hex << r_xram_rsp_trt_buf.nline
    32833297          << " / index = " << std::dec << index << std::endl;
    32843298#endif
     
    34103424if(m_debug_xram_rsp_fsm)
    34113425{
    3412 std::cout << "  <MEMC " << name() << " XRAM_RSP_DIR_UPDT>" 
     3426std::cout << "  <MEMC " << name() << " XRAM_RSP_DIR_UPDT>"
    34133427          << " Cache update: "
    34143428          << " way = " << std::dec << way
     
    34733487        r_xram_rsp_to_tgt_rsp_trdid = r_xram_rsp_trt_buf.trdid;
    34743488        r_xram_rsp_to_tgt_rsp_pktid = r_xram_rsp_trt_buf.pktid;
    3475         for(size_t i=0; i < m_words; i++) 
     3489        for(size_t i=0; i < m_words; i++)
    34763490        {
    34773491            r_xram_rsp_to_tgt_rsp_data[i] = r_xram_rsp_trt_buf.wdata[i];
     
    35413555        r_xram_rsp_to_ixr_cmd_nline = r_xram_rsp_victim_nline.read();
    35423556        r_xram_rsp_to_ixr_cmd_trdid = r_xram_rsp_trt_index.read();
    3543         for(size_t i=0; i<m_words ; i++) 
     3557        for(size_t i=0; i<m_words ; i++)
    35443558        {
    35453559            r_xram_rsp_to_ixr_cmd_data[i] = r_xram_rsp_victim_data[i];
     
    35633577    }
    35643578    /////////////////////////
    3565     case XRAM_RSP_HEAP_REQ:    // Get the lock to the HEAP 
     3579    case XRAM_RSP_HEAP_REQ:    // Get the lock to the HEAP
    35663580    {
    35673581      if(r_alloc_heap_fsm.read() == ALLOC_HEAP_XRAM_RSP)
     
    36763690    case XRAM_RSP_ERROR_RSP:     // Request an error response to TGT_RSP FSM
    36773691    {
    3678       if(!r_xram_rsp_to_tgt_rsp_req.read()) 
     3692      if(!r_xram_rsp_to_tgt_rsp_req.read())
    36793693      {
    36803694        r_xram_rsp_to_tgt_rsp_srcid  = r_xram_rsp_trt_buf.srcid;
    36813695        r_xram_rsp_to_tgt_rsp_trdid  = r_xram_rsp_trt_buf.trdid;
    36823696        r_xram_rsp_to_tgt_rsp_pktid  = r_xram_rsp_trt_buf.pktid;
    3683         for(size_t i=0; i < m_words; i++) 
     3697        for(size_t i=0; i < m_words; i++)
    36843698        {
    36853699            r_xram_rsp_to_tgt_rsp_data[i] = r_xram_rsp_trt_buf.wdata[i];
     
    36943708#if DEBUG_MEMC_XRAM_RSP
    36953709if(m_debug_xram_rsp_fsm)
    3696     std::cout << "  <MEMC " << name() 
     3710    std::cout << "  <MEMC " << name()
    36973711              << " XRAM_RSP_ERROR_RSP> Request a response error to TGT_RSP FSM:"
    36983712              << " srcid = " << std::dec << r_xram_rsp_trt_buf.srcid << std::endl;
     
    47924806          addr_t address = m_cmd_cas_addr_fifo.read();
    47934807          char buf[80];
    4794           snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d", 
     4808          snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d",
    47954809                   (int)m_cmd_cas_srcid_fifo.read());
    47964810          check_monitor(buf, address, r_cas_wdata.read(), false);
     
    48074821          << " / word = " << word
    48084822          << " / value = " << r_cas_wdata.read()
    4809           << " / count = " << r_cas_count.read() 
     4823          << " / count = " << r_cas_count.read()
    48104824          << " / global_llsc_table access" << std::endl;
    48114825#endif
     
    48564870            addr_t address = m_cmd_cas_addr_fifo.read();
    48574871            char buf[80];
    4858             snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d", 
     4872            snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d",
    48594873                     (int)m_cmd_cas_srcid_fifo.read());
    48604874            check_monitor(buf, address, r_cas_wdata.read(), false);
     
    50925106            addr_t address = m_cmd_cas_addr_fifo.read();
    50935107            char buf[80];
    5094             snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d", 
     5108            snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d",
    50955109                     (int)m_cmd_cas_srcid_fifo.read());
    50965110            check_monitor(buf, address, r_cas_wdata.read(), false);
     
    51035117#if DEBUG_MEMC_CAS
    51045118if(m_debug_cas_fsm)
    5105 std::cout << "  <MEMC " << name() 
     5119std::cout << "  <MEMC " << name()
    51065120          << " CAS_BC_UPT_LOCK> Register a broadcast inval transaction in UPT"
    51075121          << " / nline = " << std::hex << nline
     
    51595173#if DEBUG_MEMC_CAS
    51605174if(m_debug_cas_fsm)
    5161 std::cout << "  <MEMC " << name() 
     5175std::cout << "  <MEMC " << name()
    51625176          << " CAS_BC_DIR_INVAL> Register the PUT in TRT and invalidate DIR entry"
    51635177          << " / nline = " << std::hex << m_nline[(addr_t)(m_cmd_cas_addr_fifo.read())]
     
    52035217#if DEBUG_MEMC_CAS
    52045218if(m_debug_cas_fsm)
    5205 std::cout << "  <MEMC " << name() 
     5219std::cout << "  <MEMC " << name()
    52065220          << " CAS_BC_XRAM_REQ> Request a PUT transaction to IXR_CMD FSM" << std::hex
    52075221          << " / nline = " << m_nline[(addr_t) m_cmd_cas_addr_fifo.read()]
     
    52115225      else
    52125226      {
    5213         std::cout << "ERROR in MEM_CACHE / CAS_BC_XRAM_REQ state" 
     5227        std::cout << "ERROR in MEM_CACHE / CAS_BC_XRAM_REQ state"
    52145228                  << " : request should not have been previously set" << std::endl;
    52155229      }
     
    52325246#if DEBUG_MEMC_CAS
    52335247if(m_debug_cas_fsm)
    5234 std::cout << "  <MEMC " << name() 
     5248std::cout << "  <MEMC " << name()
    52355249          << " CAS_RSP_FAIL> Request TGT_RSP to send a failure response" << std::endl;
    52365250#endif
     
    52545268#if DEBUG_MEMC_CAS
    52555269if(m_debug_cas_fsm)
    5256 std::cout << "  <MEMC " << name() 
     5270std::cout << "  <MEMC " << name()
    52575271          << " CAS_RSP_SUCCESS> Request TGT_RSP to send a success response" << std::endl;
    52585272#endif
     
    56215635#if DEBUG_MEMC_CC_SEND
    56225636if(m_debug_cc_send_fsm)
    5623 std::cout << "  <MEMC " << name() 
     5637std::cout << "  <MEMC " << name()
    56245638          << " CC_SEND_CLEANUP_ACK> Cleanup Ack for srcid "
    56255639          << std::hex << r_cleanup_to_cc_send_srcid.read() << std::endl;
     
    56605674#if DEBUG_MEMC_CC_SEND
    56615675if(m_debug_cc_send_fsm)
    5662 std::cout << "  <MEMC " << name() 
     5676std::cout << "  <MEMC " << name()
    56635677          << " CC_SEND_XRAM_RSP_INVAL_NLINE> BC-Inval for line "
    56645678          << std::hex << r_xram_rsp_to_cc_send_nline.read() << std::endl;
     
    56885702#if DEBUG_MEMC_CC_SEND
    56895703if(m_debug_cc_send_fsm)
    5690 std::cout << "  <MEMC " << name() 
     5704std::cout << "  <MEMC " << name()
    56915705          << " CC_SEND_XRAM_RSP_BRDCAST_NLINE> BC-Inval for line "
    56925706          << std::hex << r_xram_rsp_to_cc_send_nline.read() << std::endl;
     
    58915905  // The CC_RECEIVE fsm controls the DSPIN target port on the coherence
    58925906  // network.
    5893   ///////////////////////////////////////////////////////////////////////////////
     5907  //////////////////////////////////////////////////////////////////////////////
    58945908
    58955909  switch(r_cc_receive_fsm.read())
     
    59065920
    59075921        if((type == DspinDhccpParam::TYPE_CLEANUP_DATA) ||
    5908            (type == DspinDhccpParam::TYPE_CLEANUP_INST) )
    5909         { 
     5922           (type == DspinDhccpParam::TYPE_CLEANUP_INST))
     5923        {
    59105924          r_cc_receive_fsm = CC_RECEIVE_CLEANUP;
    59115925          break;
    59125926        }
    5913        
     5927
    59145928        if(type == DspinDhccpParam::TYPE_MULTI_ACK)
    59155929        {
     
    59185932        }
    59195933
    5920         assert(
    5921             false &&
    5922             "VCI_MEM_CACHE ERROR: Illegal type in coherence request");
    5923        
     5934        assert(false &&
     5935            "VCI_MEM_CACHE ERROR in CC_RECEIVE : "
     5936            "Illegal type in coherence request");
     5937
    59245938        break;
    59255939      }
    59265940    ////////////////////////
    5927     case CC_RECEIVE_CLEANUP:  // write first CLEANUP flit in CC_RECEIVE to CLEANUP fifo
    5928       {
    5929         if(not p_dspin_in.write or not m_cc_receive_to_cleanup_fifo.wok()) break;
    5930 
    5931         assert( not p_dspin_in.eop.read() and
    5932         "VCI_MEM_CACHE ERROR in CC_RECEIVE : CLEANUP command must have two flits");
     5941    case CC_RECEIVE_CLEANUP:
     5942      {
     5943        // write first CLEANUP flit in CC_RECEIVE to CLEANUP fifo
     5944
     5945        if(not p_dspin_in.write or not m_cc_receive_to_cleanup_fifo.wok())
     5946          break;
     5947
     5948        assert(not p_dspin_in.eop.read() and
     5949            "VCI_MEM_CACHE ERROR in CC_RECEIVE : "
     5950            "CLEANUP command must have two flits");
    59335951
    59345952        cc_receive_to_cleanup_fifo_put = true;
     
    59385956      }
    59395957    ////////////////////////////
    5940     case CC_RECEIVE_CLEANUP_EOP:  // write second CLEANUP flit in CC_RECEIVE to CLEANUP fifo
    5941       {
    5942         if(not p_dspin_in.write or not m_cc_receive_to_cleanup_fifo.wok()) break;
    5943 
    5944         assert( p_dspin_in.eop.read() and
    5945         "VCI_MEM_CACHE ERROR in CC_RECEIVE : CLEANUP command must have two flits");
     5958    case CC_RECEIVE_CLEANUP_EOP:
     5959      {
     5960        // write second CLEANUP flit in CC_RECEIVE to CLEANUP fifo
     5961
     5962        if(not p_dspin_in.write or not m_cc_receive_to_cleanup_fifo.wok())
     5963          break;
     5964
     5965        assert(p_dspin_in.eop.read() and
     5966            "VCI_MEM_CACHE ERROR in CC_RECEIVE : "
     5967            "CLEANUP command must have two flits");
    59465968
    59475969        cc_receive_to_cleanup_fifo_put = true;
     
    59545976    case CC_RECEIVE_MULTI_ACK:
    59555977      {
     5978        // write MULTI_ACK flit in CC_RECEIVE to MULTI_ACK fifo
     5979
    59565980        // wait for a WOK in the CC_RECEIVE to MULTI_ACK fifo
    5957         if(not p_dspin_in.write or not m_cc_receive_to_multi_ack_fifo.wok()) break;
    5958 
    5959         assert( p_dspin_in.eop.read() and
    5960         "VCI_MEM_CACHE ERROR in CC_RECEIVE : MULTI_ACK command must have one flit");
    5961 
    5962         cc_receive_to_multi_ack_fifo_put  = true;
    5963         r_cc_receive_fsm                  = CC_RECEIVE_IDLE;
     5981        if(not p_dspin_in.write or not m_cc_receive_to_multi_ack_fifo.wok())
     5982          break;
     5983
     5984        assert(p_dspin_in.eop.read() and
     5985            "VCI_MEM_CACHE ERROR in CC_RECEIVE : "
     5986            "MULTI_ACK command must have one flit");
     5987
     5988        cc_receive_to_multi_ack_fifo_put = true;
     5989        r_cc_receive_fsm                 = CC_RECEIVE_IDLE;
    59645990        break;
    59655991      }
     
    59826008  {
    59836009    case TGT_RSP_READ_IDLE:
    5984     { 
     6010    {
    59856011      // write requests have the highest priority
    59866012      if(r_write_to_tgt_rsp_req) r_tgt_rsp_fsm = TGT_RSP_WRITE;
     
    61156141}
    61166142#endif
    6117  
    6118         uint32_t last_word_idx = r_read_to_tgt_rsp_word.read() + r_read_to_tgt_rsp_length.read() - 1;
     6143
     6144        uint32_t last_word_idx = r_read_to_tgt_rsp_word.read() +
     6145                                 r_read_to_tgt_rsp_length.read() - 1;
    61196146        bool     is_last_word  = (r_tgt_rsp_cpt.read() == last_word_idx);
    61206147        bool     is_ll         = ((r_read_to_tgt_rsp_pktid.read() & 0x7) == TYPE_LL);
    61216148
    6122         if ( (is_last_word and not is_ll) or (r_tgt_rsp_key_sent.read() and is_ll))
     6149        if ((is_last_word              and not is_ll) or
     6150            (r_tgt_rsp_key_sent.read() and is_ll))
    61236151        {
    61246152          // Last word in case of READ or second flit in case if LL
     
    62116239          << " / cpt = " << std::dec << r_tgt_rsp_cpt.read() << std::endl;
    62126240#endif
    6213         uint32_t last_word_idx = r_xram_rsp_to_tgt_rsp_word.read() + r_xram_rsp_to_tgt_rsp_length.read() - 1;
     6241        uint32_t last_word_idx = r_xram_rsp_to_tgt_rsp_word.read() +
     6242                                 r_xram_rsp_to_tgt_rsp_length.read() - 1;
    62146243        bool     is_last_word  = (r_tgt_rsp_cpt.read() == last_word_idx);
    62156244        bool     is_ll         = ((r_xram_rsp_to_tgt_rsp_pktid.read() & 0x7) == TYPE_LL);
     
    62296258          {
    62306259            r_tgt_rsp_key_sent = true;                     // Send second flit of ll
    6231           }                                                                           
     6260          }
    62326261          else
    62336262          {
     
    63886417  switch(r_alloc_dir_fsm.read())
    63896418  {
    6390     case ALLOC_DIR_RESET: // Initializes the directory one SET per cycle. 
     6419    case ALLOC_DIR_RESET: // Initializes the directory one SET per cycle.
    63916420                          // All the WAYS of a SET initialized in parallel
    63926421
     
    71547183      (r_ixr_rsp_fsm.read()   == IXR_RSP_TRT_READ)) ||
    71557184      (r_ixr_rsp_fsm.read()   == IXR_RSP_ACK))
    7156    
     7185
    71577186    p_vci_ixr.rspack = true;
    71587187
     
    73317360          cleanup_ack_type = DspinDhccpParam::TYPE_CLEANUP_ACK_INST;
    73327361        }
    7333         else 
     7362        else
    73347363        {
    73357364          cleanup_ack_type = DspinDhccpParam::TYPE_CLEANUP_ACK_DATA;
     
    73387367        uint64_t flit = 0;
    73397368        uint64_t dest =
    7340           r_cleanup_to_cc_send_srcid.read() << 
     7369          r_cleanup_to_cc_send_srcid.read() <<
    73417370          (DspinDhccpParam::SRCID_WIDTH - vci_param_int::S);
    73427371
     
    73787407          multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_INST;
    73797408        }
    7380         else 
     7409        else
    73817410        {
    73827411          multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_DATA;
     
    73857414        uint64_t flit = 0;
    73867415        uint64_t dest =
    7387           m_xram_rsp_to_cc_send_srcid_fifo.read() << 
     7416          m_xram_rsp_to_cc_send_srcid_fifo.read() <<
    73887417          (DspinDhccpParam::SRCID_WIDTH - vci_param_int::S);
    73897418
     
    74097438
    74107439        p_dspin_out.write = true;
    7411         p_dspin_out.data  = flit; 
     7440        p_dspin_out.data  = flit;
    74127441
    74137442        break;
     
    74237452            r_xram_rsp_to_cc_send_nline.read(),
    74247453            DspinDhccpParam::MULTI_INVAL_NLINE);
    7425        
     7454
    74267455
    74277456        p_dspin_out.eop   = true;
     
    75177546          multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_INST;
    75187547        }
    7519         else 
     7548        else
    75207549        {
    75217550          multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_DATA;
     
    75247553        uint64_t flit = 0;
    75257554        uint64_t dest =
    7526           m_write_to_cc_send_srcid_fifo.read() << 
     7555          m_write_to_cc_send_srcid_fifo.read() <<
    75277556          (DspinDhccpParam::SRCID_WIDTH - vci_param_int::S);
    75287557
     
    75767605      {
    75777606
    7578         uint8_t multi_updt_cpt  = 
     7607        uint8_t multi_updt_cpt  =
    75797608          r_cc_send_cpt.read() + r_write_to_cc_send_index.read();
    75807609
     
    76107639          multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_INST;
    76117640        }
    7612         else 
     7641        else
    76137642        {
    76147643          multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_DATA;
     
    76177646        uint64_t flit = 0;
    76187647        uint64_t dest =
    7619           m_cas_to_cc_send_srcid_fifo.read() << 
     7648          m_cas_to_cc_send_srcid_fifo.read() <<
    76207649          (DspinDhccpParam::SRCID_WIDTH - vci_param_int::S);
    76217650
Note: See TracChangeset for help on using the changeset viewer.