基于vhdlpoc设计说明书.docx_第1页
基于vhdlpoc设计说明书.docx_第2页
基于vhdlpoc设计说明书.docx_第3页
基于vhdlpoc设计说明书.docx_第4页
基于vhdlpoc设计说明书.docx_第5页
已阅读5页,还剩31页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

The Report of POC Design March 29, 20111、Purpose1. The purpose of this project is to design and simulate a parallel output controller (POC) which acts an interface between system bus and printer.2. The use of MaxPlus II for design and simulation.2、Taska. The physical model of POCPOC 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 ConnectionFigure 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. Figure 2 The handshake-timing diagram between POC and the printerb. The logical model of POCThe 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. c. The overall connection of printer and POCThe overall connection graph as follows:In this graph there are two main modules: printer and poc; Printer in this project is used as a time-delayer. POC contains the main program of this project. 3、Simulation and ExplainMeaning of Symbols:cs - enable signal. clk - clock signal.rw - input signal of POC that is the control of reading datas from POC to CPU or writing datas from CPU to POCreset - input signal that resets the whole system.chos - input signal .when set as 0,represents the mode of inquiry ;when set as1, represents the mode of interrupt.D - 8 bits data signal from CPU to POC. A - 3 bits address signal from CPU to POC.”000”point to br.”001”point to br.pd - 8 bits signal from POC to Printer.rdy - input signal that is a printer ready message to POC.tr - a pulse signal to make the rdy be low-level. irq - Interrupt signal from POC to CPU. 3.1 The simulation wave of POC module(without printer)a. inquiry modeHere are the explanations of the simulation wave:1、 cs is the chip select signal which means when set 1, the chip is selected to work.2、 When reset=1 and here comes a positive edge of the clock, the whole system resets.3、The control signal chos =1 indicates that poc use the inquiry mode.4、Here the A indicate the target. When A=”001” means the cpu selects sr register as the read or write target, when A=”000” means cpu selects the br.5、In a inquiry , rw and A are singals from cpu to poc to control the action of poc.rw=1 and A=001 write data from cpu(D) to poc(br).rw=1 and A=000 write status to update sr to set sr(7)=0.rw=1 and A=001 again write data from poc(br) to printer(pd).6、The irq signal is always 0 because the control signal chos always equals 0, the block works in inquiry mode.7、After sending datas to br and set sr to “00000000”, 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 to 0, which shows that the tr signal really make the printer work.8、In the whole process, sr register have two status, when data from cpu send to poc, cpu set the sr to “00000000” to indicate that poc is busy, after printer comes to ready again poc set sr to “10000000” itself to indicate that it comes to ready and can get the print task. The printer comes to ready again and poc sets sr to “10000000” .b. interrupt modeHere are the explanations of the simulation wave:1、In the interrupt mode, chos is always set 1, the print process occures by the irq signal from poc.2、When irq send 0 to cpu,it means there is a print requirement and cpu begin to handle it.3、 In the interrupt process rw and A are singals from cpu to poc to control the action of poc.rw=1 and A=001 write data from cpu(D) to poc(br).rw=1 and A=000 write status to update sr to set sr(7)=0andsr(0)=0.rw=1 and A=001 again write data from poc(br) to printer(pd). 4、After sending datas to br and set sr to “00000000”, 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 to 0, which shows that the tr signal really make the printer work. after printer comes to ready again poc set sr to “10000001” itself to indicate that it comes to ready and can get the print task.3.2 The simulation wave of printer module 1、The receiving is started in response to the leading edge of the tr signal transmitted from the poc, and the rdy is cleared to indicate that the printer is busy. 2、After some time interval, the rdy is set again, indicating the current character printing is finished and the printer is ready for next turn. 3.3 The simulation wave of the whole POC (with printer)a. inquiry mode1、chos=0,the whole block in inquiry mode.Here irq always equals 0. The mean of signals is the same as the above.2、The simulation wave shows that the whole block as the design requirements.b. interrupt modeHere are the explanations of the simulation wave:1、chos=1,the whole block in interrupt mode. If the printer is free, the poc will generate an interrupt (irq=1).After cpu deal with the interrupt, the data will be transferred to printer. The printer will cost some time to deal with the data. Then the process can be circled.2、The simulation wave shows that the whole block as the design requirements.c、Mix of inquiry mode and interrupt modeHere are the explanations of the simulation wave:To mix of inquiry mode and interrupt mode,first set chos as0,then set as 1.In the inquiry mode irq is always equal 0.Then in the interrupt mode, If the printer is free, the poc will generate an interrupt (irq=1).when poc and printer deal with the interrupt, irq changes to 0.4、Conclusions and discussionsa. As a parallel output controller ,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.b. Since there is no need to establish an cpu module , I set rw and A to instead the action of cpu to meet the need of simulation. Considering that the functional simulation, I add some variable to make sure the simulation in good timing in the program.c. By designing the POC module, I find it helps to learn how to use of quartus and VHDL for design and simulation.The process of designing also teachs me the importantce of figuring out the structure and timing of the task before programming .d.Thinking deeply,we can find that there are some shortages of this model.One of the most important one is that one printer can only be used by one user in this model. If many people want to use the printer, the efficiency of the POC will be dropped fleetly. Because many users will generate interrupt. The CPU will be interrupted frequently and the POC will also work gap by gap. So we should solve this matter. We have some techniques to solve it. But the most popular of them is a technique called SPOOLing (Simultaneous Peripheral Operation On-Line). The core mind of it is sharing. The printer is independent in physics, but sharing in logic. It uses a sharing main memory to buffer data, the data will not be sent to POC (or printer) unless the memory is full. The speed of accessing to main memory is much higher than to POC (or printer), so the total speed will grow much. AppendixThe full program as follows:a) printer:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity printer isport( clk: in std_logic; tr: in std_logic; reset:in std_logic; rdy: buffer std_logic);end entity printer;architecture one of printer issignal stime:std_logic_vector(2 downto 0):=000;beginprocess(clk)beginif(reset=0) then rdy=1;stime=000;elsif( tr=1)then rdy=0;elsif(clkevent and clk=1) then if (rdy=0and stime2) then stime=2) then rdy=1;stime=000; end if;end if;end process;end one;b) poclibrary ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity poc isport( clk: in std_logic; cs:in std_logic; rdy:in std_logic; rw:in std_logic; chos: in std_logic; reset:in std_logic; A:in std_logic_vector(2 downto 0); D:in std_logic_vector(7 downto 0); irq:out std_logic; tr:buffer std_logic; pd:out std_logic_vector(7 downto 0);end entity poc;architecture one of poc issignal br:std_logic_vector(7 downto 0):=00000000;signal sr:std_logic_vector(7 downto 0):=10000000;signal trtime:std_logic_vector(2 downto 0):=000;beginprocess(clk)beginif(cs=1) thenif(clkevent and clk=1)then if(reset=0)then if(chos=0)then irq=0;tr=0;sr=10000000; else irq=1;tr=0;sr=10000001;end if; end if; if(reset=1)then if(rw=1and A=000)then if(chos=0)then sr=00000000; else sr=00000000;irq=0;end if; elsif(rw=1and A=001)then if(chos=0) then if(rdy=1and sr(7)=1) then br=D;end if; if(rdy=1and sr(7)=0)then pd=br;tr=1;end if; if(rdy=0andtr=1)thentr=0;sr=10000000;end if; end if; if(chos=1)then if(rdy=1and sr(7)=1) then br=D;end if; if(rdy=1and sr(7)=0)then pd=br;tr=1;end if; if(rdy=0andtr=1)thentr=0;sr=10000001;irq=1;end if; end if; end if; end if;end if;end if;end process;end one; 39大学本科生毕业设计(论文)撰写规范本科生毕业设计(论文)是学生在毕业前提交的一份具有一定研究价值和实用价值的学术资料。它既是本科学生开始从事工程设计、科学实验和科学研究的初步尝试,也是学生在教师的指导下,对所进行研究的适当表述,还是学生毕业及学位资格认定的重要依据。毕业论文撰写是本科生培养过程中的基本训练环节之一,应符合国家及各专业部门制定的有关标准,符合汉语语法规范。指导教师应加强指导,严格把关。1、论文结构及要求论文包括题目、中文摘要、外文摘要、目录、正文、参考文献、致谢和附录等几部分。1.1 题目论文题目应恰当、准确地反映论文的主要研究内容。不应超过25字,原则上不得使用标点符号,不设副标题。1.2 摘要与关键词1.2.1 摘要本科生毕业设计(论文)的摘要均要求用中、英两种文字给出,中文在前。摘要应扼要叙述论文的研究目的、研究方法、研究内容和主要结果或结论,文字要精炼,具有一定的独立性和完整性,摘要一般应在300字左右。摘要中不宜使用公式、图表,不标注引用文献编号,避免将摘要写成目录式的内容介绍。1.2.2 关键词关键词是供检索用的主题词条,应采用能覆盖论文主要内容的通用技术词条(参照相应的技术术语标准),一般列35个,按词条的外延层次从大到小排列,应在摘要中出现。1.3 目录目录应独立成页,包括论文中全部章、节的标题及页码。1.4 论文正文论文正文包括绪论、论文主体及结论等部分。1.4.1 绪论绪论一般作为论文的首篇。绪论应说明选题的背景、目的和意义,国内外文献综述以及论文所要研究的主要内容。文管类论文的绪论是毕业论文的开头部分,一般包括说明论文写作的目的与意义,对所研究问题的认识以及提出问题。绪论只是文章的开头,不必写章号。毕业设计(论文)绪论部分字数不多于全部论文字数的1/4。1.4.2 论文主体论文主体是论文的主要部分,要求结构合理,层次清楚,重点突出,文字简练、通顺。论文主体的内容要求参照大学本科生毕业设计(论文)的规定第五章。论文主体各章后应有一节“本章小结”。1.4.3 结论结论作为单独一章排列,但不加章号。结论是对整个论文主要成果的归纳,要突出设计(论文)的创新点,以简练的文字对论文的主要工作进行评价,一般为4001 000字。1.5 参考文献参考文献是论文不可缺少的组成部分,它反映了论文的取材来源和广博程度。论文中要注重引用近期发表的与论文工作直接有关的学术期刊类文献。对理工类论文,参考文献数量一般应在15篇以上,其中学术期刊类文献不少于8篇,外文文献不少于3篇;对文科类、管理类论文,参考文献数量一般为1020篇,其中学术期刊类文献不少于8篇,外文文献不少于3篇。在论文正文中必须有参考文献的编号,参考文献的序号应按在正文中出现的顺序排列。产品说明书、各类标准、各种报纸上刊登的文章及未公开发表的研究报告(著名的内部报告如PB、AD报告及著名大公司的企业技术报告等除外)不宜做为参考文献引用。但对于工程设计类论文,各种标准、规范和手册可作为参考文献。引用网上参考文献时,应注明该文献的准确网页地址,网上参考文献不包含在上述规定的文献数量之内。1.6 致谢对导师和给予指导或协助完成论文工作的组织和个人表示感谢。内容应简洁明了、实事求是,避免俗套。1.7 附录如开题报告、文献综述、外文译文及外文文献复印件、公式的推导、程序流程图、图纸、数据表格等有些不宜放在正文中,但有参考价值的内容可编入论文的附录中。2、论文书写规定2.1 论文正文字数理工类 论文正文字数不少于20 000字。文管类 论文正文字数12 00020 000字。其中汉语言文学专业不少于7 000字。外语类 论文正文字数8 00010 000个外文单词。艺术类 论文正文字数3 0005 000字。2.2 论文书写本科生毕业论文用B5纸计算机排版、编辑与双面打印输出。论文版面设置为:毕业论文B5纸、纵向、为横排、不分栏,上下页边距分别为2.5cm和2cm,左右页边距分别为2.4cm和2cm,对称页边距、左侧装订并装订线为0cm、奇偶页不同、无网格。论文正文满页为29行,每行33个字,字号为小四号宋体,每页版面字数为957个,行间距为固定值20磅。页眉。页眉应居中置于页面上部。单数页眉的文字为“章及标题”;双数页眉的文字为“大学本科生毕业设计(论文)”。页眉的文字用五号宋体,页眉文字下面为2条横线(两条横线的长度与版芯尺寸相同,线粗0.5磅)。页眉、页脚边距分别为1.8cm和1.7cm。页码。页码用小五号字,居中标于页面底部。摘要、目录等文前部分的页码用罗马数字单独编排,正文以后的页码用阿拉伯数字编排。2.3 摘要中文摘要一般为300字左右,外文摘要应与中文摘要内容相同,在语法、用词和书写上应正确无误,摘要页勿需写出论文题目。中、外文摘要应各占一页,编排装订时放置正文前,并且中文在前,外文在后。2.4 目录目录应包括论文中全部章节的标题及页码,含中、外文摘要;正文章、节题目;参考文献;致谢;附录。正文章、节题目(理工类要求编写到第3级标题,即.。文科、管理类可视论文需要进行,编写到23级标题。)2.5 论文正文2.5.1 章节及各章标题论文正文分章、节撰写,每章应另起一页。各章标题要突出重点、简明扼要。字数一般在15字以内,不得使用标点符号。标题中尽量不用英文缩写词,对必须采用者,应使用本行业的通用缩写词。2.5.2 层次层次以少为宜,根据实际需要选择。层次代号格式见表1和表2。表1 理工类论文层次代号及说明层次名称示 例说 明章第1章 章序及章名居中排,章序用阿拉伯数字节1.1 题序顶格书写,与标题间空1字,下面阐述内容另起一段条1.1.1 款1.1.1.1 题序顶格书写,与标题间空1字,下面阐述内容在标题后空1字接排项 (1) 题序空2字书写,以下内容接排,有标题者,阐述内容在标题后空1字 版心左边线 版心右边线表2 文管类论文层次代号及说明章节条款项一、 (一) 1. (1)居中书写空2字书写空2字书写空2字书写空2字书写 版心左边线 版心右边线各层次题序及标题不得置于页面的最后一行(孤行)。2.6 参考文献正文中引用文献标示应置于所引内容最末句的右上角,用小五号字体。所引文献编号用阿拉伯数字置于方括号“ ”中,如“二次铣削1”。当提及的参考文献为文中直接说明时,其序号应该与正文排齐,如“由文献8,1014可知”。经济、管理类论文引用文献,若引用的是原话,要加引号,一般写在段中;若引的不是原文只是原意,文前只需用冒号或逗号,而不用引号。在参考文献之外,若有注释的话,建议采用夹注,即紧接文句,用圆括号标明。不得将引用文献标示置于各级标题处。参考文献书写格式应符合GB77141987文后参考文献著录规则。常用参考文献编写项目和顺序应按文中引用先后次序规定如下:著作图书文献序号作者书名(版次)出版地:出版者,出版年:引用部分起止页 第一版应省略翻译图书文献序号作者书名(版次)译者出版地: 出版者,出版年:引用部分起止页 第一版应省略学术刊物文献序号作者文章名学术刊物名年,卷(期):引用部分起止页学术会议文献序号作者文章名编者名会议名称,会议地址,年份出版地,出版者,出版年:引用部分起止页学位论文类参考文献序号研究生名学位论文题目出版地学校(或研究单位)及学位论文级别答辩年份:引用部分起止页 西文文献中第一个词和每个实词的第一个字母大写,余者小写;俄文文献名第一个词和专有名词的第一个字母大写,余者小写;日文文献中的汉字须用日文汉字,不得用中文汉字、简化汉字代替。文献中的外文字母一律用正体。作者为多人时,一般只列出前3名作者,不同作者姓名间用逗号相隔。外文姓名按国际惯例,将作者名的缩写置前,作者姓置后。学术会议若出版论文集者,可在会议名称后加上“论文集”字样。未出版论文集者省去“出版者”、“出版年”两项。会议地址与出版地相同者省略“出版地”。会议年份与出版年相同者省略“出版年”。学术刊物文献无卷号的可略去此项,直接写“年,(期)”。参考文献序号顶格书写,不加括号与标点,其后空一格写作者名。序号应按文献在论文中的被引用顺序编排。换行时与作者名第一个字对齐。若同一文献中有多处被引用,则要写出相应引用页码,各起止页码间空一格,排列按引用顺序,不按页码顺序。参考文献书写格式示例见附录1。2.7 名词术语科技名词术语及设备、元件的名称,应采用国家标准或部颁标准中规定的术语或名称。标准中未规定的术语要采用行业通用术语或名称。全文名词术语必须统一。一些特殊名词或新名词应在适当位置加以说明或注解。文管类专业技术术语应为常见、常用的名词。采用英语缩写词时,除本行业广泛应用的通用缩写词外,文中第一次出现的缩写词应该用括号注明英文全文。2.8 计量单位物理量计量单位及符号一律采用中华人民共和国法定计量单位(GB310031021993,见附录2),不得使用非法定计量单位及符号。计量单位符号,除用人名命名的单位第一个字母用大写之外,一律用小写字母。非物理单位(如件、台、人、元、次等)可以采用汉字与单位符号混写的方式,如“万tkm”,“t/(人a)”等。文稿叙述中不定数字之后允许用中文计量单位符号,如“几千克至1 000kg”。表达时刻时应采用中文计量单位,如“上午8点45分”,不能写成“8h45min”。计量单位符号一律用正体。2.9 外文字母的正、斜体用法按照GB310031021986及GB71591987的规定使用,即物理量符号、物理常量、变量符号用斜体,计量单位等符号均用正体。2.10 数字按国家语言文字工作委员会等七单位1987年发布的关于出版物上数字用法的规定,除习惯用中文数字表示的以外,一般均采用阿拉伯数字(参照附录3)。2.11 公式原则上居中书写。若公式前有文字(如“解”、“假定”等),文字顶格书写,公式仍居中写。公式末不加标点。公式序号按章编排,如第1章第一个公式序号为“(1-1)”,附录2中的第一个公式为(-1)等。 文中引用公式时,一般用“见式(1-1)”或“由公式(1-1)”。公式中用斜线表示“除”的关系时,若分母部分为乘积应采用括号,以免含糊不清,如a/(bcosx)。通常“乘”的关系在前,如acosx/b而不写(a/b)cosx。2.12 插表表格不加左、右边线。表序一般按章编排,如第1章第一个插表的序号为“表11”等。表序与表名之间空一格,表名中不允许使用标点符号,表名后不加标点。表序与表名置于表上,居中排写(见附录4)。表头设计应简单明了,尽量不用斜线。表头中可采用化学符号或物理量符号。全表如用同一单位,将单位符号移到表头右上角,加圆括号(见附录4中的例2)。表中数据应正确无误,书写清楚。数字空缺的格内加“”字线(占2个数字宽度)。表内文字和数字上、下或左、右相同时,不允许用“”、“同上”之类的写法,可采用通栏处理方式(见附录4中的例2)。表内文字说明不加标点。文管类的插表在表下一般根据需要可增列补充材料、注解、附记、资料来源、某些指标的计算方法等。表内文字说明,起行空一格,转行顶格,句末不加标点。表题用五号字,表内文字及表的说明文字均用五号字,中文用宋体。表格容量较大,必要时表格也可分为两段或多段(这只能发生在转页时),转页分段后的每一续表的表头都应重新排字,重排表头的续表上方右侧应注明(续表)字样。2.13 插图插图应与文字紧密配合,文图相符,技术内容正确。2.13.1 制图标准插图应符合技术制图及相应专业制图的规定。机械工程图:采用第一角投影法,应符合附录5所列有关标准的规定。电气图:图形符号、文字符号等应符合附录6所列有关标准的规定。流程图:符合国家标准。对无规定符号的图形应采用该行业的常用画法。2.13.2 图题及图中说明每个图均应有图题(由图号和图名组成)。图号按章编排,如第1章第一图的图号为“图1-1”等。图题置于图下。有图注或其他说明时应置于图题之上。图名在图号之后空一格排写。引用图应说明出处,在图题右上角加引用文献编号。图中若有分图时,分图号用a)、b)等置于分图之下。图中各部分说明应采用中文(引用的外文图除外)或数字项号,各项文字说明置于图题之上(有分图题者,置于分图

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论