集成电路技术分享

 找回密码
 我要注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: longtime

verilog来分析下啊

[复制链接]
UFO 发表于 2010-6-28 12:31:08 | 显示全部楼层
原帖由 janye 于 2006-10-20 20:08 发表<br>
你进程里的时钟源太多了吧,改少点应该就可以了<br>
试试这样可以吗<br>
<br>
library ieee;<br>
use ieee.std_logic_1164.all;<br>
use ieee.std_logic_unsigned.all;<br>
<br>
ENTITY myfpga IS<br>
&nbsp; &nbsp; PORT(&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;CLK&nbsp;&nbsp;:&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;IN ... 我试过了~~~可以,,谢谢
AAT 发表于 2010-6-28 12:55:56 | 显示全部楼层
CNT := 0; TRAGOUT &lt;= '0'; <br>
&nbsp;&nbsp;ELSE CNT := CNT + 1;<br>
END IF;<br>
END IF;<br>
END PROCESS; <br>
TRAGOUT&lt;=T_OUT;<br>
这里输出犯了错误!!!!!!!!!<br>
IF语句逻辑 表达的也不太好
interi 发表于 2010-6-28 13:30:51 | 显示全部楼层
LIBRARY IEEE;<br>
USE IEEE.STD_LOGIC_1164.ALL; <br>
<br>
ENTITY test IS<br>
&nbsp; &nbsp; PORT(&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;CLK&nbsp;&nbsp;:&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;IN&nbsp;&nbsp;STD_LOGIC;<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;TRAG:&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;IN&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;STD_LOGIC;<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;TRAGOUT:&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;BUFFER&nbsp;&nbsp;STD_LOGIC);<br>
END;<br>
<br>
ARCHITECTURE BHV OF test IS<br>
&nbsp; &nbsp; SIGNAL T_OUT:STD_LOGIC;<br>
BEGIN<br>
PROCESS(CLK,TRAG,TRAGOUT)<br>
BEGIN<br>
IF TRAG'EVENT AND TRAG='1' THEN <br>
&nbsp; &nbsp;T_OUT &lt;= '1'; <br>
END IF;<br>
END PROCESS;<br>
<br>
PROCESS(T_OUT,CLK)<br>
VARIABLE CNT:INTEGER range 0 to 10 := 0;<br>
BEGIN<br>
IF CLK'EVENT AND CLK='0' THEN<br>
&nbsp; &nbsp; IF T_OUT = '1' AND CNT = 10 THEN <br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;CNT := 0; <br>
&nbsp; &nbsp; TRAGOUT &lt;= '0'; <br>
&nbsp; &nbsp;ELSE <br>
&nbsp; &nbsp;&nbsp; &nbsp;CNT := CNT + 1;<br>
&nbsp; &nbsp; TRAGOUT&lt;=T_OUT;<br>
&nbsp; &nbsp;END IF;<br>
END IF;<br>
END PROCESS; <br>
<br>
END;<br>
是这样的效果么 ????????????
usb 发表于 2010-6-28 14:40:37 | 显示全部楼层
原帖由 liushui666 于 2006-10-22 09:33 发表<br>
CNT := 0; TRAGOUT &lt;= '0'; <br>
&nbsp;&nbsp;ELSE CNT := CNT + 1;<br>
END IF;<br>
END IF;<br>
END PROCESS; <br>
TRAGOUT&lt;=T_OUT;<br>
这里输出犯了错误!!!!!!!!!<br>
IF语句逻辑 表达的也不太好 谢谢了~~
       
VVC 发表于 2010-6-28 16:37:04 | 显示全部楼层
把BUFFER改掉试拭
ICE 发表于 2010-6-28 17:48:44 | 显示全部楼层
process不可以同时对上,下沿敏感~~~~
您需要登录后才可以回帖 登录 | 我要注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

QQ|小黑屋|手机版|Archiver|fpga论坛|fpga设计论坛 ( 京ICP备20003123号-1 )

GMT+8, 2024-12-25 00:16 , Processed in 0.060143 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表