I'm currently learning about data path in a CPU and having a hard time understanding the functionality of G,L, H parts in the following image. Why have those parts been used there?
\$\begingroup\$
\$\endgroup\$
2
-
1\$\begingroup\$ You know what a multiplexer does in general? \$\endgroup\$– pjc50Commented Aug 28, 2019 at 10:17
-
\$\begingroup\$ Yes..I can understand that the multiplexer in D selects PC+4 or computed address and set it to PC..In other words, I know what a multiplexer is..What I can't understand is why they are used in G and L places.. \$\endgroup\$– PavinduCommented Aug 28, 2019 at 10:21
Add a comment
|
1 Answer
\$\begingroup\$
\$\endgroup\$
G multiplexer: Selects the second argument to the ALU. Possible values are another register's value or the immediate value of the instruction.
L multiplexer: Selects the value to write into the destination register. Possible values are the value of the addressed RAM register or the result from the ALU.
H shifter: Multiplies the immediate value of the instruction by 4, as the PC needs.