BFCPU ehh, what makes it so special?
Well its got 2 Cores!
RISC - 16 ISA (https://docs.google.com/spreadsheets/d/1...sp=sharing - This is my personal copy so it may be worded stupidly)
Pipelined
There 32 bytes of shared memory for the cpu to use and have fun with.
8 bit ALU
7 local registers
6 bit prom(there is an 8 bit bus available).
Flag queue - 7 deep(maybe 8 IIRC)
Data stack - 8 deep
7 U/I ports
7 pointer addresses
11 tick Data loop
The clock will be under 20 ticks
The first prototype
Full thing updated at 3/2/15
imgur album : http://imgur.com/a/kAKYH
Shout-outs to Embizone, and newomaster.
The Alu is embi's 4 tick CLE
The Regs are newos
(still not finished)
More information on the instruction set?
Oh my bad, here it is, also i put it in the main post.
https://docs.google.com/spreadsheets/d/1EGOTh42Q9Hb3XkBVUtqOuXe0zrMGtylPRJyfohCXvVk/edit?usp=sharing
This is my personal copy so it may be worded stupidly
I would have liked to see some extensible programming possibilities... such as a call/return or at the very least something that replicates it.
Something that would act as an arbiter for the shared cache if you do add extensible programming.
Sup GG!
I think this project is fantastic. The server really needs more epic projects, rather than the small quicky CPUs right now. In fact, I suggest making it bigger.
Is that 32 registers (quite a lot) or 32 bytes of RAM? The IS link is broken. @Voltz jump and return commands can effectively be functions.
Best of luck!
I have pointer stuffs. Like 7 pointer regs so I have a few ways of getting around with jumping. I have 7 registers attached to each ALU plus the shared 32 Bytes of memory.
The shared memory is like a shared ram basically. xD
Some interesting stuff on that spreadsheet great.
Lol, in a good or bad way?
Not sure there's seems to be some assignment there..
Yes, lacks detail on cloning 3/10, otherwise looks awesome.
Quote:@Voltz jump and return commands can effectively be functions.
That is exactly the point.... Extensible programming.
What the hell is U/I. if it is user input im disgusted.
That awkward moment when you dont have a stack pointer
Still reading. but I see u have 1 in boxes that should be 001... in excel and open office You can use an apostrophe like this;
'001
and it will disable auto format that drops the 0's, as well as will make the apostrophe unseen.
Also, call return are so much easier to just add as an argument in an IS the a function. Speeds it up like 4 fold atleast
What do you mean? Im still fairly un-familiar with call and return. Arent they just for running subroutines? Why not just have a branch to the sub routine?
(03-11-2015, 07:41 PM)greatgamer34 Wrote: [ -> ]...call and return. Arent they just for running subroutines? Why not just have a branch to the sub routine?
You're right they "just" run subroutines.... but it saves the programmer work, and saves memory (program space). "Call" is like "branch", but it automagically stores a return address, which means the end of the subroutine is simply a "return" instead of a "jump to <address>".
Sure, I could (among other possibilities)
Code:
PUSH <PC + 4>
JMP <subroutine>
and my subroutine could finish with
Code:
PULL reg0
JMP <reg0>
But you're looking at probably 4-bytes of instruction per call, and another 4-bytes for return. (That's assuming you've got PUSH and PULL instructions). Instead with call and return, you're looking at probably 2-bytes per CALL and 1-byte to return.
It might not sound like much, but how much program memory does the average Redstone computer have?
And then there's the debugging cost: with automagic CALL and RETURN, there's no way for me to screw up and push the wrong return address, or forget to push anything at all.
RISC-16 (that's the ISA ur using right? Link is broken) can emulate calls quite adequately with the JALR (jump and link register) instruction. Just jump to an address and save the PC to memory / software stack. Just an extra instruction, unless of course you're implementing software stack then maybe an extra 2.
Well I have 7 registers dedicated for saving pointers to do such a thing.

You're right: it can be done. But with IS-level-support for subroutines, the correct pointer is automatically stored and retrieved. Shorter programs, less bugs. (or, to look at it another way... more work for the hardware engineer, less for the software developer)
Oh I see. So the system I have now will suffice, but for the future, Ill keep this in mind!

How many bytes of memory does it have in total?
7 bytes of GPR
7 bytes of SPR(for pointers)
8 bytes of stack
Each "core" has that ^
Then it has a shared 32 byte memory.
Question. y SO MANY pointers?
I have 14 registers as well, and some are SPR, but they are only SPR in the program model, so they can tech. Be used as GPR. (Can use any register as a pointer)
most of my SPRs, are on my PCs (2 on each of the 2 PCs) and some on my Timer (2+1 with the +1 being the current time value). I have some other Special purpose memory, but that is RAM mapped.
Update on the project 21-3-15
More than half of the instructions are bug tested.