Port: Add protocol-agnostic ports in the port hierarchy
Review Request #1273 - Created June 17, 2012 and submitted
| Information | |
|---|---|
| Andreas Hansson | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 9125:c14aa7de9462 --------------------------- Port: Add protocol-agnostic ports in the port hierarchy This patch adds an additional level of ports in the inheritance hierarchy, separating out the protocol-specific and protocl-agnostic parts. All the functionality related to the binding of ports is now confined to use BaseMaster/BaseSlavePorts, and all the protocol-specific parts stay in the Master/SlavePort. In the future it will be possible to add other protocol-specific implementations. The functions used in the binding of ports, i.e. getMaster/SlavePort now use the base classes, and the index parameter is updated to use the PortID typedef with the symbolic InvalidPortID as the default.
util/regress all passing (disregarding t1000 and eio)
Posted (June 18, 2012, 10:24 a.m.)
-
src/cpu/testers/rubytest/RubyTester.cc (Diff revision 1) -
Why this change? read_idx is an index, and not a Port ID.
-
src/mem/port.hh (Diff revision 1) -
Should we have a virtual function for port binding here in the BaseSlavePort class as well?
Posted (July 4, 2012, 10:22 a.m.)
Hi Andreas, This looks reasonable to me. Before you commit it though, I'm curious about your longer-term vision for handling different protocols. It's hard for me to feel completely confident in the naming and in the functionality split without a better idea of where you're headed. For example, I'd think that sending and receiving are pretty basic operations as well, so should there be some form of send and receive in the base ports as well? I can also see where if the packet class varies from protocol to protocol you don't want to hardwire that (but you could have a base packet class as well, which could be hardwired as the class for send/receive on the base ports). Clearly there are a lot of ways to do it, and I don't know which one you have in mind. This is probably something that's worth it's own email thread rather than doing it all in reviewboard comments...
-
src/mem/port.hh (Diff revision 1) -
typo "overrive"
Review request changed
Updated (July 20, 2012, 10:14 p.m.)
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+266 -164) |
Ship It!
Ship It!
