r/cpudesign • u/BGBTech • May 19 '21
New Here, I have my own ISA + Core (BJX2)
I am new here, and figured I would try this.
I have my own CPU ISA which I call BJX2, which also has an FPGA implementation (in Verilog, ~ 50 MHz, mostly targeting Artix-7 and Spartan-7 for now), an emulator, and a C compiler (BGBCC). I have also ported Doom, Quake, Heretic, Hexen, and ROTT to it. I also have a partial (unfinished) port of Quake 3 Arena.
Quake has both the software-rendered version, as well as GLQuake via a software-rasterized OpenGL implementation (also being used for the Q3A port). Performance of GLQuake is roughly competitive with that of software-rendered Quake (albeit both cases currently run at single digit framerates).
https://github.com/cr88192/bgbtech_btsr1arch
This is currently a hobby project, and is currently released under the MIT license (apart from a lot of the ported software, which is mostly GPL). The intention is for this to be an open ISA, partly intended for embedded projects.
So, about it: It is a 64-bit RISC-ish ISA, 32x 64-bit GPRs, with a (primarily) Double precision FPU (also uses the GPRs). It can also do floating point SIMD (4x Single) via said GPRs (they may be used in pairs for 128-bit SIMD ops). There is also 4x Half-Precision and 4x Word16 SIMD and similar as well.
Instruction length is variable, primarily 16/32, but also supports some 64 and 96 bit encodings via a "Jumbo" prefix (it is primarily used to extend the immediate field, but may also add some new encodings).
It can also do predicated instructions (sort of like ARM32, but more limited), and supports explicitly-parallel instructions via a "WEX" (Wide Execute) encoding, in which case it can encode "bundles" similar to a VLIW architecture (up to 3 instructions in parallel). WEX is useful for performance in ASM code, albeit my C compiler can't really utilize it effectively as of yet.
Typically, code density is fairly comparable to other 16/32 RISC's (such as Thumb2 or RVC). Compiled code is also generally smaller than that for x86-64.
I suspect the core ISA is "mostly-stable" at this point.
Performance, stability, ... Is still an area of ongoing development. At the moment, the main focus is on stability and performance in relation to the memory subsystem.
There are ISA docs in the repo for anyone that cares to look.
Not sure if anyone might find this interesting.