Thursday, March 28, 2013

ASAP-2 Almost Simple As Possible Computer - Version 2



Here is version 2 of my ASAP-2 Almost Simple As Possible Computer.  A few changes have been made to the circuit.


The conditional jumps will have either 6 or 9 T-states depending on whether the condition is true.  During a jump operation the selector will choose among the flags depending on the opcode (Jump if Positive microcode shown).  If the condition is false and jump is enabled, the output of U9 will be high and the sequence will simply increment the program counter to the next opcode.  If the condition is true and jump is enabled then U9 will go low.  The controller sequencer will then load the value 8 (D3 = 1, D2,D1,D0 = 0) on the positive going clock edge and the micro-instruction pointer will now be at the 9th instruction; this will carry out loading the program counter with the new value.


The I/O Ports are addressable by an 8-bit number, so up to 256 of either inputs or outputs can be supported by the I/O opcodes.  In this case minimal decoding is used and only 2 inputs and 2 outputs are placed.  During an operation the port selector buffer is loaded with the chosen I/O number.  This is decoded to pass along the enable signal to the correct port.  When active, either a low buffer enable or a positive going clock will be passed to the selected port.  The inputs are simply an 8-line 3-state buffer.  The outputs are 8-bit D-Type registers.


Dealing with the Carry Flag becomes quite complicated since a number of different opcodes affect the Carry Flag.  When rotating or shifting the accumulator, the previous MSB/LSB becomes the Carry Flag; but depending on the operation, the old Carry Flag may or may not be shifted in as the new MSB/LSB.  Some ALU operations use the current value of the Carry Flag, others need either a 1 or a 0 to get the correct result.  The two data selectors route the Carry Flag and the MSB/LSB of the accumulator to support Rotate Left/Right, Rotate-Through Carry Left/Right and Arithmetic Shift Left/Right.
















































































 

Link to a RAR file of the schematics, ROM files and microcode.

Saturday, March 16, 2013