



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: Intro to Computer Engr; Subject: Electrical & Computer Engr; University: Georgia Institute of Technology-Main Campus; Term: Unknown 1989;
Typology: Study notes
1 / 6
This page cannot be seen from the preview
Don't miss anything!




Micro co de
The datapath b elow incorp orates an adder/subtractor and a one bit shifter. The arithmetic op eration is sp eci ed by the add=sub control line. The subtraction is X - Y. The shift direction is controlled by the r ig ht=l ef t control line. The enable signals determine which functional unit drives the Z bus. The datapath also contains a register le with four registers. On each cycle, one add/sub or shift op eration can o ccur in the datapath.
Part A Write micro co de for this datapath to compute the average of the four initial values in the register le, leaving the result in register zero. You may mo dify other any register once its value has b een summed. Put your answers in decimal (i.e., to select register two on the X bus, put a 2 in the X column).
cycle X Y Z W E add=sub += enabl e r ig ht=l ef t shif t enabl e 1
2
Part B Write micro co de for this datapath to compute the function:
R 0 = (R 1 + R 3 )= 2 + 4(R 2 R 0 )
You may mo dify any register once its initial value has b een used. Put your answers in decimal.
cycle X Y Z W E add=sub += enabl e r ig ht=l ef t shif t enabl e 1 2 3 4 5 6 7 8
Part C The datapath b elow incorp orates an adder/subtractor, multiply/divider, and a one bit shifter. An arithmetic op eration is sp eci ed by the add=sub and mul =div control lines. Subtraction is (X Y ); division is (X= Y ). The shift direction is controlled by the r ig ht=l ef t control line. The enable signals determine which functional unit drives the Z bus. The datapath also contains a register le with four registers.
32
32
Z
add/sub mul/div +- en */ en
Y
X
2 2 2
32
X Y Z
RWE
Add/Sub Mul/Div shift en
Shifter
right/left
Register File
Write micro co de for this datapath to compute the function b elow. The initial values of the registers should b e used in the equation. Any register may b e mo di ed once its initial value has b een used for the last time. Express all signals in o ctal notation (i.e., to select register two on the X bus, put a \2" in the X column).
Part E For the datapath ab ove, write micro co de for this datapath to compute the function b elow. The initial values of the registers should b e used in the equation. Mo dify only R 0. All other registers should b e unchanged by this pro cedure. Use only registers R 0 , R 1 , R 2 , and R 3.
R 0 =
(R 1 12 R 2 )^2 R 3
cycle X Y Z R W E add=sub + en mul =div */ en r ig ht=l ef t shif t en 1 2 3 4 5 6 7 8 9
Part F Write micro co de for this datapath to compute the value (5R 3 ) leaving the result in R 0.
cycle X Y Z R W E add=sub + en mul =div */ en r ig ht=l ef t shif t en 1
Part G Write micro co de for this datapath to exchange the contents of R 1 and R 2. Use only registers R 1 and R 2. Don't worry ab out over ows.
cycle X Y Z R W E add=sub + en mul =div */ en r ig ht=l ef t shif t en 1
2
3
Part H Write micro co de for this datapath to compute the function b elow. For this part, use only R 0 ; R 1 ; R 2.
R 0 =
(3R 0 R 1 )(R 2 +R 1 R 0 ) 2
cycle X Y Z R W E add=sub + en mul =div */ en r ig ht=l ef t shif t en 1 2 3 4 5 6 7 8
Part I For the datapath ab ove, describ e each micro co de instruction b elow using register transfer notation (e.g., R 0 R 1 + R 2 ). Then deduce the expression computed by the microsequence.
add + mul = r ig ht shif t cycle X Y Z R W E sub en div en l ef t en description 1 3 2 2 1 0 0 0 1 0 0
2 2 0 2 1 0 0 0 0 0 1