English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 15 August 2021, 15:35   #41
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by saimo View Post
It must be a language thing. So, you mean: "minimum" = "at least". I had interpreted that as "as small as".
This

Quote:
Originally Posted by modrobert View Post
Yes, my mistake, starting to remember now, so the Amiga activates pin 5 to get the data from CD32 controller shifted out on pin 9, right?
Right, pin 6 as the 'clock' for the serial data.
ross is offline  
Old 17 August 2021, 13:24   #42
saimo
Registered User
 
saimo's Avatar
 
Join Date: Aug 2010
Location: Italy
Posts: 787
I had the CIA tests run on a friend's Amiga CD32 equipped with a TF328. The results (attached) are: all the instructions (clr, move, st, tst) execute in 1 E clock cycle, no matter the combination. I guess this is due to CIAs and Gayle being integrated into Akiko.
The sad news is that this proves that the CIA speed access cannot be relied upon for precise timing, unless one writes self-adapting/parametric code that executes according to a previous assessment of the speed.

EDIT
Correction to myself: the expansion board used was a TF330, not a TF328.
Attached Files
File Type: txt CIA_tests_log-Amiga_CD32.txt (6.4 KB, 66 views)

Last edited by saimo; 03 September 2021 at 23:28.
saimo is offline  
Old 17 August 2021, 14:11   #43
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by saimo View Post
The results (attached) are: all the instructions (clr, move, st, tst) execute in 1 E clock cycle, no matter the combination.
These are the results I would expect from any AGA machine, executing code from icache, in the internal bus
(and basically are the results that WinUAE provides).

I'd like to see results from other revisions of the A1200 or A4000..
ross is offline  
Old 17 August 2021, 14:28   #44
saimo
Registered User
 
saimo's Avatar
 
Join Date: Aug 2010
Location: Italy
Posts: 787
Quote:
Originally Posted by ross View Post
These are the results I would expect from any AGA machine, executing code from icache, in the internal bus
(and basically are the results that WinUAE provides).
Yep, and we're back to my very first post here I had always assumed that it was like that, until recently my A1200 pointed out I was wrong!

Quote:
I'd like to see results from other revisions of the A1200 or A4000..
Me too. I asked another friend who has a variety of machines to make other tests, but unfortunately he won't be able to run them for a few weeks. This evening I should get the results from another Amiga CD32, though.
Of course, if anyone else is able and willing to run tests, that's very welcome! They are attached to this post.
saimo is offline  
Old 01 September 2021, 08:53   #45
saimo
Registered User
 
saimo's Avatar
 
Join Date: Aug 2010
Location: Italy
Posts: 787
I finally received the log from another test, performed on yet another Amiga CD32 equipped with a TF328. Surprise: the results are different from the previous ones (see post 42)! While the previous results were perfect (1 CIA cycle per access), these ones show an odd behaviour:
* the combinations clr+tst and st+tst require 3 CIA cycles (instead of the perfect 2);
* the combinations clr+tst+st+tst and st+tst+clr+tst require 5 CIA cycles (instead of the perfect 4 and also instead of 6, as one would expect from the previous point).

Bottom line: even when the machines are supposedly the same, the timings may vary, so CIA accesses cannot be used for precise timing.

EDIT
Correction to myself: the results in post #42 have been made on an Amiga CD32 equipped with a TF330 (not a TF328), so the surprise isn't as big as I wrote above It's still true, however, that trusting the CIA access speed for exact timing isn't wise.
Attached Files
File Type: txt CIA_tests_log-Amiga_CD32+TF328.txt (6.2 KB, 60 views)

Last edited by saimo; 03 September 2021 at 23:27.
saimo is offline  
Old 03 September 2021, 21:04   #46
BeamCoder
Registered User
 
Join Date: Dec 2020
Location: Philippines
Posts: 45
Quote:
Originally Posted by saimo View Post
I finally received the log from another test, performed on yet another Amiga CD32 equipped with a TF328. Surprise: the results are different from the previous ones (see post 42)! While the previous results were perfect (1 CIA cycle per access), these ones show an odd behaviour:
* the combinations clr+tst and st+tst require 3 CIA cycles (instead of the perfect 2);
* the combinations clr+tst+st+tst and st+tst+clr+tst require 5 CIA cycles (instead of the perfect 4 and also instead of 6, as one would expect from the previous point).

Bottom line: even when the machines are supposedly the same, the timings may vary, so CIA accesses cannot be used for precise timing.
Maybe this could be post on Undocumented Amiga Hardware thread for archive? This information could be important to someone
BeamCoder is offline  
Old 03 September 2021, 23:23   #47
saimo
Registered User
 
saimo's Avatar
 
Join Date: Aug 2010
Location: Italy
Posts: 787
Quote:
Originally Posted by BeamCoder View Post
Maybe this could be post on Undocumented Amiga Hardware thread for archive? This information could be important to someone
Hmmm... given what he says in post 17, it sounds that all of this was nothing new to Toni Wilen - maybe it was common knowledge already?


(By the way, I'm going to make a correction to my previous post right after submitting this.)
saimo is offline  
Old 04 September 2021, 08:10   #48
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
This kind of behavior is typical for async CPU clock (CPU clock is not integer multiple of main board clock), some memory access cycles are always missed. I wasn't sure if it affects CIA (that badly).

EDIT: 68020+ due to caches and internal pipelines, can have different delays between memory access and start of next memory access, even if instructions are exact same and clock is sync.

Undocumented thread is mostly about chipset features, not fast CPUs/accelerator boards.

Last edited by Toni Wilen; 04 September 2021 at 08:18.
Toni Wilen is offline  
Old 04 September 2021, 18:07   #49
saimo
Registered User
 
saimo's Avatar
 
Join Date: Aug 2010
Location: Italy
Posts: 787
Quote:
Originally Posted by Toni Wilen View Post
This kind of behavior is typical for async CPU clock (CPU clock is not integer multiple of main board clock), some memory access cycles are always missed. I wasn't sure if it affects CIA (that badly).
It sounds like I had made the same or a similar assumption: I thought that the access speed was 1 CIA cycle and that, however, the CPU might lose some CPU cycles due to clocks not perfectly synchronized. I certainly didn't expect the loss to be multiples of CIA clocks halves and to be so apparently random.
saimo is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shift + F3 not working in ProTracker? h0ffman support.WinUAE 4 06 February 2014 14:21
shift pattern AGS Coders. Asm / Hardware 16 16 December 2013 21:27
Dead shift keys... clownstyle support.Hardware 21 13 October 2013 22:30
Right Shift+Right Amiga works, but not Left shift+Left Amiga Photon support.WinUAE 13 22 November 2010 21:43
Sound shift mcferson support.WinUAE 26 15 October 2008 13:03

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:08.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.15944 seconds with 14 queries