異步復(fù)位的verilog程序如下:
moduleD_FF
?。?/p>
//Inputports
SYSCLK
,RST_B,
A,
//Outputports
B
?。?
//=========================================
//Inputandoutputdeclaration
//=========================================
inputSYSCLK;
input RST_B;
inputA;
outputB;
//=========================================
//Wireandregdeclaration
//=========================================
wireSYSCLK;
wireRST_B;
wireA;
regB;
//=========================================
//Logic
//=========================================
always@(posedgeSYSCLKornegedgeRST_B)
begin
if(!RST_B)
B《=1‘b0;
else
B《=A;
end
endmodule
綜合后的RTL級(jí)電路圖如下:

通過(guò)比較顯然異步復(fù)位消耗的邏輯資源要少些,因此通常的設(shè)計(jì)中都采用異步復(fù)位的方式,需要進(jìn)一步的學(xué)習(xí)的話(huà),可以再研究下其它的資料。
三、總結(jié):
所以說(shuō),一般都推薦使用異步復(fù)位,同步釋放的方式,而且復(fù)位信號(hào)低電平有效。這樣就可以?xún)扇涿懒恕?/p>
電子發(fā)燒友App








































評(píng)論