Andreas Hansson got review request #1001!
MEM: Introduce the master/slave port roles in the Python classes
Review Request #1001 - Created Jan. 17, 2012 and submitted
| Information | |
|---|---|
| Andreas Hansson | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
MEM: Introduce the master/slave port roles in the Python classes This patch classifies all ports in Python as either Master or Slave and enforces a binding of master to slave. Conceptually, a master (such as a CPU or DMA port) issues requests, and receives responses, and conversely, a slave (such as a memory or a PIO device) receives requests and sends back responses. Currently there is no differentiation between coherent and non-coherent masters and slaves. The classification as master/slave also involves splitting the dual role port of the bus into a master and slave port and updating all the system assembly scripts to use the appropriate port. Similarly, the interrupt devices have to have their int_port split into a master and slave port. The intdev and its children have minimal changes to facilitate the extra port. Note that this patch does not enforce any port typing in the C++ world, it merely ensures that the Python objects have a notion of the port roles and are connected in an appropriate manner. This check is carried when two ports are connected, e.g. bus.master = memory.port. The following patches will make use of the classifications and specialise the C++ ports into masters and slaves.
util/regress all passing (disregarding t1000 and eio)
seems fine to me. Steve?
Posted (Feb. 2, 2012, 1:58 a.m.)
Overall this is great. My only concern is the syntax of declaring master vs. slave... the string keywords are a little verbose. If we're eventually going to expand the set of strings to include the protocol (e.g., 'MOESICacheMaster' or something) then using strings is probably OK. If the master/slave distinction is going to be maintained orthogonal to the protocol specification, I'd prefer to see us expand Port/VectorPort to be subclassed as MasterPort/SlavePort/VectorMasterPort/VectorSlavePort.
Review request changed
Updated (Feb. 9, 2012, 3:45 a.m.)
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+482 -361) |
Posted (Feb. 9, 2012, 11:40 p.m.)
-
src/python/m5/params.py (Diff revision 2) -
Is there still a need to export Port and VectorPort, or should they be internal-only classes? It's just a matter of whether they should be taken of this __all__ list or not.
Congrats on patch #1001... at least reviewboard seems to think that's worth celebrating!
