In the CPUsim wombat1 machine I noticed a microinstruction Inc2-pc under the increment option. However in the 12 basic (Store,Load,Add,Subtract,Jump etc) machine instructions I cannot seem to find it being used. What is its purpose and also why is its Delta set to 2 and not just 1?
Asked
Active
Viewed 441 times
0
-
It's used for instruction fetch - every time you fetch an instruction the PC needs to be incremented by 2. – Paul R Apr 20 '15 at 22:45
-
then are increment microinstructions only used for fetch seuqences? – user2710184 Apr 20 '15 at 22:48
-
In this specific case, yes, it's only used during instruction fetch. – Paul R Apr 20 '15 at 22:49
-
say I wanted to implement a stack with push and pop instructions, I would have to use this microinstruction right? – user2710184 Apr 20 '15 at 23:04
-
No - it only operates on the PC. – Paul R Apr 20 '15 at 23:05
-
couldnt create a new microinstruction to operate on my stack pointer register which will have to be created also, and then add a new hardware module for the stack. Yes? – user2710184 Apr 20 '15 at 23:11
-
Sure - you can create any (micro)instructions you like, but we're now well beyond the scope of your original question. – Paul R Apr 20 '15 at 23:13