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梦中情岛 🌊
声明:本文涉及图文和模型素材仅用于个人学习.研究和欣赏,请勿二次修改.非法传播.转载.出版.商用.及进行其他获利行为. 背景 深居内陆的人们,大概每个人都有过大海之梦吧.夏日傍晚在沙滩漫步奔跑:或是在 ...
随机推荐
- Linux 基础入门 第二周9.21~9.27
一.学习内容 本周主要学习内容主要贴合: 在进行<深入理解计算机系统>这门课的实验中没有遇到什么大问题,学习内容与上周实验<linux基础入门>有相似之处.本实验中的内容比较贴 ...
- 交流异步电机的Modelica模型
Modelica标准库里的异步电机模型过于复杂,为了便于学习,我用最基本的异步电机方程写了一个Modelica模型,公式参照陈伯时的<电力拖动自动控制系统--运动控制系统>第3版的190页 ...
- Jenkins进阶系列之——07更改Jenkins的主目录
Jenkins默认会存放在用户主目录下的.jenkins文件夹中 如:Linux root用户:/root/.jenkins 注意:这是linux版本的.windows系统请自行更改.这个值在Jenk ...
- ASP.NET 系列:RBAC权限设计
权限系统的组成通常包括RBAC模型.权限验证.权限管理以及界面访问控制.现有的一些权限系统分析通常存在以下问题: (1)没有权限的设计思路 认为所有系统都可以使用一套基于Table设计的权限系统.事实 ...
- Swift 玩转 3D Touch 之 Peek & Pop
什么是3D Touch 3D Touch 是iOS9之后专为 iPhone6s 机型加入的新特性,这一新技术移植于 Mac Book 上的 ForceTouch 更准确地说应该是 ForceTouch ...
- #Linux学习笔记# Linux在线帮助文档man page
man是manual的简称,表示手册页.Linux系统的帮助手册页是按照章节(SECTION)来存储了.man手册页分为下面几个章节. 1 普通命令 2 内核提供的系统调用 3 库调用(C库函数) 4 ...
- sql server 使用函数辅助查询
函数是所有语言系统下都具备的内部数据处理过程,SQL SERVER也同样内置了许多函数.在SQL SERVER中,函数是由一个或多个T-SQL语句组成的子程序.利用函数可以简化数据的处理操作. 函数分 ...
- 'UserInfoBLL' node cannot be resolved for the specified context [MVC展示数据.Controllers.LoginController]问题解决
我们在配置Spring.Net时,往往会提示找不到,然而看了看都对着呢?那么问题出在了哪? 问题呈现: 进行如下修改,将名字随便取个,不为BLL方法名字即可,我这里添加了一个1,注意这里改了,控制器里 ...
- psd做成HTML相关参考页面
前端制作(美工)是怎么把PSD制作成页面的? 美工怎么做的我不清楚,因为我是做前端的,我就从前端这个角度说吧. 首先拿到PSD,先分析哪些是要导出为图片的,哪些是可以自己用代码完成的.将图片全部导出, ...
- WPF--调用线程必须为 STA,因为许多 UI 组件都需要(转载)
自VS2005开始,UI元素在不同线程中访问就受到限制了,当然你也可以解除这种限制 以下提供Framework3.0的解决方案发: public partial class Window1 : Win ...