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

正文內(nèi)容

數(shù)字集成電路設(shè)計(jì)入門知識(shí)-從hdl到版圖-資料下載頁(yè)

2025-02-11 17:13本頁(yè)面
  

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