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! 

  • 相关阅读:
    P2519 [HAOI2011]problem a
    P1084 疫情控制
    P1941 飞扬的小鸟
    NOIP填坑计划
    P2831 愤怒的小鸟
    AGC 16 D
    P3960 列队
    Python3爬虫相关软件,库的安装
    软件理论基础—— 第一章命题逻辑系统L
    软件理论基础——导论
  • 原文地址:https://www.cnblogs.com/fpga/p/1631216.html
Copyright © 2011-2022 走看看