> > I haven't looked at this particular issue closely, but aren't you answering > your own question? The thing you gain by accessing the CPU via the > ThreadContext interface is that all of the CPU models present a consistent > and compatible interface to the instruction objects... > Hey Steve, I agree that accessing through the ThreadContext Interface buys you a consistent way to access the CPU & register file...However, because all the CPUs are derived off of the BaseCPU object anyway, then it forces all the CPUs to already have the same consistent interface without using the ThreadContext in the first place.
My "toy" example of this is say I want to read a integer register from an instruction. I could either go: (1) inst->threadContext->readIntReg() or (2) inst->cpu->readIntReg() In the threadContext object, there is just some redundant call to cpu->readIntReg() anyway. So you end up calling (1) and (2) instead of just directly calling (2). So unless there is some important preprocessing done in the threadContext's readIntReg() function that can't be done in the cpu object's readIntReg() function, I'm not exactly sure that we arent just stacking redundant compatibility on top of each other. But, I could be missing something (especially the FS implications) -- ---------- Korey L Sewell Graduate Student - PhD Candidate Computer Science & Engineering University of Michigan
_______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev