⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 第6节 verilog常用程序示例 -与非网专题: fpga开发实用教程.htm

📁 一百多个例子很好的verilog 学习资料
💻 HTM
📖 第 1 页 / 共 4 页
字号:
S2: next_state = S1; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
default: next_state = S2; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; endcase&nbsp;<BR>end 
<BR><BR>// 完成状态机的外部逻辑 <BR>always @(current_state or ) begin 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
case(current_state)&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S1:&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S2: 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
default:&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;endcase 
<BR>end&nbsp;</P>
<UL>
  <LI>&nbsp;综合状态机的一般原则 </LI></UL>
<P>在硬件描述语言中,许多基于仿真的语句虽然符合语法规则,但是不能映射到硬件逻辑电路单元,如果要最终实现硬件设计,必须写出可以综合的程序。通常,综合的原则为:</P>
<OL>
  <LI>综合之前一定要进行仿真,仿真会暴露逻辑错误。如果不做仿真,没有发现的逻辑错误会进入综合器,使综合的结果产生同样的逻辑错误。&nbsp; 
  <LI>&nbsp;每一次布线之后都要进行仿真,在器件编程或流片之前一定要进行最后的仿真。&nbsp; 
  <LI>&nbsp;用Verilog HDL描述的异步状态机是不能综合的,应该避免用综合器来设计。在必须设计异步状态机时,建议用电路图输入的方法 
  <LI>状态机应该有一个异步或同步复位端,以便在通电时将硬件电路复位到有效状态。建议使用异步复位以简化硬件开销。 
  <LI>时序逻辑电路建模时,用非阻塞赋值。用always块写组合逻辑时,采用阻塞赋值。不要在多个always块中为同一个变量赋值。 
  <LI>&nbsp;always块中应该避免组合反馈回路。在赋值表达式右端参与赋值的信号都必须出现在敏感信号列表中,否则在综合时,会为没有列出的信号隐含地产生一个透明锁存器。&nbsp; 
  </LI></OL>
<P>&nbsp;</P>
<P align=center><A href="http://www.eefocus.com/article/08-03/37221s.html"><FONT 
color=#0000ff>&lt;&lt;上一节</FONT></A><FONT color=#0000ff>&nbsp;&nbsp;&nbsp; 
</FONT><A href="http://www.eefocus.com/article/08-03/37234s.html"><FONT 
color=#0000ff>下一节&gt;&gt;</FONT></A></P></DIV>
<DIV style="FLOAT: left"><BR>
<SCRIPT language=JavaScript 
src="第6节 Verilog常用程序示例 -与非网专题: FPGA开发实用教程.files/article_aboutlink.htm" 
type=text/javascript>
                        </SCRIPT>
<BR>
<SCRIPT language=JavaScript 
src="第6节 Verilog常用程序示例 -与非网专题: FPGA开发实用教程.files/article_comment.htm" 
type=text/javascript>
                        </SCRIPT>
<BR></DIV></DIV></DIV>
<DIV class=body_right>
<DIV class=r1>
<DIV class=r1_bar>今日要闻</DIV>
<DIV align=center><A 
href="http://www.eefocus.com/article/08-06/5311326020643tsfM.html" 
target=_blank><IMG style="MARGIN-TOP: 10px; MARGIN-BOTTOM: 10px" 
src="第6节 Verilog常用程序示例 -与非网专题: FPGA开发实用教程.files/focus_img_0.jpg" width=200 
border=0 atl="平板电视专利费过高 国内厂商期待自主创新"></A> 
<H6><A href="http://www.eefocus.com/article/08-06/5311326020643tsfM.html" 
target=_blank>平板电视专利费过高 国内厂商期待自主创新</A></H6></DIV>
<UL>
  <LI><A href="http://www.eefocus.com/article/08-06/2626060648z9Kc.html" 
  target=_blank>“易PC们”能够走多远?</A> 
  <LI><A href="http://www.eefocus.com/html/08-06/5311326120655EjlB.shtml" 
  target=_blank>机顶盒解决方案大集合 AVS标准逐...</A> 
  <LI><A href="http://www.eefocus.com/myspace/blog/show_151191.html" 
  target=_blank>软硬件皆开源 Openmoko新款手机上...</A> 
  <LI><A href="http://www.eefocus.com/myspace/blog/show_151109.html" 
  target=_blank>新型纳机电开关存储器问世,将与...</A> </LI></UL></DIV>
<DIV class=r1>
<DIV class=r1_bar>热点专题</DIV>
<DIV align=center><A 
href="http://www.eefocus.com/html/08-06/415515110608ewru.shtml" 
target=_blank><IMG style="MARGIN-TOP: 10px; MARGIN-BOTTOM: 10px" height=60 
src="第6节 Verilog常用程序示例 -与非网专题: FPGA开发实用教程.files/topic_img_0.jpg" width=180 
border=0 atl="晶体管电路设计(下)"></A> 
<H6><A href="http://www.eefocus.com/html/08-06/415515110608ewru.shtml" 
target=_blank>晶体管电路设计(下)</A></H6></DIV>
<UL>
  <LI><A href="http://www.eefocus.com/html/08-06/415528060514cK2v.shtml" 
  target=_blank>中国科技大学GPS 实验室——GPS篇...</A> 
  <LI><A href="http://www.eefocus.com/html/08-05/2709020537kvtZ.shtml" 
  target=_blank>第二届全国智能车大赛东北赛区获...</A> 
  <LI><A href="http://www.eefocus.com/html/08-05/415520080549KvWJ.shtml" 
  target=_blank>基于XILINX FPGA片上嵌入式系统的...</A> 
  <LI><A href="http://www.eefocus.com/html/08-03/2731030353xPh0.shtml" 
  target=_blank>触摸屏技术成新型显示试金石</A> </LI></UL></DIV>
<DIV class=r1>
<DIV class=r1_bar>论坛热贴</DIV>
<DL>
  <DD><SPAN class=gray_cu>01. </SPAN><A title=【经典推荐】[安捷伦出品]ADS2005安装程序(破解版) 
  href="http://www.eefocus.com/bbs/article.php?tid=307" 
  target=_blank>【经典推荐】[安捷伦出品]ADS200...</A> 
  <DD><SPAN class=gray_cu>02. </SPAN><A 
  title="【射频通信和高速通信仿真软件】Ansoft Designer v2.2 + Crack" 
  href="http://www.eefocus.com/bbs/article.php?tid=742" 
  target=_blank>【射频通信和高速通信仿真软件】...</A> 
  <DD><SPAN class=gray_cu>03. </SPAN><A title=【ADS中文视频教程(台湾)】[时长80分钟] 
  href="http://www.eefocus.com/bbs/article.php?tid=1202" 
  target=_blank>【ADS中文视频教程(台湾)】[时长...</A> 
  <DD><SPAN class=gray_cu>04. </SPAN><A title=【天线工程手册(PDF)版】[应广大网友要求,独家压制] 
  href="http://www.eefocus.com/bbs/article.php?tid=386" 
  target=_blank>【天线工程手册(PDF)版】[应广大...</A> 
  <DD><SPAN class=gray_cu>05. </SPAN><A title=【Agilent公司射频设计—视频教程】[swf格式] 
  href="http://www.eefocus.com/bbs/article.php?tid=1186" 
  target=_blank>【Agilent公司射频设计—视频教程...</A> 
  <DD><SPAN class=gray_cu>06. </SPAN><A title="【热门推荐】[微带天线] 三本经典教材" 
  href="http://www.eefocus.com/bbs/article.php?tid=191" 
  target=_blank>【热门推荐】[微带天线] 三本经典...</A> 
  <DD><SPAN class=gray_cu>07. </SPAN><A title="【ADS中文视频教程(台湾)】[第一部分 22个包]" 
  href="http://www.eefocus.com/bbs/article.php?tid=1206" 
  target=_blank>【ADS中文视频教程(台湾)】[第一...</A> 
  <DD><SPAN class=gray_cu>08. </SPAN><A title=奉上《实用射频技术》 
  href="http://www.eefocus.com/bbs/article.php?tid=165" 
  target=_blank>奉上《实用射频技术》</A> 
  <DD><SPAN class=gray_cu>09. </SPAN><A title="【热门推荐】Ansoft HFSS v10安装程序(破解版)" 
  href="http://www.eefocus.com/bbs/article.php?tid=303" 
  target=_blank>【热门推荐】Ansoft HFSS v10安装...</A> 
  <DD><SPAN class=gray_cu>10. </SPAN><A title=【ADS2005A视频讲解】[安捷伦公司][时长:1小时15分] 
  href="http://www.eefocus.com/bbs/article.php?tid=1457" 
  target=_blank>【ADS2005A视频讲解】[安捷伦公司...</A> </DD></DL></DIV></DIV></DIV>
<DIV class=clear></DIV>
<DIV class=foot>
<SCRIPT language=JavaScript 
type=text/javascript>var statbs='Topic_37123';</SCRIPT>

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD class=foot_t>&nbsp;</TD></TR>
  <TR>
    <TD class=foot_txt><A 
      href="http://www.eefocus.com/content/service/introduce.php">关于我们</A> | <A 
      href="http://www.eefocus.com/content/service/hr.php">诚邀加盟</A> | <A 
      href="http://www.eefocus.com/content/service/">客户服务</A> | <A 
      href="http://www.eefocus.com/content/service/law.php">相关法律</A> | <A 
      href="http://www.eefocus.com/content/map.html">网站地图</A> | <A 
      href="http://www.eefocus.com/content/link.html">友情链接</A> | 服务信箱:<A 
      href="mailto:service@eefocus.com?subject=网站服务与反馈邮件">mailto:service@eefocus.com?subject=网站服务与反馈邮件</A> 
      <BR>© 2006 与非门科技信息咨询(北京)有限公司 All Rights Reserved. </TD></TR></TBODY></TABLE>
<SCRIPT language=JavaScript 
src="第6节 Verilog常用程序示例 -与非网专题: FPGA开发实用教程.files/makejs.htm" 
type=text/javascript></SCRIPT>

<SCRIPT src="第6节 Verilog常用程序示例 -与非网专题: FPGA开发实用教程.files/urchin.js" 
type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>
_uacct = "UA-1502657-1";
urchinTracker();
</SCRIPT>
</DIV>
<DIV class=clear></DIV>
<SCRIPT language=JavaScript>
<!--
var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
// --> 
</SCRIPT>
</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -