Hi Wang,

If by "write buffer queue", you mean the "mandatoryQueue", then you cannot 
restrict its size wihtout risking an assert error as the sequencer does not 
check the mandatoryQueue fullness before enqueuing.

Still, the maximum number of concurrent tag array and data array lookups can be 
controlled using the banking mechanism of the CacheMemory used in Ruby cache 
controllers. Sadly, MOESI CMP Directory does not seem to make use of this 
mechanism and adding support for it is no easy task.

You can still look at MOESI AMD and CHI to get two examples of cache banking 
support in a Ruby protocol.
Again, adding support for that to a protocol will be a hard task and adding it 
without introducing subtle bugs can be even harder.
But if you have no other choice than learning Ruby and adding this feature to 
the protocol you want to use, here are a few hints to start (based on CHI 
protocol):
    1. Look for the RequestType enumeration in CHI-cache-funcs.sm. It lists the 
names associated to arbitrary resources like tag and data array banks. These 
tags are associated to a transition when the corresponding resource is required 
by this transition. E.g., when CHI needs to read the tag array during a 
transition, the TagArrayRead tag is associated to the transition (see 
CHI-cache-transitions.sm).
    2. Then the checkResourceAvailable function in the same file tests for 
resource availability according to the flag passed as arguments.
    3. If the later returns true, then recordRequestType (still in 
CHI-cache-funcs.sm) will be called to record the resource usage. If 
checkResourceAvailable returns false, a "Resource stall" is triggered, the 
transition is aborted and the next input port is checked.
    4. If you set a resource stall handler (search rsc_stall_handler in 
CHI-cache-ports.sm), you can customize the behavior of the controller upon 
Resource stall for each input port. You should not need this feature.

Note that while the RequestType enumeration type and checkResourceAvailable and 
recordRequestTypes function names are magic names that you must conform to, the 
content of RequestType and the body of these two functions is yours to choose. 
This is the "fully customized" version of the check_allocate mechanism, if you 
know it. If not, then check it first to get in touch with the ResourceStall 
mechanism.

Good luck with your experiments,
Gabriel
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to