Close

Possible Instruction Set

A project log for Base 3 -Ternary Computer from scratch.

Yes - No - Maybe? The goal is to completely step away from the normal binary system and investigate alternative computing systems.

thundersqueakThunderSqueak 10/14/2014 at 22:049 Comments

While waiting for components to arrive, I have been doing some late night musing as to what functions I wish to implement into the CPU.

This is the list so far of opcodes, 0 through 13 (000 to +++), that I have been considering.

I want to attempt to keep the list down to 14 instructions, and am open to suggestions as to what should be removed from this list and have something more useful added in its place. LD and ST may be simplified to a MOV command freeing up one of the "slots".

This gives me a bit of a goal while doing the design, making the idea that much more concrete.

Another decision that has to be made is how many trits wide I want to make the system bus. The current thought is to make it 6, this is mostly due to cost of components on a hobby project :) The first 3 will be used for the opcode, the second set of 3 will be for the address that will be used.

Now to get back to calculus homework ^^;;

~ThunderSqueak

Discussions

Zorbeltuss wrote 02/21/2016 at 19:13 point

A single shift instruction would probably be useful, in trinary I doubt one for left and one for right would make much sense.

  Are you sure? yes | no

freefuel wrote 02/16/2016 at 04:59 point

seems wasteful to implement an instruction that does nothing, could you perhaps use another instruction more then once to fill unneeded cycles?  or halt the clock.

  Are you sure? yes | no

Daevh wrote 02/21/2016 at 02:00 point

No-Operation instructions are a common feature in most (if not all) instruction set architectures. They're quite useful for precise timing of delays, amongst many other things.
Halting the clock seems like a good idea, but processors are generally synchronous devices that change state on clock signal edges; if the clock is halted by the processor, how could it execute any method of re-starting it?

  Are you sure? yes | no

freefuel wrote 02/21/2016 at 02:04 point

I understood the goal here was to keep the instruction count to a minimum, to keep the ALU design manageable. 

  Are you sure? yes | no

freefuel wrote 02/21/2016 at 02:04 point

I understood the goal here was to keep the instruction count to a minimum, to keep the ALU design manageable. 

  Are you sure? yes | no

Daevh wrote 02/23/2016 at 20:15 point

@freefuel Sure, but a NOP instruction doesn't actually do anything, so the ALU doesn't need to have anything included in its design for supporting NOPs. A typical approach to executing instructions is to selectively enable different parts of the ALU with control signals from the instruction decoder (ie, when executing an ADD instruction, the adder unit in the ALU would be enabled, and the rest of the ALU's components would be disabled). A NOP instruction would simply not enable any of the ALU features.   

  Are you sure? yes | no

ThunderSqueak wrote 10/19/2014 at 03:56 point
I was asking for suggestions from people :) it also isnt really about the memory, I was just looking for a set to concentrate on in the beginning. I am designing all this from scratch ^^;; I had actually considered all those types of functions before trimming iit down to 14 to concentrate on in the beginning. I expect after I get the first ones added, I will work on ways for doing the others in hardware :)

  Are you sure? yes | no

daniele.pensiero wrote 10/19/2014 at 07:55 point
you got some nerves... :)
keep us updated!

  Are you sure? yes | no

daniele.pensiero wrote 10/18/2014 at 14:14 point
Hi! Very cool project. I've something to argue about this instruction set if i can.
Let's use the term bit even if it is not a bit 'cause we have 3 possible value.
Since you have choosen to use 3 bit you have 3^3=27 possible operations that you can represent. So it is pointless use only 14 operations; you can add 13 operations without spending more memory , for free. I think left shift and right shift are mandatory operations such as push and pop operations for managing the stack. An operation like "jump and set program counter" is also very appreciated when calling a sub routine. Since you still have 8 unused rappresentation you could add a multiply , divide and % (remainder of division) that are very useful too. Let me know what you think about. Cheers.

  Are you sure? yes | no