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

📄 43310.html

📁 vhdl 交通灯 发觉 发酒疯机关炮高风亮节
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!---->
<!---->
<br /><br />

<span class="tpc_title"></span><br />
<!---->
<br /><span class="tpc_content">3.信号转换模块――tolight.vhd<br>LIBRARY IEEE;<br>USE IEEE.STD_LOGIC_1164.ALL;<br>USE IEEE.STD_LOGIC_UNSIGNED.ALL;<br>ENTITY tolight IS<br>  PORT ( &nbsp;   clk2:IN STD_LOGIC;<br> &nbsp;  &nbsp;   statenum2:in STD_LOGIC_VECTOR(1 DOWNTO 0);<br> &nbsp;  &nbsp;   mr2,my2,mg2,cr2,cy2,cg2:OUT STD_LOGIC);<br>END tolight;<br>ARCHITECTURE behav OF tolight IS<br>begin<br>  process(clk2)<br> &nbsp;  begin<br> &nbsp;  &nbsp; if clk2&#39;event and clk2=&#39;1&#39; then<br> &nbsp;  &nbsp;   case statenum2(1 downto 0) is<br> &nbsp;  &nbsp;  &nbsp;  when &nbsp; &quot;00&quot;=&gt;mr2&lt;=&#39;0&#39;;my2&lt;=&#39;0&#39;;mg2&lt;=&#39;1&#39;;cr2&lt;=&#39;1&#39;;cy2&lt;=&#39;0&#39;;cg2&lt;=&#39;0&#39;;<br> &nbsp;  &nbsp;  &nbsp;  when &nbsp; &quot;01&quot;=&gt;mr2&lt;=&#39;0&#39;;my2&lt;=&#39;1&#39;;mg2&lt;=&#39;0&#39;;cr2&lt;=&#39;1&#39;;cy2&lt;=&#39;0&#39;;cg2&lt;=&#39;0&#39;;<br> &nbsp;  &nbsp;  &nbsp;  when &nbsp; &quot;10&quot;=&gt;mr2&lt;=&#39;1&#39;;my2&lt;=&#39;0&#39;;mg2&lt;=&#39;0&#39;;cr2&lt;=&#39;0&#39;;cy2&lt;=&#39;0&#39;;cg2&lt;=&#39;1&#39;; <br> &nbsp;  &nbsp;  &nbsp;  when &nbsp; &quot;11&quot;=&gt;mr2&lt;=&#39;1&#39;;my2&lt;=&#39;0&#39;;mg2&lt;=&#39;0&#39;;cr2&lt;=&#39;0&#39;;cy2&lt;=&#39;1&#39;;cg2&lt;=&#39;0&#39;;<br> &nbsp;  &nbsp;  &nbsp;  when others=&gt;mr2&lt;=&#39;0&#39;;my2&lt;=&#39;0&#39;;mg2&lt;=&#39;1&#39;;cr2&lt;=&#39;1&#39;;cy2&lt;=&#39;0&#39;;cg2&lt;=&#39;0&#39;;<br> &nbsp;  &nbsp;   end case;<br> &nbsp;  &nbsp; end if;<br>  end process;<br>end behav;<br><br>4.顶层文件――traffic.vhd<br>library ieee;<br>use ieee.std_logic_1164.all;<br>use ieee.std_logic_arith.all;<br>use ieee.std_logic_unsigned.all;<br>entity traffic is<br>  port( &nbsp; clk:in std_logic;<br> &nbsp;  &nbsp;  &nbsp;  s  :in std_logic;<br> &nbsp;  &nbsp;   reset:in std_logic;<br> &nbsp;  &nbsp;   mr,my,mg,cr,cy,cg:OUT STD_LOGIC;<br> &nbsp;  &nbsp;  &nbsp; time:out std_logic_vector(7 downto 0));<br>end traffic;<br>ARCHITECTURE behav OF traffic IS<br>component controlm IS<br>  PORT (clk0,reset0,s0,c0  :IN STD_LOGIC;<br> &nbsp;  &nbsp;   ld0 &nbsp;  &nbsp;  &nbsp;  &nbsp; :out std_logic;<br> &nbsp;  &nbsp;   dinl0,dinh0 &nbsp;  :OUT STD_LOGIC_VECTOR(3 DOWNTO 0);<br> &nbsp;  &nbsp;   state0 &nbsp;  &nbsp;  &nbsp; :OUT STD_LOGIC_VECTOR(1 DOWNTO 0));<br>END component controlm;<br>component mvc is<br>  port( &nbsp; cp1:in  std_logic;<br> &nbsp;  &nbsp;  &nbsp;  ld1:in  std_logic;<br> &nbsp;  &nbsp;   dinl1:in  std_logic_vector(3 downto 0);<br> &nbsp;  &nbsp;   dinh1:in  std_logic_vector(3 downto 0);<br> &nbsp;  &nbsp;  &nbsp;  ql1:out std_logic_vector(3 downto 0);<br> &nbsp;  &nbsp;  &nbsp;  qh1:out std_logic_vector(3 downto 0);<br> &nbsp;  &nbsp;  &nbsp;   c1:out std_logic);<br>end component mvc;<br>component tolight IS<br>  PORT ( &nbsp;   clk2:IN STD_LOGIC;<br> &nbsp;  &nbsp;   statenum2:in STD_LOGIC_VECTOR(1 DOWNTO 0);<br> &nbsp;  &nbsp;   mr2,my2,mg2,cr2,cy2,cg2:OUT STD_LOGIC);<br>END component tolight;<br><br>signal c,ld &nbsp;   :std_logic;<br>signal dinl,dinh:std_logic_vector(3 downto 0);<br>signal statenum :std_logic_vector(1 downto 0);<br>begin<br>u1: controlm port map(clk0=&gt;clk,reset0=&gt;reset,s0=&gt;s,c0=&gt;c,ld0=&gt;ld,dinl0=&gt;dinl,dinh0=&gt;dinh,state0=&gt;statenum);<br>u2: mvc &nbsp;   port map(cp1=&gt;clk,ld1=&gt;ld,dinl1=&gt;dinl,dinh1=&gt;dinh,ql1=&gt;time(3 downto 0),qh1=&gt;time(7 downto 4),c1=&gt;c);<br>u3: tolight port map(clk2=&gt;clk,statenum2=&gt;statenum,mr2=&gt;mr,my2=&gt;my,mg2=&gt;mg,cr2=&gt;cr,cy2=&gt;cy,cg2=&gt;cg);<br>end behav;<br><br>引脚锁定:<br>根据实验输入输出要求,选择模式五作为实验电路。<br>具体引脚锁定如下:<br>信号名 类型 使用电路信号 引脚<br>clk 输入 CLOCK0 126<br>s 输入 键8 19<br>reset 输入 键7 18<br>mr 输出 D8 19<br>my 输出 D7 28<br>mg 输出 D6 27<br>cr 输出 D5 26<br>cy 输出 D4 23<br>cg 输出 D3 22<br>time(7 downto 4) 输出 译码数码管8 96.95,92,91<br>time(3 downto 0) 输出 译码数码管7 90,89,88,87</span><br />
<!---->
</td></tr>
<tr valign="bottom" bgcolor="#f3f8ef">
<td colspan="6">
<!---->
</td></tr>
<tr bgcolor="#f3f8ef" valign="bottom"><td colspan="5">
<!---->
<font color="red">[1 楼]</font>
<!---->
<a href='../../../profile.php?action=show&uid=27'><font color="#5EA2A2" face=Gulim>ghty</font></a>
<font color="#5EA2A2">一级会员</font>
<font color="#5EA2A2">发帖115</font>
<font color="#5EA2A2">威望133 </font>
<font color="#5EA2A2">金币244 </font>
<font color="#5EA2A2">宣传贡献5 </font>
<a href='../../../message.php?action=write&touid=27'><font color=#5EA2A2>短息</font></a>
<a href='../../../post.php?action=quote&fid=6&tid=43310&pid=99520&article=1'><font color=#5EA2A2>引用</font></a>
<a href='../../../post.php?action=modify&fid=6&tid=43310&pid=99520&article=1'><font color=#5EA2A2>编辑</font></a>
<font color=#5EA2A2>日期07-13 16:13</font></a>
<td align=right>
<a href="javascript:scroll(0,0)">顶端</a></td></tr></table></td></tr></table>
<table width="98%" align="center">
<tr><td height="1"></td></tr>
</table>
<!---->
<br /><table cellspacing="0" cellpadding="0" width="98%" align="center">
<form name="jump" method="post"><tr><td align="left"></td>
<td valign="center" align="right">
<select onchange="Fjumpr(this.options[this.selectedIndex].value,'../../..')">
<option value='' selected>快速跳至</option>
<option value="1">>> 电子技术专栏</option><option value="28"> &nbsp;|- 广告发布、商务、供需、招聘求职</option><option value="2"> &nbsp;|- 充电技术、设计、电池技术、开发</option><option value="3"> &nbsp;|- EDA、CAD、电路图与电路板设计</option><option value="4"> &nbsp;|- 开关电源、各类电源、磁芯的技术</option><option value="6"> &nbsp;|- 照明、镇流器、LED、节能灯技术</option><option value="7"> &nbsp;|- 单片机、PLC、DSP、自动化控制</option><option value="8"> &nbsp;|- 无线电、天线接收、遥控、超声波</option><option value="12"> &nbsp;|- 家电技术、电工技术、发电与传输</option><option value="36"> &nbsp;|- 小制作、仪器仪表、元器件、IC设计</option><option value="39"> &nbsp;|- 初学者的园地、技术问题有问必答</option><option value="42"> &nbsp;|- 音响、功放、影牒机、数码等技术</option><option value="44"> &nbsp;|- 彩色电视、显示器、液晶、等离子</option><option value="40"> &nbsp;|- 综合资源、资料、课程、书籍下载</option><option value="9">>> 电脑网络通信专栏</option><option value="13"> &nbsp;|- 电脑技术、组装、维修和软件应用</option><option value="32"> &nbsp;|- 手机、电话、小灵通、对讲机技术</option><option value="11"> &nbsp;|- 网站设计与网络技术和服务器技术</option><option value="19">>> 认证安规管理专栏</option><option value="21"> &nbsp;|- 欧规、美规、国内外、等安规认证</option><option value="20"> &nbsp;|- ISO认证、企业管理、品质等管理</option><option value="16">>> 英语专栏</option><option value="31"> &nbsp;|- 电子电脑专业英语和日常英语学习</option><option value="24">>> 休闲,娱乐与服务专栏</option><option value="27"> &nbsp;|- 站务管理、意见反馈、建议和投诉</option><option value="26"> &nbsp;|- 娱乐 影视 游戏 酷图 笑话 军事</option><option value="30"> &nbsp;|- 版主俱乐部</option><option value="45">>> 信息中心</option><option value="46"> &nbsp;|- 供应信息</option><option value="47"> &nbsp;|- 求购信息</option><option value="48"> &nbsp;|- 招聘信息</option><option value="49"> &nbsp;|- 求职信息</option>
</select>
</td></tr></form>
<tr><td align="left"><br /><b><a href="../../../index.php">论坛中心</a> -> <a href="../../../thread.php?fid=6">照明、镇流器、LED、节能灯技术</a></b></td>
<td align="right"><br /><a href="../../../post.php?fid=6"><img src="../../../image/wind/post.gif" /></a>
<a href="../../../post.php?action=reply&fid=6&tid=43310">
<img src="../../../image/wind/reply.gif" /></a>
</td></tr></table><br />
<form name="FORM" method="post" action="../../../post.php">
<table cellspacing="1" cellpadding="0" align="center" width="98%" bgcolor=#E7E3E7>
<tr>
<td colspan="2">
<table cellspacing="0" cellpadding="0" width="100%">
<tr><td class="head">
<b>快速发帖(如果你要上传附件请使用“回复帖子”功能回复帖子)</b></td>
<td class="head" align="right">
<a href="#top"><b>顶端</b></a></td></tr></table></td></tr>
<tr><td valign="top" width="20%" bgcolor="#f3f8ef" style="padding:7px"><!-- 20宽跟下面搭配 -->
<b>内容</b>:<br />
<font face="verdana"> HTML 代码不可用<br /><br />
<input type="checkbox" name="atc_usesign" value="1" checked />使用签名<br />
<input type="checkbox" name="atc_convert" value="1" checked />Wind Code自动转换
<input type="hidden" name="atc_autourl" value="1" /><br /><br />
[<a  href="javascript:checklength(document.FORM,'30000');">查看帖子长度</a>]
</td>
<td width="80%" bgcolor="#f3f8ef" style="padding:7px"> 
标题: <input type="text" name="atc_title" value="Re:交通灯控制器vhdl程序" size="45" maxlength="45" />
<!---->
<br />

<!---->	

<!---->	

<!---->	

<!---->	

<!---->	

<!---->	

<!---->	

<!---->	

<!---->
<br />
<textarea onkeydown="quickpost(event)" name="atc_content" cols="100" rows="8"></textarea>
<input type="hidden" value="2" name="step" />
<input type="hidden" value="reply" name="action" />
<input type="hidden" value="6" name="fid" />
<input type="hidden" value="43310" name="tid" />
<input type="hidden" value="none" name="atc_attachment" />
<input type="hidden" value="verify" name="verify" />
<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;
<font color="red"> 按 Ctrl+Enter 直接提交&nbsp;&nbsp;&nbsp;</font><input type="submit" name="Submit" value="提 交" onclick="return checkCnt();" /> 
</td></tr></table></form>
<br />
<center><script type="text/javascript"><!--
google_ad_client = "pub-0039291941255433";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
//2007-02-09: www.elecm.com/index.htm
google_ad_channel = "7190330468";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "FF6FCF";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>
<br />
<center><b>版权所有 电子网<br>
本站管理员:along  7x24小时服务热线:0769-86560516 EMAIL:elecm@126.com</b></a>
<br>声明:网友发表的意见和文章为其个人行为,不代表本网站赞同或支持其行为和意见!转载文章版权归原作者!</a></center>
</body></html>
<script language="JavaScript">
function Addtoie(value,title){
	window.external.AddFavorite(value,title);
}
function Fjumpr(value,path)
{
	if(value!= '') {
		window.location=(path+'/thread.php?fid='+value);
	}
}
function quickpost(event)
{
	if((event.ctrlKey && event.keyCode == 13)||(event.altKey && event.keyCode == 83))
	{
		this.document.FORM.submit();
	}
}
function checkCnt() {
  cnt++;
  if (cnt==1) return true;
  alert('Submission Processing. Please Wait');
  return false;
}
function checklength(theform,postmaxchars) {
	if (postmaxchars != 0) {
		message = '\n最大的字符为'+postmaxchars+' 字节';
	}else {
		message = ''; 
	}
	alert('您的信息已经有 '+theform.atc_content.value.length+' 字节'+message);
}
function addsmile(NewCode) {
    document.FORM.atc_content.value += ' '+NewCode+' '; 
}
function CopyCode(obj){
	var js = document.body.createTextRange();
	js.moveToElementText(obj);
	js.select(); 
	js.execCommand("Copy");
}
</script>
<script src="../../../hitcache.php?tid=43310"></script>
<!---->

⌨️ 快捷键说明

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