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.
- Mysql 常用 SQL 语句集锦 转载(https://gold.xitu.io/post/584e7b298d6d81005456eb53)
Mysql 常用 SQL 语句集锦 基础篇 //查询时间,友好提示 $sql = "select date_format(create_time, '%Y-%m-%d') as day fr ...
- DEV控件:gridControl常用属性设置(转载)
特别长,先撸下来再说 1.隐藏最上面的GroupPanel gridView1.OptionsView.ShowGroupPanel=false; 2.得到当前选定记录某字段的值 sValue=T ...
- Mysql常用命令行大全——转载
转载地址:http://www.blogjava.net/supperchen/archive/2012/10/11/389340.html 第一招.mysql服务的启动和停止 net stop my ...
- C#常用集合的使用(转载)
大多数集合都在System.Collections,System.Collections.Generic两个命名空间.其中System.Collections.Generic专门用于泛型集合. 针对特 ...
- PHP的几个常用加密函数(转载 https://jellybool.com/post/php-encrypt-functions)
PHP的几个常用加密函数 在网站的开发过程中,常常需要对部分数据(如用户密码)进行加密,本文主要介绍PHP的几个常见的加密函数 MD5加密: string md5 ( string $str [, b ...
- Linux常用命令大全(转载收藏)
转载自鸿燕藏锋:https://www.cnblogs.com/yjd_hycf_space/p/7730690.html 最近都在和Linux打交道,感觉还不错.我觉得Linux相比windows比 ...
- 基于.NET平台常用的框架整理<转载>
转载来自:http://www.cnblogs.com/hgmyz/p/5313983.html 基于.NET平台常用的框架整理 自从学习.NET以来,优雅的编程风格,极度简单的可扩展性,足够强大 ...
随机推荐
- cassandra 之 在spark-shell 中使用 spark cassandra connector 完整案例
1.cassandra 准备 启动cqlsh, CQLSH_HOST=172.16.163.131 bin/cqlsh cqlsh>CREATE KEYSPACE productlogs WIT ...
- [javascript]jquery选择器笔记
技术文档 中文:http://jquery.cuishifeng.cn/ 英文:http://api.jquery.com/category/selectors/ 分类 基本选择器 层次选择器 过滤选 ...
- POJ1247-Magnificent Meatballs
http://poj.org/problem?id=1247 Magnificent Meatballs Time Limit: 1000MS Memory Limit: 10000K Total ...
- js中中括号,大括号使用详解
js中中括号,大括号使用详解 一.总结 一句话总结:{ } 是一个对象,[ ] 是一个数组 1.js大括号{}表示什么意思? 对象 { } 大括号,表示定义一个对象,大部分情况下要有成对的属性和值,或 ...
- 文件上传及时显示, 前端js和后端php相互结合使用
文件读取 javascript 绑定文件上传变化事件 onchange 利用window对象 FileReader 调用方法 readerAsDataURL onload 方法 异步读取 属性:fil ...
- Prism 4 文档 ---第7章 组成用户界面
一个应用程序的用户界面(UI)可以通用以下几种模式之一来构建: 窗体所需要所有的控件都包含在一个单独的XAML文件中,在设计时组合这个窗体. 窗体的逻辑区域被分割到单独的部分中,通常指哟过户控件.这些 ...
- RabbitMQ(4) 未路由的消息、TTL和死信
未路由的消息 当生产这发送的消息到达指定的交换器后,如果交换器无法根据自身类型.绑定的队列以及消息的路由键找到匹配的队列,默认情况下消息将被丢弃.可以通过两种方式 处理这种情况,一是在发送是设置man ...
- LeetCode OJ:Reorder List(重序链表)
Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do thi ...
- 第9课:备份mysql数据库、重写父类、unittest框架、多线程
1. 写代码备份mysql数据库: 1)Linux下,备份mysql数据库,在shell下执行命令:mysqldump -uroot -p123456 -A >db_bak.sql即可 impo ...
- 使用treemap 遍历map参数
遍历格式 XXX=123&XXX=456.....参数为map treemap是一个有序的key-value集合,它是通过红黑树实现的 TreeMap<String, String> ...