• Please review our updated Terms and Rules here

Build your own PDP 8I, Part 3..

Marty

Veteran Member
Joined
Jul 26, 2009
Messages
3,141
Location
Boulder , Colorado USA
Hi All;

Dave, Thank You for Your Response..

"" When you say "Memory location 0007 is changed from 7771 to 0000" do you mean that memory location 0007 'counts' from 7771, 7772, ... 7777 and then to 0000 each time it goes around the loop? ""

I don't know for sure, But, I think So, I will need to look into that closer and try and see for sure..
I will need to run it thru the Loop once and then check that memory Location, and Go into my own Loop to know for sure..

Yes, it is counting up from 7771 to 0000 and then stays at 0000..

"" I am thinking that INDIRECT AUTO INCREMENT is not working. ""

If I knew where this would be/is located, I could do some checking Now..
But, I don't have a clue, where this is located..

THANK YOU Marty
 
Last edited:

daver2

Veteran Member
Joined
Jun 19, 2012
Messages
8,074
Location
UK - Worcester
It's in the Fx and Ax state machine again (a bit we haven't gone through yet...)

I left my schematics at home today so I can't look it up at the moment.

Dave
 

daver2

Veteran Member
Joined
Jun 19, 2012
Messages
8,074
Location
UK - Worcester
A simpler program to test out the problem.

0000 7240 CLA CMA - Set AC to 7777.
0001 0410 AND I 10 - Auto-increment memory location 10 and use the resulting value to index the operand.
0002 7402 HLT

...

0010 0011
0011 7777
0012 1234
0013 5670

Single step and see what the AC value and memory location 0010 are both before and after the AND instruction at location 0001.

AC before should be 7777. AC after should be either 7777 (wrong) or 1234 (right).

Memory location 0010 before should be 0011. After should be either 0011 (wrong) or 0012 (right).

The signal line to look at is on schematic LD11 chip J7 pin 1. This pin should be a '1' from M2 pin 10 when an address (in MA) is in the range 0010 to 0017. When performing the FETCH cycle of the 'AND' instruction at location 0001 you should see something like F0, F1, F2, F3, F4, F5, F6, F7, F8, F9 and F10 (a full house!). Some of the Ax signals are permitted to be entered (i.e. whilst waiting for CYCOMP - the memory cycle to complete) but the whole Fx state machine should be processed for this instruction/operand sequence.

Dave
 
Last edited:

Marty

Veteran Member
Joined
Jul 26, 2009
Messages
3,141
Location
Boulder , Colorado USA
Hi All;

Dave, Thank You for Your Testing program, I will run it and Let You know the Results..

I have Inserted at 0001 0410, is this correct ??
From Looking it up from the other program, I want to make sure I have the correct OP Code..

Also, in Locations '0002 thru '0007 , I put 7402's HLT..

IT FAILS !!!!

"" A simpler program to test out the problem.

0000 7240 CLA CMA - Set AC to 7777.
0001 AND I 10 - Auto-increment memory location 10 and use the resulting value to index the operand.
0002 7402 HLT

...

0010 0011
0011 7777
0012 1234
0013 5670

Single step and see what the AC value and memory location 0010 are both before and after the AND instruction at location 0001.

AC before should be 7777.
Correct..
AC after should be either 7777 (wrong) or 1234 (right).
' 7777 '

Start 0000 PC = '0000
Ma '0000
M '7240
Mb '0000
Pc '0000
Ir '0000
AC '0000..
J7 pin 1, = '1
CONT,

Ma '0040
M '7240
Mb '0000
Pc '0001
Ir '7420
AC '7777..
Mem 10 '0011
J7 pin 1, = '0

CONT,

Ma '0011
M '7777
Mb '7777
Pc '0002
Ir '0410
AC '7777..
Mem 10 '0011
J7 pin 1, = '0

CONT,

Ma '0002
M '7402
Mb '7777
Pc '0003
Ir '7402
AC '7777..
Mem 10 '0011
J7 pin 1, = '0
CONT,

Ma '0002
M '7402
Mb '7777
Pc '0004
Ir '7402
AC '7777..
Mem 10 '0011
J7 pin 1, = '0

Memory location 0010 before should be 0011. After should be either 0011 (wrong) or 0012 (right).

The signal line to look at is on schematic LD11 chip J7 pin 1. This pin should be a '1' from M2 pin 10 when an address (in MA) is in the range 0010 to 0017. When performing the FETCH cycle of the 'AND' instruction at location 0001 you should see something like F0, F1, F2, F3, F4, F5, F6, F7, F8, F9 and F10 (a full house!). Some of the Ax signals are permitted to be entered (i.e. whilst waiting for CYCOMP - the memory cycle to complete) but the whole Fx state machine should be processed for this instruction/operand sequence. ""

"" you should see something like F0, F1, F2, F3, F4, F5, F6, F7, F8, F9 and F10 (a full house!). ""
I think they do, But, I am going to slow it down to make sure..
YES !!!

THANK YOU Marty
 
Last edited:

daver2

Veteran Member
Joined
Jun 19, 2012
Messages
8,074
Location
UK - Worcester
"I have Inserted at 0001 0410, is this correct ??" - Yes. Sometimes my hand types faster than my brain thinks!

There is something fishy here...

Can you try the following:

STOP CLEAR

Load the following values into register MA (by hand via LDMA) and see what the state of J7 pin 1 is after each load.

MA => J7/1
0000 => '0'
0007 => '0'
0010 => '1'
0017 => '1'
0020 => '0'
7777 => '0'

The key 'steps' to the state machine are:

MB is loaded in F5 (schematic LD15 E15 input pin 2 going low).
MB is loaded in F7 (schematic LD15 E15 input pin 3 going low).
Memory is written to in F7 (schematic LD15 G4 input pin 12 going low).
F7 is included in the CIN logic (schematic LD13 M10 pin 12 going low).
MA is loaded in F8 (schematic LD15 E1 input pin 6 going low).
MB is loaded in F10 (schematic LD15 E15 input pins 5/6/11/12 going low).

Dave
 
Last edited:

Marty

Veteran Member
Joined
Jul 26, 2009
Messages
3,141
Location
Boulder , Colorado USA
Hi All;

Thank You, Dave for Responding Once more Today..

"" There is something fishy here...

Can you try the following:

STOP CLEAR

Load the following values into register MA (by hand via LDMA) and see what the state of J7 pin 1 is after each load.

MA => J7/1
0000 => '0' YES..

0007 => '0' YES..

0010 => '1' NO !! '0'

0017 => '1' NO !! '0'

0020 => '0' YES !!

7777 => '0' YES !!..

Look like I have something to Chase after !!!!
And I know where to start Looking..


THANK YOU Marty
 

daver2

Veteran Member
Joined
Jun 19, 2012
Messages
8,074
Location
UK - Worcester
So there's your little gremlin!

Schematic LD11 has a 7402 (M2) a 7430 (E16) and a load of inverter gates feeding J7 pin 1 from the MA register (can you double check that it is the MA register that the decode is working with).

This should decode for MA=000000010XXX (i.e. MA0-MA6='0', MA7='1' and MA8='0' with MA9=11 being "don't care").

J7 pin 1 is initially set to a '1' from your register trace above - the question is - what is the logic that is driving it?

If J7 pin 1 is a '0' on the clock pulse after F6 - we should go to A7 (which means we should never get to F7) and our state machine should terminate prematurely.

Dave
 

Marty

Veteran Member
Joined
Jul 26, 2009
Messages
3,141
Location
Boulder , Colorado USA
Hi All;

Dave, Thank You for the Explanations..
BUT,
I think I have Found, (if not all, most of the problem) ALL of the Signals to E16, are the WRONG Polarity !!

I think I can do a Quick Fix, I can ADD Another Inverter after the 7430, and before the 7402 and then (hopefully) All should be Fine..
I will try this and see..

THANK YOU Marty
 

daver2

Veteran Member
Joined
Jun 19, 2012
Messages
8,074
Location
UK - Worcester
To avoid any confusion: with the MA register set at (say) 0010 - all the inputs to E16 should be a '1' (i.e. the opposite sense of the MA register bit settings - except for MA8).

Marty: I have just checked this logic out - IT WORKS DON'T CHANGE IT - there must be something wrong elsewhere...

Dave
 
Last edited:

Marty

Veteran Member
Joined
Jul 26, 2009
Messages
3,141
Location
Boulder , Colorado USA
Hi All;

Dave, Thanks for the Clarification..
And this Time around the Inputs are correct, but the Output is wrong,
So more looking into things, Maybe a Bad 7430.. We'LL see..

THANK YOU Marty
 

Marty

Veteran Member
Joined
Jul 26, 2009
Messages
3,141
Location
Boulder , Colorado USA
Hi All;

Dave, Thanks for the note..
But, in Your typing there may be an error !!

""This should decode for MA=000/000/010/XXX (i.e. MA0-MA6='0', MA7='1' and MA8='0' with MA9=11 being "don't care").
( this decodes to '0020)
Shouldn't it be,
This should decode for MA=000/000/001/XXX (i.e. MA0-MA6='0', MA7='0' and MA8='1' with MA9=11 being "don't care").
( this decodes to '0010)..

I Think I have Found it this time, two of my wires are Wrong, and so it decodes wrong..
I Just proved it, by putting the code I have it wired for and Not the code it should be, and it Responds..


THANK YOU Marty
 
Last edited:

daver2

Veteran Member
Joined
Jun 19, 2012
Messages
8,074
Location
UK - Worcester
Yes - fingers typing faster than brain again...

MA=000/000/001/XXX

Check...

Bed time in the UK - I'll catch up with your progress in the morning.

Dave
 

Marty

Veteran Member
Joined
Jul 26, 2009
Messages
3,141
Location
Boulder , Colorado USA
Hi All;

"" A simpler program to test out the problem.

0000 7240 CLA CMA - Set AC to 7777.
0001 0410 AND I 10 - Auto-increment memory location 10 and use the resulting value to index the operand.
0002 7402 HLT

...

0010 0011
0011 7777
0012 1234
0013 5670

Single step and see what the AC value and memory location 0010 are both before and after the AND instruction at location 0001.

AC before should be 7777. AC after should be either 7777 (wrong) or 1234 (right).

Memory location 0010 before should be 0011. After should be either 0011 (wrong) or 0012 (right).

The signal line to look at is on schematic LD11 chip J7 pin 1. This pin should be a '1' from M2 pin 10 when an address (in MA) is in the range 0010 to 0017. When performing the FETCH cycle of the 'AND' instruction at location 0001 you should see something like F0, F1, F2, F3, F4, F5, F6, F7, F8, F9 and F10 (a full house!). Some of the Ax signals are permitted to be entered (i.e. whilst waiting for CYCOMP - the memory cycle to complete) but the whole Fx state machine should be processed for this instruction/operand sequence. ""

This NOW WORKS !!!

I will be Out tomorrow, but, I will see Your response, and do a little before I have to leave..

I think there is still a problem, with the other Program, but, it could be my Fat Fingers..
Or another Bug lurking in the Background..

"" 0000 7240 CLA CMA
0001 0410 AND I 10
0002 2007 ISZ 7
0003 5001 JMP 1
0004 7402 HLT
0005 5004 JMP 4
0006 7402 HLT
0007 7771 Number of times to iterate around the ISZ loop.
0010 0011 Pointer to the 'AND' mask to use for the AC.
0011 3776 Consecutive mask words for the AC...
0012 5775 "
0013 6773 "
0014 7367 "
0015 7557 "
0016 7637 "
0017 7777 "

Dave, Would it be possible to 'do' this another way, with the limited memory space that we have ??
For now eliminate the ISZ instruction, and use skip if All ones (7777) to go thru the table from address '0011 thru address '0017..
I am just looking for ways to narrow down where there may be problems..

Also, is there a way to 'prove' that the 0410 AND I 10 is Not the problem ??

THANK YOU Marty
 
Last edited:

daver2

Veteran Member
Joined
Jun 19, 2012
Messages
8,074
Location
UK - Worcester
Marty,

The 'bugette' is in my test program. Sorry, I did spot this last night - but thought it would be beter to get the 'simple' test program working first and then move back to my original test program.

Corrected test program is as follows:

0000 7240 CLA CMA
0001 0410 AND I 10
0002 2007 ISZ 7
0003 5001 JMP 1
0004 7402 HLT
0005 5004 JMP 4
0006 7402 HLT
0007 7771 Number of times to iterate around the ISZ loop.
0010 0010 Pointer to the 'AND' mask to use for the AC minus 1 for pre-auto-inc.
0011 3776 Consecutive mask words for the AC...
0012 5775 "
0013 6773 "
0014 7367 "
0015 7557 "
0016 7637 "
0017 7777 "

I had forgotton that the autoinc adds 1 to the memory location before it is used as an address.

STOP CLEAR

Set PC=0000 and AC=1234 before the start.

Set SINGLE INSTRUCTION to 'on' and step throught the program with CONT.

The register (and memory) values should be as follows before/after each instruction.

PC=0001 AC=7777 [7]=7771 [10]=0010 (Before AND I 10 instruction).

PC=0002 AC=3776 [7]=7771 [10]=0011 (After AND I 10 instruction but before ISZ 7 instruction).
PC=0001 AC=3776 [7]=7772 [10]=0011 (After ISZ 7 instruction but before AND I 10 instruction).

PC=0002 AC=1774 [7]=7772 [10]=0012 (After AND I 10 instruction but before ISZ 7 instruction).
PC=0001 AC=1774 [7]=7773 [10]=0012 (After ISZ 7 instruction but before AND I 10 instruction).

PC=0002 AC=0770 [7]=7773 [10]=0013 (After AND I 10 instruction but before ISZ 7 instruction).
PC=0001 AC=0770 [7]=7774 [10]=0013 (After ISZ 7 instruction but before AND I 10 instruction).

PC=0002 AC=0360 [7]=7774 [10]=0014 (After AND I 10 instruction but before ISZ 7 instruction).
PC=0001 AC=0360 [7]=7775 [10]=0014 (After ISZ 7 instruction but before AND I 10 instruction).

PC=0002 AC=0140 [7]=7775 [10]=0015 (After AND I 10 instruction but before ISZ 7 instruction).
PC=0001 AC=0140 [7]=7776 [10]=0015 (After ISZ 7 instruction but before AND I 10 instruction).

PC=0002 AC=0000 [7]=7776 [10]=0016 (After AND I 10 instruction but before ISZ 7 instruction).
PC=0001 AC=0000 [7]=7777 [10]=0016 (After ISZ 7 instruction but before AND I 10 instruction).

PC=0002 AC=0000 [7]=7777 [10]=0017 (After AND I 10 instruction but before ISZ 7 instruction).
PC=0004 AC=0000 [7]=0000 [10]=0017 (After ISZ 7 instruction. The PC will have moved on to the HLT instruction at address 0004).

The PDP-8 should halt.

To re-run the program (e.g. at full speed) you will have to set memory locations 0007 back to 7771 and 0010 back to 0010 (these two memory locations are used by the ISZ and AND I instructions respectively and are updated as a result).

Hope this fixes all known problems (so far)...

Dave
 
Last edited:

daver2

Veteran Member
Joined
Jun 19, 2012
Messages
8,074
Location
UK - Worcester
Excellent news!!!

I just need to 'take stock' again of where we are and double check that we have covered most (if not all) of the addressing modes.

We just need to test out the Z bit (Zero Page bit) and I think that is it. Whether we can test this with 16 words of memory though...

If we have covered everything (operand wise), need to look at the DCA and IOT instructions next.

Dave
 

Marty

Veteran Member
Joined
Jul 26, 2009
Messages
3,141
Location
Boulder , Colorado USA
Hi All;

Dave, that is Great, that You think we have covered Most of everything..

"" Excellent news!!!

I just need to 'take stock' again of where we are and double check that we have covered most (if not all) of the addressing modes.

We just need to test out the Z bit (Zero Page bit) and I think that is it.
Good..
Whether we can test this with 16 words of memory though...
Hopefully, soon I can get more memory working..
If we have covered everything (operand wise), need to look at the DCA and IOT instructions next. ""
OK, by me..

I think this is by far the farthest we have had a working model, Working..

One of the Other things I need to look at is my Ext 16 pin socket, that besides the three Mem sockets, which is used for External memory..
So, on the EXT 16 pin socket, I need to find out IF I have enough pins for the Implementation of I/O, or if I need to go to like a 20 pin socket for more pins..
I see that I will have to move two Leds to make room for one more 16 pin Socket for I/O Data In and Data Out..
Then after doing that, there would be No more Room on the Main Board for anything else..

THANK YOU Marty
 
Last edited:

daver2

Veteran Member
Joined
Jun 19, 2012
Messages
8,074
Location
UK - Worcester
ION/IOF Testing.

A bit of 'light relief'...

STOP CLEAR

Check E14 pin 9 is '0' (schematic LD21 - Interrupt enable flip-flop).

Deposit the following program:

0000 6000 IOF - Make sure E14 pin 9 is still '0'.
0001 6000 IOF - Make sure E14 pin 9 is still '0'.
0002 6001 ION - Make sure E14 pin 9 becomes a '1'.
0003 6001 ION - Make sure E14 pin 9 is still a '1'.
0004 6000 IOF - Make sure E14 pin 9 becomes '0'.
0005 6001 ION - Make sure E14 pin 9 becomes a '1'.
0006 6000 IOF - Make sure E14 pin 9 becomes a '0'.
0007 6001 ION - Make sure E14 pin 9 becomes a '1'.

Set PC=0 and AC=1234.

Set SINGLE INSTRUCTION mode and CONT through the program one instruction at a time making sure E14 pin 9 follows the comments.

After executing the instruction at address 0007 - press CLEAR and make sure that E14 pin 9 becomes '0'.

This concludes this test.

I will now start to look at the individual addressing modes and instructions to see that we have covered all combinations of each. I have already identified a few addressing modes that we haven't tested - so this will be my next port of call.

Dave
 

Marty

Veteran Member
Joined
Jul 26, 2009
Messages
3,141
Location
Boulder , Colorado USA
Hi All;

Dave, Thank You for the Next Test..

We have a Problem, Nothing comes easy..

ION/IOF Testing.

A bit of 'light relief'...

STOP CLEAR

Check E14 pin 9 is '0' (schematic LD21 - Interrupt enable flip-flop).

Deposit the following program:

0000 6000 IOF - Make sure E14 pin 9 is still '0'.
YES..
0001 6000 IOF - Make sure E14 pin 9 is still '0'.
YES..
0002 6001 ION - Make sure E14 pin 9 becomes a '1'.
YES..
0003 6001 ION - Make sure E14 pin 9 is still a '1'.
No, it Jumps to 0005 on the PC.. The Led does briefly come on but turns off in a flash..
0004 6000 IOF - Make sure E14 pin 9 becomes '0'.
Skips over 0004
0005 6001 ION - Make sure E14 pin 9 becomes a '1'.
No, it Jumps to 0007 on the PC.. The Led does briefly come on but turns off in a flash..
0006 6000 IOF - Make sure E14 pin 9 becomes a '0'.
Skips over 0004
0007 6001 ION - Make sure E14 pin 9 becomes a '1'.
Yes, the Led stays on

Set PC=0 and AC=1234.
YES..

Set SINGLE INSTRUCTION mode and CONT through the program one instruction at a time making sure E14 pin 9 follows the comments.

After executing the instruction at address 0007 - press CLEAR and make sure that E14 pin 9 becomes '0'.
YES..

This concludes this test.

THANK YOU Marty
 
Top