各厂商综合工具,对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"

verilog synthesis相关推荐

  1. (原創) 深入探討blocking與nonblocking (SOC) (Verilog)

    Abstract Verilog雖然是個語法簡單的語言,但是blocking與nonblocking卻是大家學習Verilog時永遠的痛,即時是很資深的IC Designer,也未必完全搞清楚兩者的差 ...

  2. 对于Verilog语言的一些总结

    1.不使用初始化语句: 2.不使用延时语句: 3.不使用循环次数不确定的语句,如:forever,while等: 4.尽量采用同步方式设计电路: 5.尽量采用行为语句完成设计: 6.always过程块 ...

  3. Verilog 总结

    先记下来: 1.不使用初始化语句: 2.不使用延时语句: 3.不使用循环次数不确定的语句,如:forever,while等: 4.尽量采用同步方式设计电路: 5.尽量采用行为语句完成设计: 6.alw ...

  4. Verilog HDL语言入门(二)

    强烈建议用同步设计 2.在设计时总是记住时序问题 3.在一个设计开始就要考虑到地电平或高电平复位.同步或异步复位.上升沿或下降沿触发等问题,在所有模块中都要遵守它 4.在不同的情况下用if和case, ...

  5. Verilog 非阻塞赋值的仿真/综合问题

    源文件作者:Clifford E. Cummings    (Sunburst Design, Inc.)  原标题:Nonblocking Assignments in Verilog Synthe ...

  6. 【数字设计验证】System Verilog(sv)稍微进阶的笔记(一)

    文章目录 1. EDA工具对代码的处理与输出 1.1 Compile 1.2 Simulation 1.3 Synthesis 2. System Verilog Coding Guide 2.1 状 ...

  7. 对Verilog 初学者比较有用的整理(转自它处)

    对Verilog 初学者比较有用的整理(转自它处) ************************************************************************** ...

  8. 对Verilog 初学者比较有用的整理

    对Verilog 初学者比较有用的整理(转自它处) ************************************************************************** ...

  9. Verilog 最全经验总结

    1.不使用初始化语句: 2.不使用延时语句: 3.不使用循环次数不确定的语句,如:forever,while等: 4.尽量采用同步方式设计电路: 5.尽量采用行为语句完成设计: 6.always过程块 ...

最新文章

  1. Spring MVC 过时了吗?
  2. MySQL—01—MySQL介绍和安装
  3. 新装WINDOWS XP系统 必须安装的十大高危漏洞补丁
  4. 科大星云诗社动态20210529
  5. 疫情之下的科技普惠:阿里云科技驱动中小企业数字化
  6. [蓝桥杯][2018年第九届真题]调手表(BFS)
  7. 小程序 生成条形码barcode.js
  8. c语言中为什么无法输入文件,Devc写C语言时无法输入文件内容
  9. python实现微信打飞机
  10. 华为云服务器搭建PaddlePaddle GPU环境
  11. 《别闹了,费曼先生》读书笔记
  12. 大学“电路分析基础”试题合集第八章
  13. 羊哥推荐的Java后端开发书籍
  14. 加州大学戴维斯分校 计算机科学,UCDavis的Computer Science「加州大学戴维斯分校计算机科学专业」...
  15. 初学Linux时用到的一点复制,粘贴,删除,创建指令
  16. 极米投屏h2服务器响应失败,极米h2升级断电后怎么办?是修还是换一台当贝投影F3?...
  17. 128、函数接口类---Consumer
  18. Android 微信支付加密
  19. manifest.json
  20. 大数据培训:Hadoop HDFS 实现原理

热门文章

  1. 在线伪原创排版工具,让写作更高效!
  2. 浏览器内核和js引擎
  3. [乐意黎] 笔记本WIFI设置成固定IP
  4. Paper:《Graph Neural Networks: A Review of Methods and Applications—图神经网络:方法与应用综述》翻译与解读
  5. python 读取 word 表格_Python实现批量读取word中表格信息的方法
  6. 异动调薪对于HR经办和薪资经办协调作业的要求
  7. 一位Erlang程序员的告白
  8. 编程基本功训练:流程图和UML图的画法及练习
  9. 电脑宽带连接提示错误代码769怎么办?
  10. kubernetes云原生纪元:健康检查-高可用的守护者