Download as pdf
Download as pdf
You are on page 1of 7
You are to write an LAS program to compute the results of the following equation. Assume that the computation does not result in an arithmetic overflow and that X,Y, and N are positive integers with N= 1, Note: The LAS did not have assembly language, only machine language. . NW +1) a a. Use the equation Sum(¥) = ———- when writing the IAS program. b. Do it the “hard way,” without using the equation from part (a). Given the memory contents of the IAS computer shown below, Address Contents O08A 010FA210FB 08B O10FAOF08D osc 020FA210FB show the assembly language code for the program, starting at address 08A. Explain what this program does. ‘Table 11 The IAS Instruction Set Tate “Symbol Tye opcode Representation Desrpton “9001010 LOADMO Taner cote frei MO ts asumustar AC (01001 LOADMOMU) Tamer cote of memory oaton Xo MO ‘visor STORM(X) Tamer cotent of cmon to memory ation X Daa tumfer ONDNDL LOAD MEX) Tranfer MUX) othe accurate (000019 LOAD-M() —Tauler MCX) te accurate ‘ut0LL LOAD|MC,—Taaler bse alu of MCX) tote aamaar (00103 _LOAD-MOX}__Taner-AUX} othe asamalte ‘Vacndional OOWII01 JUMPMIXIGI9) Take = taco om et fof XT ranch ono _SUMPM4X.2035) Take net istration ih half MEX ‘GHOTHIE UMP. MKfH9) number ints cums exocnegne ate mo Condon festoton rom et a ot MX) ranch" gntny SUM MX2039) umber nb acumaitr seen, ke ext iestcton rm thal of OX) ‘opaTion ADMIN) AdIMK) 16 AC pate sean AC ‘otrit DDIM) AM)» AC: put herent in AC ‘moo suBMEX) Sua M(X) rom AC pl Re rn AC ‘0100 SUMO) Sab MO rom AC pte rman in AC ‘astimese OURO MULM(S) ——_-Muipy MUX) by Mo; put os ena ret {in AC pute ein ie MO ‘worsen pIvMeo, De AC MON ate gti MO edhe ‘noi si Map secemuar by 2a eon ote cio RSH hid aca Bat oi ih oe potion oO STORMIRI) Reet Ste bdo Mr ore ‘rodly omit STOR x29) Reps ar fd at OO ion i Suppose that a task makes extensive use of floating-point operations, with 40% of the time consumed by floating-point operations. With a new hardware de- sign, the floating-point module is sped up by a factor of K. Then the overall speedup is as follows: Speedup = 06 + K Thus, independent of K, the maximum speedup is 1.67 ‘Consider the execution of a program that results in the execution of 2 million instructions on a 400-MHz processor. The program consists of four major types of instructions. The instruction mix and the CPI for each instruction type are given below, based on the result of a program trace experiment: Instruction Type CPI Instruction Mix (%) Arithmetic and logic 1 60, Load/store with cache hit 2 18 Branch 4 12 Memory reference with cache miss & 10 The average CPI when the program is executed on a uniprocessor with the above trace results is CPZ = 0.6 + (2 x 0.18) + (4 x 0.12) + (8 X 0.1) = 2.24. The corres- A benchmark program is run on a 40 MHz processor. The executed program consists of 100,000 instruction executions, with the following instruction mix and clock cycle count: Instruction Type Instruction Count | Cycles per Instruction Integer arithmetic 45,000 1 Data transfer 32,000 2 Floating point 15,000 2 Control transfer 8000: 2 Determine the effective CPI. Consider two different machines, with two different instruction sets, both of which have a clock rate of 200 MHz. The following measurements are recorded on the two machines running a given set of benchmark programs: Instruction Cycles per Instruction Type Count (millions) | Instruction Machine A Arithmetic and logic 8 1 Load and store 4 3 Branch 2 4 Others 4 3 Machine A Arithmetic and logic 10 1 Load and store 8 2 Branch 2 4 Others 4 3 a, Determine the effective CP/, MIPS rate, and execution time for each machine. b. Comment on the results.

You might also like