I am learning about micro programming and am confused as to what a micro-instruction actually is. I am using the MIPS architecture. My questions are as follows
Say for example I have the ADD instruction, what would the micro-instructions look like for this? How many micro-instructions are there for the add instruction. Is there somewhere online I can see the list of micro-instructions for the basic instructions of MIPS?
How can I figure out the bit string for an ADD microprogrammed instruction?
This is an example of how to load the
EPCinto one of the registers and add 4-bytes to it:There are "a lot" of instructions that you can use, you can see the MIPS Instruction Set here. In my humble opinion, MIPS is Really neat and easy to learn! A fun fact is that the first Playstation used a MIPS CPU.
Example instructions
lw= load wordla= load addresssw= save wordaddi= add immidateThen you have a lot of conditional instructions such as:
bne= branch not equalbnez= branch not equal zeroAnd with these you use
jto jump to an adress.Here is an example from an Exception Handler that I wrote once for MIPS, this is the External Source handler:
In the above example I define an entry point called
Externalthat I can jump to, as I do withDisMissto loop, you generally jump to yourself.There are some other instructions used here aswell:
mfc0= move from co-processor 0To handle labels, I would suggest you check this question/answer out.
Here's a couple of resources on MicroProgramming with MIPS: