On Tue, 13 Jul 2010 11:20:26 -0700, Gabe Black <[email protected]> wrote:
> This also brings up another idea I've been rolling around for a while. > Why is all the control state local to the miscregfile/it's decendant the > ISA object? Why don't we put control state that matters to the TLB, or > at least a copy of it, in the TLB itself and then communicate it back > and forth as necessary? That would be easier to code (or at least I'm > guessing) since you'd just have the state right there, faster since it > avoids calling out for it, and would more conceptually match real > hardware where all the control state isn't put in one huge blob > someplace. The same thing could be done for other structures like the > interrupt controller, and maybe the decoder and/or predecoder. Speaking > of the decoder, it would be nice to make that a little stateful as well. > As it is in, say, ARM, the decoder has to rediscover what mode it's in > over and over. I'm guessing it would be better to explicitly switch it's > state (or it entirely) when changing modes instead, although that might > add a fair amount of complexity. Perhaps the decoder should be an object > instead of a bare function? I'm less sure how that would work. It could, > hypothetically, allow us to return the two PC bits commandeered to > signal the mode. At least for ARM, I intended to have the TLB cache the various translation state (CPSR, SCTLR) and invalidate the cache on CPSR, SCTLR writes to that it wouldn't have to access those misc registers every cycle. I think part of the issue is that those registers are accessed by a variety of things so it isn't necessarily better for it to live in the TLB. I don't know that there is anything preventing the misc register accesses from calling another function on the tlb to update registers when they're written. Couldn't the same thing be used for these other suggestions? Assuming that we make the decoder an object (which I don't think should be too hard), in the case of changing the state of the cpu couldn't the misc register write call tc->decoder->changeState(foo); Ali _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
