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

加入VIP,免费下载
 

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

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

下载须知

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

版权提示 | 免责声明

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

FIFO Verilog文档格式.docx

1、 F_FirstN, F_EmptyN );input Clk; / CLK signal.input RstN; / Low Asserted Reset signal.input (FWIDTH-1):0 Data_In; / Data into FIFO.input FInN; / Write into FIFO Signal.input FClrN; / Clear signal to FIFO.input FOutN; / Read from FIFO signal.output (FWIDTH-1):0 F_Data; / FIFO data out.output F_FullN;

2、 / FIFO full indicating signal.output F_EmptyN; / FIFO empty indicating signal.output F_LastN; / FIFO Last but one signal.output F_SLastN; / FIFO SLast but one signal.output F_FirstN; / Signal indicating only one / word in FIFO.reg F_FullN;reg F_EmptyN;reg F_LastN;reg F_SLastN;reg F_FirstN;reg FCWID

3、TH:0 fcounter; /counter indicates num of data in FIFOreg (FCWIDTH-1):0 rd_ptr; / Current read pointer.0 wr_ptr; / Current write pointer.wire (FWIDTH-1):0 FIFODataOut; / Data out from FIFO MemBlk0 FIFODataIn; / Data into FIFO MemBlkwire ReadN = FOutN;wire WriteN = FInN;assign F_Data = FIFODataOut;ass

4、ign FIFODataIn = Data_In; FIFO_MEM_BLK memblk(.clk(Clk), .writeN(WriteN), .rd_addr(rd_ptr), .wr_addr(wr_ptr), .data_in(FIFODataIn), .data_out(FIFODataOut) / Control circuitry for FIFO. If reset or clr signal is asserted, / all the counters are set to 0. If write only the write counter / is increment

5、ed else if read only read counter is incremented / else if both, read and write counters are incremented. / fcounter indicates the num of items in the FIFO. Write only / increments the fcounter, read only decrements the counter, and / read & write doesnt change the counter value. always (posedge Clk

6、 or negedge RstN) begin if(!RstN) begin fcounter = 0; rd_ptr wr_ptr end else beginFClrN ) beginWriteN & F_FullN)= wr_ptr + 1;ReadN & F_EmptyN)= rd_ptr + 1; ReadN &= fcounter + 1; else if(WriteN & != fcounter - 1; / All the FIFO status signals depends on the value of fcounter. / If the fcounter is eq

7、ual to fdepth, indicates FIFO is full. / If the fcounter is equal to zero, indicates the FIFO is empty. / F_EmptyN signal indicates FIFO Empty Status. By default it is / asserted, indicating the FIFO is empty. After the First Data is / put into the FIFO the signal is deasserted.RstN) F_EmptyN = 1b0;

8、 if(FClrN=1b1) begin if(F_EmptyN=1b0 & WriteN=1b0)b1; else if(F_FirstN=1 ReadN=1b1) else / F_FirstN signal indicates that there is only one datum sitting / in the FIFO. When the FIFO is empty and a write to FIFO occurs, / this signal gets asserted. F_FirstN if(F_EmptyN=1b0) | (fcounter=2 &b1) else i

9、f (F_FirstN=1 (WriteN ReadN) / F_SLastN indicates that there is space for only two data words /in the FIFO. F_SLastN if( (F_LastN=1b1) | (fcounter = (FDEPTH-3) & else if(F_SLastN=1 (ReadN WriteN) ) / F_LastN indicates that there is one space for only one data / word in the FIFO. F_LastN if (F_FullN=1 (fcounter = (FDEPTH-2) & else if(F_LastN=1 / F_FullN indicates that the FIFO is full. F_FullN if (F_LastN=1 else if(F_FullN=1endmodule/ Configurable memory block for fifo. The width of the mem/ block is configu

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

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