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

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/376223.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/376223.shtml
英文地址,請注明出處:http://en.pswp.cn/news/376223.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

QPushButton hover配置

鼠標移動到QPushButton上面時顯示下劃線 //下面是當鼠標移動到按鈕上時&#xff0c;按鈕上的文字顯示下劃線 QPushButton#Button_2:hover{ text-decoration:underline; }//下面是普通顯示 QPushButton#Button_2{ color:rgba(52, 144, 255 ,255); border-radius:0px; backgrou…

eclipse沒有日志_強化公共DHT以抵抗eclipse攻擊,ipfs官方還說了什么?

近日&#xff0c;IPFS官方發布博客&#xff0c;就如何強化公共DHT以抵抗eclipse攻擊進行詳細介紹&#xff0c;星球君幫大家翻譯了一下&#xff0c;讓我們來看看官方都說了什么吧&#xff1a;IPFS 2020 年的一個主要焦點是隨著網絡規模的不斷擴大而改進內容路由。雖然我們已經對…

mongoDB簡明教程-python(轉)

MongoDB是一個介于關系數據庫和非關系數據庫之間的產品&#xff0c;是非關系數據庫當中功能最豐富&#xff0c;最像關系數據庫的。他支持的數據結構非常松散&#xff0c;是類似 json的bjson格式&#xff0c;因此可以存儲比較復雜的數據類型。官方網站&#xff1a;http://www.mo…

HTTP基礎10--web(2)

因輸出值轉義不完全引發的安全漏洞 實施 Web 應用的安全對策可大致分為以下兩部分。 客戶端的驗證Web 應用端&#xff08;服務器端&#xff09;的驗證: 輸入值驗證 / 輸出值轉義客戶端允許篡改數據或關閉 JavaScript&#xff0c;不適合將 JavaScript 驗證作為安全的防范對策。保…

單一課和綜合課的劃分依據_武夷巖茶產地如何劃分?

產地是指某種物品的生產、出產或加工制造的地點&#xff0c;日常含義是指某種物品的主要生產地。本文探討的武夷巖茶種植產地&#xff0c;也就是當地茶人俗稱的“山場”。武夷巖茶“山場”的俗稱可能緣起于宋代的茶政。宋代官府設置“榷&#xff08;qu&#xff09;茶場”&#…

windows文件路徑大于MAX_PATH

如果文件路徑大于MAX_PATH&#xff0c;是無法直接用CreatFile、fopen等方法來打開文件 但是可以通過在路徑前面加上“\\?\”來獲取文件 比如想要打開下面的文件123.txt&#xff0c;但是文件路徑是很長的&#xff08;假設…是200個字符&#xff09;&#xff1a; C:\123...\1…

C# 枚舉 字符串 轉換

普通方法 這種方法盡管很SB但確實可以解決問題 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e){string SelPath "";switch (comboBox1.SelectedIndex){case 0: SelPath System.Environment.GetFolderPath(System.Environment.SpecialFo…

arduino 機器視覺編程_萬物皆可仿真的MATLAB/Simulink神奇在哪?解析如何將其應用于一整套機器人設計開發流程...

MATLAB/Simulink&#xff1a;萬物皆可仿真 MATLAB是由美國MathWorks公司出品的一款商業數學軟件。它是一個多功能的科學計算平臺&#xff0c;將算法開發、數據分析、矩陣計算等諸多強大功能集成在一個易于操作的視窗環境中。MATLAB下的Simulink更是被認為可以“仿真任何系統”。…

排序算法(1) 快速排序 C++實現

快速排序基本特性 時間復雜度&#xff1a;O&#xff08;n*lgn&#xff09;最壞&#xff1a;O&#xff08;n^2&#xff09;空間復雜度&#xff1a;最好情況下&#xff1a;O&#xff08;lgn&#xff09;&#xff0c;最壞情況&#xff1a;O(n)&#xff0c;平均情況&#xff1a;O(l…

boost 變量類型轉換

如果vs版本比較低&#xff0c;會不支持一些std類型轉換函數&#xff08;vs2008就不支持&#xff09;&#xff0c;比如&#xff1a; std::to_string \\數字轉字符串 std::stoll \\字符串轉數字而且項目碰巧用boost庫&#xff0c;可以考慮用下面的的方法來進行類型轉換…

PB增刪改

新建一個數據窗口----選擇需要更新的表&#xff0c;或者直接寫sql也可以如下圖已經建立好的數據窗口&#xff0c;根據要求將需要更新的列、unigue key 還有需要更新的表設置好&#xff0c;【將需要更新列的taborder設置大于0 這樣維護的時候可以編輯&#xff08;等于0是不能編輯…

(五十六)iOS多線程之NSOperation

NSOpertation是一套OC的API&#xff0c;是對GCD進行的Cocoa抽象。 NSOperation有兩種不同類型的隊列&#xff0c;主隊列和自定義隊列。 主隊列運行于主線程上&#xff0c;自定義隊列在后臺運行。 【NSBlockOperation】 通過Block創建任務&#xff0c;下面比較主隊列和自定義隊列…

android 系統源碼調試 局部變量值_如何方便快速的整編Android 9.0系統源碼?

點擊上方“劉望舒”&#xff0c;選擇“星標”多點在看&#xff0c;就是真愛&#xff01;作者 : 劉望舒 | 來源 &#xff1a;劉望舒的博客地址&#xff1a;http://liuwangshu.cn/framework/aosp/3-compiling-aosp.html前言在上一篇文章是時候下載Android 9.0系統源碼了中&…

boost 文件操作

如果要簡單處理文件和文件夾的時候&#xff08;刪除、重命名等&#xff09;&#xff0c;使用Windows的系統函數會十分麻煩&#xff0c;可以嘗試一下使用Boost庫來進行處理 頭文件 #include <boost/filesystem.hpp>如果要獲得每次處理的結果錯誤碼&#xff0c;需要加上頭…

讓“是男人就下到100層”在Android平臺上跑起來

原工程:https://github.com/jeekun/DownFloors 移植后的代碼&#xff1a;HelloCpp.zip 移植后的APK&#xff1a;HelloCpp.apk 說明&#xff1a;&#xff08;cocos2d-x版本是“ 2.2&#xff09; 1.該工程是直接在HelloCpp上修改完成,所以包名也不修改了 2.原工程里面可能是采用g…

Codeforces Round #277 (Div. 2) 題解

Codeforces Round #277 (Div. 2)A. Calculating Functiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFor a positive integer n lets define a function f: f(n)???-?1??2?-?3??..??(?-?1)nn Your …

QT 邊框圓角處理

平時的邊框是平角的&#xff1a; 如果需要圓角的話&#xff0c;就要加stylesheet加上這個&#xff1a; border-radius:3px;比如&#xff1a; QPushButton{ border-radius:3px; }就變成圓角了&#xff1a; px前面的數字越大就越圓&#xff0c;比如5px比3px圓 假如只需要某一…

3級調度 fpga_Vivado HLS學習筆記——1.了解FPGA架構

本篇文章為本人學習Xilinx的Vivado HLS教程記錄的學習筆記&#xff0c;僅供學習參考。Vivado HLS官方視頻教程&#xff1a;優酷視頻?v.youku.com目錄&#xff1a; Vivado HLS課程簡介FPGA與CPU、GPU、DSP的區別FPGA的優勢Xilinx FPGA架構:邏輯單元、算術邏輯單元、存儲單元使用…

[LeetCode]Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. 思考&#xff1a;DFS。 /*** Definition for binary tree* struct TreeNode {* int val;* Tree…

BZOJ2435 [Noi2011]道路修建

這是NOI11年題&#xff0c;你在逗我&#xff1f; 直接dfs就可以了&#xff0c;Linux下貌似不會爆棧。。。 1 /**************************************************************2 Problem: 24353 User: rausen4 Language: C5 Result: Accepted6 Time:5184 …