12-31-2015, 07:52 PM
(12-30-2015, 09:51 PM)slugdude Wrote: My current CPU is crap at everything but the ISA is really flexible... A nightmare to program though until you pass that point where you love its quirks and love it. In terms of this particular CPU I built then here are the ratings out of 10 I'd give it:
P: 0. It does not actually calculate anything without using its memory maps. If you include them I guess around 6. It adds, subtracts, NORs, XORs, and rightshifts, but currently no mult/div or anything else more advanced. No relative jumps either.
E: 10. The whole ISA is very memory-map based so literally anything can be connected to it.
E: 0. It doesn't have any instruction to output or input but a register is mapped to a binary output so if you include that idk 2? It currently has no inputs but with the whole memory mapping thing it could be easily done - if you allow me to play the memory map card again you could say 10 .
C: 1. The current ISA supports a mere 16 lines of code which is pathetic. Nothing other than the PROM can be executed. The thing is, this CPU was a test of this ISA so I didn't want it to be a complex project.
U: Err, it works... Idk this is more a random number but 7?
U: 2. To someone new to it's ISA it's a bitch. Instead or having an add operation you copy the first value to reg 11, copy the second to reg 12, then read the value for the result of the 2 added. Similar mechanism for all logical/arithmetic operations.
In terms of it's specs:
9 tick clock, not pipelined. (In theory it should work with 8 but idk why the branching fucks up when I do that and I'm way too lazy to fix it). However in this time it can only either input an immediate value or copy a value from one register to another (or memory maps). Branching takes 3 cycles.
7 GPRs. Reg 0 is a ZR, regs 9 and 10 are for XOR and NOR atm, regs 11 and 12 for adding, 13 for rightshifting (once) and 14/15 for subtracting. Reg 1 is mapped to a binary display output but if you don't need to see anything until the program is over you can use it as a gpr until then.
The most optimised fib program I could make gave me one value every 5 cycles so 45 ticks. Although that includes three blank lines to sync it up... If you remove that you will have one value, 2 cycles later get the next, then 5 cycles later the next then 2 cycles... and so on.
PROM is 16 lines, each total 10 bits in length
It is an 8 bit CPU - although the adder and subtractor ignore the msb so that the cout can be stored in the msb of the result meaning the adder and subtractor are only 7 bit.
The CPU doesn't have a name. You can find it (I think) at '/warp slugcpu2' and the ISA it is based on is at '/warp SMI'.
Well If I guessed the other details right about your CPU then you have a PECU rating of 16 according to my calculator.