freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

數(shù)字集成電路設(shè)計(jì)入門(mén)--從hdl到版圖于敦山北大微電子學(xué)系(文件)

 

【正文】 句以文本格式顯示仿真結(jié)果 第五章 Verilog的詞匯約定 (Lexical convention) 1. 理解 Verilog中使用的詞匯約定 2. 認(rèn)識(shí)語(yǔ)言專(zhuān)用標(biāo)記 (tokens) 3. 學(xué)習(xí) timescale 學(xué)習(xí)內(nèi)容: 術(shù)語(yǔ)及定義 1. 空白符:空格、 tabs及換行 2. Identifier: 標(biāo)志符, Verilog中對(duì)象 (如模塊或端口 )的名字 3. Lexical: 語(yǔ)言中的字或詞匯,或與其相關(guān)。 input sel, // control input b, /* data inputs */ a。 endmodule 格式自由 使用空白符提高可讀性及代碼組織。缺省為 32位 base: 數(shù)基,可為 2(b)、 8(o)、 10(d)、 16(h)進(jìn)制。H83a unsized hexadecimal (zero extended to 32 bits) 839。bz01x Zextended to 32 bits 3’b1010_ 1101 3bit number, truncated to 3’b101 decimal notation 32e 4 scientific notation for scientific notation for 4100 整數(shù)常量和實(shí)數(shù)常量 ? 整數(shù)的大小可以定義也可以不定義。 Verilog沒(méi)有字符串?dāng)?shù)據(jù)類(lèi)型 字符串( string) 轉(zhuǎn)義符及格式符將在驗(yàn)證支持部分討論 格式符 %h %o %d %b %c %s %v %m %t hex oct dec bin ACSII string strength module time 轉(zhuǎn)義符 \t \n \\ \‖ \13 digit octal number tab 換行 反斜杠 雙引號(hào) ASCII representation of above 格式符 %0d表示沒(méi)有前導(dǎo) 0的十進(jìn)制數(shù) 標(biāo)識(shí)符 (identifiers) ? 標(biāo)識(shí)符是用戶在描述時(shí)給 Verilog對(duì)象起的名字 ? 標(biāo)識(shí)符必須以字母 (az, AZ)或 ( _ )開(kāi)頭,后面可以是字母、數(shù)字、 ( $ )或( _ )。 not not1 (sel_, sel)。 endmodule Verilog標(biāo)識(shí)符 標(biāo)識(shí)符 (identifiers) ? 有效標(biāo)識(shí)符舉例: shift_reg_a busa_index _bus3 ? 無(wú)效標(biāo)識(shí)符舉例: 34 // 開(kāi)頭不是字母或“ _” a*b_ // 包含了非字母或數(shù)字, “ $” “_” n238 //包含了非字母或數(shù)字, “ $” “_” ? Verilog區(qū)分大小寫(xiě),所有 Verilog關(guān)鍵詞使用小寫(xiě)字母。 not not1(\~sel ,sel)。 endmodule ? 使用轉(zhuǎn)義符可能會(huì)產(chǎn)生一些問(wèn)題,并且不是所有工具都支持。 轉(zhuǎn)義標(biāo)識(shí)符由反斜杠“ \‖開(kāi)始,空白符結(jié)束 Escaped Identifiers 轉(zhuǎn)義標(biāo)識(shí)符 ( Escaped identifiers) 轉(zhuǎn)義標(biāo)識(shí)符允許用戶在標(biāo)識(shí)符中使用非法字符。 module MUX2_ 1 (out, a, b, sel) 。 and 2 and1( a1, a, sel_)??商岣呙枋龅目勺x性。 not `not_delay not1( sel_, sel)。 endmodule 定義 not_delay 使用 not_delay 文本替換 (substitution) ? 解除定義的宏,使用 `undef macro_name ? 使用編譯指導(dǎo) `define,可以 – 提高描述的可讀性 – 定義全局設(shè)計(jì)參數(shù),如延時(shí)和矢量的位數(shù)。 文本包含 (inclusion) `include ? 編譯指導(dǎo) `include在當(dāng)前內(nèi)容中插入一個(gè)文件 格式: `include “file_name” 如 `include `include parts/count. v `include ../../library/mux. v” ? `include可用于: – include保存在文件中的全局的或經(jīng)常用到的一些定義,如文本宏 – 在模塊內(nèi)部 include一些任務(wù)( tasks),提高代碼的可維護(hù)性。 not 1 not1( sel_, sel)。 endmodule Timescale ? time_precision不能大于 time_unit ? time_precision和 time_unit的表示方法: integer unit_string – integer : 可以是 1, 10, 100 – unit_string: 可以是 s(second), ms(millisecond), us(microsecond), ns(nanosecond), ps(picosecond), fs(femtosecond) – 以上 integer和 unit_string可任意組合 ? precision的時(shí)間單位應(yīng)盡量與設(shè)計(jì)的實(shí)際精度相同。 ? 如果沒(méi)有 timescale說(shuō)明將使用缺省值,一般是 ns。 not (. . .) // 123ns or 1230000 STUs . . . endmodule `timescale 1ps/ 100fs module3 (. . .)。 4. 使用 `resetall解除 5. 編譯指導(dǎo)是全局的。使用適當(dāng)?shù)木?,既達(dá)到必要的精度,又不會(huì)仿真太慢。 6. 使用盡可能大的精度??瞻追糜诟糸_(kāi)標(biāo)識(shí)符及關(guān)鍵詞,多余的忽略 2. //用于單行注釋?zhuān)?/* */用于多行注釋 3. 整數(shù)常量的尺寸由 10進(jìn)制數(shù)表示的位數(shù)確定。 這是因?yàn)榉抡嫫鞅仨殞?duì)整個(gè)設(shè)計(jì)進(jìn)行精確仿真 在下面的例子中,仿真時(shí)間單位( STU)為 100fs `timescale 1ns/ 10ps module1 (. . .)。 – 若 time_unit與 precision_unit差別很大將嚴(yán)重影響仿真速度。 and 2 and2( b1, b, sel)。 output out。這樣,當(dāng)要修改設(shè)計(jì)配置時(shí),只需要在一個(gè)地方修改。 and `and_delay and2( b1, b, sel)。 output out。 or 1 or1( out, a1, b1)。 input a, b, sel 。 當(dāng)信號(hào) a或 b的值發(fā)生變化時(shí),系統(tǒng)任務(wù) $monitor顯示當(dāng)前仿真時(shí)間,信號(hào) a值 (二進(jìn)制格式 ), 信號(hào) b值( 16進(jìn)制格式)。綜合工具輸出綜合網(wǎng)表時(shí)也使用轉(zhuǎn)義符。 and and2( b1, b, sel)。 output out。 and and2 (b1, b, sel)。 output out。如 2’b1101表示的是 2’b01 ? 實(shí)數(shù)常量 – 實(shí)數(shù)可用科學(xué)表示法或十進(jìn)制表示 – 科學(xué)表示法表示方式: 尾數(shù) e或 E指數(shù) , 表示: 尾數(shù) 10指數(shù) 字符串( string) ? 字符串要在一行中用雙引號(hào)括起來(lái),也就是不能跨行。hff01 64bit hexadecimal (zero extended to 64 bits) 939。 ? 實(shí)數(shù)常量可以用十進(jìn)制或科學(xué)表示法表示。 多行注釋?zhuān)?/* */內(nèi) 單行注釋 到行末結(jié)束 整數(shù)常量和實(shí)數(shù)常量 ? 整數(shù)的大小可以定義也可以不定義。 and (a1, a, sel_), (b1, b, sel)。 4. LSB:最低有效位 (Lease significant bit) 5. MSB:最高有效位 (Most significant bit) 空白符和注釋 module MUX2_1 (out, a, b, sel)。測(cè)試模塊用于設(shè)計(jì)模塊驗(yàn)證 4. 在 testbench中用到的兩類(lèi)過(guò)程語(yǔ)句是 initial和 always。 end 要給 $dumpvars提供層次 (levels)及范圍 (scope)參數(shù),例如 復(fù)習(xí) 1. Verilog的基本構(gòu)建模塊是什么?是如何構(gòu)成一個(gè)系統(tǒng)的? 2. module怎樣與其它模塊通信? 3. 仿真時(shí)兩個(gè)性質(zhì)不同的模塊是什么? 4. 在 test fixture中兩類(lèi)不同的過(guò)程語(yǔ)句是什么?它們有什么不同? 5. 用什么方法能以文本格式顯示仿真結(jié)果? 1. module是基本構(gòu)建單元。 ? $dumpvars (3, top. u2, top. u1)。 // Dump所有層次的信號(hào) ? $dumpvars (1, top)。如: initial begin $dumpfile (“verilog. dump”)。 $dumpvars $dumpvars[( levels, scope*)]。 ? VCD數(shù)據(jù)庫(kù)不記錄仿真結(jié)束時(shí)的數(shù)據(jù)。 $dumpvars將在后面詳細(xì)描述 。 $dumplimit(file_ size)。 $dumpvars()。 end // Display results initial $monitor($time, out=%b a=%b b=%b sel=%b, out, a, b, sel)。 5 b = 1。 // Apply stimulus initial begin a = 0。 endmodule 0 out= 0 a= 0 b= 1 sel= 0 5 out= 0 a= 0 b= 0 sel= 0 10 out= 1 a= 0 b= 1 sel= 1 15 out= 1 a= 1 b= 1 sel= 1 結(jié)果輸出 時(shí)間單位末的概念 `timescale 1ns/1ns module testfixture。 sel = 1。 b = 1。 // Data type declaration reg a, b, sel。 ? $monitor系統(tǒng)任務(wù)支持不同的數(shù)基。 Verilog提供了一些系統(tǒng)任務(wù)和系統(tǒng)函數(shù),包括: 注意不能有空格 Test Fixture 響應(yīng)產(chǎn)生 ? $time是一個(gè)系統(tǒng)函數(shù),返回當(dāng)前返回仿真時(shí)間。 $monitor ([“format_specifiers”,] arguments)。reg類(lèi)數(shù)據(jù)是寄存器類(lèi)數(shù)據(jù)信號(hào),在重新賦值前一直保持當(dāng)前數(shù)據(jù)。 sel = 1。 b = 1。 // Data type declaration reg a, b, sel。 // Data type declaration // Instantiate modules MUX2_1 mux (out, a, b, sel)。 Test Fixture template module testfixture。實(shí)例化多路器時(shí)不需要知道其實(shí)現(xiàn)細(xì)節(jié)。 or (out,
點(diǎn)擊復(fù)制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1