When silicon chips are fabricated, defects in materials (e.g., silicon) and manu
ID: 3542002 • Letter: W
Question
When silicon chips are fabricated, defects in materials (e.g., silicon) and manufacturing errors can result in defective circuits. A very common defect is for one wire to affect the signal in another. This is called a cross-talk fault. A special class of cross-talk faults is when a signal is connected to a wire that has a constant logical value (e.g., a power supply wire). In this case, we have a stuck-at-0 or a stuck-at-1 fault, and the affected signal always has a logical value of 0 or 1, respectively.
Let us assume that processor testing is done by filling the PC, registers, data memory, and instruction memory with some values (determined by you), 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 fault on the following signals?
1. Instruction Memory, output instruction, bit 5, stuck-at-1 (Hint: ADDI instruction)
2. Control unit, output ALUSrc, stuck-at-1
Explanation / Answer
The semantics are a little more complicated, so we'll write it below.
In most CPUs (and even in C programming), you have to add similar kinds of quantities. Thus, adding a 32 bit quantity to a 16 bit quantity usually makes no sense.
Usually, the "smaller" quantity is promoted in size to the larger quantity. Thus, the 16 bit immediate value is made into a 32 bit immediate value.
How should this be done? Since the addition is on signed 2C, the best way to increase the immediate value from 16 bits to 32 bits is by sign-extension. That is, you repeat the sign bit (which is IR15 16 times, and make that the upper two bytes of a 32 bit number. The low 16 bits come from the low 16 bits of the instruction.
Sign-extension preserve the value of the bit representation. For example, if the bitstring had a value of -2 in 2C using 16 bits, then sign extending it creates a 32-bit 2C value that's also -2.
Here is a specific example of addi
The dashes are 5-bit encoding of the register number in UB. For example, $r7 is encoded as 00111. The rightmost dash is a 16-bit immediate value written in 2C.
Instruction B31-26 B25-21 B20-16 B15-0 opcode register s register t immediate addi $rt, $rs, <immed> 001 000 - - -Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.