Let us assume that processor testing is done by filling the PC,registers, and data and instruction memories with some values(you can choose which values), letting a single instruction execute, then reading the PC, memories, and registers. These values are then examined to determine if a particular fault is present. Can you design a test (values for PC, memories, and registers) that would determine if there is a stuck-at-0 fault on this signal?

Respuesta :

Answer:

See explaination for the details.

Explanation:

PC can be any valid value that is divisible by 4. In that case, lets pick 20000.

We can pick any instruction dat writes to a register. Lets pick addi.

The destination register number must be odd so that it has good value of 1. The opposite of the stock-add-value we want to test for. Lets go ahead and pick register 9.

Make register 9 have a value of 20 and register 9 jas a value of 25 prior to the add instruction.

addi. $9, zero, 22

When the value read from register 8 after the add instruction is 22, we know that we have found the fault.