zoukankan      html  css  js  c++  java
  • noprune keep preserve 区别

    在用signaltap调试FPGA程序的时候,通常为了观察内部一些信号,可以加编译属性比如 keep preserve noprune

    那么他们的区别是什么呢?

    我们可以从Quartus的说明中找到答案

     

    preserve的解释是:防止quartus优化掉寄存器,其典型应用是将其放在module声名前,这样这个module内部的所有reg类型变量都会被保留。

    keep的解释如下:

    // Prevents Quartus II from minimizing or removing a particular

    // signal net during combinational logic optimization.

    // Apply the attribute to a net or variable declaration.


    (* keep *) wire <net_name>;

    (* keep *) reg <variable_name>;

    防止quartus优化掉组合逻辑中的特殊变量。

    noprune的解释

    // Prevents Quartus II from removing or optimizing a fanout free register.

    // Apply the attribute to the variable declaration for an object that infers

    // a register.


    (* noprune *)  <variable_declaration>;

    防止quartus优化掉没有扇出的寄存器。

    总结如下:如果你只想quartus不优化掉某个特殊变量可以使用keep(wire类型),noprune(reg类型),如果是想让module里面所有的reg类型都不要被优化,那么建议使用preserve! 

  • 相关阅读:
    python之socket编程
    python之异常处理
    面向对象进阶
    openstack的网络配置
    VLAN,GRE,VXLAN
    三节点搭建openstack-Mitaka版本
    矩阵转换
    判断区域相交的方法
    Centos 6.5 Multipath 初始配置
    CentOS开机自动运行程序的脚本
  • 原文地址:https://www.cnblogs.com/fpga/p/1631216.html
Copyright © 2011-2022 走看看