-
Notifications
You must be signed in to change notification settings - Fork 61
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 Plru Docs #249
base: master
Are you sure you want to change the base?
Add Plru Docs #249
Conversation
Hi ^^ I would say, the PLRU thing should be documented independently of the Plugin / pipeline framework. val io = new Bundle{
val context = new Bundle{
//user -> plru, specify the current state
val state = Plru.State(entries)
//user -> plru, allow to specify prefered entries to remove. each bit set mean : "i would prefer that way to not to be selected by PLRU"
val valids = withEntriesValid generate Bits(entries bits)
}
val evict = new Bundle{
//PLRU -> user, Tells you the least recently used entry for the given context provided above
val id = UInt(log2Up(entries) bits)
}
val update = new Bundle{
// user -> PLRU specify which entry the user want to mark as most recently used
val id = UInt(log2Up(entries) bits)
// PLRU -> user specfy what should then be the new value of the PLRU status
val state = Plru.State(entries)
}
} |
Yeah i just copied those over for notes, i was planning to update it so that it's independent of anything else |
I haven't fully got round to using it so I won't be able to document it all now. Once I understand it's usage better I should be able to add more docs. |
That PLRU utils doesn't contain any state, only combinatorial behaviour, usefull in the control logic of a cache to figure out what way to evict, and also logic to update the PLRU with the last way usage |
@Dolu1990 is there anything else you want to add or would you be happy with these docs? |
val ram = Mem.fill(nSets)(Plru.State(wayCount)) | ||
val write = ram.writePort | ||
val fromLoad, fromStore = cloneOf(write) | ||
write.valid := fromLoad.valid || fromStore.valid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say, this is when you have two pipeline (one load and one store) which want to update the PLRU state.
For the doc itself, we shouldn't have that complexity.
There is two example of PLRU usage you may haven't seen :
No description provided.