If memory serves me correctly, I dont think there is anything in the MIPS spec that says how you have to implement the possible 3-byte operation for swl/swr pairs, but just that it has to be functional.
For a more specific implementation about how a MIPS core might do this, I bet one could browse through the MIPS34K or other core manuals and check out what they do. On the M5 side, as long as the ISA/CPU interface can properly generate the 3-byte store and then hand it off to the memory system we will be fine as then the memory system implementation of that operation could handle it however it sees fit. On Wed, Jan 20, 2010 at 7:57 AM, Radivoje Vasiljevic <[email protected]>wrote: > Just about RMW sequence in real CPU. It is needed when CPU writes less then > data bus size and there is ECC. CPU needs to read complete word or double > word, modify appropriate bytes, recalculate ECC bits and then write it back. > Or, memory system must do RMW in same way, but it is not possible to do > partial modification of word or double word "in place". And for MIPS it > depends is access to cached or uncached memory region (kseg1/disabled > caching in TLB entry or normal cached access). Same applies to caches if it > have ECC (probably L2 or L3, L1 highly unlikely), but explicit partial > load/stores are not very common and cached byte/half word stores goes to L1 > caches which usually have just parity which can be updated in the flight. > > ----- Original Message ----- From: "Steve Reinhardt" <[email protected]> > To: "M5 Developer List" <[email protected]> > Sent: 20. N~?°?1Nf?°N€ 2010 2:31 > Subject: Re: [m5-dev] MIPS o3 unaligned store error > > > > > In hardware it's pretty easy to do per-byte enables if you need to; >> much simpler than doing a read-modify-write sequence. The only reason >> I can imagine that they wouldn't do it that way is if they already had >> to do an RMW for some other instructions and so they piggybacked on >> that. I don't know of any MIPS instructions that would require RMW >> though (particularly since MIPS uses LL/SC for atomic ops, which is >> the main reason you'd want RMW). >> > > Have we discussed doing 3-byte memory ops on the list before? It's >> clear it would require some new functionality at the read()/write() >> ExecContext interface, but that seems like a worthwhile addition to >> me. >> > > Steve >> > > > > > > _______________________________________________ > m5-dev mailing list > [email protected] > http://m5sim.org/mailman/listinfo/m5-dev > > -- - Korey
_______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
