According to the
data cache control method and device, the medium, the program product and the terminal, by adding the state field in the cache line and optimizing the control method, unified management of complex requirements of cache operation is achieved, and the
management process is simplified. Core functions such as
dirty bit write-back, effective cache line setting, multi-path access order preserving and replacement priority control can be realized only by inquiring and configuring a status bit once when an instruction arrives and an operation is finished. And meanwhile, the problems of
high complexity, large
resource consumption and poor expansibility in traditional
cache management are solved. The use of the data handling unit optimizes the
data exchange between the cache line and the main memory, reduces unnecessary address translation and main memory access, and improves the overall
system performance. The structure is suitable for constructing a multi-level cache, can be widely applied to cache devices of various chips, and provides an efficient and reliable cache solution.