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

正文內(nèi)容

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

2025-07-19 17:39本頁面
  

【正文】 ilog中,字符串大多用于顯示信息的命令中。 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ù)字、 ( $ )或( _ )。 ? 最長可以是 1023個字符 ? 標識符區(qū)分大小寫, sel和 SEL是不同的標識符 ? 模塊、端口和實例的名字都是標識符 module MUX2_1 (out, a, b, sel)。 output out。 input a, b, sel。 not not1 (sel_, sel)。 and and1 (a1, a, sel_)。 and and2 (b1, b, sel)。 or or1 (out, a1, b1)。 endmodule Verilog標識符 標識符 (identifiers) ? 有效標識符舉例: shift_reg_a busa_index _bus3 ? 無效標識符舉例: 34 // 開頭不是字母或“ _” a*b_ // 包含了非字母或數(shù)字, “ $” “_” n@238 //包含了非字母或數(shù)字, “ $” “_” ? Verilog區(qū)分大小寫,所有 Verilog關(guān)鍵詞使用小寫字母。 轉(zhuǎn)義標識符 ( Escaped identifiers) ? 可以包含任何可打印字符 ? 反斜杠及空白符不是標識符的一部分 module \2:1MUX (out, a, b, sel)。 output out。 input a, b, sel。 not not1(\~sel ,sel)。 and and1( a1, a, \~sel )。 and and2( b1, b, sel)。 or or1( out, a1, b1)。 endmodule ? 使用轉(zhuǎn)義符可能會產(chǎn)生一些問題,并且不是所有工具都支持。有時用轉(zhuǎn)義符完成一些轉(zhuǎn)換,如產(chǎn)生邏輯圖的 Verilog網(wǎng)表。綜合工具輸出綜合網(wǎng)表時也使用轉(zhuǎn)義符。 不建議使用轉(zhuǎn)義符。 轉(zhuǎn)義標識符由反斜杠“ \‖開始,空白符結(jié)束 Escaped Identifiers 轉(zhuǎn)義標識符 ( Escaped identifiers) 轉(zhuǎn)義標識符允許用戶在標識符中使用非法字符。如: \~@sel \busa+ index \{A,B} top.\ 3inst .1 // 在層次化名字中轉(zhuǎn)義符 轉(zhuǎn)義標識符必須以空格結(jié)束 語言專用標記 ( tokens) 系統(tǒng)任務(wù)及函數(shù) $identifier ? $符號指示這是系統(tǒng)任務(wù)和函數(shù) ? 系統(tǒng)函數(shù)有很多,如: – 返回當前仿真時間 $time – 顯示 /監(jiān)視信號值 ($display, $monitor) – 停止仿真 $stop – 結(jié)束仿真 $finish $monitor($time, “a = %b, b = %h”, a, b)。 當信號 a或 b的值發(fā)生變化時,系統(tǒng)任務(wù) $monitor顯示當前仿真時間,信號 a值 (二進制格式 ), 信號 b值( 16進制格式)。 語言專用標記 ( tokens) 延時說明 ? “”用于說明過程 (procedural)語句和門的實例的延時,但不能用于模塊的實例化。 module MUX2_ 1 (out, a, b, sel) 。 output out 。 input a, b, sel 。 not 1 not1( sel_, sel)。 and 2 and1( a1, a, sel_)。 and 2 and2( b1, b, sel)。 or 1 or1( out, a1, b1)。 endmodule ? 門延時有很多類名字:門延時 (gate delay),傳輸延時(propagation delay),固有延時 (intrinsic delay),對象內(nèi)在延時(intraobject delay) 編譯指導 (Compiler Directives) ? ( `)符號說明一個編譯指導 ? 這些編譯指導使仿真編譯器進行一些特殊的操作 ? 編譯指導一直保持有效直到被覆蓋或解除 ? `resetall 復位所有的編譯指導為缺省值,應該在其它編譯指導之前使用 文本替換 (substitution) `define 編譯指導 `define提供了一種簡單的文本替換的功能 `define macro_name macro_text 在編譯時 macro_text替換 macro_name??商岣呙枋龅目勺x性。 `define not_delay 1 `define and_delay 2 `define or_delay 1 module MUX2_1 (out, a, b, sel)。 output out。 input a, b, sel。 not `not_delay not1( sel_, sel)。 and `and_delay and1( a1, a, sel_)。 and `and_delay and2( b1, b, sel)。 or `or_delay or1( out, a1, b1)。 endmodule 定義 not_delay 使用 not_delay 文本替換 (substitution) ? 解除定義的宏,使用 `undef macro_name ? 使用編譯指導 `define,可以 – 提高描述的可讀性 – 定義全局設(shè)計參數(shù),如延時和矢量的位數(shù)。這些參數(shù)可以定義在同一位置。這樣,當要修改設(shè)計配置時,只需要在一個地方修改。 – 定義 Verilog命令的簡寫形式 `define vectors_ file /usr1/chrisz/library/vectors `define results_ file / usr1/chrisz/library/results ? 可以將 `define放在一個文件中,與其它文件一起編譯。 文本包含 (inclusion) `include ? 編譯指導 `include在當前內(nèi)容中插入一個文件 格式: `include “file_name” 如 `include `include parts/count. v `include ../../library/mux. v” ? `include可用于: – include保存在文件中的全局的或經(jīng)常用到的一些定義,如文本宏 – 在模塊內(nèi)部 include一些任務(wù)( tasks),提高代碼的可維護性。 可以是相對路徑或絕對路徑 Timescale ? `timescale 說明時間單位及精度 格式: `timescale time_unit / time_precision 如: `timescale 1 ns / 100 ps time_unit: 延時或時間的測量單位 time_precision: 延時值超出精度要先舍入后使用 ? `timescale必須在模塊之前出現(xiàn) `timescale 1 ns / 10 ps // All time units are in multiples of 1 nanosecond module MUX2_1 (out, a, b, sel)。 output out。 input a, b, sel。 not 1 not1( sel_, sel)。 and 2 and1( a1, a, sel_)。 and 2 and2( b1, b, sel)。 or 1 or1( out, a1, b1)。 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è)計的實際精度相同。 – precision是仿真器的仿真時間步。 – 若 time_unit與 precision_unit差別很大將嚴重影響仿真速度。 – 如說明一個 `timescale 1s / 1ps,則仿真器在 1秒內(nèi)要掃描其事件序列 1012次;而 `timescale 1s/1ms則只需掃描 103次。 ? 如果沒有 timescale說明將使用缺省值,一般是 ns。 Timescale ? 所有 timescale中的最小值決定仿真時的最小時間單位。 這是因為仿真器必須對整個設(shè)計進行精確仿真 在下面的例子中,仿真時間單位( STU)為 100fs `timescale 1ns/ 10ps module1 (. . .)。 not (. . .) // or 12300 STUs . . . endmodule `timescale 100ns/ 1ns module2 (. . .)。 not (. . .) // 123ns or 1230000 STUs . . . endmodule `timescale 1ps/ 100fs module3 (. . .)。 not (. . .) // or 12 STUs (rounded off) . . . endmodule 復習 1. Verilog中的空白符總是忽略的嗎? 2. 在源代碼中插入注釋有哪兩種方法? 3. 整數(shù)常數(shù)的尺寸如何指定?缺省的尺寸及數(shù)基是多少? 4. 設(shè)置的編譯指導如何解除? 5. 編譯指導影響全局嗎? 6. 在仿真時為什么要用接近實際的最大 timescale精度? 1. 是的??瞻追糜诟糸_標識符及關(guān)鍵詞,多余的忽略 2. //用于單行注釋, /* */用于多行注釋 3. 整數(shù)常量的尺寸由 10進制數(shù)表示的位數(shù)確定。缺省為 32位,缺省的數(shù)基為十進制。 4. 使用 `resetall解除 5. 編譯指導是全局的。編譯時遇到編譯指導后開始有效,直至復位或被覆蓋,可能影響多個文件。 6. 使用盡可能大的精度。精度越小,仿真時間步越小,仿真時間越長。使用適當?shù)木龋冗_到必要的精度,又不會仿真太慢。
點擊復制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1