poc报告 联系客服

发布时间 : 星期六 文章poc报告更新完毕开始阅读

POC Design

Purpose

The purpose of this project is to design and simulate a parallel output controller

(POC)which acts an interface between system bus and printer. The Altera’s Quartus II EDA tool is recommended and provided for simulation.

Task

POC is one of the most common I/O modules, namely the parallel output controller. It plays the role of an interface between the computer system bus and the peripheral (such as a printer or other output devices).

Figure 1 Printer Connection

Figure 1 shows the connecting of a printer to the system bus through the POC. The communication between POC and the printer is controlled by a “handshake” protocol illustrated in Figure 2.

1 / 7

Figure 2 The handshake-timing diagram between POC and the printer

The handshaking process is described as follows: When the printer is ready to receive a character, it holds RDY=1.The POC must then hold a character at PD (parallel data)

port and produce a pulse at the terminal TR (transfer request). The printer will change RDY to 0, take the character at PD and hold the RDY at 0 until the character has been printed (e.g. 5 or 10ms), then set RDY=1 again when it is ready to receive the next character. (Suppose the printer has only a one character “buffer” register, so that each character must be printed before the next character is sent).

In order to ease your design work, the further explanations of the POC operations and some design hints are given as follows:

The buffer register BR is used to hold a character that has been sent via the system bus while that the character is being transferred to the printer. The status register SR is used for two control functions: SR7serves as a ready flag for system bus transfers to BR (like the printer RDY signal for transfers from POC to the printer), and SR0 is used to enable or disable interrupt requests from POC. If SR0=1, then POC will interrupt when it is ready to receive a character (i.e., when SR7=1). If SR0=0, then POC will not interrupt. The other bits of SR are not used and empty.

The transfer of a character to POC via the system bus proceeds as follows. POC indicates that it is ready by setting SR7.The processor reads SR (by executing a

polling or interrupt service routine) and, finding SR7=1, writes a character to BR. The POC clears SR7 when it loads this character into BR to indicate that another character should not be sent for the moment. POC then proceeds to transfer the character in BR to the printer by generating a pulse at TR. The processor, in the

meantime, continues to fetch and execute instructions .If it should happen to read SR, it will find SR7=0 and hence will not attempt to send another character to the printer. When the printer is ready to receive another character, POC sets SR7.The transfer cycle can now repeat

The overall connection of the simulated printer and POC

2 / 7

Design description of the simulation connection

clk -- system clock.

reset -- input signal that resets the whole system. cs -- enable signal.

rw -- input signal of POC that is the control of reading datas from POC to

CPU or writing datas from CPU to POC

mode -- input signal .when set to ‘0’,represents the mode of polling ;when set

to’1’, represents the mode of interrupt.

a -- 3 bits address bus.”000” represents the state of idle.”001” represents the

state of transfer data.

d -- 8 bits data bus between CPU and POC. pd -- 8 bits data busl between POC and Printer.

rdy -- the signal which reprensents the state of printer.

tr -- a pulse signal from POC to make the rdy be low-level. irq -- Interrupt signal from POC to CPU.

Simulation results and explanation

1.The simulation wave of printer module

Explanation: When the printer is ready to receive a character, it holds RDY=1.The POC must then hold a character at PD (parallel data) port and produce a pulse at the terminal TR (transfer request). Then the printer will change RDY to 0, take the character at PD and hold the RDY at 0 until the character has been printed (e.g. 5 or 10ms), then set RDY=1 again when it is ready to receive the next character.

2.The simulation wave of polling mode without printer

3 / 7

Explanation: In polling mode, the singal mode=’0’ and The irq signal is always ‘0’ ,rw and a are singals from cpu to poc to control the action of poc.rw=’1’ and A=’000’ represents the state of idle.rw=’1’ and A=’001’ represents the state of transfer data and print. When a pulse signal tr arrive,the data is send to pd from d , After the tr signal we can see that the input rdy signal change to 0.

3.The simulation wave of interrupt mode without printer

Explanation: In interrupt mode,mode=1 and rw and A are signals from cpu to

poc to control the action of poc.rw=’1’ and A=’000’ represents the state of idle.rw=’1’ and A=’001’ represents the state of transfer data and print.after a irq signal ‘1’is send to cpu,a data is send to br from cpu.then a pulse signal tr is send to printer,the data is send to pd from br at the same time , After the tr signal we can see that the input rdy signal change to 0.

4.The simulation wave of poc with printer in both mode

4 / 7