Discussion:
Question - Lab 1
(too old to reply)
Ryan McNeeley
2005-10-26 02:35:18 UTC
Permalink
I'm finalizing my lab up and have a very basic question, but when
implementing an operation, what does ALU refer to? And what does "ALU op"
refer to? Maybe I'll hear something before lab submission. Thanks!
--
Ryan McNeeley
***@osu.edu
Ryan McNeeley
2005-10-26 02:38:53 UTC
Permalink
I think what I'm getting at is, it is spelled out within the Lab 1
description that "mov %r6, %r3" commands the machine to push the MDR to bus
and load ACC, and I understand this, but where do you perform the operation,
and how does ALU come into play? Thanks.
Post by Ryan McNeeley
I'm finalizing my lab up and have a very basic question, but when
implementing an operation, what does ALU refer to? And what does "ALU op"
refer to? Maybe I'll hear something before lab submission. Thanks!
--
Ryan McNeeley
John Hayford
2005-10-26 02:44:59 UTC
Permalink
The ALU is the circuit that performs the actual computation, i.e. add,
subtract, multiply, divide. These are done in state 8 from the simple
instruction set on page 64. Hope that helps.
John Hayford
Post by Ryan McNeeley
I think what I'm getting at is, it is spelled out within the Lab 1
description that "mov %r6, %r3" commands the machine to push the MDR to bus
and load ACC, and I understand this, but where do you perform the operation,
and how does ALU come into play? Thanks.
Post by Ryan McNeeley
I'm finalizing my lab up and have a very basic question, but when
implementing an operation, what does ALU refer to? And what does "ALU op"
refer to? Maybe I'll hear something before lab submission. Thanks!
--
Ryan McNeeley
Ryan McNeeley
2005-10-26 02:54:47 UTC
Permalink
Thanks for your quick response. Yes, I've noticed the flow of the
simulation, however, I am stuck with the computation part. My program is to
a point where it outputs all the correct values for IR, PC, and MAR, but is
obvious having problems with the ACC as the computations aren't actually
implemented yet. I guess my question is how do I squeeze in a computation
between the "MDR to bus" and the "load ACC"? If that is clear...
Post by John Hayford
The ALU is the circuit that performs the actual computation, i.e. add,
subtract, multiply, divide. These are done in state 8 from the simple
instruction set on page 64. Hope that helps.
John Hayford
Post by Ryan McNeeley
I think what I'm getting at is, it is spelled out within the Lab 1
description that "mov %r6, %r3" commands the machine to push the MDR to
bus and load ACC, and I understand this, but where do you perform the
operation, and how does ALU come into play? Thanks.
Post by Ryan McNeeley
I'm finalizing my lab up and have a very basic question, but when
implementing an operation, what does ALU refer to? And what does "ALU
op" refer to? Maybe I'll hear something before lab submission. Thanks!
--
Ryan McNeeley
Wayne D. Heym
2005-10-26 02:06:48 UTC
Permalink
Post by Ryan McNeeley
I guess my question is how do I squeeze in a computation
between the "MDR to bus" and the "load ACC"? If that is clear...
Only a SAM LOAD instruction passes through a state that has just the two
control signals that you mention here. A SAM SUB instruction would pass
through the state I mentioned in my previous message, in which four
control signals are asserted.
--
Wayne
Ryan McNeeley
2005-10-26 03:10:30 UTC
Permalink
Ah yes, I understand that it only a SAM LOAD command passes through there, I
guess where I am at is trying to figure out how I piece together the MDR to
bus, ALU to ACC, ALU op, and load ACC into my program. Basically I have all
the components and know what they will consist of code-wise, except I think
I'm still a little foggy on the ALU to ACC, does this consist of code? If
so, ALU isn't a register, its a part of the machine, how would I execute
this command?

Thanks again.
Post by Wayne D. Heym
I guess my question is how do I squeeze in a computation between the "MDR
to bus" and the "load ACC"? If that is clear...
Only a SAM LOAD instruction passes through a state that has just the two
control signals that you mention here. A SAM SUB instruction would pass
through the state I mentioned in my previous message, in which four
control signals are asserted.
--
Wayne
Ryan McNeeley
2005-10-26 04:49:38 UTC
Permalink
Luckily, I figured out enough to get things working before submission. I
found out that I was just looking at the registers in the wrong sense along
with the proper placement of the computation. Thanks for pointing my in the
right direction.
Post by Ryan McNeeley
Ah yes, I understand that it only a SAM LOAD command passes through there,
I guess where I am at is trying to figure out how I piece together the MDR
to bus, ALU to ACC, ALU op, and load ACC into my program. Basically I
have all the components and know what they will consist of code-wise,
except I think I'm still a little foggy on the ALU to ACC, does this
consist of code? If so, ALU isn't a register, its a part of the machine,
how would I execute this command?
Thanks again.
Post by Wayne D. Heym
I guess my question is how do I squeeze in a computation between the "MDR
to bus" and the "load ACC"? If that is clear...
Only a SAM LOAD instruction passes through a state that has just the two
control signals that you mention here. A SAM SUB instruction would pass
through the state I mentioned in my previous message, in which four
control signals are asserted.
--
Wayne
Wayne D. Heym
2005-10-26 02:01:38 UTC
Permalink
Post by Ryan McNeeley
I think what I'm getting at is, it is spelled out within the Lab 1
description that "mov %r6, %r3" commands the machine to push the MDR to bus
and load ACC,
Right, and the failure to say "ALU to ACC" tells the multiplexer to make
its output come from the bus and not from the ALU.
Post by Ryan McNeeley
and I understand this, but where do you perform the operation,
and how does ALU come into play? Thanks.
When SAM executes a SUB operation, one of the most important states it
passes through is the state that asserts the following four signals:

MDR to bus, ALU to ACC, ALU subtract, load ACC

ALU subtract tells the ALU to perform a subtraction and not an addition,
multiplication, or division.

ALU to ACC tells the multiplexer to make its output come from the ALU
and not from the bus.
--
Wayne
Continue reading on narkive:
Loading...