Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write serial port IRQ tests #690

Closed
dirkwhoffmann opened this issue Apr 30, 2022 · 3 comments
Closed

Write serial port IRQ tests #690

dirkwhoffmann opened this issue Apr 30, 2022 · 3 comments
Labels
Done Enhancement New feature or request

Comments

@dirkwhoffmann
Copy link
Owner

I've bought a loopback adapter for the serial port which can be exploited by a program to interrupt itself by sending out UART packages. If I understood the latest cputester code correctly, Toni is using this approach for verifying IPL timing.

IMG_2711

TODO:

  • Write test cases that visualise UART IRQ timing.
  • Adjust timing in vAmiga to match the real machine.

Together with AmigaTestKit, the adapter has revealed that my favourite ECS machine has a broken serial port 😕. Luckily, the OCS machine is all fine. It only had a bended pin which was easy to fix.

@dirkwhoffmann dirkwhoffmann added the Enhancement New feature or request label Apr 30, 2022
@dirkwhoffmann
Copy link
Owner Author

A first chunk of UART interrupt tests has been uploaded to the test repo.

UART/txirq0:

Amiga 500 ECS: 🥰

txirq0_A500_ECS

vAmiga: 🙈

Bildschirmfoto 2022-05-22 um 17 28 47

UART/txirq1:

Amiga 500 ECS: 🥰

txirq1_A500_ECS

vAmiga: 🙈

Bildschirmfoto 2022-05-22 um 17 30 27

None of the tests utilise the RBF interrupt, yet. Hence, no loopback dongle needed.

dirkwhoffmann added a commit that referenced this issue May 26, 2022
@dirkwhoffmann
Copy link
Owner Author

Some UART tests were broken in v2.1b2. This has been been fixed. Now all tests are passing again:

Bildschirmfoto 2022-06-11 um 08 40 21

Using the UART TBE interrupt, it's possible to write fine-grained IPL tests. This one tests the MOVE Rg,Rg instruction:

moveRgRg_A500_OCS

In each section IPL timing affects when a color change from grey to yellow moves over to a color change from grey to light red to yellow.

vAmiga:

Bildschirmfoto 2022-06-11 um 08 42 04

BTW, no dongle for the serial port is required. Originally I though that I need to utilise the RBF interrupt, but the TBE interrupt is totally sufficient.

@dirkwhoffmann
Copy link
Owner Author

Fixed in v2.1b3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Done Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant