I've been working for a couple weeks now on my very own CPU architecture. Earlier in the spring I got my hands on a Upduino FPGA which will be what holds the irl implementation eventually. I have only a vague idea of what I'm doing so many choices may be questionable but I'm cute so its ok :3 .
Leftie-8 is an 8-bit but really beefy CPU. I took heavy inspiration from architectures I am already familiar with, that being ARM and 6502. The idea was to keep things grounded in 80s "flavor" as if it were put out into a hyper-niche home computer. Assembly with probably be the primary mode of programming (might try making FORTH at some point) and memory is simple and flat with no OS assisting hardware. Many design features are of course far too complex for the times manufacturing ability but I decided to ignore that and just use verilog and my FPGA with all its modern power.
Leftie-8 has 16 general purpose registers (GPRs) arranged in 2 banks of 8. The banks can be toggled between using a control flag and only 8 are accessible at a time. The first register in the file is labled the accumulator A and the rest are numbered from there (R0-R6). In many cases A is just another register but it has special priority to keep down instruction complexity at least a bit. One very important use is that A is always the left-hand-side value in instructions hence the name. The other argument and the destination of the instruction is variable adding a lot of flexibility. For example, ADD R2, R1 is equivalent to A + R1 -> R2. R0 and R1 serve extra roles as what I've called "address offsets" similar to the 6502's X and Y registers.
In addition to the GPRs there is an 8b status register holding fairly standard flags (zero, carry, overflow, negative) as well as various control values (flag enable, interrupt enable, bank select). Modifying this register both allows to manually set flags and control CPU operations. A 16b stack pointer (SP)references a standard stack structure for pushing data and return addresses.Lastly there are 4 quick call registers (C0-C3) that hold 16b absolute addresses of subroutines for easy access. This allows them to be used without limitation of relative offsets (like branch instructions) and without needed constant 2 byte immediates in the code.
Leftie-8 has (probably too many) 31 instructions. A full list & writeup of them will come in a later post but theres a mix of usual suspects and my own weird choices. They are generally sorted into 3 families
To finish things off heres a brief rundown of wackier features of Leftie-8:
I've gotten a good bit more done than just this, but will be catching up to myself over time. I hope to catalog lots of my work here in the blog section then put a finished writeup in projects. Be back soon hopefully!!! o/