What is the difference using NOP and stalls in MIPS

I think you’ve got your terminology confused. A stall is injected into the pipeline by the processor to resolve data hazards (situations where the data required to process an instruction is not yet available. A NOP is just an instruction with no side-effect. Stalls Recall the 5 pipeline stage classic RISC pipeline: IF – Instruction … Read more

what does .space do in mips?

.space Len directive instructs the assembler to reserve Len bytes. As every word has 4 bytes, when Len is 20 you are instructing the assembler to reserve 5 words. For example if you have then other_data will be 20 bytes after array address. Due to architectural constraints in MIPS you may need to also instruct the assembler to align the … Read more