Concept explainers
The file seq-full.hcl contains the HCL description for SEQ, along with the declaration of a constant IIADDQ having hexadecimal value C, the instruction code for iaddq. Modifythe HCL descriptions of the control logic blocks to implement the iaddq instruction, as described in Practice Problem 4.3 and Problem 4.51.See the lab material for directions on how to generate a simulator for your solution and how to test it.
Want to see the full answer?
Check out a sample textbook solutionChapter 4 Solutions
Computer Systems: Program... -Access
Additional Engineering Textbook Solutions
Java: An Introduction to Problem Solving and Programming (8th Edition)
Java: An Introduction to Problem Solving and Programming (7th Edition)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Starting Out with Python (3rd Edition)
Digital Fundamentals (11th Edition)
Software Engineering (10th Edition)
- For a function with prototype long decode2(long x, long y, long z); GCC generates the following assembly code: 1 decode2: 2 subq %rdx, %rsi 3 imulq %rsi, %rdi 4 movq %rsi, %rax 5 salq $63, %rax 6 sarq $63, %rax 7 xorq %rdi, %rax 8 ret Parameters x, y, and z are passed in registers %rdi, %rsi, and %rdx. The code stores the return value in register %rax. Write C code for decode2 that will have an effect equivalent to the assembly code shown.arrow_forwardPlease,Consider two different implementations, M1 and M2, of the same instruction set. There arethree classes of instructions (A, B, and C) in the instruction set. M1 has a clock rate of 2.0GHz and M2has a clock rate of 2.5GHz. The average number of cycles for each instruction class and their frequencies(for a typical program) are as follows:Instruction Class M1-Cycles/InstructionClass M2 -Cycles/InstructionClasss FrequencyA 1 2 60%B 3 2 30%C 4 3 10%(a) Calculate the average CPI for each machine, M1, and M2.(b) Calculate the average MIPS ratings for each machine, M1 and M2.(c) Which machine has a smaller MIPS rating? Which individual instruction class CPI do you needto change, and by how much, to have this machine have the same or better performance as themachine with the higher MIPS rating (you can only change the CPI for one of the instructionclasses on the slower machine)?.arrow_forwardPlease solve and show work. Consider two different implementations of the same instruction set architecture. The instructions can be divided into four classes according to their CPI (class A, B, C, and D). P1 with a clock rate of 2.5 GHz and CPIs of 1, 2, 3, and 2, and P2 with a clock rate of 3 GHz and CPIs of 2, 3, 2, and 2. Given a program with a dynamic instruction count of 1.0E6, instructions are divided into classes as follows: 30% class A, 20% class B, 30% class C, and 20% class D; which implementation is faster? What is the global CPI for each implementation? Find the clock cycles required in both cases.arrow_forward
- I was given to write a parallel computing problem in which a sequential c++ code is to be written and should be made to work as a parallel program by adding simple parallel computing constructs like "pragma omp parallel". it should be run on a ccr which I have access to and check the speed up of the parallelly running problem. All the skeleton of the program is given and I should complete the specific function.arrow_forwardConsider two different implementations, M1 and M2, of the same instruction set. There arethree classes of instructions (A, B, and C) in the instruction set. M1 has a clock rate of 2.0GHz and M2has a clock rate of 2.5GHz. The average number of cycles for each instruction class and their frequencies(for a typical program) are as follows:Instruction Class M1-Cycles/InstructionClass M2 -Cycles/InstructionClasss FrequencyA 1 2 60%B 3 2 30%C 4 3 10%(a) Calculate the average CPI for each machine, M1, and M2.(b) Calculate the average MIPS ratings for each machine, M1 and M2.(c) Which machine has a smaller MIPS rating? Which individual instruction class CPI do you needto change, and by how much, to have this machine have the same or better performance as themachine with the higher MIPS rating (you can only change the CPI for one of the instructionclasses on the slower machine)?arrow_forwardProvide the instruction execution steps (F,D,E,M,W,PC) for the following: NOP, JMP, CALL, PUSH, ADD EAX,X, SUB AX,BXarrow_forward
- An example of a MISD machine might be something like a systolic array, which is a kind of array. A pipeline network or "wavefront" of data processing units that is organised as a network might be referred to as a systolic array. Since the receipt of new data is what initiates execution, none of these components need the employment of a program counter in order to function properly. Each individual unit in a timed systolic array computes in "lock-step," meaning that within the course of a single clock cycle, each individual unit finishes alternating stages of computation and communication.arrow_forwardWrite HCL code for the signal D_stall in the PIPE implementation.Pipeline register D must be set to bubble for a mispredicted branch ora ret instruction. As the analysis in the preceding section shows,however, it should not inject a bubble when there is a load/use hazardin combination with a ret instruction:bool D_bubble =# Mispredicted branch (E_icode == IJXX && !e_Cnd) ||# Stalling at fetch while ret passes through pipeline# but not condition for a load/use hazard!(E_icode in { IMRMOVQ, IPOPQ } && E_dstM in { d_srcA,d_srcB }) && IRET in { D_icode, E_icode, M_icode };arrow_forwardBy considering Edsim51 simulator, write an 8051 assembly code for the following scenario: 1- At the beginning, number 0 is displayed on the Disp0 and Disp3, The rightmost and leftmost 7-segments, respectively. 2- for each time that switch #0 is closed and opened, one unit should be incremented to the number that is shown on Disp0. if it is 9, it doesn't change. 3- for each time that switch #1 is closed and opened, one unit should be decremented from the number that is shown on Disp0. if it is 0, it doesn't change. 4- for each time that switch #2 is closed and opened, two units should be incremented to the number that is shown on Disp3. if it is 8, it doesn't change. 5- for each time that switch #3 is closed and opened, two units should be decremented from the number that is shown on Disp3. if it is 0, it doesn't change. The order of closing the switches is not determined, but when a switch is closed, the system waits until that switch becomes open again. meanwhile, the other switches…arrow_forward
- Implement a shared-memory pthread program on in C to find Prefix Sum of n integers. Keep theparallel overheads to a minimum. (One barrier synchronization may be enough.) Vary n as 210, 215, and 220 (or moreif desired), and p, the number of processes, from 1 to 8, and obtain the speedup relative to the sequential timingswithout any overheads. Produce a speedup plot with p on x-axis and Sp on y-axis. Each n will result in a separatespeedup curve. Use same plot for all the curves to see how speedup varies as problem size increases.arrow_forwardFor the (pseudo) assembly code below, replace X, Y, P, and Q with thesmallest set of instructions to save/restore values on the stack and update the stackpointer. Assume that procA and procB were written independently by two differentprogrammers who are following the MIPS guidelines for caller-saved and callee-savedregisters. In other words, the two programmers agree on the input arguments andreturn value of procB, but they can't see the code written by the other person. procA:$s0 = ...$s1 = ...$s2 = ...$t0 = ...$t1 = ...$t2 = ...X$a0 = ...$a1 = ...jal procBY... = $s1... = $t0... = $t1... = $a0jr $raprocB:P... = $a0... = $a1$s2 = ...$t0 = ...Qjr $raarrow_forwardWrite a code in sim8085 for the following problem: The pressure of two boilers is monitored and controlled by a microcomputer works based on microprocessor programming. A set of 6 readings of first boiler, recorded by six pressure sensors, which are stored in the memory location starting from 2050H. A corresponding set of 6 reading from the second boiler is stored at the memory location starting from 2060H. Each reading from the first set is expected to be higher than the corresponding position in the second set of readings. Write an 8085 sequence to check whether the first set of reading is higher than the second one or not. If all the readings of first set is higher than the second set, store 00 in the ‘D’ register. If any one of the readings is lower than the corresponding reading of second set, stop the process and store FF in the register ‘D’. Data (H): First set: 78, 89, 6A, 80, 90, 85 Second Set:71, 78, 65, 89, 56, 75arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education