Changeset 684


Ignore:
Timestamp:
May 12, 2014, 9:22:51 AM (10 years ago)
Author:
cfuguet
Message:

Merging trunk modifications (r678) into fault-tolerance branch

Location:
branches/fault_tolerance/module/internal_component/vci_cc_vcache_wrapper/caba/source
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/fault_tolerance/module/internal_component/vci_cc_vcache_wrapper/caba/source

  • branches/fault_tolerance/module/internal_component/vci_cc_vcache_wrapper/caba/source/include/vci_cc_vcache_wrapper.h

    r656 r684  
    339339    bool                                m_debug_previous_i_hit;
    340340    bool                                m_debug_previous_d_hit;
    341     bool                                m_debug_activated;
     341    bool                                m_debug_icache_fsm;
     342    bool                                m_debug_dcache_fsm;
     343    bool                                m_debug_cmd_fsm;
    342344
    343345    ///////////////////////////////
  • branches/fault_tolerance/module/internal_component/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp

    r661 r684  
    815815        m_debug_previous_i_hit     = false;
    816816        m_debug_previous_d_hit     = false;
    817         m_debug_activated          = false;
     817        m_debug_icache_fsm             = false;
     818        m_debug_dcache_fsm             = false;
     819        m_debug_cmd_fsm                = false;
    818820
    819821        // activity counters
     
    956958    m_cpt_total_cycles++;
    957959
    958     m_debug_activated = (m_cpt_total_cycles > m_debug_start_cycle) and m_debug_ok;
     960    m_debug_icache_fsm = m_debug_icache_fsm ||
     961        ((m_cpt_total_cycles > m_debug_start_cycle) and m_debug_ok);
     962    m_debug_dcache_fsm = m_debug_dcache_fsm ||
     963        ((m_cpt_total_cycles > m_debug_start_cycle) and m_debug_ok);
     964    m_debug_cmd_fsm = m_debug_cmd_fsm ||
     965        ((m_cpt_total_cycles > m_debug_start_cycle) and m_debug_ok);
    959966
    960967    /////////////////////////////////////////////////////////////////////
     
    12281235                    r_icache_fsm      = ICACHE_MISS_SELECT;
    12291236#if DEBUG_ICACHE
    1230 if ( m_debug_activated )
     1237if ( m_debug_icache_fsm )
    12311238std::cout << "  <PROC " << name() << " ICACHE_IDLE> READ MISS in icache"
    12321239          << " : PADDR = " << std::hex << paddr << std::endl;
     
    12501257                    r_icache_fsm       = ICACHE_IDLE;
    12511258#if DEBUG_ICACHE
    1252 if ( m_debug_activated )
     1259if ( m_debug_icache_fsm )
    12531260std::cout << "  <PROC " << name() << " ICACHE_IDLE> READ HIT in icache"
    12541261          << " : PADDR = " << std::hex << paddr << std::endl;
     
    12621269
    12631270#if DEBUG_ICACHE
    1264 if ( m_debug_activated )
     1271if ( m_debug_icache_fsm )
    12651272{
    12661273    std::cout << "  <PROC " << name()
     
    16081615
    16091616#if DEBUG_ICACHE
    1610 if ( m_debug_activated )
     1617if ( m_debug_icache_fsm )
    16111618{
    16121619    std::cout << "  <PROC " << name()
     
    16331640                            CACHE_SLOT_STATE_ZOMBI);
    16341641#if DEBUG_ICACHE
    1635 if ( m_debug_activated )
     1642if ( m_debug_icache_fsm )
    16361643{
    16371644    std::cout << "  <PROC " << name()
     
    17081715                            r_vci_rsp_fifo_icache.read() );
    17091716#if DEBUG_ICACHE
    1710 if ( m_debug_activated )
     1717if ( m_debug_icache_fsm )
    17111718{
    17121719    std::cout << "  <PROC " << name()
     
    17861793                                        CACHE_SLOT_STATE_ZOMBI );
    17871794#if DEBUG_ICACHE
    1788 if ( m_debug_activated )
     1795if ( m_debug_icache_fsm )
    17891796{
    17901797    std::cout << "  <PROC " << name()
     
    18101817                                    CACHE_SLOT_STATE_VALID );
    18111818#if DEBUG_ICACHE
    1812 if ( m_debug_activated )
     1819if ( m_debug_icache_fsm )
    18131820{
    18141821    std::cout << "  <PROC " << name()
     
    19051912
    19061913#if DEBUG_ICACHE
    1907 if ( m_debug_activated )
     1914if ( m_debug_icache_fsm )
    19081915{
    19091916    std::cout << "  <PROC " << name()
     
    19461953            }
    19471954#if DEBUG_ICACHE
    1948 if ( m_debug_activated )
     1955if ( m_debug_icache_fsm )
    19491956{
    19501957    std::cout << "  <PROC " << name()
     
    20322039
    20332040#if DEBUG_ICACHE
    2034 if ( m_debug_activated )
     2041if ( m_debug_icache_fsm )
    20352042{
    20362043std::cout << "  <PROC " << name()
     
    20722079
    20732080#if DEBUG_ICACHE
    2074 if ( m_debug_activated )
     2081if ( m_debug_icache_fsm )
    20752082{
    20762083    std::cout << "  <PROC " << name()
     
    23332340
    23342341#if DEBUG_DCACHE
    2335 if ( m_debug_activated )
     2342if ( m_debug_dcache_fsm )
    23362343std::cout << "  <PROC " << name() << " DCACHE_IDLE>"
    23372344          << " Cache update in P1 stage" << std::dec
     
    26312638                    break;
    26322639
     2640                    case iss_t::XTN_DEBUG_MASK:     // debug mask
     2641                        m_debug_dcache_fsm = ((m_dreq.wdata & 0x1) != 0);
     2642                        m_debug_icache_fsm = ((m_dreq.wdata & 0x2) != 0);
     2643                        m_debug_cmd_fsm = ((m_dreq.wdata & 0x4) != 0);
     2644                        m_drsp.valid = true;
     2645                        r_dcache_fsm = DCACHE_IDLE;
     2646                        break;
     2647
    26332648                    default:
    26342649                        r_mmu_detr   = MMU_WRITE_UNDEFINED_XTN;
     
    26882703                            m_drsp.rdata = 0;
    26892704#if DEBUG_DCACHE
    2690 if ( m_debug_activated )
     2705if ( m_debug_dcache_fsm )
    26912706std::cout << "  <PROC " << name() << " DCACHE_IDLE>"
    26922707          << " HIT in dtlb, but privilege violation" << std::endl;
     
    27042719                            m_drsp.rdata = 0;
    27052720#if DEBUG_DCACHE
    2706 if ( m_debug_activated )
     2721if ( m_debug_dcache_fsm )
    27072722std::cout << "  <PROC " << name() << " DCACHE_IDLE>"
    27082723          << " HIT in dtlb, but writable violation" << std::endl;
     
    27452760                                r_dcache_fsm          = DCACHE_MISS_SELECT;
    27462761#if DEBUG_DCACHE
    2747 if ( m_debug_activated )
     2762if ( m_debug_dcache_fsm )
    27482763std::cout << "  <PROC " << name() << " DCACHE_IDLE>"
    27492764          << " READ MISS in dcache"
     
    27562771                                r_dcache_fsm   = DCACHE_IDLE;
    27572772#if DEBUG_DCACHE
    2758 if ( m_debug_activated )
     2773if ( m_debug_dcache_fsm )
    27592774std::cout << "  <PROC " << name() << " DCACHE_IDLE>"
    27602775          << " Pending cleanup, stalled until cleanup acknowledge"
     
    27722787                                m_drsp.rdata   = cache_rdata;
    27732788#if DEBUG_DCACHE
    2774 if ( m_debug_activated )
     2789if ( m_debug_dcache_fsm )
    27752790std::cout << "  <PROC " << name() << " DCACHE_IDLE>"
    27762791          << " READ HIT in dcache"
     
    27872802                            r_dcache_fsm            = DCACHE_UNC_WAIT;
    27882803#if DEBUG_DCACHE
    2789 if ( m_debug_activated )
     2804if ( m_debug_dcache_fsm )
    27902805std::cout << "  <PROC " << name() << " DCACHE_IDLE>"
    27912806          << " READ UNCACHEABLE in dcache"
     
    29853000
    29863001#if DEBUG_DCACHE
    2987 if ( m_debug_activated )
     3002if ( m_debug_dcache_fsm )
    29883003{
    29893004    if ( r_dcache_tlb_ins.read() )
     
    30553070
    30563071#if DEBUG_DCACHE
    3057 if ( m_debug_activated )
     3072if ( m_debug_dcache_fsm )
    30583073{
    30593074    std::cout << "  <PROC " << name()
     
    30923107
    30933108#if DEBUG_DCACHE
    3094 if ( m_debug_activated )
     3109if ( m_debug_dcache_fsm )
    30953110{
    30963111    std::cout << "  <PROC " << name()
     
    31143129
    31153130#if DEBUG_DCACHE
    3116 if ( m_debug_activated )
     3131if ( m_debug_dcache_fsm )
    31173132{
    31183133    std::cout << "  <PROC " << name()
     
    31413156
    31423157#if DEBUG_DCACHE
    3143 if ( m_debug_activated )
     3158if ( m_debug_dcache_fsm )
    31443159{
    31453160    std::cout << "  <PROC " << name()
     
    31823197
    31833198#if DEBUG_DCACHE
    3184 if ( m_debug_activated )
     3199if ( m_debug_dcache_fsm )
    31853200{
    31863201    if ( r_dcache_tlb_ins.read() )
     
    32543269
    32553270#if DEBUG_DCACHE
    3256 if ( m_debug_activated )
     3271if ( m_debug_dcache_fsm )
    32573272{
    32583273    std::cout << "  <PROC " << name()
     
    32783293
    32793294#if DEBUG_DCACHE
    3280 if ( m_debug_activated )
     3295if ( m_debug_dcache_fsm )
    32813296{
    32823297    std::cout << "  <PROC " << name()
     
    32953310
    32963311#if DEBUG_DCACHE
    3297 if ( m_debug_activated )
     3312if ( m_debug_dcache_fsm )
    32983313{
    32993314    std::cout << "  <PROC " << name()
     
    33633378
    33643379#if DEBUG_DCACHE
    3365 if ( m_debug_activated )
     3380if ( m_debug_dcache_fsm )
    33663381{
    33673382    std::cout << "  <PROC " << name()
     
    33833398
    33843399#if DEBUG_DCACHE
    3385 if ( m_debug_activated )
     3400if ( m_debug_dcache_fsm )
    33863401{
    33873402    std::cout << "  <PROC " << name()
     
    33993414
    34003415#if DEBUG_DCACHE
    3401 if ( m_debug_activated )
     3416if ( m_debug_dcache_fsm )
    34023417{
    34033418    std::cout << "  <PROC " << name()
     
    34163431
    34173432#if DEBUG_DCACHE
    3418 if ( m_debug_activated )
     3433if ( m_debug_dcache_fsm )
    34193434{
    34203435    std::cout << "  <PROC " << name()
     
    34543469
    34553470#if DEBUG_DCACHE
    3456 if ( m_debug_activated )
     3471if ( m_debug_dcache_fsm )
    34573472{
    34583473    if ( r_dcache_tlb_ins.read() )
     
    35303545
    35313546#if DEBUG_DCACHE
    3532 if ( m_debug_activated )
     3547if ( m_debug_dcache_fsm )
    35333548{
    35343549    std::cout << "  <PROC " << name()
     
    35543569
    35553570#if DEBUG_DCACHE
    3556 if ( m_debug_activated )
     3571if ( m_debug_dcache_fsm )
    35573572{
    35583573    std::cout << "  <PROC " << name()
     
    35723587
    35733588#if DEBUG_DCACHE
    3574 if ( m_debug_activated )
     3589if ( m_debug_dcache_fsm )
    35753590{
    35763591    std::cout << "  <PROC " << name()
     
    35853600    {
    35863601#if DEBUG_DCACHE
    3587 if ( m_debug_activated )
     3602if ( m_debug_dcache_fsm )
    35883603{
    35893604    std::cout << "  <PROC " << name()
     
    36383653        {
    36393654#if DEBUG_DCACHE
    3640 if ( m_debug_activated )
     3655if ( m_debug_dcache_fsm )
    36413656{
    36423657    std::cout << "  <PROC " << name()
     
    36533668    {
    36543669#if DEBUG_DCACHE
    3655 if ( m_debug_activated )
     3670if ( m_debug_dcache_fsm )
    36563671{
    36573672    std::cout << "  <PROC " << name()
     
    39253940
    39263941#if DEBUG_DCACHE
    3927 if ( m_debug_activated )
     3942if ( m_debug_dcache_fsm )
    39283943{
    39293944    std::cout << "  <PROC " << name()
     
    39683983
    39693984#if DEBUG_DCACHE
    3970 if ( m_debug_activated )
     3985if ( m_debug_dcache_fsm )
    39713986{
    39723987    std::cout << "  <PROC " << name()
     
    40284043
    40294044#if DEBUG_DCACHE
    4030 if ( m_debug_activated )
     4045if ( m_debug_dcache_fsm )
    40314046{
    40324047    std::cout << "  <PROC " << name()
     
    41244139
    41254140#if DEBUG_DCACHE
    4126 if ( m_debug_activated )
     4141if ( m_debug_dcache_fsm )
    41274142{
    41284143    std::cout << "  <PROC " << name()
     
    41544169                            CACHE_SLOT_STATE_ZOMBI );
    41554170#if DEBUG_DCACHE
    4156 if ( m_debug_activated )
     4171if ( m_debug_dcache_fsm )
    41574172{
    41584173    std::cout << "  <PROC " << name()
     
    42994314                                r_vci_rsp_fifo_dcache.read() );
    43004315#if DEBUG_DCACHE
    4301 if ( m_debug_activated )
     4316if ( m_debug_dcache_fsm )
    43024317{
    43034318    std::cout << "  <PROC " << name()
     
    43774392                                        CACHE_SLOT_STATE_ZOMBI );
    43784393#if DEBUG_DCACHE
    4379 if ( m_debug_activated )
     4394if ( m_debug_dcache_fsm )
    43804395std::cout << "  <PROC " << name()
    43814396          << " DCACHE_MISS_DIR_UPDT> Switch slot to ZOMBI state"
     
    44004415
    44014416#if DEBUG_DCACHE
    4402 if ( m_debug_activated )
     4417if ( m_debug_dcache_fsm )
    44034418std::cout << "  <PROC " << name()
    44044419          << " DCACHE_MISS_DIR_UPDT> Switch slot to VALID state"
     
    46054620
    46064621#if DEBUG_DCACHE
    4607 if ( m_debug_activated )
     4622if ( m_debug_dcache_fsm )
    46084623{
    46094624    std::cout << "  <PROC " << name()
     
    46534668
    46544669#if DEBUG_DCACHE
    4655 if ( m_debug_activated )
     4670if ( m_debug_dcache_fsm )
    46564671{
    46574672    std::cout << "  <PROC " << name()
     
    47014716
    47024717#if DEBUG_DCACHE
    4703 if ( m_debug_activated )
     4718if ( m_debug_dcache_fsm )
    47044719{
    47054720    std::cout << "  <PROC " << name()
     
    47444759
    47454760#if DEBUG_DCACHE
    4746 if ( m_debug_activated )
     4761if ( m_debug_dcache_fsm )
    47474762{
    47484763    std::cout << "  <PROC " << name()
     
    48054820
    48064821#if DEBUG_DCACHE
    4807 if ( m_debug_activated )
     4822if ( m_debug_dcache_fsm )
    48084823{
    48094824    std::cout << "  <PROC " << name()
     
    48424857
    48434858#if DEBUG_DCACHE
    4844 if ( m_debug_activated )
     4859if ( m_debug_dcache_fsm )
    48454860{
    48464861    std::cout << "  <PROC " << name()
     
    48684883
    48694884#if DEBUG_DCACHE
    4870 if ( m_debug_activated )
     4885if ( m_debug_dcache_fsm )
    48714886{
    48724887    std::cout << "  <PROC " << name()
     
    49044919
    49054920#if DEBUG_DCACHE
    4906 if ( m_debug_activated )
     4921if ( m_debug_dcache_fsm )
    49074922{
    49084923    std::cout << "  <PROC " << name()
     
    49334948
    49344949#if DEBUG_DCACHE
    4935 if ( m_debug_activated )
     4950if ( m_debug_dcache_fsm )
    49364951{
    49374952    std::cout << "  <PROC " << name()
     
    49945009
    49955010#if DEBUG_DCACHE
    4996 if ( m_debug_activated and ok )
     5011if ( m_debug_dcache_fsm and ok )
    49975012{
    49985013    std::cout << "  <PROC " << name()
     
    50105025
    50115026#if DEBUG_DCACHE
    5012 if ( m_debug_activated and ok )
     5027if ( m_debug_dcache_fsm and ok )
    50135028std::cout << "  <PROC " << name() << " DCACHE_INVAL_TLB_SCAN>"
    50145029          << " Invalidate DTLB entry" << std::hex
     
    52155230
    52165231#if DEBUG_CMD
    5217 if ( m_debug_activated )
     5232if ( m_debug_cmd_fsm )
    52185233{
    52195234std::cout << "  <PROC " << name() << " CMD_IDLE>"
Note: See TracChangeset for help on using the changeset viewer.