?? 第6節 verilog常用程序示例 -與非網專題: fpga開發實用教程.htm
字號:
?<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0046)http://www.eefocus.com/html/08-03/37231s.shtml -->
<HTML><HEAD><TITLE>第6節 Verilog常用程序示例 -與非網專題: FPGA開發實用教程</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content=all name=robots>
<META
content="Verilog基本模塊 同步RS觸發器 同步T觸發器 同步D觸發器 同步JK觸發器 基本時序處理模塊"
name=keywords>
<META content=Verilog常用程序示例 name=description><LINK
href="第6節 Verilog常用程序示例 -與非網專題: FPGA開發實用教程.files/detail.css" type=text/css
rel=stylesheet><LINK
href="第6節 Verilog常用程序示例 -與非網專題: FPGA開發實用教程.files/book_detail.css" type=text/css
rel=stylesheet>
<SCRIPT language=JavaScript
src="第6節 Verilog常用程序示例 -與非網專題: FPGA開發實用教程.files/main.js" type=text/javascript>
</SCRIPT>
<SCRIPT language=JavaScript
src="第6節 Verilog常用程序示例 -與非網專題: FPGA開發實用教程.files/article.js"
type=text/javascript>
</SCRIPT>
<SCRIPT language=JavaScript
src="第6節 Verilog常用程序示例 -與非網專題: FPGA開發實用教程.files/translate_c.js"
type=text/javascript>
</SCRIPT>
<SCRIPT language=JavaScript type=text/javascript>
_intlStrings._originalText = "";
_intlStrings._interfaceDirection = "ltr";
_intlStrings._interfaceAlign = "left"
</SCRIPT>
<META content="MSHTML 6.00.2900.3020" name=GENERATOR></HEAD>
<BODY onselectstart="return false">
<SCRIPT>_setupIW();
</SCRIPT>
<!--專題文章頭部-->
<TABLE class=nav cellSpacing=0 cellPadding=0 width=946 align=center border=0>
<TBODY>
<TR>
<TD class=nav_left_logo> </TD>
<TD class=nav_list align=right><A href="http://www.eefocus.com/">網站首頁</A>
│ <A href="http://www.eefocus.com/application/" target=_blank>系統應用</A> │
<A href="http://www.eefocus.com/content/theory/">通用技術</A> │ <A
href="http://datasheet.eefocus.com/">數據手冊</A> │ <A
href="http://www.eefocus.com/topic/">熱點專題</A> │ <A
href="http://www.eefocus.com/job/">招聘求職</A> │ <A
href="http://www.eefocus.com/zhuanlan/">名家專欄</A> │ <A
href="http://www.eefocus.com/blog/">博客</A> │ <A
href="http://www.eefocus.com/bbs/" target=_blank>技術論壇</A> │ <A
href="http://www.eefocus.com/myspace/">我的空間</A></TD></TR></TBODY></TABLE><!--專題廣告-->
<DIV class=banner><A
href="http://www.eefocus.com/html/08-06/415531070314nUp7.shtml"
target=_blank><IMG src="第6節 Verilog常用程序示例 -與非網專題: FPGA開發實用教程.files/logo.gif"
width=946 border=0></A> </DIV><!--頁面導航信息-->
<DIV class=nav_bar>
<DIV class=nav_left>您的位置:<A href="http://www.eefocus.com/">首頁</A>>><A
href="http://www.eefocus.com/html/08-06/415531070314nUp7.shtml">FPGA開發實用教程</A>>>正文
</DIV><A href="http://www.eefocus.com/"><IMG class=btn_home height=18
src="第6節 Verilog常用程序示例 -與非網專題: FPGA開發實用教程.files/btn.gif" width=86
align=absMiddle border=0></A> </DIV><!--頁面內容-->
<DIV class=web>
<DIV id=main>
<DIV id=left>
<DIV id=bt>第6節 Verilog常用程序示例 </DIV>
<DIV id=xx>
<DL>
<DD><A class=ulink href="http://www.eefocus.com/content/email.php">推薦給好友</A>
</DD>
<DD><IMG height=18 hspace=5
src="第6節 Verilog常用程序示例 -與非網專題: FPGA開發實用教程.files/for_friend.gif" width=18
vspace=2> </DD>
<DD><A class=ulink href="http://www.eefocus.com/content/print.php">打印</A>
</DD>
<DD><IMG height=18 hspace=5
src="第6節 Verilog常用程序示例 -與非網專題: FPGA開發實用教程.files/for_print.gif" width=18
vspace=2> </DD>
<DD><A class=ulink href="http://www.eefocus.com/content/favorite.php">加入收藏</A>
</DD>
<DD><IMG height=18 hspace=5
src="第6節 Verilog常用程序示例 -與非網專題: FPGA開發實用教程.files/for_favorite.gif" width=18
vspace=2> </DD>
<DD></DD>
<DD style="FLOAT: left">更新于2008-05-28 04:40:25 </DD></DL></DIV>
<HR style="CLEAR: both" align=center width="98%">
<DIV id=tags><A
href="http://www.eefocus.com/search/?keyword=Verilog基本模塊&searchselect=article"
target=_blank>Verilog基本模塊</A> <A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=同步RS觸發器&searchselect=article"
target=_blank>同步RS觸發器</A> <A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=同步T觸發器&searchselect=article"
target=_blank>同步T觸發器</A> <A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=同步D觸發器&searchselect=article"
target=_blank>同步D觸發器</A> <A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=同步JK觸發器&searchselect=article"
target=_blank>同步JK觸發器</A> <A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=&searchselect=article"
target=_blank></A><A
href="http://www.eefocus.com/search/?keyword=基本時序處理模塊&searchselect=article"
target=_blank>基本時序處理模塊</A> </DIV>
<DIV id=nr>
<P><STRONG>2.6.1 Verilog基本模塊</STRONG> <BR><BR>1.觸發器的Verilog實現
<BR><BR>時序電路是高速電路的主要應用類型,其特點是任意時刻電路產生的穩定輸出不僅與當前的輸入有關,而且還與電路過去時刻的輸入有關。時序電路的基本單元就是觸發器。下面介紹幾種常見同步觸發器的Verilog實現。
</P>
<UL>
<LI>同步RS觸發器 </LI></UL>
<P>RS觸發器分為同步觸發器和異步觸發器,二者的區別在于同步觸發器有一個時鐘端clk,只有在時鐘端的信號上升(正觸發)或下降(負觸發)時,觸發器的輸出才會發生變化。下面以正觸發為例,給出其Verilog代碼實現。
<BR><BR>例2-15 正觸發型同步RS觸發器的Verilog實現。<BR><BR>module sy_rs_ff (clk, r, s, q, qb);
<BR> input clk, r, s;
<BR> output q, qb;
<BR> reg q;
<BR><BR> assign qb = ~ q;
<BR> always @(posedge clk) begin
<BR>
case({r, s})
<BR>
2'b00: q <= 0;
<BR>
2'b01: q <=
1; <BR> 2'b10:
q <= 0;
<BR>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -