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"
转载于:https://www.cnblogs.com/lianjiehere/p/4292704.html
Altera的几个常用的Synthesis attributes(转载)相关推荐
- (转)Altera的几个常用的Synthesis attributes
各厂商综合工具,对HDL综合时都定义了一些综合属性这些属性可指定a declaration,a module item,a statement, or a port connection 不同的综合方 ...
- Linux常用命令大全(转载收藏)
转载自鸿燕藏锋:https://www.cnblogs.com/yjd_hycf_space/p/7730690.html 最近都在和Linux打交道,感觉还不错.我觉得Linux相比windows比 ...
- C#常用集合的使用(转载)
大多数集合都在System.Collections,System.Collections.Generic两个命名空间.其中System.Collections.Generic专门用于泛型集合.针对特定 ...
- Linux系统常用的基本命令【转载CSDN象在舞】
本文主要介绍Linux中常用的基本命令,简单实用,以供大家参考,如有错误,欢迎大家指出.下面开始介绍. 一.查看哪个用户登录的系统 1.users命令 2.whoami命令或者who am i命令 二 ...
- VC常用控件用法(转载)
1.表头控制 Header Control 2.图像列表控制 Image List 3.列表控制和视 List Control&List View 4.树控制和视 Tree Control&a ...
- OD常用断点函数(转载)
OD常用断点函数 1.限制程序功能函数 EnableMenuItem 允许.禁止或变灰指定的菜单条目 EnableWindow 允许或禁止鼠标和键盘控制指定窗口和条目(禁止时菜单变灰) 2.对话框函数 ...
- LaTeX 常用宏包(转载)
latex常用宏包 (2014-08-01 19:45:30) 转载▼ 转载于http://blog.sina.com.cn/s/blog_628dd2bc0102uyih.html 页面与标 ...
- WebRTC源码研究(4)web服务器工作原理和常用协议基础(转载)
前言 前面3篇博客分别对WebRTC框架的介绍,WebRTC源码目录,WebRTC的运行机制进行了介绍,接下来讲解一点关于服务器原理的知识.后面博客会写关于WebRTC服务器相关的开发,目前git上面 ...
- ADAMS中的常用问题精选(转载)
1 .ADAMS中的单位的问题 开始的时候需要为模型设置单位.在所有的预置单位系统中,时间单位是秒,角度是度.可设置: MMKS--设置长度为毫米,质量为千克,力为牛顿. MKS-设置长度为米,质量为 ...
最新文章
- MYSQL 集群的数据节点错误信息归档
- 百度编辑器修改,不让它自动替换html标签
- 计算机三维作品说明,计算机三维技术
- 计算机网络第六章:应用层
- 用字体选择对话框改变字体
- pgsql怎么从interval中取出数字_tp6中swoole扩展websocket的使用
- Chrome DevTools进阶教程
- PC端设置每行固定三个元素多余换行
- 牛客题霸 [跳台阶] C++题解/答案
- Properties 持久的属性集
- (6)ISE14.7生成bit文件报错解决(FPGA不积跬步101)
- spring-boot actuator(监控)配置和使用
- u盘安装CENTOS后,启动missing operating system ,只能用U盘才能启动系统
- 转 Mac 使用ab性能测试工具
- 计算机英语这门课上后感1000,英语公开课观后感作文1000字
- 2021年茶艺师(初级)考试资料及茶艺师(初级)模拟试题
- php如何实现快速压缩视频,如何把大视频压缩小 怎么将视频压缩到最小方便储存...
- “BBEdit”代码与文本编辑功能有哪些?
- 华硕x450vb黑苹果系统拯救与安装
- 优化家里网速,以TL-WR842N为例
热门文章
- mvc的视图中显示DataTable的方法
- iOS:Cocoa编码规范 -[译]Coding Guidelines for Cocoa
- 读《数学之美》第四章 谈谈分词
- RAC+ASM在单机上恢复的过程
- 1000以内完数c语言程序_C语言经典面试题目及答案详解(二)
- Pytorch LSTM初识(详解LSTM+torch.nn.LSTM()实现)1
- Matlab各种最值问题
- Matlab Compiler路径
- vue-cli项目引用文件/组件/库 的注意事项(一)
- 面试中的常见14种算法套路