ruby: cleaner ruby tester support
Review Request #2776 - Created May 11, 2015 and submitted
| Information | |
|---|---|
| Tony Gutierrez | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10877:19a630782b82 --------------------------- ruby: cleaner ruby tester support This patch allows the ruby random tester to use ruby ports that may only support instr or data requests. This patch is similar to a previous changeset (8932:1b2c17565ac8) that was unfortunately broken by subsequent changesets. This current patch implements the support in a more straight-forward way. The patch also includes better DPRINTFs and generalizes the retry behavior needed by the ruby tester so that other testers/cpu models can use it as well.
Issue Summary
| Description | From | Last Updated | Status |
|---|---|---|---|
| I'd suggest to always send a retry, simply to comply with the timing protocol. This is extra important these days ... | Andreas Hansson | May 13, 2015, 2:33 p.m. | Open |
| In the crossbar we only send a single retry at a time. It used to look like this, but imho ... | Andreas Hansson | May 13, 2015, 2:33 p.m. | Open |
| Not overly descriptive :-) | Andreas Hansson | July 7, 2015, 9:16 a.m. | Open |
| Surely that should only happen when returning true? In this case we know that we are not done. | Andreas Hansson | July 7, 2015, 9:16 a.m. | Open |
| I'd still suggest to keep consistent with the rest of gem5 and send the retry (and leave it to the ... | Andreas Hansson | July 7, 2015, 9:16 a.m. | Open |
Description: |
|
|||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 1 (+168 -65) |
-
src/mem/packet_queue.cc (Diff revision 1) -
I strongly disagree with this change. This buffer should not exist, and even 100 packets is a stretch. Any module hitting this needs to recondiser how it deals with flow control
-
configs/ruby/MESI_Three_Level.py (Diff revision 1) -
Should these changes be in a different patch since they are orthogonal to the Ruby tester?
I would be OK to keep them here, but you should update the commit message to say you change the clock domain for all of the controllers.
-
src/mem/ruby/system/RubyPort.cc (Diff revision 1) -
I don't understand why the random tester doesn't want to retry failed requests. Could you explain why this feature is necessary? It's been a few years since I've looked deeply at the random tester. I'll hold off on broadcasting my opinion on this until I understand it better :).
Again, this may be more appropriate as a separate patch, but I'm not going to push hard on this.
-
src/mem/ruby/system/RubyPort.cc (Diff revision 1) -
Did you mean to call the new sendRetries function here?
-
src/mem/ruby/system/RubyPort.cc (Diff revision 1) -
Does this function ever get called?
Is this in one of the (many many) patches I haven't gotten to yet, or should be called from above?
-
src/mem/ruby/system/RubyPort.cc (Diff revision 1) -
Does it make sense to call this function when the retryList is empty? Why not have an assert instead of an if statement which guards the entire function?
I suggest either changing the name (trySendRetries), or using the if statement outside of this function and instead use an assert within the function.
-
configs/ruby/MESI_Three_Level.py (Diff revision 1) -
Can you explain the rationale behind this change?
-
src/cpu/testers/rubytest/Check.cc (Diff revision 1) -
Please use the Mersenne twister (random_mt). It took a significant effort to unify how we generate random numbers, and I'd rather see we do not regress on that point.
-
src/mem/ruby/system/RubyPort.cc (Diff revision 1) -
I'd suggest to always send a retry, simply to comply with the timing protocol. This is extra important these days with bridging to SST and SystemC/TLM.
The tester can simply ignore the retry if it does not care.
-
src/mem/ruby/system/RubyPort.cc (Diff revision 1) -
In the crossbar we only send a single retry at a time. It used to look like this, but imho it makes no sense. Once one port goes ahead the RubyPort will be busy, will it not?
Description: |
|
|||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+155 -72) |
The modifications to packet queue have been removed from this patch. Can the rest of this patch be checked in as is? There seems to be no consensus on the clk domain issue. Once we check in this patch, perhaps someone who feels passionate on the clk domain settings for the L1 cache can fix it in a better way.
I'm going to voice my concern again for modifying the RubyPort to ignore retries instead of the RubyTester. But I'll take the critism that this is a case of asking the patch author to totally change their design to what I want.
We should fix the RubyPort abstraction at some point. Either it should be a transparent wrapper from "ports" to the "MandatoryQueues", or it should be more clear exactly what it's modeling that the classic networking (ports, crossbars, etc) don't already model.
-
configs/ruby/MESI_Three_Level.py (Diff revision 2) -
I think it's pretty clear from reviews that Nilay and I would prefer not to change the clock domains when simulating regular CPU cores. Most existing systems have L1s clocked at the CPU frequency, and gem5 should stay that way.
Can we just leave these changes out and fix the clock domains for the testers separately? The testers are the least common use case for gem5+Ruby.
Description: |
|
|||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+329 -144) |
Diff: |
Revision 4 (+329 -144) |
|---|
-
configs/ruby/MESI_Three_Level.py (Diff revision 4) -
Why is this needed? It seems the generic version using [i] should be equivalent.
This comment applies to all the config script changes.
-
src/cpu/testers/rubytest/CheckTable.cc (Diff revision 4) -
Not overly descriptive :-)
-
src/mem/ruby/system/RubyPort.hh (Diff revision 4) -
2009, 2013?
-
src/mem/ruby/system/RubyPort.cc (Diff revision 4) -
2009, 2013?
-
src/mem/ruby/system/RubyPort.cc (Diff revision 4) -
Surely that should only happen when returning true? In this case we know that we are not done.
-
src/mem/ruby/system/RubyPort.cc (Diff revision 4) -
I'd still suggest to keep consistent with the rest of gem5 and send the retry (and leave it to the RubyTester port to ignore it)
-
configs/ruby/MESI_Three_Level.py (Diff revision 4) -
As far as I can tell the code is identical, with i replaced with 0. i would be 0 for the first item. Am I missing something? I see no mentioning of any ports in this block of code.
-
configs/ruby/MESI_Three_Level.py (Diff revision 4) -
I see why this is (unfortunately) needed. Can you at least add a comment in the code about why you have this check? I agree that this is not a good long-term solution, but no need to solve all our ruby problems in a single patch ;).
-
src/mem/ruby/system/RubyPort.hh (Diff revision 4) -
This should change to an if statement. See http://repo.gem5.org/gem5/rev/60eb3fef9c2d
Description: |
|
|||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 5 (+374 -148) |
Description: |
|
|||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 6 (+374 -148) |
-
configs/ruby/MESI_Three_Level.py (Diff revision 6) -
The comment + 3 more lines should be enough. No need to repeat the whole thing.
