TEC-2 micro-programming and testing

Source: Internet
Author: User

Topic Requirements

The memory unit data is subtracted from the contents of the memory unit represented by the absolute address addr, and the result is saved to the memory unit specified by the DR content.

Instruction format
D4 DR X
ADDR
DATA
Command function

    data-[ADDR]→[DR]

Design analysis

According to the instruction function and instruction format, the first reading address addr unit content is temporarily placed in the Q register. By putting Pc→ar, the content in MEM is the data of the memory unit. At this time, Mem-q→q, and will Dr→ar, then address register AR storage is exactly the DR, so as long as the Q register content to write memory can complete the command function. In addition, the micro-program must achieve two PC+1→PC operation in order to ensure the correct direction of the PC.

Micro Program
1  -: Pc→ar, pc+1→pc;0000 0E00 a0b5 54022 101: Mem→ar;0000 0E00 10f0 00023 102: Mem→q;0000 0E00 00f0 00004 103: Pc→ar, pc+1→pc;0000 0E00 a0b5 54025 104: Mem-q→q;0000 0E00 02E0 00006  the: Dr→ar;0000 0E00 90b0 000A7 106: Q→mem, cc#=0      ;0029 0300 1020 0010
Microcode detailed pc→ar, pc+1→pc 0000 0E00 a0b5 5402
ci3-0 /mio req/we mi8-0 A B Sci DC1 DC2

No action

f→b

Y=a

r+s

r=0

S=b

pc pc  cin value 1 no tube   address register ar 
 

/we set to 1 send y (PC)

to the internal bus so that AR receives

F=0+PC+CIN→PC

Y=A=PC

The contents of

Y are

is sent to the internal data bus

    pc default is R5 pc default is R5  pc+1→pc   Pc→ar

(y→ar)

1110 101 0 1 0 0 0 0 0 1 1 0101 0101 01 000 010

Note: The following a, B are 0000, do not operate

Mem→ar 0000 0E00 10f0 0002
ci3-0 /mio req/we mi8-0 Sci DC1 DC2
Sequential execution

Memory Read

No

F

R+s

R=d

S=0

CIN value 0 No tube. Address Register AR

MEM's data

Send to internal bus

Y=f=d+0

Send to internal bus

D+0

The D-Input is

Data sent from the internal bus

Mem→ar

(Y=d→ar)

1110 001 0 0 1 0 0 0 1 1 1 00 000 010

mem→q 0000 0E00 00f0 0000
ci3-0 /mio req/we mi8-0 Sci DC1 DC2
Sequential execution

Memory Read

F→q

Y=f

R+s

R=d

S=0

CIN value 0 No tube. Not used

MEM's data

Send to internal bus

F=d+0→q

D+0

The D-Input is

Data sent from the internal bus

1110 001 0 0 1 0 0 0 1 1 1 00 000 000
Pc→ar, pc+1→pc 0000 0E00 a0b5 5402 (slightly) mem-q→q 0000 0E00 02E0 0000
ci3-0 /mio req/we mi8-0 Sci DC1 DC2
Sequential execution

Memory Read

F→q

Y=f

R-s

R=d

S=q

CIN value 0 No tube. Not used

MEM's data

Send to internal bus

F=d-q→q

D-q

The D-Input is

Data sent from the internal bus

1110 001 0 0 0 0 1 0 1 1 0 00 000 000
Dr→ar 0000 0E00 90b0 000A
ci3-0 /mio req/we mi8-0 Sci Sa SB DC1 DC2

No action

None

y=f

r+s

r=0

S =b

 cin

Value 0

A=a B=dr no tube   Address register

AR

 

/we set to 1 send Y

to the internal bus so that AR receives

y= F=0+b

To internal bus

 

sa=0 The value of the  a port is from the field of a port

sa=1 The value of the  a port from the field of the SR

sb=0  b port values from B-Port fields

sb=1  b Port values from the Dr field

 

 dr→ar

(y→ar)

1110 101 0 0 1 0 0 0 1 1 0 00 0 1 000 010
Q→mem, Cc#=0, 3#, a4h 0029 0300 1020 0010

  send data to internal bus IB

so the mem can get Y (Q)

TD style= "Text-align:center;" >
Next Address mar9-0 ci3-0 /mio req/we mi8-0 Sci DC1 DC2

a4h

a4h The function of the micro-instruction is based on whether there is an interrupt request,

The determines whether to enter the interrupt processing process or to execute the next instruction sequentially.

This is an action that should be performed after each machine instruction is completed.

Memory Write

None

y=f

r+s

r=0

s=q

 cin value 0 output of the operator not using

final conditional transfer to a4h execution of subsequent handlers

if interrupted: →adh∽b6h→a5h

without interruption: →a5h

 

 

y=f=q

 0+q

 

   

10100010 (forward 0)

0011 000 0 0 1 0 0 0 010 00 20s 000

Episode

On how to get the microcode, first we have to use the micro-instruction parser . But when I poked the little penguin, something went wrong ... Such

This is the reason why Tabctl32.otx is not in the correct directory and has not yet been loaded to find a solution on your own. Say so or give the link. "

Test tools:

You can open the TEC-2 simulator, and then open the monitoring program, or you can open the monitor~ in the folder directly

Steps

1. First, enter the microcode into a memory unit that starts with 0900H. Use the e command to input microcode, enter after the transmission of the program. Separate each value with a space and press ENTER when finished. Such as:

>e0900

2. Load microcode and enter microcode with a command. Such as:

>a0800
0800:MOVR1, the ;microcode in-memory first address 0802:MOVR2,7 ;Micro-instruction bar number 0804:MOVR3, - ;microcode in the micro-control memory of the first address 0806: LDMC;load microcode instructions to load microcode instructions into micro-control memory 0807:RET 0808:

3. Run the program with the G command to load the microcode. Such as:

>g0800

4. Use the a command to enter a new program for testing. Such as:

>a08200820:MOVR0,0011        ;0011→r00822:MOV[0890],r0;R0 content → Memory 0890 address0824:MOVR1,0891        ;0891→R10826:NOP                 ;NOP is an empty operation instruction, reserved unit0827:NOP0828:NOP0829:RET

5. Call new instructions at the beginning of NOP to test. Such as:

0890 0111            ; instruction Format: D4drx ADDR DATA (D410 1 is the R1 register, where the results are sent. In 4, we used MOV R1, 0891 command, so you can see the contents of R1 in 0891.

This invokes the operation code D4 of the new instruction, with the operand addr=0890 data=1111. And then:

>g0820                     ; executes a micro program with a first address of 0820

6. View the results and use the D or r command to view the memory or register status after the program is run.

>d0891

7. Run:

Reference
    1. Http://www.cnblogs.com/joyeecheung/p/3687773.html
    2. Http://www.cnblogs.com/chenshiyu/p/4457211.html

TEC-2 micro-programming and testing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.