各厂商综合工具,对HDL综合时都定义了一些综合属性这些属性可指定a declaration,a module item,a statement, or a port connection 不同的综合方式。

语法为:

/* synthesis, <any_company_specific_attribute = value_or_optional_value */

下面就是Altera的几个常用的Synthesis attributes

Noprune

A Verilog HDL synthesis attribute that prevents the Quartus II software from removing a register that does not directly or indirectly feed a top-level output or bidir pin.

For example:

reg reg1 /* synthesis noprune */;

keep

A Verilog HDL synthesis attribute that directs Analysis & Synthesis to not minimize or remove a particular net when optimizing combinational logic.

For example:

wire keep_wire /* synthesis keep */;

preserve

A Verilog HDL synthesis attribute that directs Analysis & Synthesis to not minimize or remove a particular register when eliminating redundant registers or registers with constant drivers.

For example:

reg reg1 /* synthesis preserve */;

ram_init_file

A Verilog HDL synthesis attribute that specifies initial contents of an inferred memory.

For example:

reg [7:0] mem[0:255] /* synthesis ram_init_file = " my_init_file.mif" */;

ramstyle

A Verilog HDL synthesis attribute that specifies the type of TriMatrix Memory block to use when implementing an inferred RAM.

M512", "M4K", "M9K", "M144K", "MLAB", "M-RAM”

For example:

reg [0:7] my_ram[0:63] /* synthesis ramstyle = "M512" */;

translate_off  or  translate_on

Verilog HDL synthesis directives that direct Analysis & Synthesis to ignore portions of the design code that are specific to simulation and not relevant to logic synthesis.

For example:

parameter tpd = 2;  // Generic delays

// synthesis translate_off

#tpd;

// synthesis translate_on

关于状态机有下面三个综合属性:

full_case
 A Verilog HDL synthesis attribute that directs Analysis & Synthesis to treat unspecified state values in a Verilog Design File Case Statement as don't care values, and therefore to treat the Case Statement as "full".

仅用于Verilog ,与case 语句一起使用表明所有可能的状态都已经给出不需要其他逻辑保持信号的值.

module full_case (a, sel, y);
   input [3:0] a;
   input [1:0] sel;
   output y;
   reg y;
   always @(a or sel)                case (sel)      // synthesis full_case 
         2'b00: y="a"[0];
         2'b01: y="a"[1];
         2'b10: y="a"[2];
      endcase
endmodule

 parallel_case
 A Verilog HDL synthesis attribute that directs Analysis & Synthesis to implement parallel logic rather than a priority scheme for all case item expressions in a Verilog Design File Case Statement.

仅用于Verilog ,与case 语句一起使用强制生成一个并行的多路选择结构而不是一个优
先译码结构.

module parallel_case (sel, a, b, c);
   input [2:0] sel;
   output a, b, c;
   reg a, b, c;
   always @(sel)                  begin
      {a, b, c} = 3'b0;
      casez (sel)                // synthesis parallel_case 
         3'b1??: a = 1'b1;
         3'b?1?: b = 1'b1;
         3'b??1: c = 1'b1;
      endcase
   end
endmodule

syn_encoding
 A Verilog HDL synthesis attribute that determines how the Quartus II software should encode the states of an inferred state machine.
 强制重新状态机的状态编码方式.有default,one-hot,sequential,gray,johnson,compact,user几种编码方式

(* syn_encoding = "user" *) reg [1:0] state;
parameter init = 0, last = 3, next = 1, later = 2;

always @ (state) begin
case (state)
init:
out = 2'b01;
next:
out = 2'b10;
later:
out = 2'b11;
last:
out = 2'b00;
endcase
end

In the above example, the states will be encoded as follows:

init   = "00"
last   = "11"
next   = "01"
later   = "10"

Altera的几个常用的Synthesis attributes(转载)的更多相关文章

  1. Altera的几个常用的Synthesis attributes

    各厂商综合工具,对HDL综合时都定义了一些综合属性这些属性可指定a declaration,a module item,a statement, or a port connection 不同的综合方 ...

  2. [笔记]Altera系列01:常用资料下载链接

    Altera官方文档 Altera Product Catalog 外部存储器规范估算器 To be continued.

  3. Mysql 常用 SQL 语句集锦 转载(https://gold.xitu.io/post/584e7b298d6d81005456eb53)

    Mysql 常用 SQL 语句集锦 基础篇 //查询时间,友好提示 $sql = "select date_format(create_time, '%Y-%m-%d') as day fr ...

  4. DEV控件:gridControl常用属性设置(转载)

    特别长,先撸下来再说 1.隐藏最上面的GroupPanel  gridView1.OptionsView.ShowGroupPanel=false; 2.得到当前选定记录某字段的值  sValue=T ...

  5. Mysql常用命令行大全——转载

    转载地址:http://www.blogjava.net/supperchen/archive/2012/10/11/389340.html 第一招.mysql服务的启动和停止 net stop my ...

  6. C#常用集合的使用(转载)

    大多数集合都在System.Collections,System.Collections.Generic两个命名空间.其中System.Collections.Generic专门用于泛型集合. 针对特 ...

  7. PHP的几个常用加密函数(转载 https://jellybool.com/post/php-encrypt-functions)

    PHP的几个常用加密函数 在网站的开发过程中,常常需要对部分数据(如用户密码)进行加密,本文主要介绍PHP的几个常见的加密函数 MD5加密: string md5 ( string $str [, b ...

  8. Linux常用命令大全(转载收藏)

    转载自鸿燕藏锋:https://www.cnblogs.com/yjd_hycf_space/p/7730690.html 最近都在和Linux打交道,感觉还不错.我觉得Linux相比windows比 ...

  9. 基于.NET平台常用的框架整理<转载>

    转载来自:http://www.cnblogs.com/hgmyz/p/5313983.html 基于.NET平台常用的框架整理   自从学习.NET以来,优雅的编程风格,极度简单的可扩展性,足够强大 ...

随机推荐

  1. js事件在不同浏览器之间的差异

    目录: 1. 介绍 2. 不同浏览器之间的差异 2.1 添加事件的方法 2.2 事件对象event 2.3 event中的属性/方法 3. 总结 1. 介绍 javascript与HTML之间的交互是 ...

  2. js中中括号,大括号使用详解

    js中中括号,大括号使用详解 一.总结 一句话总结:{ } 是一个对象,[ ] 是一个数组 1.js大括号{}表示什么意思? 对象 { } 大括号,表示定义一个对象,大部分情况下要有成对的属性和值,或 ...

  3. Android----Material Design之(FloatActionButton,CoordinatorLayout,CollapsingToolbarLayout,AppBarLayout,TabLayout等)

    Material Design 的一些UI 平常开发还是用的比较多的,以前没写,最近总结一下,写一篇博客,要求版本在5.0以上. 主要介绍了FloatActionButton,CoordinatorL ...

  4. 【Demo】jQuery 设置简单的分页

    功能描述: (1)设定起始页位置和每页的大小: (2)绑定自定义的分页事件,在事件中隐藏当前页不需要显示的行: (3)为表格添加页链接: (4)绑定链接的单击事件,在事件中触发表格分页事件. 效果图: ...

  5. Spring Boot总结

    一.Spring Boot 入门 1.Spring Boot 简介 简化Spring应用开发的一个框架: 整个Spring技术栈的一个大整合: J2EE开发的一站式解决方案: 2.微服务 2014,m ...

  6. Java集合详解8:Java的集合类细节精讲

    Java集合详解8:Java集合类细节精讲 今天我们来探索一下Java集合类中的一些技术细节.主要是对一些比较容易被遗漏和误解的知识点做一些讲解和补充.可能不全面,还请谅解. 本文参考:http:// ...

  7. Quartz教程五:SimpleTrigger

    原文链接 | 译文链接 | 翻译:nkcoder 本系列教程由quartz-2.2.x官方文档翻译.整理而来,希望给同样对quartz感兴趣的朋友一些参考和帮助,有任何不当或错误之处,欢迎指正:有兴趣 ...

  8. C++高级编程2. 静态动态链接库

    C++高级编程2. 静态动态链接库20131018 1.动态链接库和静态链接库的区别: 静态链接库就是把lib文件中用到的函数代码直接连接进目标程序,程序运行的时候不在需要其他的库文件:动态链接库是把 ...

  9. Java--------------Windows下Redis的安装使用

    摘要 redis是一个key-value存储系统.和Memcached类似,它支持存储的value类型相对更多,包括string(字符串).list(链表).set(集合).zset(sorted s ...

  10. This function has none of DETERMINISTIC, NO SQL解决办法

    This function has none of DETERMINISTIC, NO SQL解决办法 创建存储过程时 出错信息: ERROR 1418 (HY000): This function ...