Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

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 stuckat-1 fault, and the affected signal always has a logical value of 0 or 1, respectively. The following problems refer to bit 0 of the Write Register input on the register fi le in Figure 4.24. 4.6.1 [10] 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? 4.6.2 [10] Repeat 4.6.1 for a stuck-at-1 fault. Can you use a single test for both stuck-at-0 and stuck-at-1? If yes, explain how; if no, explain why not. 4.6.3 [60] If we know that the processor has a stuck-at-1 fault on this signal, is the processor still usable? To be usable, we must be able to convert any program that executes on a normal MIPS processor into a program that works on this processor. You can assume that there is enough free instruction memory and data memory to let you make the program longer and store additional data. Hint: the processor is usable if every instruction “broken” by this fault can be replaced with a sequence of “working” instructions that achieve the same effect. 4.6.4 [10] Repeat 4.6.1, but now the fault to test for is whether the “MemRead” control signal becomes 0 if RegDst control signal is 0, no fault otherwise. 4.6.5 [10] Repeat 4.6.4, but now the fault to test for is whether the “Jump” control signal becomes 0 if RegDst control signal is 0, no fault otherwise.

Short Answer

Expert verified

4.6.1

It is needed to execute the MIPS instruction “ADDI $1, zero, 128”, which can be placed the value of 128 into “$1”.

The value “128” has all of the bits at zero, but bit 7 has not at zero.

So, if bit 7 of the instruction is stuck at zero then the $1 will become zero.

4.6.2

It can’t be possible to do the test “stuck-at-zero” and “stuck-at-one” at the same signal by using only one instruction.

4.6.3

It is needed to find all of the instructions that have the value of “0” in the offset or immediate bit operand and that is to get the replacement of the instruction sequence “safe”.

4.6.4

If the “MemRead” is stuck at zero, then the data memory is read for each instruction. And for the non-load instructions, the Mux discards the memory- value that can select the value to be written in the unit of register.

4.6.5

If the “jump” is stuck-at-one, the PC is updated by each instruction as if this were in the “jump” instruction.

To do the test for this kind of fault, an ADDI can be executed with an immediate operand of non-zero.

If the “jump” is stuck-at-one, after the execution of “ADDI” the PC will not point to the following instructions of the “ADDI”.

Step by step solution

01

Define the concept.

4.6.1

To test for a stuck-at-0 fault on this signal,

It is needed to put an instruction so the signal to the value of “1” and can produce another result if the value on the signal is a stuck-at-0 fault

In bit number 7 of the instruction, the word is used for representing the immediate/offset.

Hence, it is needed to execute the MIPS instruction “ADDI $1, zero, 128”, which can be placed the value of 128 into “$1”.

The value “128” has all of the bits at zero, but bit 7 has not at zero.

So, if bit 7 of the instruction is stuck at zero then the $1 will become zero.

4.6.2

To do the “stuck-at-zero” test set the required instructions signal to “1” and to do the “stuck-at-one” test set the required instructions signal to “0”.

As the signal can be either 0 or 1 at the same cycle,

It can’t be possible to do the test “stuck-at-zero” and “stuck-at-one” at the same signal by using only one instruction.

To do the test “stuck-at-one” is analogous to the test “stuck-at-zero”

It can be used the instruction “ADDI $1, zero, 0” that can able to put the value of “0” in the “$1”.

So, if bit 7 of the instruction is stuck at one then, the immediate operand will become “128” and “$1” turns into 128, but the 0 will not turn into.

4.6.3

This is quite complex to work around with this kind of fault.

First of all, it is needed to find all of the instructions that have the value of “0” in the offset or immediate bit operand and that is to get the replacement of the instruction sequence “safe”.

4.6.4

If the “MemRead” is stuck at zero, then the data memory is read for each instruction. And for the non-load instructions, the Mux discards the memory- value that can select the value to be written in the unit of register.

As the outcome, the desired design can’t be possible for this kind of test due to this specified fault. The reason for this is that still the processor operates properly.

4.6.5

If the “jump” is stuck-at-one, the PC is updated by each instruction as if this were in the “jump” instruction.

To do the test for this kind of fault, an ADDI can be executed with an immediate operand of non-zero.

If the “jump” is stuck-at-one, after the execution of “ADDI” the PC will not point to the following instructions of the “ADDI”.

02

Determine the calculation.

4.6.1

Let’s consider that the testing of the processor is done by padding with the values of the PC, the register, the data, and the instruction.

To test for a stuck-at-0 fault on this signal,

It is needed to put an instruction so the signal to the value of “1” and can produce another result if the value on the signal is a stuck-at-0 fault

In bit number 7 of the instruction, the word is used for representing the immediate/offset.

Hence, it is needed to execute the MIPS instruction “ADDI $1, zero, 128”, which can be placed the value of 128 into “$1”.

The value “128” has all of the bits at zero, but bit 7 has not at zero.

So, if bit 7 of the instruction is stuck at zero then the $1 will become zero.

4.6.2

To do the “stuck-at-zero” test set the required instructions signal to “1” and to do the “stuck-at-one” test set the required instructions signal to “0”.

As the signal can be either 0 or 1 at the same cycle,

It can’t be possible to do the test “stuck-at-zero” and “stuck-at-one” at the same signal by using only one instruction.

To do the test “stuck-at-one” is analogous to the test “stuck-at-zero”

It can be used the instruction “ADDI $1, zero, 0” that can able to put the value of “0” in the “$1”.

So, if bit 7 of the instruction is stuck at one then, the immediate operand will become “128” and “$1” turns into 128, but the 0 will not turn into.

4.6.3

This is quite complex to work around with this kind of fault.

First of all, it is needed to find all of the instructions that have the value of “0” in the offset or immediate bit operand and that is to get the replacement of the instruction sequence “safe”.

4.6.4

If the “MemRead” is stuck at zero, then the data memory is read for each instruction. And for the non-load instructions, the Mux discards the memory- value that can select the value to be written in the unit of register.

As the outcome, the desired design can’t be possible for this kind of test due to this specified fault. The reason for this is that still the processor operates properly.

4.6.5

If the “jump” is stuck-at-one, the PC is updated by each instruction as if this were in the “jump” instruction.

To do the test for this kind of fault, an ADDI can be executed with an immediate operand of non-zero.

If the “jump” is stuck-at-one, after the execution of “ADDI” the PC will not point to the following instructions of the “ADDI”.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

This exercise examines the accuracy of various branch predictors for the following repeating pattern (e.g., in a loop) of branch outcomes: T, NT, T, T, NT

4.16.1 [5] What is the accuracy of always-taken and always-not-taken predictors for this sequence of branch outcomes?

4.16.2 [5] What is the accuracy of the two-bit predictor for the first4 branches in this pattern, assuming that the predictor starts off in the bottom left state from Figure 4.63 (predict not taken)?

4.16.3 [10] What is the accuracy of the two-bit predictor if this pattern is repeated forever?

4.16.4 [30] Design a predictor that would achieve a perfect accuracy if this pattern is repeated forever. You predictor should be a sequential circuit with one output that provides a prediction (1 for taken, 0 for not taken) and no inputs other than the clock and the control signal that indicates that the instruction is a conditional branch.

4.16.5 [10] What is the accuracy of your predictor from 4.16.4 if it is given a repeating pattern that is the exact opposite of this one?

4.16.6 [20] Repeat 4.16.4, but now your predictor should be able to eventually (after a warm-up period during which it can make wrong predictions) start perfectly predicting both this pattern and its opposite. Your predictor should have an input that tells it what the real outcome was. Hint: this input lets your predictor determine which of the two repeating patterns it is given.

Question: For the problems in this exercise, assume that there are no pipeline stalls and that the breakdown of executed instructions is as follows: add addi not beq lw sw 20% 20% 0% 25% 25% 10% 4.5.1 [10] In what fraction of all cycles is the data memory used? 4.5.2 [10] In what fraction of all cycles is the input of the sign-extend circuit needed? What is this circuit doing in cycles in which its input is not needed.

The importance of having a good branch predictor depends on how often conditional branches are executed. Together with branch predictor accuracy, this will determine how much time is spent stalling due to mispredicted branches. In this exercise, assume that the breakdown of dynamic instructions into various instruction categories is as follows:

R-Type

BEQ

JMP

LW

SW

40%

25%

5%

25%

5%

Also, assume the following branch predictor accuracies:

Always-Taken

Always-Not-Taken

2-Bit

45%

55%

85%

4.15.1 [10] Stall cycles due to mispredicted branches increase the CPI. What is the extra CPI due to mispredicted branches with the always-taken predictor? Assume that branch outcomes are determined in the EX stage, that there are no data hazards, and that no delay slots are used.

4.15.2 [10] Repeat 4.15.1 for the “always-not-taken” predictor.

4.15.3 [10] Repeat 4.15.1 for for the 2-bit predictor.

4.15.4 [10] With the 2-bit predictor, what speedup would be achieved if we could convert half of the branch instructions in a way that replaces a branch instruction with an ALU instruction? Assume that correctly and incorrectly predicted instructions have the same chance of being replaced. 4.17 Exercises 367 4.15.5 [10] With the 2-bit predictor, what speedup would be achieved if we could convert half of the branch instructions in a way that replaced each branch instruction with two ALU instructions? Assume that correctly and incorrectly predicted instructions have the same chance of being replaced.

4.15.6 [10] Some branch instructions are much more predictable than others. If we know that 80% of all executed branch instructions are easy-to-predict loop-back branches that are always predicted correctly, what is the accuracy of the 2-bit predictor on the remaining 20% of the branch instructions?

In this exercise, we examine how pipelining affects the clock cycle time of the processor. Problems in this exercise assume that individual stages of the datapath have the following latencies:

IF

ID

EX

MEM

WB

250ps

350ps

150ps

300ps

200ps

Also, assume that instructions executed by the processor are broken down as follows:

alu

beq

lw

sw

45%

20%

20%

15%

4.8.1 [5] What is the clock cycle time in a pipelined and non-pipelined processor?

4.8.2 [10] What is the total latency of an LW instruction in a pipelined and non-pipelined processor?

4.8.3 [10] If we can split one stage of the pipelined datapath into two new stages, each with half the latency of the original stage, which stage would you split and what is the new clock cycle time of the processor? 4.8.4 [10] Assuming there are no stalls or hazards, what is the utilization of the data memory?

4.8.5 [10] Assuming there are no stalls or hazards, what is the utilization of the write-register port of the “Registers” unit? 4.8.6 [30] Instead of a single-cycle organization, we can use a multi-cycle organization where each instruction takes multiple cycles but one instruction finishes before another is fetched. In this organization, an instruction only goes through stages it actually needs (e.g., ST only takes 4 cycles because it does not need the WB stage). Compare clock cycle times and execution times with singlecycle, multi-cycle, and pipelined organization.

The basic single-cycle MIPS implementation in Figure 4.2 can only implement some instructions. New instructions can be added to an existing Instruction Set Architecture (ISA), but the decision whether or not to do that depends, among other things, on the cost and complexity the proposed addition introduces into the processor datapath and control. The first three problems in this exercise refer to the new instruction: Instruction: LWI Rt,Rd(Rs) Interpretation: Reg[Rt] = Mem[Reg[Rd]+Reg[Rs]] 4.2.1 [10] Which existing blocks (if any) can be used for this instruction? 4.2.2 [10] which new functional blocks (if any) do we need for this instruction? 4.2.3 [10] what new signals do we need (if any) from the control unit to support this instruction?

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free