Ignore:
Timestamp:
Nov 17, 2014, 10:47:55 AM (9 years ago)
Author:
cfuguet
Message:

reconf: use the watchdog timer for the uncacheable requests too.

  • The vci_cc_vcache_wrapper's dcache FSM triggers the watchdog timer also for the uncacheable requests (read and write).
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

    r853 r888  
    442442    sc_signal<bool>         r_dcache_vci_sc_req;        // atomic write request SC
    443443    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)
     444    sc_signal<trdid_t>      r_dcache_vci_wdt_trdid;     // dcache WDT trdid (for debug)
    445445
    446446    // register used for XTN inval
     
    456456    sc_signal<bool>         r_dcache_miss_clack;        // waiting for a cleanup acknowledge
    457457
    458     // Watchdog timer (WDT) for MISS timeout exception (black-hole detection)
    459     sc_signal<uint32_t>     r_dcache_miss_wdt_max;      // wdt triggering value
    460     sc_signal<uint32_t>     r_dcache_miss_wdt;          // wdt counter
     458    // Watchdog timer (WDT) for timeout exception (black-hole detection)
     459    sc_signal<uint32_t>     r_dcache_wdt_max;           // wdt triggering value
     460    sc_signal<uint32_t>     r_dcache_wdt;               // wdt counter
    461461    sc_signal<trdid_t>      r_dcache_wdt_timeout;       // timeout counter (for debug)
    462462
  • branches/reconfiguration/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp

    r853 r888  
    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"),
     324      r_dcache_vci_wdt_trdid("r_dcache_vci_wdt_trdid"),
    325325
    326326      r_dcache_xtn_way("r_dcache_xtn_way"),
     
    332332      r_dcache_miss_set("r_dcache_miss_set"),
    333333      r_dcache_miss_inval("r_dcache_miss_inval"),
    334       r_dcache_miss_wdt_max("r_dcache_miss_wdt_max"),
    335       r_dcache_miss_wdt("r_dcache_miss_wdt"),
     334
     335      r_dcache_wdt_max("r_dcache_wdt_max"),
     336      r_dcache_wdt("r_dcache_wdt"),
    336337      r_dcache_wdt_timeout("r_dcache_wdt_timeout"),
    337338
     
    817818
    818819        // Reset watchdog timer threshold to max value
    819         r_dcache_miss_wdt_max      = UINT32_MAX;
     820        r_dcache_wdt_max           = UINT32_MAX;
    820821        r_dcache_wdt_timeout       = 0;
    821822
     
    25352536
    25362537                    case XTN_WDT_MAX:
    2537                         m_drsp.rdata = r_dcache_miss_wdt_max.read();
     2538                        m_drsp.rdata = r_dcache_wdt_max.read();
    25382539                        m_drsp.valid = true;
    25392540                        m_drsp.error = false;
     
    26802681
    26812682                    case XTN_WDT_MAX:
    2682                         r_dcache_miss_wdt_max = m_dreq.wdata;
     2683                        r_dcache_wdt_max = m_dreq.wdata;
    26832684                        m_drsp.valid = true;
    26842685                        r_dcache_fsm = DCACHE_IDLE;
     
    28022803#endif
    28032804                                // request a VCI DMISS transaction
    2804                                 r_dcache_vci_miss_trdid = r_dcache_wdt_timeout.read();
     2805                                r_dcache_vci_wdt_trdid = r_dcache_wdt_timeout.read();
    28052806
    28062807                                r_dcache_vci_paddr    = paddr;
     
    28512852                            r_dcache_vci_unc_req   = true;
    28522853                            r_dcache_fsm           = DCACHE_UNC_WAIT;
     2854
     2855                            // reset to 0 the watchdog timer
     2856                            r_dcache_vci_wdt_trdid = r_dcache_wdt_timeout.read();
     2857                            r_dcache_wdt = 0;
    28532858#if DEBUG_DCACHE
    28542859                            if (m_debug_dcache_fsm)
     
    29222927                                r_dcache_vci_unc_req   = true;
    29232928                                r_dcache_fsm           = DCACHE_UNC_WAIT;
     2929
     2930                                // reset to 0 the watchdog timer
     2931                                r_dcache_vci_wdt_trdid = r_dcache_wdt_timeout.read();
     2932                                r_dcache_wdt = 0;
    29242933                            }
    29252934                            else
     
    31993208        else // we must load the missing cache line in dcache
    32003209        {
    3201             r_dcache_vci_miss_trdid = r_dcache_wdt_timeout.read();
     3210            r_dcache_vci_wdt_trdid = r_dcache_wdt_timeout.read();
    32023211
    32033212            r_dcache_vci_miss_req = true;
     
    34763485        else            // we must load the missing cache line in dcache
    34773486        {
    3478             r_dcache_vci_miss_trdid = r_dcache_wdt_timeout.read();
     3487            r_dcache_vci_wdt_trdid = r_dcache_wdt_timeout.read();
    34793488
    34803489            r_dcache_fsm          = DCACHE_MISS_SELECT;
     
    41684177            r_dcache_miss_set = set;
    41694178
    4170             // reset to 0 the miss watchdog timer
    4171             r_dcache_miss_wdt = 0;
     4179            // reset to 0 the watchdog timer
     4180            r_dcache_wdt = 0;
    41724181
    41734182            if (cleanup)
     
    42974306        }
    42984307
    4299         // increment MISS watchdog timer for black-hole detection
    4300         r_dcache_miss_wdt = r_dcache_miss_wdt.read() + 1;
    4301         if (r_dcache_miss_wdt.read() == r_dcache_miss_wdt_max.read()) {
     4308        // increment watchdog timer for black-hole detection
     4309        r_dcache_wdt = r_dcache_wdt.read() + 1;
     4310        if (r_dcache_wdt.read() == r_dcache_wdt_max.read())
     4311        {
    43024312            r_mmu_detr   = MMU_READ_DATA_TIMEOUT;
    43034313            r_mmu_dbvar  = r_dcache_save_vaddr.read();
     
    45404550        }
    45414551
     4552        // increment watchdog timer for black-hole detection
     4553        r_dcache_wdt = r_dcache_wdt.read() + 1;
     4554        if (r_dcache_wdt.read() == r_dcache_wdt_max.read())
     4555        {
     4556            r_mmu_detr   = MMU_READ_DATA_TIMEOUT;
     4557            r_mmu_dbvar  = m_dreq.addr;
     4558            m_drsp.valid = true;
     4559            m_drsp.error = true;
     4560            r_dcache_fsm = DCACHE_IDLE;
     4561
     4562            // debug: this counter is used to detect an early WDT timeout.
     4563            // It is sent as the data uncacheable transactions TRDID. When a
     4564            // response is treated by the RSP FSM, the RTRDID is compared to
     4565            // this counter to determine if a timeout was triggered during the
     4566            // transaction.
     4567            r_dcache_wdt_timeout = r_dcache_wdt_timeout.read() + 1;
     4568
     4569#if DEBUG_DCACHE
     4570            if (m_debug_dcache_fsm)
     4571            {
     4572                std::cout << "  <PROC " << name() << " DCACHE_MISS_WAIT>"
     4573                             "  watchdog timer exception" << std::endl;
     4574            }
     4575#endif
     4576            break;
     4577        }
     4578
    45424579        if (r_vci_rsp_data_error.read()) // bus error
    45434580        {
     
    53975434            if ((p_vci.rpktid.read() & 0x7) == TYPE_DATA_UNC)
    53985435            {
     5436                // debug: verify that the available response concerns the current transaction.
     5437                assert(r_dcache_wdt_timeout.read() == p_vci.rtrdid.read());
     5438
    53995439                r_vci_rsp_fsm = RSP_DATA_UNC;
    54005440            }
     
    61016141        p_vci.wdata   = 0;
    61026142        p_vci.be      = 0xF;
    6103         p_vci.trdid   = r_dcache_vci_miss_trdid.read();
     6143        p_vci.trdid   = r_dcache_vci_wdt_trdid.read();
    61046144        p_vci.pktid   = TYPE_READ_DATA_MISS;
    61056145        p_vci.plen    = m_dcache_words << 2;
     
    61116151        p_vci.cmdval  = true;
    61126152        p_vci.address = r_dcache_vci_paddr.read() & ~0x3;
    6113         p_vci.wdata   = 0;
     6153        p_vci.wdata   = r_dcache_vci_wdt_trdid.read();
    61146154        p_vci.be      = r_dcache_vci_unc_be.read();
    61156155        p_vci.trdid   = 0;
     
    61256165        p_vci.wdata   = r_dcache_vci_wdata.read();
    61266166        p_vci.be      = r_dcache_vci_unc_be.read();
    6127         p_vci.trdid   = 0;
     6167        p_vci.trdid   = r_dcache_vci_wdt_trdid.read();
    61286168        p_vci.pktid   = TYPE_DATA_UNC;
    61296169        p_vci.plen    = 4;
Note: See TracChangeset for help on using the changeset viewer.