Re: [hatari-devel] Adding cache support for the MegaSTE |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Adding cache support for the MegaSTE
- From: Christian Zietz <czietz@xxxxxxx>
- Date: Sat, 13 Jul 2024 15:29:06 +0200
- Autocrypt: addr=czietz@xxxxxxx; keydata= xsFNBGMHkrYBEACc4fljFVcoEo+DzmhTRd8pOfnj39wkNL+VEIzUpz5OfxFNx/KYWhtHxLN9 VWD3rojS5ww3bNgWiYdqDLisuaO6jLXZ7JNBQU3ruJg+g4iCuwfwFf/tVAHvMCr5U/ibiE94 VZuHs6yYJnXHuKrZEBzWQTEPHltqFLVq+cr4dzMV14SIWP8/OnUCaQeeCE1jdh8itXw75Cv9 Bc4wqhT1eU75WmcUwJ1hNrwZm6M2acFoABmZL0CWm0L8+7PXDgZXlwyNoWuPoupjuAvjsdsY 5x+uWtfyufrC/auTcc7LKiAxRQcZ/ABtLhnAa13Su4BsrVwJIxFIGDrZe/CpX48CvYdWljQF JqElP5ShsaM01odrLhmS8OreMEODo6Vhr3zqs3wUA/bl8gEkxDbSz0LewqC07sajTiYIVABW bVWkyn2T8JANSbtVV9YgUnbK+CsMckruarab1iSrTBB+aTvK5TN7LP4iKHaXfZAbq5wtQfXe yrvyPjkbmzvbYb+lnVe24fqLQS1RVB6p/LGAkKFBT1SjEQWVtzVIiAAlbjhRxIsdOqJK1kl/ 6GyQyGfUlPByUETzzFKe6qcCtQlUZPwd7vquryw+3PSVkhL9PiEtUSMiOIVpRzfomxwKXNGT avDoYjTZL1ROuzQYfL+ekpGu4Ti53GGxagxJT1tBhon1qUkMwwARAQABzSBDaHJpc3RpYW4g WmlldHogPGN6aWV0ekBnbXgubmV0PsLBkQQTAQgAOxYhBElYYBdDcemT9uBa0ocIs0yCexWe BQJjB5K2AhsDBQsJCAcCAiICBhUKCQgLAgQWAgMBAh4HAheAAAoJEIcIs0yCexWer/E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uaAy8=
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1720877347; x=1721482147; i=czietz@xxxxxxx; bh=EAWBsejR1jEX9tt9KNDTD0adpxpJSIBUpjpwmomKjHQ=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=oD8aSBuX0tSz0IzsTrQjlCDNnnQNKvl7CXpQpGEmfLGdZ+7m7xMD3Hg66L3kQCKF lnnRshzTEOD0xjiTxslztnvmNifHSB59oPyRu7fnIRGHbh/3pWpgIsq9cBckqjKd7 FOccYEN8teJcnsohqAwyYPniPR5YVX602x59EHEXDbYiHh6+BdGsREtavEoODqFUW nhiViWnk1YThLWGOH37Resnn/ykgoF/zm5DuSRWyM4eCzbWee0mzHnObOOFqytEPQ pgqo1fbiUNF9leGUr7wPniO7omhaSiSGfaV94sgCh1sMuu96xGPl4mbi80WgUngKz aANoUoQnHvAFjMVtVA==
- Ui-outboundreport: notjunk:1;M01:P0:bYwTFf0Yb2U=;EQvSW089il00II0N8IKdQj1Bn+O Pff+qNsBue3LtsBjAXRJNIJrihC70SGf2EeqHjtWE6c8k5Scubr+Jca64r2l08mABbg5JXlLn 47wSIWg0JG/PnvvZ3KFcy9JW47+6nnN+C+pxIC6ROm6yzfFzOJHeSUnD91ZXqnrUlsRKrCEUY ztvkzOZcvwFCuY8RD6hrHtkSOecPqGr5UOAx0286j7ZhCNMhWlxtZBoxVpcbcZ9dnydap7GFV xeQDLH7fdRGinTgx3J9AbmOaB+p1JZkAYR8dnaiOqzFP/ye/iK0XJP2fj0Uuuq2APyuwu7QWF ZYAR0W46FLXu5A4jjJfzmYaB4Pyp8Gp6GpQxQTZ2GGtL0bts7l9tG9Oo1wcn94Qyx/mVLhU77 r8WAGZEWFLM7mkWy3N26D0k7w59/QXz/VATEq0LT0Hh1TAUYc1w6iloIuk3Pwz6WOhDZC7XHQ rfLb3WoE+lHbw2oi9V5n7N7+6g5G4hgvPb17fpxuExpq2aPQG/4j5uY/M0ZwfR29S6z71D5tb Wagkr/bx4mUqeBGua0/gLNd7pssdglp9RCj4BZStjzG/0cvei2HAWvm1xCHonrO9AHbyFMB9S cGoJWfFdOlmu4GidSXZ7OPMgsu1KNzQxXMEfEhJGDO/eka//SneXdjpMkoTFN2S06SK6wUUOU Sil37ruv8ZmkVCXifSUUcw8J6r9hROBgDu4A3J6259GA3JAqmxPjN/utrJOm6NFG+j4u+1Nj3 RaSKJE8yH2rAlT6sbaO3Em2Rhqfn89bEg7nJ6M8ou7nNdiAvb6BQavi2yN4MXndyo7ifYNEdO Phha1zKFeKGtg6F3J3q47qJQ==
Christian Zietz schrieb:
Results attached.
I struggle to understand the difference between 8 MHz and 16 MHz + 100%
cache hits, though. The come out at $19E = 414 HBLs and $A7 = 167 HBLs,
respectively, which is a 414/167 ≈ 2.5(!) speed increase.
You do a MOVE.W (Ax)+,Dx; DBRA Dy,xxx. The MOVE is 8 cycles, the DBRA is
10 cycles. In 8 MHz mode the DBRA incurs two waitstates (because of
unaligned prefetch from ST RAM). Hence, in 8 MHz mode the loop should
take 8+10+2=20 cycles, equivalent to 40 16-MHz cycles.
Assuming 100% cache hit, in 16-MHz mode the same loop ought to take 8+10
= 18 cycles.
But that only would explain a 2.22 (40/18) speed increase. I wonder if
the rest is due to overhead in interrupt handling in 8-MHz mode.
Do you see a way to modify your test program to run with interrupts
disabled, using, e.g., one of MFP timers for time measurement?
Regards
Christian
--
Christian Zietz - CHZ-Soft - czietz@xxxxxxx
WWW: https://www.chzsoft.de/
New GnuPG-Key-ID: 0x8708B34C827B159E