Final Project Report: For Advanced Microprocessor Design
Final Project Report: For Advanced Microprocessor Design
for
Finished By:
Zhao chengyan 255459
_________________________________________
Finished By:
Wang yi 252370
_________________________________________
We hereby claim that this project is finished by ourselves only and not any portion of
which is copied from any other people.
Index
1. Cover page
2. Project requirement & objective (copied from the requirement on the web)
3. Top design
1). Requirement of top view
2). Top design on Master ECB
3). Top design on Slave ECB
4). Top design of communication & control protocols
4. Implementation
1). Implementation on Master ECB
1>. Objective in Master ECB
2>. Receiver task in Master
3>. Get results task in Master
4>. Task schedular of Master
5>. Communication protocols & controls
2). Implementation on Slave ECB: processing & flow control
1>. Main frame
2>. Receiver task
3>. Sender task
4>. Execution task
5>. KBD response task
6>. Communication protocols & controls
5. Possible problems, debugging & programming experience
1>. Main frame control & multi-tasking algorithm
2>. A long Jump
3>. Possibly screen block
6. Dedication of different people
1>. Wang’s dedication
2>. Zhao’s dedication
3>. Public dedication
7. Project Developing time
8. Testing & Demo show
1>. Testing in Master ECB
2>. Testing in Slave ECB
3>. Demo Show Procedure
9. Appendix
1). Appendix A: master program with comments
2). Appendix B: slave program with comments
3). Disk: total source/execution code ready
Auxiliary Processor - AP
With
Fall 1996
TERM PROJECT:
2). Both program & control code would transfer through serial port 2
Description:
1>. The objective of this project is to allow to run programs on two computers
simultaneously. Control over the programs is to be provided through two mechanisms:
2>.Calls to auxiliary processor initiated by unimplemented instruction exceptions: For
example, use a line A exception to implement the following operations:
1)>. OPERATION1: submit a task for execution on auxiliary processor; specifies
block in memory where the relocatable code and data reside and transfers the code to the
auxiliary processor.
2)>. OPERATION2: check the status of the job on the auxiliary processor.
3)>. OPERATION3: get results back form the auxiliary processor (you may transfer
the entire block back including the code and assume that the data area contains the
results); specifies where to in the host memory the results are to be transferred .
3>. Real time monitor commands, for example:
For the host: same as operations 1, 2, 3 above.
For the auxiliary: same as operation 2 above.
Procedure:
Define the requirements for the auxiliary processor calls. State the function supported
by each call, parameters needed etc. Prepare detailed high level specifications for the
communication protocol between the host and the auxiliary processors. Select a subset of
real time monitor commands to be implemented on the host and on the auxiliary
processor.
Design and implement a real time kernel for each of the processors. Use the monitor
commands on the host to run a sample program on the auxiliary processor. Program a sample
MC68000 applications that includes calls to the functions to be executed on the auxiliary
processor. (In addition to MC68000 application you may try an IBM PC application (use
programming language of your choice) that talks to the auxiliary processor through a serial
port.
2). Requirements:
Prepare final report and a disk with the programs developed for this project. Final
report should include: description of the problem, high level specification, motivation and
description of the real time monitor functions and the functions accessible through the
unimplemented instruction exceptions, detailed description of the design including the
source code, description of the testing procedure, and finally a short instruction manual
that would allow a CS4825 student to run a sample application.
Also include an estimate on time (hours) it took to complete this project. If you
decided to work on different modules individually (e.g. one student develops kernel for
the host the other for auxiliary processor) please specify your contributions.
Due date:
3. Top Design:
1). Requirement for top view & objective:
The objective of the project is to show a task initiated from one node can
be carried out on another node. The status of the execution is monitored, and
the results expected can be achieved promptly.
1>. Submit an application in an un-implemented exception from the host(in our case, the exception
would be a Line A exception, with the parameters transferred in the D0 register).
2>. Slave will receive the application from the host and save it in a certain place in its private
memory(relocatable).
3>. Both master and slave will response for the user (PC keyboard): it must have a KBD response
module.
4>. After the computation (execution of the submitted task) finished, the slave will return the results to
master.
5>. Also, the master will receive the results coming back from slave and save the results into its private
memory.
There would be other user applications in the master ECB computer, since the remote execution could
happen simultaneously with the current ECB computation.
1>. Handshaking:
Before the useful data can be transmitted, a procedure called handshaking is needed. Because the
ACIA2 does not provide the necessary flow control functions and enough buffer size at the data link
level, some of the data transmitted when the receiver is not ready will be missed. On the other side, the
buffer makes it possible useless data may be collected by receiving party. The only way to guarantee the
success of data transmission is to make both parties ready at the same time and clear the useless data in
the buffer before the useful data transmission. So each byte transmitted will be collected at the other side
immediately and correctly. A handshaking started at the sending of communication inquiry signal(the "I")
from transmit party and ended with the acknowledgment signal (the "o") from the receiving party. The
useful data will be transmitted provided that the receiving of "o" at the transmit party.
After handshaking, the transmit party is ready to send data and the receiver party is ready to receive
data while the buffer is cleared.
i
MP ---------------------------> AP /* this is the handshaking part of the message transferring */
o
<---------------------------
program
---------------------------> /* this would be the source program transferring to AP */
I
MP -------------------------> AP /* this is the handshaking part of MP inquiry */
o
<------------------------
q
-------------------------> /* this is the request information and following is the request result */
n
<--------------------------
I
MP <------------------------- AP /* handshaking signals to get results back */
o
-------------------------->
result
<--------------------------
I
host <------------------------AP /* after the handshaking , the results would transfer back */
o
-------------------------> /* to the master */
result
<-------------------------
Because the control states of each processor are explicated defined, there will be no requirement
to add an identification and addressing tag to each message body. Most of the messages are mainly
composed of a byte, except the message containing the application program in which the length of the
application program is to be specified. For complex system composing of more than one AP or requiring
more than one tasks to be processed in one AP, the message encoding should be carefully defined and the
protocol control part will be a little bit more complex.
3). Slave KBD response & Inquiry response modular: is starts at address $5A00
1>. If there is inquiry message coming from the master ECB ready in the serial port 2, this modular
has the responsibility to reply the status of the submitted task. (Since it is still executing, the reply
message would be “n” for ever)
2>. If there is inquiry from the slave ECB connection computer keyboard, it also has the responsibility
to reply to this user. (Response the “Q” as “BUSY”)
3>. The status of the task is saved in a status word buffer, which is hold by the slave ECB only.
4>. The status word indicates the status of the current executing task and only could be changed if the
task is finished executing.
7. Project time
1). Top design time: 10 hours
2). Programming & debugging time in separate board: 10 hours
3). Handshaking & communication in both board: 15 hours
4). Prepare code & final report: 8 hours
5). Others: 5 ~ 10 hours
Total time consumed : 50 hours
8. Testing & Demo show:
1). Testing in Master ECB:
1>. Trace test on sender modular: to be sure the handshaking and app bin code sending could finish
smoothly.
2>. Trace test on receiver modular: to be sure the handshaking and app results could come back
correctly.
3>. KBD modular test: to be sure the inquiry message could transfer back and forth smoothly and the
replied message results could display onto screen correctly.
9. Appendix
1). Master Program: host1.x68 with comments on file (printed separately)
2). Slave Program: timer.x68 with comments on file (printed separately)
3). Disk with developed programs:
The program with the name above are all saved in the root directory.
Together with the MC68000 execution file, with the extension of .REC