- Timestamp:
- Mar 8, 2016, 3:24:40 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
r1037 r1038 7894 7894 //////////////////////////////////////////////////////////////////////////////////// 7895 7895 // 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 f iveother 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 ) 7899 7899 // To maximize the throughput, the ressource is always allocated. 7900 7900 // A new allocation is done when the owner FSM does not access the cache. 7901 7901 // - 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. 7903 7903 ///////////////////////////////////////////////////////////////////////////////////// 7904 7904 … … 7913 7913 // compute dir_allocate, that is actually a release condition: 7914 7914 // 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 7917 7918 bool dir_allocate = false; 7918 int dir_last = r_alloc_dir_last.read(); 7919 int dir_last = r_alloc_dir_last.read(); 7919 7920 switch(r_alloc_dir_fsm.read()) 7920 7921 { … … 7935 7936 (r_read_fsm.read() != READ_DIR_LOCK) and 7936 7937 (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))) 7941 7939 { 7942 7940 dir_allocate = true; … … 7955 7953 (r_write_fsm.read() != WRITE_BC_IVT_LOCK) and 7956 7954 (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))) 7964 7956 { 7965 7957 dir_allocate = true; … … 7979 7971 (r_cas_fsm.read() != CAS_BC_IVT_LOCK) and 7980 7972 (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))) 7988 7974 { 7989 7975 dir_allocate = true; … … 8013 7999 { 8014 8000 dir_allocate = true; 8015 dir_last = ALLOC_DIR_CLEANUP;8016 8001 } 8017 8002 … … 8036 8021 r_alloc_dir_last = dir_last; 8037 8022 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 8042 8028 else if ( dir_last == ALLOC_DIR_READ ) 8043 8029 { … … 8045 8031 else if (dir_req_cas) r_alloc_dir_fsm = ALLOC_DIR_CAS; 8046 8032 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;8048 8033 else if (dir_req_read) r_alloc_dir_fsm = ALLOC_DIR_READ; 8049 8034 } … … 8052 8037 if (dir_req_cas) r_alloc_dir_fsm = ALLOC_DIR_CAS; 8053 8038 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;8055 8039 else if (dir_req_read) r_alloc_dir_fsm = ALLOC_DIR_READ; 8056 8040 else if (dir_req_write) r_alloc_dir_fsm = ALLOC_DIR_WRITE; … … 8059 8043 { 8060 8044 if (dir_req_config) r_alloc_dir_fsm = ALLOC_DIR_CONFIG; 8061 else if (dir_req_cleanup) r_alloc_dir_fsm = ALLOC_DIR_CLEANUP;8062 8045 else if (dir_req_read) r_alloc_dir_fsm = ALLOC_DIR_READ; 8063 8046 else if (dir_req_write) r_alloc_dir_fsm = ALLOC_DIR_WRITE; … … 8065 8048 } 8066 8049 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 )8075 8050 { 8076 8051 if (dir_req_read) r_alloc_dir_fsm = ALLOC_DIR_READ; … … 8078 8053 else if (dir_req_cas) r_alloc_dir_fsm = ALLOC_DIR_CAS; 8079 8054 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;8081 8055 } 8082 8056 } // end if dir_allocate
Note: See TracChangeset
for help on using the changeset viewer.