Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cache Replacement Policy #334

Open
tinhanho opened this issue Dec 24, 2023 · 1 comment
Open

Add Cache Replacement Policy #334

tinhanho opened this issue Dec 24, 2023 · 1 comment

Comments

@tinhanho
Copy link

Hi @mortbopet,
I find that contributing to the cache replacement policy is a good way to work with. The replacement policy which possesses from now on are Random and LRU. Intuitively, FIFO can be added and it has been done through few lines of code. What I am doing now is trying to add policy like least frequently used. However, I cannot find out where the code is to expand the slot just like LRU doing. For example, when 2 ways cache used, you click Repl. policy LRU and the LRU slots show up.
image

I guess that it might be the UI problem but I do not know how to modify it. Could you help me?

@HotMercury
Copy link
Contributor

You can review line 440 in the incachegraphic.cpp file within issue #335, and you'll discover the relevant information there.

if (m_cache.getReplacementPolicy() == ReplPolicy::LRU && m_cache.getWays() > 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants