![]() |
![]() |
#1 |
Registered User
![]() Join Date: Jan 2019
Location: Brisbane
Posts: 86
|
memory read/write penalty
Hey all, I understand there are extra memory access needed to read/write to odd addresses on 68020+ and it’s not possible on 68000/010, but what about for 68020+ with a long word read or write to a 2 byte alignment that is not a 4 byte alignment. Any additional cost for longs at those addresses?
As a side question, for the odd addresses is the penalty 2x access cost? Thanks! |
![]() |
![]() |
#2 |
Registered User
![]() Join Date: Jun 2016
Location: europe
Posts: 592
|
Yeah, 020+ has to read two consecutive 32-bit data if the address is only 1 or 2 byte aligned (not on a 32-bit boundary).
Last edited by a/b; 24 January 2022 at 23:26. Reason: typo... |
![]() |
![]() |
#3 |
Registered User
![]() Join Date: Jan 2019
Location: Brisbane
Posts: 86
|
Ok good to know, thanks! Couldn’t find much info except for the odd addresses.
|
![]() |
![]() |
#4 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 49
Posts: 4,529
|
Not all odd addresses have a penalty. If you access a word that is fully contained inside an aligned long, then it is accessed at full speed. IOW, if the word is at an address of 1 modulo 4.
|
![]() |
![]() |
#5 |
Registered User
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,095
|
But what happens when you read word or long sequences from a not aligned memory block? Do you get a possible penalty only for the first read access, but then the following reads can re-use the previous data from the cache and only need to fetch the subsequent words or longwords from memory? Or is there still a cache read penalty?
|
![]() |
![]() |
#6 | |
Registered User
![]() Join Date: Feb 2017
Location: Denmark
Posts: 253
|
Quote:
|
|
![]() |
![]() |
#7 |
Registered User
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,095
|
Thanks paraj, good to know that, because I always have my difficulties to understand the timing tables and the exact calculation of required clock cycles, and under WinUAE I can hardly measure with benchmarks how fast a real CPU would execute the code.
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Memory Read/Write | xArtx | Coders. C/C++ | 20 | 18 March 2016 13:50 |
read/write error? | backtoskooldaze | support.Hardware | 3 | 07 September 2011 15:22 |
read but wont write | Dave_wb | support.Hardware | 0 | 09 December 2006 14:04 |
Read\Write Errors..... | THX1138 | support.Apps | 10 | 13 October 2004 15:24 |
CD Read Write Errors | Stom | support.WinUAE | 2 | 07 June 2002 18:46 |
|
|