Altera的几个常用的Synthesis attributes
各厂商综合工具,对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的更多相关文章
- Altera的几个常用的Synthesis attributes(转载)
各厂商综合工具,对HDL综合时都定义了一些综合属性这些属性可指定a declaration,a module item,a statement, or a port connection 不同的综合方 ...
- [笔记]Altera系列01:常用资料下载链接
Altera官方文档 Altera Product Catalog 外部存储器规范估算器 To be continued.
- ADO面板上的控件简介
ADO面板上的控件简介 一. TADOConnection组件该组件用于建立数据库的连接.ADO的数据源组件和命令组件可以通过该组件运行命令及数据库中提取数据等.该组件用于建立数据库的连接,该连接可被 ...
- javascript系列之DOM(一)
原文:javascript系列之DOM(一) DOM(document object moudle),文档对象模型.它是一个中立于语言的应用程序接口(API),允许程序访问并修改文档的结构,内容和样式 ...
- VBS基础篇 - 对象(5) - File对象
VBS基础篇 - 对象(5) - File对象 描述:提供对文件所有属性的访问,从FSO对象的GetFile方法获得. 使用File对象 要用File对象模型来编程必须先用FileS ...
- mfc CTabCtrl
知识点: CTabCtrl常用属性 CTabCtrl类常用成员函数 CTabCtrl代码示例 一.CTabCtrl控件属性 Bottom:底部样式 Vertical:垂直样式 与Bottom结合使用, ...
- 笔记-django- HttpRequest/Response
笔记-django- HttpRequest/Response 1. HttpRequest/Response When a page is requested, Django create ...
- Delphi通过ADO读写数据库
ADO是一种程序对象,用于表示用户数据库中的数据结构和所包含的数据. ADO (ActiveX Data Objects,ActiveX数据对象)是Microsoft提出的应用程序接口(API)用以实 ...
- Three.js 打造缤纷夏日3D梦中情岛 🌊
声明:本文涉及图文和模型素材仅用于个人学习.研究和欣赏,请勿二次修改.非法传播.转载.出版.商用.及进行其他获利行为. 背景 深居内陆的人们,大概每个人都有过大海之梦吧.夏日傍晚在沙滩漫步奔跑:或是在 ...
随机推荐
- 用scheme语言实现SPFA算法(单源最短路)
最近自己陷入了很长时间的学习和思考之中,突然发现好久没有更新博文了,于是便想更新一篇. 这篇文章是我之前程序设计语言课作业中一段代码,用scheme语言实现单源最段路算法.当时的我,花了一整天时间,学 ...
- nodejs初学————安装篇(iis8.5+windows8.1)
nodejs很久前就想玩玩,不过一直没时间,昨晚花了4个小时来捣鼓到iis上架设成功了,废话不说了. PS:我的系统是windows8.1 x64,所以自带iis8.5的,下载的文件也是x64的. N ...
- Thinkphp 边学边用-验证码无意间犯的错
先看代码: $(".verify_img").click(function(){ var timenow = new Date().getTime(); var url =&quo ...
- [USACO2005][POJ3044]City Skyline(贪心+单调栈)
题目:http://poj.org/problem?id=3044 题意:以坐标的形式给出一张图,表示一些楼房的正视图,求出楼房的最少个数. 分析:和小学常做的立方体问题很像,很容易想到一个贪心方法, ...
- 02.C#可空類型、默認參數、LINQ(一章1.3-1.4)
利用上班時間發個隨筆,不知領導會不會看到,可能會有同事看到也說不定啊:) 關于可空類型,在C#1中沒有這個概念,在C#3中引入的.那比如我們要實現一個表示人的類,人有名字和年齡兩個屬性,如何表示一個沒 ...
- 第十一章:WEB浏览器中的javascript
客户端javascript涵盖在本系列的第二部分第10章,主要讲解javascript是如何在web浏览器中实现的,这些章节介绍了大量的脚本宿主对象,这些对象可以表示浏览器窗口.文档树的内容.这些章节 ...
- SDAutolayout图片大小根据数量变化
只需要在自定义的PhotoContainerView中做一下判断就可以了 ) { [self setupAutoWidthFlowItems:[temp copy] withPerRowItemsCo ...
- 新建URL,cookie技术
假如用户禁止了cookie,怎么用session技术 //在这里访问一下session request.getSession(); //这里注意的是 要使用一下session while(iterat ...
- hdu1890 伸展树(区间反转)
对于大神来说这题是水题.我搞这题花了快2天. 伸展树的优点有什么,就是树不管你怎么旋转序列是不会改变得,并且你要使区间反转,只要把第k大的点转到根结点,那么它的左子树就是要交换的区间[l,r),然后交 ...
- HYSBZ1036 树链剖分
这题我建了2棵线段树,这样来处理 最值和和值,简单的题目. #include<queue> #include<stack> #include<cmath> #inc ...