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

正文內(nèi)容

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

2025-08-06 17:39 上一頁面

下一頁面
 

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