• Aucun résultat trouvé

Figure 9·3 Excerpt from Microprogram Flow (K·NL·KDII-B-l)

Dans le document GT40 graphic display terminal volume 2 (Page 138-143)

AU

microsteps have mnemonic names such as

80·1

(source mode

0,

step

I),

S2·2 (source mode 2, step 2), etc. A

microi'ou~ne will

often weave back and reuse part of another. For example, the source mode 1 routine weaves back into the source mode 0 routine by the GOTO SQ.2 in S 1·2 (Figure 9.3). .

9·11

To the left of every microstep is the location of that step in the CS (in octal) and the contents of the NXT field.

Observe the microprogram counter (MPC) while single stepping through the microprogram. The LOC and NXT columns provide useful information relating to the path taken by the microprogram.

The flow is well commented and should be self-explanatory. Table 9-3 is a useful glossary of flow notation.

Designation BA

DATI + PC

CKOFF B

IR B Sex R [8]

R [D]

R [n]

BUT ALBYT BYTE.BAR ENABOVER DATO DATIP INIT

Table 9-3 Flow Notation Glossary

Definition Bus Address Register

Assignment operator Separator

Initiate DATI operation on Unibus.

Plus, the arithmetic operator Program Counter = R 7

Set the Clock Off bit of the control store.

B-Ieg register Instruction Register

B-leg register sign extended (bit 7 repeated in bits 8 through IS)

Scratch Pad Register specified by the source portion of the current instruction [IR (8:6)].

Scratch Pad Register speCified by the destination portion of the current instruction [IR (2:0)].

Scratch Pad Register n specified by the control ROM Branch on rnicrotest

Allow byte Unibus reference

A signal indicating the absence of a byte in instruction Enable the stack overflow detection logic (working BUT) Initiate DATO operation on Unibus.

Initiate DATIP operation on Unibus.

Initialize the logic (working BUT).

9-12

Designation SVS

IRC K

en]

R [10] OP B

GOTOX

Table 9·3 (Cont) Flow Notation Glossary

Definition Set slave sync (working BUT).

Clock the Instruct!0n Register (working BUf).

That location of the constants chip (on the data path A.Jeg) containing the value n.

ALU function determined by the auxiliary ALU cQntro) logic

as

a function of the instruction currently in the Instruction Register.

NXT field is to contain the address of

X.

Unconditional GOTO.

To illustrate the interpretation of PDP·II instructions, the execution of a CMP instruction is traced through the microcode. The machine is in the RUN state (i.e., the machine is executing instructions) and the instruction is located in memory location 1000.

Location 1000 1002 1004

1106

Assembler Symbolic CMP #15, CHAR

CHAR: WORDO

Octal 022767 000015 000100

This

instruction compares the literal 15 to the contents of CHAR and sets the condition code accordingly. Source mode is immediate (mode 2, register 7

=

PC) and destination mode is relative (mode 6, register 7

=

PC). Figure 9-4 shows the Simplified flow for the CMP example.

BUT SERVICE CONSOLE

(START OR CONTINUEI

L..;...;_;..;..;...p.;;;.... ... .;....;;.J (ADDRESS MOO! 21

(ADDRESS MODE 61

FE-TCH

11-12111

Figure 9-4 CMP

#

15, CHAR (022767), Simplified Flow Diagram 9·13

First the instruction is fetched from memory (microsteps F·1 through F·5). This is the same fetch microroutine used to get each instruction from memory and update the PC.

Location NXT DATI by the Unibus control (BC).

/Load the B register with the contents of the PC+2.

IUpdate the

PC.

CKOFF inhibits execution of the next microstep until the pending Unibus transfer (DATI, initiated in F·1) is complete.

ILoad the data from the Unibus (instruction fetched from memory) into the B register and Instruction Register (IR).

ISign extend the low order eight bits of the copy of the instruction in the B register (used in branch instruction interpretation) and branch on microtest (BUT) determined by the IR decode logic. Note that NXT (F·5)

=

I which is the CS location of the RE·

SERVED instruction microroutine. If the lR decode logic does not recognize the instruc·

tion, no signals are wire-ORed into the MPC and the RESERVED instruction micro·

routine (RT·l) is executed by the micro·

program. In this example, CMP is recognized (by the IR decode logic) and 204 is wire·

ORed with NXT (F·5

=

I) to cause the MPC to be loaded with 205, the location of the microroutine which operates on source mode 2 (S2·1). register speCified by IR (08:06). The register will contain the location of the source data (l002) in this example. Initiate a Unibus DATI to actually get the data. ALBYT will allow an odd Unibus transfer, if the IR

Location

/For byte instructions, the autoincrement is by one, for non·byte instructions, auto· auto-incremented. Inqibit the processor clock until the DATI initiated in S2·1 is complete.

The microroutine starting in 06·1 will get the destination data and perform the operation indicated by the OP code of the instruction. Mode 6, when used with the PC, requires that the index contained in the word currently pointed to by the PC be added to the updated PC (address of the index word plus two) to get the location of the source data.

LQcation NXT Microstep Action Comment

Name

lIS 075 06-1 BA +-PC; DATI /Initiate the Unibus transfer to get the index word from memory.

075 077 06·2 B+-PC+2 /Prepare to update PC to next word.

9-15·

Location

collection of logic which examines the con-tents of the IR to see if the instruction is a JMP or JSR. If either of these instructions are present, the appropriate bit is wire-ORed with NXT (D6-S) = Dl-2 into the MPC, such that the MPC is loaded with Jl-l or 12-1, respectively for JMP or JSR instruction. In the example, neither of these instructions are present and the MPC is loaded with NXT

/Receive the destination data from memory.

If the instruction had been a byte instruc-tion (e.g., CMPB);the microprogram would be diverted to 00-1 (for odd byte address) . SWAB, CLR, COM, etc.). Unary instructions would have caused the BUT IR DECODE done in F-S to take the appropriate desti-nation microroutine (there is no source field in a unary instruction). R [II] is used in

Dans le document GT40 graphic display terminal volume 2 (Page 138-143)