Changeset 1038


Ignore:
Timestamp:
Mar 8, 2016, 3:24:40 PM (8 years ago)
Author:
alain
Message:

Another modification in the ALLOC_DIR FSM. The new priority is :
CLEANUP > XRAM_RSP > cyclic( READ > WRITE > CAS > CONFIG )

File:
1 edited

Legend:

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

    r1037 r1038  
    78947894        ////////////////////////////////////////////////////////////////////////////////////
    78957895        // The ALLOC_DIR FSM allocates the access to the directory and
    7896         // the data cache with a higher priority for the XRAM_RSP FSM,
    7897         // and a round robin priority between the five other FSMs :
    7898         // (the cyclic ordering is READ > WRITE > CAS > CONFIG > CLEANUP)
     7896        // the data cache with a higher priority for CLEANUP and XRAM_RSP FSMs,
     7897        // and a round robin priority between the four other FSMs :
     7898        //    CLEANUP > XRAM_RSP > cyclic( READ > WRITE > CAS > CONFIG )
    78997899        // To maximize the throughput, the ressource is always allocated.
    79007900        // A new allocation is done when the owner FSM does not access the cache.
    79017901        // - The r_alloc_dir_fsm register define the current owner.
    7902         // - The r_alloc_dir_last register define the previous owner for round robin.
     7902        // - The r_alloc_dir_last register define the previous owner for cyclic priority.
    79037903        /////////////////////////////////////////////////////////////////////////////////////
    79047904
     
    79137913        // compute dir_allocate, that is actually a release condition:
    79147914        // allocation can be done if the owner FSM doest not use the cache
    7915         // The oner FSM get the lowest priority (registerd in dir_last)
    7916         // only if the DIR access is a success.
     7915        // The owner FSM get the lowest priority (registerd in dir_last),
     7916        // but only if there is no retry.
     7917
    79177918        bool dir_allocate = false;
    7918         int  dir_last     = r_alloc_dir_last.read();
     7919        int  dir_last     = r_alloc_dir_last.read(); 
    79197920        switch(r_alloc_dir_fsm.read())
    79207921        {
     
    79357936                     (r_read_fsm.read() != READ_DIR_LOCK)  and
    79367937                     (r_read_fsm.read() != READ_TRT_LOCK)  and
    7937                      (r_read_fsm.read() != READ_HEAP_REQ))
    7938                     or
    7939                      ((r_read_fsm.read() == READ_TRT_LOCK) and
    7940                      (r_alloc_trt_fsm.read() == ALLOC_TRT_READ)))
     7938                     (r_read_fsm.read() != READ_HEAP_REQ)))
    79417939                {
    79427940                    dir_allocate = true;
     
    79557953                     (r_write_fsm.read() != WRITE_BC_IVT_LOCK)   and
    79567954                     (r_write_fsm.read() != WRITE_MISS_TRT_LOCK) and
    7957                      (r_write_fsm.read() != WRITE_UPT_HEAP_LOCK))
    7958                     or
    7959                      ((r_write_fsm.read()     == WRITE_UPT_HEAP_LOCK) and
    7960                      (r_alloc_heap_fsm.read() == ALLOC_HEAP_WRITE))
    7961                     or
    7962                      ((r_write_fsm.read()     == WRITE_MISS_TRT_LOCK) and
    7963                      (r_alloc_trt_fsm.read()  == ALLOC_TRT_WRITE)))
     7955                     (r_write_fsm.read() != WRITE_UPT_HEAP_LOCK)))
    79647956                {
    79657957                    dir_allocate = true;
     
    79797971                     (r_cas_fsm.read() != CAS_BC_IVT_LOCK)     and
    79807972                     (r_cas_fsm.read() != CAS_MISS_TRT_LOCK)   and
    7981                      (r_cas_fsm.read() != CAS_UPT_HEAP_LOCK))
    7982                     or
    7983                      ((r_cas_fsm.read()       == CAS_UPT_HEAP_LOCK) and
    7984                      (r_alloc_heap_fsm.read() == ALLOC_HEAP_CAS))
    7985                     or
    7986                      ((r_cas_fsm.read()       == CAS_MISS_TRT_LOCK) and
    7987                       (r_alloc_trt_fsm.read() == ALLOC_TRT_CAS)))
     7973                     (r_cas_fsm.read() != CAS_UPT_HEAP_LOCK)))
    79887974                {
    79897975                    dir_allocate = true;
     
    80137999                {
    80148000                    dir_allocate = true;
    8015                     dir_last     = ALLOC_DIR_CLEANUP;
    80168001                }
    80178002 
     
    80368021            r_alloc_dir_last = dir_last;
    80378022
    8038             // higher priority for XRAM_FSM
    8039             if ( dir_req_xram_rsp ) r_alloc_dir_fsm = ALLOC_DIR_XRAM_RSP;
    8040 
    8041             // round-robin priority for READ > WRITE > CAS > CONFIG > CLEANUP
     8023            // higher priority for CLEANUP and XRAM_RSP
     8024            if      (dir_req_cleanup)      r_alloc_dir_fsm = ALLOC_DIR_CLEANUP;
     8025            if else (dir_req_xram_rsp)     r_alloc_dir_fsm = ALLOC_DIR_XRAM_RSP;
     8026
     8027            // round-robin priority for READ > WRITE > CAS > CONFIG
    80428028            else if ( dir_last == ALLOC_DIR_READ )
    80438029            {
     
    80458031                else if (dir_req_cas)      r_alloc_dir_fsm = ALLOC_DIR_CAS;
    80468032                else if (dir_req_config)   r_alloc_dir_fsm = ALLOC_DIR_CONFIG;
    8047                 else if (dir_req_cleanup)  r_alloc_dir_fsm = ALLOC_DIR_CLEANUP;
    80488033                else if (dir_req_read)     r_alloc_dir_fsm = ALLOC_DIR_READ;
    80498034            }
     
    80528037                if      (dir_req_cas)      r_alloc_dir_fsm = ALLOC_DIR_CAS;
    80538038                else if (dir_req_config)   r_alloc_dir_fsm = ALLOC_DIR_CONFIG;
    8054                 else if (dir_req_cleanup)  r_alloc_dir_fsm = ALLOC_DIR_CLEANUP;
    80558039                else if (dir_req_read)     r_alloc_dir_fsm = ALLOC_DIR_READ;
    80568040                else if (dir_req_write)    r_alloc_dir_fsm = ALLOC_DIR_WRITE;
     
    80598043            {
    80608044                if      (dir_req_config)   r_alloc_dir_fsm = ALLOC_DIR_CONFIG;
    8061                 else if (dir_req_cleanup)  r_alloc_dir_fsm = ALLOC_DIR_CLEANUP;
    80628045                else if (dir_req_read)     r_alloc_dir_fsm = ALLOC_DIR_READ;
    80638046                else if (dir_req_write)    r_alloc_dir_fsm = ALLOC_DIR_WRITE;
     
    80658048            }
    80668049            else if ( dir_last == ALLOC_DIR_CONFIG )
    8067             {
    8068                 if      (dir_req_cleanup)  r_alloc_dir_fsm = ALLOC_DIR_CLEANUP;
    8069                 else if (dir_req_read)     r_alloc_dir_fsm = ALLOC_DIR_READ;
    8070                 else if (dir_req_write)    r_alloc_dir_fsm = ALLOC_DIR_WRITE;
    8071                 else if (dir_req_cas)      r_alloc_dir_fsm = ALLOC_DIR_CAS;
    8072                 else if (dir_req_config)   r_alloc_dir_fsm = ALLOC_DIR_CONFIG;
    8073             }
    8074             else if ( dir_last == ALLOC_DIR_CLEANUP )
    80758050            {
    80768051                if      (dir_req_read)     r_alloc_dir_fsm = ALLOC_DIR_READ;
     
    80788053                else if (dir_req_cas)      r_alloc_dir_fsm = ALLOC_DIR_CAS;
    80798054                else if (dir_req_config)   r_alloc_dir_fsm = ALLOC_DIR_CONFIG;
    8080                 else if (dir_req_cleanup)  r_alloc_dir_fsm = ALLOC_DIR_CLEANUP;
    80818055            }
    80828056        }  // end if dir_allocate
Note: See TracChangeset for help on using the changeset viewer.