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
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
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
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
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
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
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 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
Are you sure? yes | no
keep us updated!
Are you sure? yes | no
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