返回信息流☆─────────────────────────────────────☆
yanxf (繁荣乡版) 于 (Mon Mar 10 15:29:10 2008) 提到:
仿真的时候出现这样的警告,仿真的结果一点都不对。请问有谁遇到过这种情况,该怎么解决?
☆─────────────────────────────────────☆
fzylijun886 (北邮人) 于 (Mon Mar 10 16:13:07 2008) 提到:
问问题,贴代码并给出项目的简单说明是个好习惯
☆─────────────────────────────────────☆
yanxf (繁荣乡版) 于 (Mon Mar 10 16:27:45 2008) 提到:
代码是这样的。就是将四路数据(d1,d2,d3,d4)复用为一路数据(dout),是一个简单的测试程序。
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity test6 is
port(
d1,d2,d3,d4:in std_logic;
clk :in std_logic;
rst:in std_logic;
dout:out std_logic
);
end entity;
architecture behavier of test6 is
signal cnt:integer range 0 to 3;
begin
process(rst,clk)
begin
if(rst='1')then
dout<='1';
cnt<=0;
elsif(clk'event and clk='1')then
if(cnt=0)then
dout<=d1;
cnt<=1;
elsif(cnt=1)then
dout<=d2;
cnt<=cnt+1;
elsif(cnt=2)then
dout<=d3;
cnt<=cnt+1;
elsif(cnt=3)then
dout<=d4;
cnt<=0;
end if;
end if;
end process;
end behavier;
☆─────────────────────────────────────☆
fzylijun886 (北邮人) 于 (Mon Mar 10 23:40:39 2008) 提到:
贴出你的仿真效果图吧,这程序好调
☆─────────────────────────────────────☆
soaringbird (soaringbird) 于 (Tue Mar 11 09:45:54 2008) 提到:
程序有问题,最好用case描述,if描述有优先级,时间约束比较难实现,另外你的仿真时钟是多少,器件选择什么都有关系。
☆─────────────────────────────────────☆
fzylijun886 (北邮人) 于 (Tue Mar 11 09:52:02 2008) 提到:
我习惯是双进程,case状态判断写在另一个进程里,采用同周期的另一个边沿触发
【 在 soaringbird 的大作中提到: 】
: 程序有问题,最好用case描述,if描述有优先级,时间约束比较难实现,另外你的仿真时钟是多少,器件选择什么都有关系。
☆─────────────────────────────────────☆
soaringbird (soaringbird) 于 (Wed Mar 12 11:41:31 2008) 提到:
【 在 fzylijun886 的大作中提到: 】
: 我习惯是双进程,case状态判断写在另一个进程里,采用同周期的另一个边沿触发
好习惯,有数据建立时间的概念
☆─────────────────────────────────────☆
WasteHeaven (托儿所之健康生活) 于 (Wed Mar 12 13:57:19 2008) 提到:
if太多了
☆─────────────────────────────────────☆
yanxf (繁荣乡版) 于 (Thu Mar 20 22:43:20 2008) 提到:
已解决,程序没有错,是器件选择的问题,我选择的器件不支持这个功能。
这是一条镜像帖。来源:北邮人论坛 / circuit / #6148同步于 2008/7/10
Circuit机器人发帖
[合集] 仿真Warning: Found clock high time violation
pooh1949
2008/7/10镜像同步0 回复
订阅后,新回复会通过你的通知中心匿名送达。
0 条回复
暂无回复 · 你可以订阅本帖等待新回复。