- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Verilog语言与FPGA数字逻辑设计4.0汇总.ppt
流水线 流水线设计:把规模较大、层次较多的组合逻辑分成几个级,在每一级插入寄存器组暂存中间数据。 K级流水线就是从组合逻辑的输入到输出恰好有K级,每级一个寄存器组,上一级的输出是下一集的输入,且又无反馈。 Verilog HDL HDL(Hardware Description Language):硬件描述语言,用于描述数字电路。 Verilog代码风格 良好的代码风格有助于综合工具对逻辑进行优化。 三态门 三态信号仅在驱动顶层的输出/双向引脚时可以用。在Altera FPGA内部的信号传输时不可以用三态门。 module tristate (myinput, myenable, mybidir); input myinput, myenable; inout mybidir; assign mybidir = (myenable ? myinput : 1bZ); endmodule 三态门 my_bidir A 三态门 Cyclone系类FPGA的I/O结构 OE Output Input 内部总线挂接 数据接收逻辑 sdram_fifo逻辑 cf_fifo逻辑 数据接收逻辑 sdram_fifo逻辑 cf_fifo逻辑 数据接收逻辑 sdram_fifo逻辑 cf_fifo逻辑 usb逻辑 S通道 E通道 A通道 USB接口 遥测 422接收逻辑 cf_fifo逻辑 FPGA 流水线 组合逻辑:c0 Tc1+Tc2+Tc3=Tc0 Max{Tc1, Tc2, Tc3} Tc0 c1 D Q c2 D Q c3 D Q 流水线 module binary_adder_tree2 (a, b, c, d, e, clk, out); parameter width = 16; input [width-1:0] a, b, c, d, e; input clk; output [width-1:0] out; assign out = a + b + c + d + e; endmodule module binary_adder_tree2 (a, b, c, d, e, clk, out); parameter width = 16; input [width-1:0] a, b, c, d, e; input clk; output [width-1:0] out; wire [width-1:0] temp1, temp2, temp4; assign temp1 = a+b; assign temp2 = c+d; assign temp3 = temp1+temp2; assign out = temp3+e; //assign out = (a+b) + (c+d) + e; endmodule 流水线 module binary_adder_tree (a, b, c, d, e, clk, out); parameter width = 16; input [width-1:0] a, b, c, d, e; input clk; output [width-1:0] out; wire [width-1:0] sum1, sum2, sum3, sum4; reg [width-1:0] sumreg1, sumreg2, sumreg3, sumreg4; // Registers always @ (posedge CLK) begin sumreg1 = sum1; sumreg2 = sum2; sumreg3 = sum3; sumreg4 = sum4; end // 2-bit additions assign sum1 = a + b; assign sum2 = c + d; assign sum3 = sumreg1 + sumreg2; assign sum4 = sumreg3 + e; assign out = sumreg4; endmodule module binary_adder_tree2 (a, b, c, d, e, clk, out); parameter width = 16; input [width-1:0] a, b, c, d, e; input clk; output [width-1:0] out; assign out = (a + b) + (c + d) + e; endmodule 状态机 状态机:注意事项 如果状态转换逻辑中包含算法,则Quartus II不会将其综合成状态机; 如果状态变量作为
文档评论(0)