Control Unit decoder

Thread Starter

Samantha Groves

Joined Nov 25, 2023
152
I am trying to design a control unit for a microprocessor im designing.The instruction of my processor will be 16 bit wide , 5 bit Opcode and 11 bit operand.

I have decided to use the following list of instructions:

NoOP->00000 + Operand Load->10000+Operand
Move->00001 + Operand Store->10001+Operand
Add->00010 + Operand
Sub->00011+Operand Jump Equal->10010+Operand
Mul ->00100+Operand Jump More->10100+Operand
Div->00101+Operand Jump Less->11000+Operand
Not->01000+Operand
And->01001+Operand
Or->01010+Operand

My accumulator has 3 flags:Overflow,Negative and Zero.

During decoding of the instruction if the 1st bit is 0 then it returns unaffected to the address bus.If the 1st bit of the opcode is 1 if we have the instruction Jump Equal(10010) and the zero flag is 1 then it is decoded into the instruction Load(10000) else it is decoded into NoOP.If we have the instruction Jump More(10100) and both the Zero and the Negative flag are 0 , it is decoded into the instruction Load else it is decoded into NoOP,and if we have the instruction Jump Less and the negative flag is 1 then it is decoded into 10000 else it is decoded into NoOP.How to achieve this?Thanks
 
Top