Altera器件的推荐代码风格.ppt

  1. 1、本文档共64页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Altera器件的推荐代码风格课件

* * * * * * Creating “Safe” State Machines Default clause does not make state machines “safe” Safe state machines created by using constraint/assignment in software Quartus II software has SAFE STATE MACHINE assignment that can be applied project-wide or on individual FSM May increase logic usage * Conclusion We showed what Verilog construct infers which logic function; We discussed how to instantiate common gates, Altera primitives and Megafunctions in Verilog; We talked about recommended Verilog coding styles for efficient synthesis. * Inferring 推断的 Instantiating 实例化的 * 了解Altera推荐的代码风格,从资源使用、时序性能、功耗几个方面分析,使写出的Verilog代码尽量高效。 * 设计的方法就是用综合工具将硬件描述语言的RTL级代码转变为门级网表 1〉代码需要转化成硬件,所以了解FPGA的内部架构很有必要 2〉综合工具将特定的代码转化成正确的逻辑 * 1〉使用行为建模描述逻辑块 例如,锁存器,计数器,寄存器,三态,内存,算法 2〉合成工具识别和插入逻辑功能描述 功能的典型优化 3〉使代码独立于供应商 * * * 1 用同步逻辑 2〉敏感信号的问题 3〉 4〉锁存器和寄存器 5〉if-else结构 6〉case 7 组合 8〉内部衍生时钟 * 同步设计: 1〉系统时钟方面 : 整个系统公用一个时钟,或者其衍生时钟,保证与源时钟有固定的相位关系。 2〉系统中主要存储元件:大都是时钟沿敏感的元件(即寄存器),而不是电平敏感的元件(即锁存器)。 * * 这里对比了两种类型的处理方式: 1〉组合逻辑的选择器 2〉时钟触发的D触发器 敏感信号列表包括所有的组合逻辑输入, * 敏感信号表只对仿真引擎起作用,而综合工具不会受到影响.综合后生成的门级网表是保证不遗漏敏感信号的,因此设计者不小心造成的敏感信号表的遗漏,往往会导致前仿真和后仿真的不一致。 引起硬件动作的被读信号应该都放在敏感信号表中,纯组合电路描述中的所有被读的信号都必须放在敏感信号表中,这些信号包括: 1) 组合电路描述中,所有被读取的信号; 2) 时序电路中的时钟信号,异步控制信号。 * * * * Here you think that you are setting the default condition to 0 but you are really latching the case where ina=1 and inb=0. * * * In typical clock-gating techniques, an AND gate is placed on the register’s clock pin. This makes it very sensitive to glitches and simultaneous switching inputs on the AND gate. In this recommended scheme, a register generates the enable command to ensure that it is free of glitches and spikes. The register that generates the enable is clocked on the negative edge of the master clock. This way only one input of the AND gate changes at a time, which does not generate glitches or spikes on the output. For a clock that is active on the falling edge, you would use an OR to gate the clock and register the

文档评论(0)

jiayou10 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8133070117000003

1亿VIP精品文档

相关文档