Changeset 853


Ignore:
Timestamp:
Oct 21, 2014, 5:16:36 PM (9 years ago)
Author:
cfuguet
Message:

reconf: introducing assert to detect early watchdog timeout.

  • Introducing an assert in the vci_cc_vcache_wrapper component. An early watchdog timeout arises when the timeout threshold is less than the max latency of a read miss transaction.
Location:
branches/reconfiguration/modules/vci_cc_vcache_wrapper/caba/source
Files:
2 edited

Legend:

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

    r846 r853  
    6565
    6666    typedef typename vci_param::fast_addr_t  paddr_t;
     67    typedef typename vci_param::fast_trdid_t trdid_t;
    6768
    6869    enum icache_fsm_state_e
     
    441442    sc_signal<bool>         r_dcache_vci_sc_req;        // atomic write request SC
    442443    sc_signal<uint32_t>     r_dcache_vci_sc_data;       // SC data (command)
     444    sc_signal<trdid_t>      r_dcache_vci_miss_trdid;    // miss dcache trdid (for debug)
    443445
    444446    // register used for XTN inval
     
    457459    sc_signal<uint32_t>     r_dcache_miss_wdt_max;      // wdt triggering value
    458460    sc_signal<uint32_t>     r_dcache_miss_wdt;          // wdt counter
     461    sc_signal<trdid_t>      r_dcache_wdt_timeout;       // timeout counter (for debug)
    459462
    460463    // handling coherence requests
  • branches/reconfiguration/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp

    r846 r853  
    322322      r_dcache_vci_sc_req("r_dcache_vci_sc_req"),
    323323      r_dcache_vci_sc_data("r_dcache_vci_sc_data"),
     324      r_dcache_vci_miss_trdid("r_dcache_vci_miss_trdid"),
    324325
    325326      r_dcache_xtn_way("r_dcache_xtn_way"),
     
    333334      r_dcache_miss_wdt_max("r_dcache_miss_wdt_max"),
    334335      r_dcache_miss_wdt("r_dcache_miss_wdt"),
     336      r_dcache_wdt_timeout("r_dcache_wdt_timeout"),
    335337
    336338      r_dcache_cc_way("r_dcache_cc_way"),
     
    816818        // Reset watchdog timer threshold to max value
    817819        r_dcache_miss_wdt_max      = UINT32_MAX;
     820        r_dcache_wdt_timeout       = 0;
    818821
    819822        // No request from CC_RECEIVE FSM to ICACHE/DCACHE FSMs
     
    27992802#endif
    28002803                                // request a VCI DMISS transaction
     2804                                r_dcache_vci_miss_trdid = r_dcache_wdt_timeout.read();
     2805
    28012806                                r_dcache_vci_paddr    = paddr;
    28022807                                r_dcache_vci_miss_req = true;
     
    31943199        else // we must load the missing cache line in dcache
    31953200        {
     3201            r_dcache_vci_miss_trdid = r_dcache_wdt_timeout.read();
     3202
    31963203            r_dcache_vci_miss_req = true;
    31973204            r_dcache_vci_paddr    = r_dcache_tlb_paddr.read();
     
    34693476        else            // we must load the missing cache line in dcache
    34703477        {
     3478            r_dcache_vci_miss_trdid = r_dcache_wdt_timeout.read();
     3479
    34713480            r_dcache_fsm          = DCACHE_MISS_SELECT;
    34723481            r_dcache_vci_miss_req = true;
     
    42964305            m_drsp.error = true;
    42974306            r_dcache_fsm = DCACHE_IDLE;
     4307
     4308            // debug: this counter is used to detect an early WDT timeout.
     4309            // It is sent as the data miss transactions TRDID. When a data miss
     4310            // response is treated by the RSP FSM, the RTRDID is compared to
     4311            // this counter to determine if a timeout was triggered during the
     4312            // transaction.
     4313            r_dcache_wdt_timeout = r_dcache_wdt_timeout.read() + 1;
     4314
     4315#if DEBUG_DCACHE
     4316            if (m_debug_dcache_fsm)
     4317            {
     4318                std::cout << "  <PROC " << name() << " DCACHE_MISS_WAIT>"
     4319                             "  watchdog timer exception" << std::endl;
     4320            }
     4321#endif
    42984322            break;
    42994323        }
     
    53715395            r_vci_rsp_cpt = 0;
    53725396
    5373             if ((p_vci.rpktid.read() & 0x7) ==  TYPE_DATA_UNC)
     5397            if ((p_vci.rpktid.read() & 0x7) == TYPE_DATA_UNC)
    53745398            {
    53755399                r_vci_rsp_fsm = RSP_DATA_UNC;
    53765400            }
    5377             else if ((p_vci.rpktid.read() & 0x7) ==  TYPE_READ_DATA_MISS)
    5378             {
     5401            else if ((p_vci.rpktid.read() & 0x7) == TYPE_READ_DATA_MISS)
     5402            {
     5403                // debug: verify that the available response concerns the current transaction.
     5404                assert(r_dcache_wdt_timeout.read() == p_vci.rtrdid.read());
     5405
    53795406                r_vci_rsp_fsm = RSP_DATA_MISS;
    53805407            }
    5381             else if ((p_vci.rpktid.read() & 0x7) ==  TYPE_READ_INS_UNC)
     5408            else if ((p_vci.rpktid.read() & 0x7) == TYPE_READ_INS_UNC)
    53825409            {
    53835410                r_vci_rsp_fsm = RSP_INS_UNC;
    53845411            }
    5385             else if ((p_vci.rpktid.read() & 0x7) ==  TYPE_READ_INS_MISS)
     5412            else if ((p_vci.rpktid.read() & 0x7) == TYPE_READ_INS_MISS)
    53865413            {
    53875414                r_vci_rsp_fsm = RSP_INS_MISS;
    53885415            }
    5389             else if ((p_vci.rpktid.read() & 0x7) ==  TYPE_WRITE)
     5416            else if ((p_vci.rpktid.read() & 0x7) == TYPE_WRITE)
    53905417            {
    53915418                r_vci_rsp_fsm = RSP_DATA_WRITE;
    53925419            }
    5393             else if ((p_vci.rpktid.read() & 0x7) ==  TYPE_CAS)
     5420            else if ((p_vci.rpktid.read() & 0x7) == TYPE_CAS)
    53945421            {
    53955422                r_vci_rsp_fsm = RSP_DATA_UNC;
    53965423            }
    5397             else if ((p_vci.rpktid.read() & 0x7) ==  TYPE_LL)
     5424            else if ((p_vci.rpktid.read() & 0x7) == TYPE_LL)
    53985425            {
    53995426                r_vci_rsp_fsm = RSP_DATA_LL;
     
    60746101        p_vci.wdata   = 0;
    60756102        p_vci.be      = 0xF;
    6076         p_vci.trdid   = 0;
     6103        p_vci.trdid   = r_dcache_vci_miss_trdid.read();
    60776104        p_vci.pktid   = TYPE_READ_DATA_MISS;
    60786105        p_vci.plen    = m_dcache_words << 2;
Note: See TracChangeset for help on using the changeset viewer.