Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
Hardware
Beiträge im Thema:
8
Erster Beitrag:
vor 2 Jahren, 9 Monaten
Letzter Beitrag:
vor 2 Jahren, 5 Monaten
Beteiligte Autoren:
Michael Schoettner, Dennis Kuschel, Randolpha

ALU Board questions

Startbeitrag von Michael Schoettner am 17.05.2015 12:58

Dear all,

after a break I continued to study the documents and have some questions regarding the ALU board. I am sorry about any stupid questions but I have not a good hardware background (I am a software guy).

What are these connectors for (V5 on ALU board)?
1. FSEL
2. CSEL
3. OEBPALU
4. LDFVZ (loading zero and overflow bit?)
5. LDCFC (loading carry bit I assume)

I also have some questions regarding the ALU - control and registers schematics (title ALU1). I found a figure in a talk of Dennis Kuschel (2008, see attachement) and tried to map the ALU components to the schematics but I got lost.

IC60: D-Input: Reg. 1
IC61: D-Input: Reg. 2
IC54: Output register?
IC53: ?
IC52: ?
IC55: Flags Register?
IC51: Flags Driver?
IC56: Flags Input Register?
(ALU tables are clear).

Many thanks in advance.

Michael
--

[attachment 60 alu.jpg]

Antworten:

Hi Micheal,

I will answer your questions:

1. FSEL
This signal selects between internal ALU flags an external flags provided by the internal databus. If FSEL is set high, the microcode can load new values for the flags into the flags output registers (IC49 and IC50). For example, this is used when the MyCPU executes the PLP OP-Code for restoring the flags from stack memory. If FSEL is set low, the flags result of an ALU operation is stored in the flags output registers.

2. CSEL
This signal selects the source for the carry flag for the next ALU operation. The carry flag can be provided from outside when CSEL is high or from inside (that means the carry flag result of the last ALU operation) when CSEL is low.

3. OEBPALU
Output Enable for Bypassing the ALU output register. For example, if the result of an ALU operation shall be stored in an internal register like the accumulator, it is not required to store the result first in the ALU output register. Instead, to save one cycle, the result can be directly stored in the target register.
Of course this is no clean design - bypassing the ALU output register should be the default mode. But some operations still need the additional ALU output register to store temporary results, so it is no more possible to remove the register.

4. LDFVZ (loading zero and overflow bit?)
Yes. When this signal gets asserted, these flags are stored in the ALU flags output register IC50.
(But note: The overflow bit has a second function - in *most cases* it acts as a sign bit.)

5. LDCFC (loading carry bit I assume)
Yes. When this signal gets asserted, the carry flag is stored in the ALU flags output register IC49.


Integrated Circuits:

IC60: D-Input: Reg. 1
Correct.

IC61: D-Input: Reg. 2
Correct.

IC54: Output register?
Yes, this is the ALU result output register.

IC53: ?
This is a tri-state line driver. It is used to bypass the ALU output register IC54. The signal OEBPALU activates this driver.

IC52: ?
Temporary register for user-provided flags. See the description of the FSEL signal above.

IC55: Flags Register?
Yes. This is the companion to the ALU output register IC54, but for the flags.

IC51: Flags Driver?
Correct. This line driver was introduced because the Flip-Flops IC49 and IC50 do not have tri-state outputs.

IC56: Flags Input Register?
No. This is a multiplexer. The first version of MyCPU ALU used two EPPROMs for the flags, but this was a waste of resources because only the half of each EPROM was used. So I put the content of both EPROMs into one single chip. To remain compatible to existing microcode I introduced the multiplexer IC56. In the next MyCPU version this multiplexer could be removed.

von Dennis Kuschel - am 17.05.2015 13:49
Dear Dennis,

thank you very much for your fast and detailed response. This helps a lot for better understanding how all these boards work together.

What are the PINs FL_Z, FL_C, and FL_V good for? As far as I can understand these are the actual bit settings of C, V, and Z, however, you have them also in the flags register and can read them out using the internal data bus?

Again thank you very much.

Michael
--

von Michael Schoettner - am 17.05.2015 16:32
The dedicated pins FL_Z, FL_C and FL_V are signals that go directly to the microcode control engine (as inputs to the microcode EPROMs). This is the only way the microcode can check the state of the flags, because the microcode engine has no access to the internal data bus.

von Dennis Kuschel - am 18.05.2015 19:34
Thank you very much!

That helps me a lot for better understanding the myCPU. (I will have more questions regarding other boards but need to to wait for the weekend).

Michael
--

von Michael Schoettner - am 20.05.2015 13:19
Quote
Dennis Kuschel
IC56: Flags Input Register?
No. This is a multiplexer. The first version of MyCPU ALU used two EPPROMs for the flags, but this was a waste of resources because only the half of each EPROM was used. So I put the content of both EPROMs into one single chip. To remain compatible to existing microcode I introduced the multiplexer IC56. In the next MyCPU version this multiplexer could be removed.


Dear Dennis,
I have same question about Flags Input Register. Which IC is Flags Input Register?
What's the function of IC48,IC47?

von Randolpha - am 13.09.2015 02:10
Hi Randolpha,

The Flags Input Register is IC52. Its purpose is to fetch flags from the internal CPU data bus. In a later clock cycle the flags output registers IC49 and IC50 can be set to the values stored in IC52. But these are only the output flags that influence the microcode state machine.
The ALU has only one input flag, that is the carry flag. IC48 is used to construct a multiplexer that selects the source of the carry flag for the next ALU operation. The source for the carry can be either the output of the last ALU operation or a pre-set carry flag that is stored in the flags output register IC49/IC50. The reason for the multiplexer is to save one clock cycle between two consecutive ALU operations (you could also take always the carry from IC49, but this takes two instead of one clock cycle).
IC47 is a hex inverter. Only the parts IC47A and IC47B are used to negate signals, the parts IC47C-F are unused.

von Dennis Kuschel - am 13.09.2015 13:17
Dear Dennis,
Thank you very much.
You're really a warm-hearted nice man.

von Randolpha - am 14.09.2015 13:21
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.