Principles of Computer Composition——Microprogram Experiment

microprogram experiment

1. Experimental results (12 points)

1. Record the experimental results (required) (8 points)

The microprogram is as follows Table-1:

address

hexadecimal

high five

S3 ~ S0

A
field

field B

C
field

MA5~MA0

meaning

00

00 00 01

00000

0000

000

000

000

000001

NOP

01

00 70 70

00000

0000

111

000

001

110000

CON(ICS)→IR

04

00 24 05

00000

0000

010

010

000

000101

(R0)→B

05

04 B2 01

00000

1001

011

001

000

000001

(A)+(B)→R0

30

00 14 04

00000

0000

001

010

000

000100

(R0)→A

32

18 30 01

00011

0000

011

000

000

000001

IN→R0

33

28 04 01

00101

0000

000

010

000

000001

(R0)→OUT

35

00 00 35

00000

0000

000

000

000

110101

NOP

The microprogram diagram is as follows

 

The experimental data path diagram is as follows:

 

Analyzing the microprogram diagram shows that:

(1) IN command: 32H->01H, that is to realize the IN function, and give the input number to R0

(2) ADD instruction, microprogram sequence:

00H-> 01H ->30H -> 04H -> 05H -> 01H

That is to realize R0->A, R0->B, (A)+(B)->R0, and give the result of R0+R0 to R0

(3) OUT instruction: 33H -> 01H

Realize (R0)→OUT, output R0 to out cell

(4) HLT instruction: 35H -> 35H

NOP, do not operate.

start operation:

①Input 23H first, as shown in the figure below:

 

The current microinstruction implements R0->A, the address of the last microinstruction is 30H, and the address of the current microinstruction is 04H.

Realized R0=23H, as shown below:

 

②The current micro-instruction implements R0->B, the address of the last micro-instruction is 04H, and the address of the current micro-instruction is 05H, as shown in the figure below, R0=23H has been realized

 

③The current microinstruction realizes A+B->R0, the last microinstruction address is 05H, the current microinstruction address is 01H, and R0=46H is realized, as shown in the figure below:

 

3. Output result

Realize 0C+0C=18(H).

The microprogram of this experiment actually realizes the function of multiplying by 2. example:

In this result: the input is 0C (12D), the output is 18 (24D), and the output is as shown in the figure below:

 

2. Experimental Questions and Thinking (3 points)

  1. What is the difference in operational control between control memory and main memory? What is the essential difference?

①Main memory:

It is an important part of computer hardware and can be directly and randomly accessed by the central processing unit (CPU). In order to improve performance and take into account reasonable cost, modern computers often adopt multi-level storage systems. That is, a cache memory with a small storage capacity and a high access speed, and a main memory with a moderate storage capacity and access speed are indispensable. Used to store instructions and data .

②Control memory : It is used to store all the microprograms that implement the entire instruction system. It is a read-only memory. Once the microprogram is solidified, it can only be read but not written when the machine is running.

  1. How many binary bits does a memory cell of the control memory contain? Logically divided into several fields, what is the purpose of each

24 bits, 10 fields

The storage units are as follows:

 

The upper five bits correspond to bits M23, M22, WR, RD, IOM from left to right, 21-20 are not WR, RD control reading and writing, 18-15 bits S3--S0 select the operation function, A, B, C are 3 A decoding field, MA5~MA0 are 6-bit follow-up micro-addresses.

  1. In Table-1, will the microinstructions in the memory control unit with address 35 be executed, and why?

No, because only the next jump address of this instruction is 35, and the next jump address of no instruction in the table is 35, except for the 35 instruction, so it will not be executed. It will not be executed unless it is forced to jump to this instruction.

Guess you like

Origin blog.csdn.net/cangzhexingxing/article/details/124046815