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

PiDP-10: Clock bit in APR is not set when repeating CONT. #319

Open
larsbrinkhoff opened this issue Mar 25, 2024 · 10 comments
Open

PiDP-10: Clock bit in APR is not set when repeating CONT. #319

larsbrinkhoff opened this issue Mar 25, 2024 · 10 comments

Comments

@larsbrinkhoff
Copy link
Contributor

larsbrinkhoff commented Mar 25, 2024

Posting here because https://github.com/rcornwell/pidp10 doesn't allow issues.

Steps to reproduce:

  1. Enter test program:
    d 100 ADDI 1,1
    d 101 DATAO PI,1
    d 102 CONSO APR,1000
    d 103 JRST 102
    d 104 CONO APR,1000
    d 105 JRST 100
    
  2. Push SING INST SING CYCLE and REPT.
  3. Push START.
  4. Hold down CONT.

Expected outcome:

Program ADDI executed frequently, counting up on the MI lights. This is because the APR 1000 bit should be set 60 times a second, so the CONSO, JRST loop should exit immediately in single stepping (repeated or not).

Actual outcome:

I'm not sure if SING CYCLE has been implemented yet, but if it is.
Program stuck in CONSO, JRST loop. Seems like APR bit 1000 isn't set 60 times a second.

@larsbrinkhoff
Copy link
Contributor Author

larsbrinkhoff commented Mar 25, 2024

@aap remarked that SING INST disables the clock flag. So the current behavior is kind of correct, albeit not by design. (I assume.)

However, the issue can (and will) be rewritten to use SING CYCLE instead.

@rcornwell
Copy link
Owner

SING CYCLE is not implemented under the emulator. I have fixed SING CYCLE to operate same as SING INST.

@larsbrinkhoff
Copy link
Contributor Author

Can you fix SING CYCLE so it doesn't inhibit the clock flag?

@rcornwell
Copy link
Owner

rcornwell commented Mar 25, 2024

No, SING CYCLE sets the SING INST SWITCH.

Also since single Cycle and single Instruction, bring you back to simH prompt, there can not be any timer events generated.

@larsbrinkhoff
Copy link
Contributor Author

On a real KA10, only SING INST should inhibit the clock flag. SING CYCLE should not inhibit the clock flag.

@rcornwell
Copy link
Owner

They are implemented identically, so single cycle will inhibit the clock. Also single Cycle has no meaning on pdp10-ka.

@larsbrinkhoff
Copy link
Contributor Author

I understand they are identical now. What I propose is to make them not identical. Is that up for discussion?

Also, any chance single cycle could be implemented in the future?

@rcornwell
Copy link
Owner

On a different emulator possibly. Now single Cycle on the KA10 was single memory cycle, not single execution cycle. But interrupting the simulation at every memory access and then restarting the instruction where it left off will add a huge performance hit to simulation. I am not sure that is justified for the few cases the feature would be used. Also making single cycle not disable clock is a bit of work that offers very little gain in functionality.

@larsbrinkhoff
Copy link
Contributor Author

For the record, I disagree this is resolved. I would like to see this fixed in the future. Are you saying you will not accept updates to fix this in your simulator?

@rcornwell
Copy link
Owner

I will always accept updates. However I think trying to emulate single cycle will greatly increase the complexity of the code, and have a negative effect on performance with little gain of functionality. If you want to propose a fix I will gladly look over it.

@rcornwell rcornwell reopened this Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants