I am attempting to build a 32-bit MIPS1 processor and going through the material I got a doubt regarding the program counter. Suppose we have a program that does random operations one after the other, in the instruction memory the operations are already specified and have we access them in a specific order (PC+4), wouldn't this cause a problem?
When the program is first started we jump to a specific location in the instruction memory, but still, the following operations are going to be predetermined since we can not write to the instruction memory unit. We will access it with PC+4 every cycle but how can we be sure that this is the operation which is needed by the program?
Thanks a lot.
question from:
https://stackoverflow.com/questions/65873911/how-do-we-match-a-program-to-an-instruction-flow-in-mips 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…