ImageVerifierCode 换一换
格式:DOCX , 页数:16 ,大小:21.64KB ,
资源ID:12217747      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/12217747.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(东南大学信息学院 poc实验报告.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

东南大学信息学院 poc实验报告.docx

1、东南大学信息学院 poc实验报告Computer Organization and Architecture COURSE DESIGNA Parallel Output Controller- (POC)Southeast universitySchool of Information Science and Engineering1. Design purposea. The purpose of this project is to design and simulate a parallel output controller (POC) which acts an interface

2、 between system bus and printer. The ISE EDA tool is recommended and provided for simulation.b. Learn about the using of Bi-directional Data Bus (BDB), and use a parallel Bi-directional Data Bus to finish the data transmission between CPU and POC.2. Introduction and TasksPOC is one of the most commo

3、n I/O modules, namely the parallel output controller. It plays the role of an interface between the computer system bus and the peripheralFigure 1. System structure diagramAs shows the inner connecting of a printer to the system bus through the POC. The com- munication between POC and the printer is

4、 controlled by a “handshake” protocol given in .Figure 2. The handshake-timing diagram between POC and the printerThe handshaking process is described as follows: When the printer is ready to receive a char- acter, it holds RDY=1. The POC must then hold a character at PD (parallel data) port and pro

5、duce a pulse at the terminal TR (transfer request). The printer will change RDY to 0, take the characterat PD and hold RDY at 0 until the character has been printed . delay 5 or 10ms), then set RDY to 1 again when it is ready to receive the next character.The buffer register BR is used to temporaril

6、y hold a character sent from the processor, which char- acter will be transferred to the printer later.The status register SR is used for two control functions:SR7 serves as a ready flag to indicate POC is ready or not to receive a new character from the processor.SR0 is used to enable the interrupt

7、 requests sent by POC.In interrupt mode, If SR0=1, then POC will send an interrupt request signal to processor when it is ready to receive a character ., when SR7=1).If SR0=0, then POC will not interrupt.The transfer of a character to POC via the system bus proceeds as follows:In interrupt mode, SR0

8、 is always 1.After sending character to printer, POC sets the SR7 to 1, since SR0=1, the interrupt request signal (IRQ) is set to 0, which indicate an effective interrupt signal to the processor.1、processor sets the value of SR7 &sets the value of BRWhen the processor detects the effective IRQ signa

9、l, the processor directly selects BR and writes a character into BR, (processor will never read the state of SR7, which is different with polling mode.)Then the processor sets the SR7 to 0, which indicates that the new character has been written intoBR and not printed yet.2、POC reads and sets the va

10、lue of SR7& handshakes operations with the printerWhen POC detects that SR7 is set to 0, POC then proceeds to start the handshaking operations with the printer.After sending character to printer, POC sets the SR7 to 1, which indicates POC is ready to receive another character from the processor. The

11、 transfer cycle can now repeat.( and are same with the polling state)PS: During the handshaking operations between POC and printer, the processor does not try to access POC until it receives the interrupt request signal3. The overall connection of the simulated printer and POC expressed in the top m

12、odule formFigure 3. The top module form of the project4. Design description of the simulation input waveformsThe input and output of CPU,POC and printer are shown below:ProcessorjPinsDescriptionInputclkInput the clock for the CPU running.modeChoose the mode for printing.When mode=1,select a interrup

13、t mode.IRQReceive the interrupt signal IRQ.When IRQ=1 , new data can be sent.DIN7.0Read data from poc.DOUT7.0Write data into poc.OutputrwShow the direction of the DOUT7.0 and DIN7.0 When rw=0, read data from POC.When rw=1, write data to POC.A0Control the address read and write on POC.When A0=0, choo

14、se SR.When A0=1, choose BR.CSCS=1, poc work.data7.0The data send to POC to be printedPOCPinsDescriptionInputclkInput the clock for the POC running.RWShow the direction of the DOUT7.0 and DIN7.0 When rw=0, send data to CPU.When rw=1, read data from CPU.A0Input address,When A0=0, choose BR. When A0=1,

15、 choose SR.RDYInput the ready signal from printer. When RDY=1, the printer is idle.When RDY=0, the printer is busy.CSInput the mode of the POC.When CS=0,select a polling mode. When CS=1,select a interrupt mode.data7.0The data receive from CPU to be printed.OutputPD7.0Output the data to printer.IRQOu

16、tput the interrupt signal IRQ to CPU,showing the POC and printer is ready.TRThe response to print RDY signal, a one-cycle pulse at the port TR(transfer request) shows that new data is sent to printer.DOUT7.0CS=0 POC send the state of SR to CPU ;CS=1 CPU read the data write in BRSignalSR7.0The regist

17、er contains the flags for the POC. When SR(7)=1, its idle.When SR(7)=0, its busy.BR7.0The register holds the value of data to print.printerPinsDescriptionInputclkInput the clock for the printer running.TRInput the pulse signal from POC, to show new data is coming.PD7.0Input the data from POC.OutputR

18、DYOutput RDY signal,when RDY=1, it shows printer is waiting for new data.5. Simulation resultsConnection between cpu and pocConnection between poc and printerHere are the explanations of the simulation wave:interrupt mode:1、In the interrupt mode,mode is always set 1, the print process occures by the

19、 IRQ signal from poc.2、When S(7)=0, IRA send 0 to cpu, it means there is a print requirement and cpu begin to handle it. 3、 In the interrupt process RW and A0 are singals from cpu to poc to control the action of poc.RW=1 and A0=1 write data from cpu(D) to poc(BR), means the begin of the interrupt pr

20、ocess.RW=x and A0=x means there is no interrupt requirement .4、After sending datas to BR and set sr to “00000000”, if RDY=1, poc give a impulse in TR to make the printer begin to work. After the TR signal we can see that the input RDY signal from the printer change from 1 to 0, which shows that the

21、TR signal really make the printer work. 5、After data of BR has been transmitted into printer, poc set SR to “” itself to indicate that it comes to ready and can get the next print task.6、Let data plus 1 to indicate the next new print cycle.6. Conclusion and Discussions1、As a parallel output controll

22、er ,poc module to act as an interface between cpu and printer. Form the simulation wave, we can see that my program meets the designs requirements.2、I divide the system into three parts, and one top entity. And I use two way to finishthe top entity. One is write program with vhdl language and anothe

23、r is create aschematic type file and connect wire.3、By designing the POC module, I find it helps to learn how to use of quartus and VHDL for design and process of designing also teachs me the importantce of figuring out the struc- ture and timing of the task before programming .Appendix:The program

24、of processor:library IEEE;use Uncomment the following library declaration if using- arithmetic functions with Signed or Unsigned values-use Uncomment the following library declaration if instantiating- any Xilinx primitives in this code.-library UNISIM;-use processor isport(clk : in std_logic;IRQ :

25、in std_logic;DOUT : out std_logic_vector(7 downto 0):=00000000;RW : out std_logic:=0;-0read,1writeA0 : out std_logic:=0;-0sr,1brDIN : in std_logic_vector(7 downto 0);end processor;architecture Behavioral of processor issignal data:std_logic_vector(7 downto 0):=00000000;signal mode:std_logic:=1;-默认为中

26、断模式beginprocess(clk)begin if clkevent and clk=1 thenif mode=1 then if IRQ=0 then A0=1; RW=1;-写入数据到BR data=data+00000001;-代表传输的字符 DOUT=data; else A0=X; RW=X;-读入SR的数据 end if; end if;end if;end process;end Behavioral;the program of poc:library IEEE;use Uncomment the following library declaration if usi

27、ng- arithmetic functions with Signed or Unsigned values-use Uncomment the following library declaration if instantiating- any Xilinx primitives in this code.-library UNISIM;-use poc isport(A0 : in std_logic;RW : in std_logic;clk : in std_logic;CS : in std_logic:=1;RDY : in std_logic;IRQ : out std_lo

28、gic:=1;DOUT : out std_logic_vector(7 downto 0);PD : out std_logic_vector(7 downto 0);TR : out std_logic:=0;DIN : in std_logic_vector(7 downto 0);end poc;architecture Behavioral of poc issignal SR : std_logic_vector(7 downto 0):=;signal BR : std_logic_vector(7 downto 0):=00000000;signal count:integer

29、 range 0 to 5:=0;type state_type is (s0,s1,s2);signal state: state_type:=s0;beginprocess(clk)begin if clkevent and clk=1 then TR=0; IRQ-中断请求信号 if SR(7)=1 then IRQ=0;-中断请求 state=s1; else IRQ=1; state-读入读出选择 if RW=1 and A0=1 then-cpu写入数据到BR BR=DIN; SR(7)=0; state=s2; elsif RW=0 and A0=0 then-cpu读入SR的数

30、据 DOUT=SR; elsif RW=1 and A0=0 then-cpu写入数据到SR SR=DIN; elsif RW=0 and A0=1 then-cpu读入BR的数据 DOUT-打印机 if RDY=1 then TR=1; PD=BR; SR(7)=1; end if; state=s0; end case;end if;end process;end Behavioral;the program of printer:library IEEE;use Uncomment the following library declaration if using- arithmetic functions with Signed or Unsigned values-use Uncomment the following library declar

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1