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

Chapter 6: Appendix B, 23 (page 500)

B.23 [20] <§§B3, B.4, B.5> Repeat Exercise B.22, but for an unsigned divider rather than a multiplier.

Short Answer

Expert verified

The Verilog implementation for the specified unit:

Module_divisor (s, clock, clear, Bin,Qin ,W, Y, Z, B) //the parameters are s, clock, clear, Bin ,Qin ,W, Y, Z, B

Input s, clock, clear Input [4:0] Qin, Bin; //Qin, Binare two inputs

Output [4:0] Y,Z; Output [2:0] B;

System registers reg C;

reg [4:0] Y, Z, B;

reg [2:0] B;

reg [2:0] stateP, stateN ;

// combinational circuit wire z;

// state register process for controller

Always begin

assign z=|B;

if stateP<= T0;

else stateP<= stateN

end

Step by step solution

01

Define the concept.

This basically represents the Verilog implementation. This unit is also a 32-bit divisor.

This can able to perform only those operations where bits occupied by the two operands and output are less than 32 bit.

02

 Determine the calculation.

The process of using this unit for building a 32-bit divisor:

In the below-mentioned code, two states ( ) are assigned to reg[2:0].

//state transition process for controller

Always begin //start the loop1

Case () // for the case of and start the loop2

T0: if = T1; else = T0 // for T0,if is T1 else will be T0

T1: = T2; // for T1, is initialized as T2

T2: = T3; // for T2, is initialized as T3

T3: if (z) = T0; else = T2// for T3,if is T1 else will be T2

Endcase //end of loop2

End //end of loop1

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

Question: 6.19 In future systems, we expect to see heterogeneous computing platforms constructed out of heterogeneous CPUs. We have begun to see some appear in the embedded processing market in systems that contain both floating point DSPs and a microcontroller CPUs in a multichip module package. Assume that you have three classes of CPU: CPU A—A moderate speed multi-core CPU (with a floating point unit) that can execute multiple instructions per cycle. CPU B—A fast single-core integer CPU (i.e., no floating point unit) that can execute a single instruction per cycle. CPU C—A slow vector CPU (with floating point capability) that can execute multiple copies of the same instruction per cycle. 6.16 Exercises 573 574 Chapter 6 Parallel Processors from Client to Cloud Assume that our processors run at the following frequencies: CPU A CPU B CPU C 1 GHz 3 GHz 250 MHz CPU A can execute 2 instructions per cycle, CPU B can execute 1 instruction per cycle, and CPU C can execute 8 instructions (though the same instruction) per cycle. Assume all operations can complete execution in a single cycle of latency without any hazards. All three CPUs have the ability to perform integer arithmetic, though CPU B cannot perform floating point arithmetic. CPU A and B have an instruction set similar to a MIPS processor. CPU C can only perform floating point add and subtract operations, as well as memory loads and stores. Assume all CPUs have access to shared memory and that synchronization has zero cost. The task at hand is to compare two matrices X and Y that each contain 1024 × 1024 floating point elements. The output should be a count of the number indices where the value in X was larger or equal to the value in Y.

6.19.1 [10] Describe how you would partition the problem on the 3 different CPUs to obtain the best performance.

6.19.2 [10] What kind of instruction would you add to the vector CPU C to obtain better performance?

Implement a switching network that has two data inputs (Aand B), two data outputs (Cand D), and a control input (S). If Sequals 1, the network is in pass-through mode, and Cshould equal A, and Dshould equal B. If Sequals 0, the network is in crossing mode, and Cshould equal B, and Dshould equal A.

A.1 [5] Section A.5 described how memory is partitioned on most MIPS systems. Propose another way of dividing memory that meets the same goals.

B.28 [10] <§B.6> Now calculate the relative performance of adders. Assume that hardware corresponding to any equation containing only OR or AND terms, such as the equations for pi and gi on page B-40, takes one time unit T. Equations that consist of the OR of several AND terms, such as the equations for c1, c2, c3, and c4 on page B-40, would thus take two time units, 2T. The reason is it would take T to produce the AND terms and then an additional T to produce the result of the OR. Calculate the numbers and performance ratio for 4-bit adders for both ripple carry and carry lookahead. If the terms in equations are further defined by other equations, then add the appropriate delays for those intermediate equations, and continue recursively until the actual input bits of the adder are used in an equation. Include a drawing of each adder labeled with the calculated delays and the path of the worst-case delay highlighted.

Rewrite the code for fact to use fewer instructions.

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