After more notepad scratching last night, I decided to make the Vulcan-74 CPU with a 32 Bit wide Program Counter instead of 24 Bits.
My goal has always been performance over chip count or cost, and this seems to offer a good advantage.
Although the propagation through 5 74HC163 counters will be longer than 4, the parallel advantage is higher.
Avoiding a PIC style WREG or 6502 style Accumulator will greatly increase speed and code density.
As I laid out pathways between the 64K Register Memory and Math Memory, this became evident.
For instance, with a 24 Bit Wide Program Memory, this is the sequence to add 13 to a Register...
Code:
LRM 126,64
; This moves a value from Register Memory Location 32320 to the Working Register
ADD 13
; This pushes the value of 13 and the output of the Working Reg into the Math Memory and then to the Math Register pair.
MML 126,64
; This moves the low byte result from the Math Memory back to the original Register Memory location. MMH is also available.
With a 32 Bit Program memory fetching 4 bytes at a time, the hardware becomes simpler and faster...
Code:
ADD 126,64,13
; This directly moves Register memory location 32320 to the Math Memory, adds 13, and then stores the Math Register pair.
MML 126,64
; This moves the low byte result from the Math Memory Registers back to the original Register Memory location.
Doing a compare is also faster, and not dependent on a PIC style Working Register or 6502 style Accumulator...
Code:
CPR 123,33,66
; This directly compares Register Memory location 31521 with the value of 66, and stores the result in the Compare Register.
So besides the extra propagation of one more 163 counter, the advantage of 32 Bit wide Program Memory over 24 Bit is clear.
This also puts my Program memory back up to either 512K or 1024K rather than only 64K.
It did seem a bit lacking to have 65536 General Working Registers (RegMem), and only 64K of Code Space!
Jumps can access up to 16MB of code space, so any jump is also a single cycle...
Code:
JMP 12,67,123
; This sets the program counter directly to Program Memory location 803,707 out of 1,048,575
So here are the proposed specifications that I intend to turn into hardware next month...
[Vulcan-74 Pule Logic CPU]Program Memory : 1024K with 32 Bit Output (INS,OP1,OP2,OP3)
Register Memory : 64K with 8 Bit Output (65536 General Working Registers)
Math Memory : 1024K with 16 Bit Output (Add, Sub, Mul, Div, Sin, Rnd, etc)
Cartridge Memory : External 8-64MB Serial Flash with "KickStart" Boot Code.
The "KickStart" code will fill the Program and Math Memories on Bootup and then give the CPU control.
From there, the CPU can access the Flash to fill Graphics and Sound Memories as required.
For development purposes, I am going to use only 15ns 32K SRAMs until I have the timing working perfectly.
At that point, I will rewire the entire CPU board using the 10ns 512K SRAMs and crank up the clock until failure.
If the CPU starts to self implode at say 13Mhz, then I will drop it back down to 8Mhz to be safe.
I did this with the 32MHz Playfeild Generator, which ran up to 40MHz, glitching at 42MHz.
It will be difficult to compare this CPU with a 6502 as it is completely dedicated and designed for the Vulcan Hardware.
Whereas the 6502 might run at 16Mhz, it would need say 20 cycles to tell the Sprite Generator to move Mario 2 pixels.
The Vulcan CPU on the other hand will do the same thing in 1 cycle, and run an auto compare on the last XY position.
To test performance, I actually have my own test that I use on every Video System I make called the "Got Balls Test".
How many 16x16 Sprites (with Alpha Pixels) can a system move at 60 frames per second? That is the magic number.
When I had the AVR talking to V74, I was getting 160. With the 6502 running the same test, it managed to pull 80+ Balls.
I fully expect the Vulcan-74 CPU to push 256 Sprites with no issues since it's brain will be hardwired to the main board.
Ok, let the Journey begin!
No doubt, there will be moments of frustration, confusion, and then jubilation.
Hope I don't need a bigger board!
Later!
Radical Brad