I suspect that once again we're probably pretty close in agreement, but just
confusing each other because we're not communicating 100% precisely... you
bring up the Platform object a couple of times, but in my mind I've already
written that off and am thinking of the future world where Platform no
longer exists. So there's no need for you to continue arguing against it
:-).
It's important to keep in mind the role that the System object plays in
configurations as the root of the subtree of the config hierarchy that
represents a system. So even if the System object itself incorporates
mostly software-related information at this point in time, in the config
script it encompasses everything about a single "machine", software and
hardware. Even if the devices in a system didn't have a direct link to a
system object (which they do, thanks to the inherited PioDevice param), they
would still be children of a system object in the hierarchy. Combining this
with the 'Parent.any' default makes it easy for a device to know what system
it belongs to, and thus to access any per-system information in a very
simple fashion. That's why I consider it to be the central object for both
software and hardware configuration of anything that's got a system-level
scope. That definitely does not mean that the System object should have an
explicit parameter for every other SimObject that might be associated with
it though (which is what I think you're arguing against... we agree there).
I think we can use 'Parent.any' pretty effectively to solve a lot of
problems. Note that currently Platform does this to find the interrupt
controller:
intrctrl = Param.IntrControl(Parent.any, "interrupt controller")
Seems like individual devices that need to find an interrupt controller or
some similar component should just be doing this directly without having to
find a Platform object first. If we do it that way, then if there's a
single interrupt controller that's a direct child of System, then the
devices will find that; if you want more than one, you can create a
Python-only class like IOSubsystem, give it an interrupt controller as a
child, put your devices under that, and then Parent.any will find the
IOSubsystem's interrupt controller before it gets up to the System object.
None of this requires anyone to have an explicit interrupt controller
parameter (though that might be needed elsewhere, e.g., to identify to the
CPU where it is going to get interrupts from).
Steve
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev