misc: Clean up and complete the gem5<->SystemC-TLM bridge [2/10]
Review Request #3528 - Created June 23, 2016 and submitted
| Information | |
|---|---|
| Christian Menard | |
| gem5 | |
| default | |
| 3686 | |
| Reviewers | |
| Default | |
Changeset 11795:321da7e75035
---------------------------
misc: Clean up and complete the gem5<->SystemC-TLM bridge [2/10]The current TLM bridge only provides a Slave Port that allows the gem5 world to
send request to the SystemC world. This patch series refractors and cleans up
the existing code, and adds a Master Port that allows the SystemC world to send
requests to the gem5 world.This patch:
* Add the Master Port.
* Add an example application that isslustrates its use.
A simple example application consisting of a TLM traffic generator and a gem5 memory is part of the patch.
Dear Christian,
thank you for this nice contribution. I will have a look on your patch and maybe I can help you fixing your issue.
Regards
Matthias
Change Summary:
Rebase patch to #3477
Depends On: |
|
||
|---|---|---|---|
Diff: |
Revision 2 (+893 -10) |
Change Summary:
Bugfix: Before this fix the test eventually resulted in an "Missed an event" error. With this new patch version, the event loop gets notified whenever a gem5 event is scheduled from a function in the SystemC world.
The review board complains about the patch not applying cleanly. Sorry about this, I tried to fix the patch, but locally it works perfectly...
Description: |
|
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
|||||||||
Depends On: |
|
|||||||||
Diff: |
Revision 3 (+930 -10) |
Change Summary:
Updated the diff: rebased on 11691 and generated with mq
Diff: |
Revision 4 (+930 -10) |
|---|
Some of the files are not displaying ok. Did you post the review using hg postreview?
-
util/tlm/examples/master_port/Makefile (Diff revision 4) -
Same as previous patch. This should use pkt-config.
-
util/tlm/examples/master_port/Makefile (Diff revision 4) -
An assignment to a name would be good for these paths. GEM5_ROOT or similar
-
util/tlm/examples/master_port/main.cc (Diff revision 4) -
gem5 has a random_mt that you should preferably use
-
util/tlm/examples/master_port/main.cc (Diff revision 4) -
Same as the other patch. Why not use the response string size?
-
util/tlm/sc_master_port.hh (Diff revision 4) -
Not convention
-
util/tlm/sc_master_port.hh (Diff revision 4) -
Could you provide a bit more comments here around what is assumed, how it does what it does, what it doesn't do, etc
-
util/tlm/sc_master_port.cc (Diff revision 4) -
Same as the header
-
util/tlm/sc_master_port.cc (Diff revision 4) -
Is it assumed that the request is deleted elsewhere?
-
util/tlm/sc_master_port.cc (Diff revision 4) -
comma on the line before
name,
other name -
util/tlm/sc_master_port.cc (Diff revision 4) -
Why the re-interpret cast?
-
util/tlm/sc_master_port.cc (Diff revision 4) -
it is not a big problem, but technically gem5 can change mode during the simulation.
The API for this is involving calls to drain and drain resume etc. We don't have to fix it now, but it may be worth at least warning if any of these functions are called.
-
util/tlm/sc_master_port.cc (Diff revision 4) -
could we base this on the response string rather to avoid buffer overflows? :-)
-
util/tlm/sc_master_port.cc (Diff revision 4) -
odd indentation
-
util/tlm/sc_master_port.cc (Diff revision 4) -
what is this checking?
Summary: |
|
|||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
|||||||||||||||||||||||||||
Branch: |
|
|||||||||||||||||||||||||||
Diff: |
Revision 5 (+921 -7) |
-
util/tlm/examples/master_port/main.cc (Diff revision 5) -
This function is also in the target example, could we source out all doublicated functions to a common dir/file?
-
util/tlm/examples/master_port/main.cc (Diff revision 5) -
Similar to the Target (the example TLM memory): put this sc_module in a seperated file...
-
util/tlm/examples/master_port/tlm.py (Diff revision 5) -
remove it if you dont need it
-
util/tlm/sc_master_port.cc (Diff revision 5) -
XXX flag?
Description: |
|
|||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 6 (+1010 -7) |
Description: |
|
|||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 7 (+1013 -7) |
Thanks for this. Some minor requests and style issues, then it's good to go.
-
util/tlm/sc_master_port.cc (Diff revision 7) -
It would be good to add a comment explaining where the request is deleted.
-
util/tlm/sc_master_port.cc (Diff revision 7) -
this is not a safe assumption
use SimClock::Int::ps for the "conversion"
-
util/tlm/sc_master_port.cc (Diff revision 7) -
do things work even if this is not TLM_UPDATED?
Summary: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 8 (+982) |
Description: |
|
|---|
Depends On: |
|
|---|
Description: |
|
|||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 9 (+982) |
Description: |
|
|||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 10 (+982) |
Ship It!
Summary: |
|
|||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
