Ignore:
Timestamp:
Jan 13, 2015, 9:42:55 AM (9 years ago)
Author:
cfuguet
Message:

reconf: factorize the watchdog_timeout signal in vci_cc_vcache_wrapper

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp

    r923 r924  
    22562256    m_drsp.rdata = 0;
    22572257
    2258     // watchdog timeout default value
    2259     bool dcache_watchdog_timeout = false;
     2258    // watchdog timeout signal
     2259    bool dcache_watchdog_timeout = (r_dcache_wdt.read() == r_dcache_wdt_max.read());
    22602260
    22612261    switch (r_dcache_fsm.read())
     
    41834183        // increment watchdog timer for black-hole detection
    41844184        r_dcache_wdt = r_dcache_wdt.read() + 1;
    4185         if (r_dcache_wdt.read() == r_dcache_wdt_max.read())
    4186         {
    4187             dcache_watchdog_timeout = true;
     4185        if (dcache_watchdog_timeout)
     4186        {
     4187            r_mmu_detr = MMU_WDT_TIMEOUT;
     4188            m_drsp.valid = true;
     4189            m_drsp.error = true;
     4190            r_dcache_fsm = DCACHE_IDLE;
    41884191
    41894192            // TODO: send the TRDID in the coherence packet to detect an early
     
    42034206            }
    42044207#endif
     4208            break;
    42054209        }
    42064210
    42074211        // wait the CC_TEST request to finish
    4208         if (not r_dcache_to_cc_test_req.read() or dcache_watchdog_timeout)
    4209         {
    4210             if (dcache_watchdog_timeout)
    4211             {
    4212                 r_mmu_detr   = MMU_WDT_TIMEOUT;
    4213                 m_drsp.error = true;
    4214             }
     4212        if (not r_dcache_to_cc_test_req.read())
     4213        {
    42154214            m_drsp.valid = true;
    4216 
    42174215            r_dcache_fsm = DCACHE_IDLE;
     4216
    42184217#if DEBUG_DCACHE
    42194218            if (m_debug_dcache_fsm)
     
    42234222                    << std::hex
    42244223                    << " / DEST = " << r_dcache_to_cc_test_dest.read()
    4225                     << " / TIMEOUT = " << dcache_watchdog_timeout
    42264224                    << std::dec << std::endl;
    42274225            }
     
    44154413        // increment watchdog timer for black-hole detection
    44164414        r_dcache_wdt = r_dcache_wdt.read() + 1;
    4417         if (r_dcache_wdt.read() == r_dcache_wdt_max.read())
     4415        if (dcache_watchdog_timeout)
    44184416        {
    44194417            r_mmu_detr   = MMU_WDT_TIMEOUT;
     
    46594657        // increment watchdog timer for black-hole detection
    46604658        r_dcache_wdt = r_dcache_wdt.read() + 1;
    4661         if (r_dcache_wdt.read() == r_dcache_wdt_max.read())
     4659        if (dcache_watchdog_timeout)
    46624660        {
    46634661            r_mmu_detr   = MMU_WDT_TIMEOUT;
Note: See TracChangeset for help on using the changeset viewer.