Re: [patch][rfa]: SID mapper component - wordsize
Dave Brolley <[email protected]>
| Newsgroups | gmane.comp.emulators.sid.devel |
|---|---|
| Message-ID | <[email protected]> |
Frank Ch. Eigler wrote: >brolley wrote: > > > >>[...] The specification >>[4*1000-1010] >>should allow access to the range 4000-4043, however, the upper bound >>is simply being multiplied by the wordsize, resulting in an upper >>bound of 4040. >> >> > >Actually, addresses in the mapper specs are inclusive, not exclusive. >That's why one often sees ranges ending with ...ffff. Plain raw >scaling such inclusive limits doesn't make sense though, so a special >case calculation like yours would make sense. However, care should be >taken not to confuse exclusive vs inclusive bounds. > Right. That's precisely what the patch does. It computes the intended inclusive bounds. >>If the mapper is accessed using wordsized elements, the problem goes >>unnoticed, since the mapper does not check the ending address of the >>range being accessed. >> >> > >That's a peculiar other bug. To be consistent with the byte-oriented >addressing across sid::bus, the size of the access would need to be >included in the checks. > > That's a separate bug (wasn't sure if it was intentional or not) and an exercise for someone's copious spare time :-) Dave