在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 4721|回复: 23

新手求助版主:再问一个弱的问题

[复制链接]
发表于 2007-4-17 13:10:07 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
版主:我写的程序出现了以下的错误,请问如何改正
process(clock)
    begin
   if clock'event and clock='1' then
      if gnt0='0' then
         if frame_rise='1' then
           a<=b;
         else
             a<='1';
      end if;
   end if;
end if;
end process ;

Error: Can't resolve multiple constant drivers for net "a" at wc.vhd(136)
 楼主| 发表于 2007-4-17 18:21:56 | 显示全部楼层
拜托!急求能人指点
发表于 2007-4-17 19:24:23 | 显示全部楼层
process(clock,gnt0,frame_rise,b)
    begin
   if clock'event and clock='1' then
      if gnt0='0' then
         if frame_rise='1' and b='0'  then
             a<='0';
         else
             a<='1';
      end if;
   end if;
end if;
end process ;
Error: Can't resolve multiple constant drivers for net "a" at wc.vhd(136)

[ 本帖最后由 wice3 于 2007-4-17 19:25 编辑 ]
 楼主| 发表于 2007-4-17 22:41:58 | 显示全部楼层
谢谢!斑竹
 楼主| 发表于 2007-4-18 10:30:46 | 显示全部楼层
版主,我按照你说的方法修改了,为什么还会出现同样的错误提示,如果一个信号有多个触发源的话,该怎样编写程序。拜托!急!
发表于 2007-4-18 12:11:57 | 显示全部楼层
单看你的代码,没有什么问题。报告提示是多源驱动问题,可能在不同的进程中操作了a net
发表于 2007-4-18 12:21:45 | 显示全部楼层
你把完整的程序贴出来
问题可能在其他地方
 楼主| 发表于 2007-4-18 12:53:24 | 显示全部楼层
这是完整的程序,我想完成的功能是:当reset复位有效时req10置1;当 dataout0为下降沿时,req10不采样 req0的值,把req10置1;当gnt0为0且 frame   为下降沿时才恢复req10 对req0的采样。
拜托请帮我看看!
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY wc IS

PORT
(
  clock:  IN STD_LOGIC;
  reset:  IN STD_LOGIC;
  req0,req1,req2,req3,req4,req5: IN STD_LOGIC;
  dataout0,dataout1,dataout2,dataout3,dataout4,dataout5: IN STD_LOGIC;
  gnt0,gnt1,gnt2,gnt3,gnt4,gnt5:    IN STD_LOGIC;
  frame   : IN STD_LOGIC;
  req10,req11,req12,req13,req14,req15: OUT STD_LOGIC
);
END wc;
ARCHITECTURE a OF wc IS
signal tmp0,tmp1,tmp2,tmp3,tmp4,tmp5: std_logic;
signal  dataout_rise0,dataout_rise1,dataout_rise2,dataout_rise3,dataout_rise4,dataout_rise5: std_logic;
signal  frame0:std_logic;
signal  frame_rise:std_logic;
BEGIN
p1:process(clock)
   begin
   if clock'event and clock='1' then
      if dataout_rise0='1' then
         req10<='1';
         else
             req10<=req0;
      end if;
end if;
end process p1;
p2:process(clock)
   begin
   if clock'event and clock='1' then
      tmp0 <=dataout0;
     end if;
end process p2;
dataout_rise0<='1' when (dataout0='0' and tmp0='1') else
              '0';            
p3:process(clock)
   begin
   if clock'event and clock='1' then
      if dataout_rise1='1' then
         req11<='1';
         else
             req11<=req1;
      end if;
end if;
end process p3;
p4:process(clock)
   begin
   if clock'event and clock='1' then
      tmp1 <=dataout1;
     end if;
end process p4;
dataout_rise1<='1' when (dataout1='0' and tmp1='1') else
              '0';            
p5:process(clock)
   begin
   if clock'event and clock='1' then
      if dataout_rise2='1' then
         req12<='1';
         else
             req12<=req2;
      end if;
end if;
end process p5;
p6:process(clock)
   begin
   if clock'event and clock='1' then
      tmp2 <=dataout2;
     end if;
end process p6;
dataout_rise2<='1' when (dataout2='0' and tmp2='1') else
              '0';            
p7:process(clock)
   begin
   if clock'event and clock='1' then
      if dataout_rise3='1' then
         req13<='1';
         else
             req13<=req3;
      end if;
end if;
end process p7;
p8:process(clock)
   begin
   if clock'event and clock='1' then
      tmp3 <=dataout3;
     end if;
end process p8;
dataout_rise3<='1' when (dataout3='0' and tmp3='1') else
              '0';            
p9:process(clock)
   begin
   if clock'event and clock='1' then
      if dataout_rise4<='1'then
         req14<='1';
         else
             req14<=req4;
      end if;
end if;
end process p9;
p10:process(clock)
   begin
   if clock'event and clock='1' then
      tmp4 <=dataout4;
     end if;
end process p10;
dataout_rise4<='1' when (dataout4='0' and tmp4='1') else
              '0';            

p11:process(clock)
   begin
   if clock'event and clock='1' then
      if dataout_rise5<='1' then
         req15<='1';
         else
             req15<=req5;
      end if;
end if;
end process p11;
p12:process(clock)
   begin
   if clock'event and clock='1' then
      tmp5 <=dataout5;
     end if;
end process p12;
dataout_rise5<='1' when (dataout5='0' and tmp5='1') else
              '0';            
p13: process(clock,gnt0,frame_rise,req0)
    begin
   if clock'event and clock='1' then
      if gnt0='0' then
         if frame_rise='1'and req0='0' then
           req10<='0';
         else
             req10<='1';
      end if;
   end if;
end if;
end process p13;
p14:process(clock)
   begin
   if clock'event and clock='1' then
      frame0 <=frame;
     end if;
end process p14;
frame_rise<='1' when (frame='0' and frame0='1') else
              '0';            

p15: process(clock,gnt1,frame_rise,req1)
    begin
   if clock'event and clock='1' then
      if gnt1='0' then
         if frame_rise='1' and req1='0' then
           req11<='0';
         else
             req11<='1';
      end if;
   end if;
end if;
end process p15;
p16: process(clock,gnt2,frame_rise,req2)
    begin
   if clock'event and clock='1' then
      if gnt2='0' then
         if frame_rise='1' and req2='0'then
           req12<='0';
         else
             req12<='1';
      end if;
   end if;
end if;
end process p16;
p17: process(clock,gnt3,frame_rise,req3)
     begin
   if clock'event and clock='1' then
      if gnt3='0' then
         if frame_rise='1' and req3='0' then
           req13<='0';
         else
             req13<='1';
      end if;
   end if;
end if;
end process p17;
p18: process(clock,gnt4,frame_rise,req4)
     begin
   if clock'event and clock='1' then
      if gnt4='0' then
         if frame_rise='1' and req4='0' then
           req14<='0';
         else
             req14<='1';
      end if;
   end if;
end if;
end process p18;
p19: process(clock,gnt5,frame_rise,req5)
      begin
   if clock'event and clock='1' then
      if gnt5='0' then
         if frame_rise='1' and req5='0' then
           req15<='0';
         else
             req15<='1';
      end if;
   end if;
end if;
end process p19;
p20:process(clock)
     begin
     if clock'event and clock='1' then      
     if reset='0' then
        req10<='1';
       else
          req10<=req0;
        end if;
     end if;
end process p20;
p21:process(clock)
     begin
     if clock'event and clock='1' then      
     if reset='0' then
        req11<='1';
       else
          req11<=req1;
        end if;
     end if;
end process p21;
p22:process(clock)
     begin
     if clock'event and clock='1' then      
     if reset='0' then
        req12<='1';
       else
          req12<=req2;
        end if;
     end if;
end process p22;
p23:process(clock)
     begin
     if clock'event and clock='1' then      
     if reset='0' then
        req13<='1';
       else
          req13<=req3;
        end if;
     end if;
end process p23;
p24:process(clock)
     begin
     if clock'event and clock='1' then      
     if reset='0' then
        req14<='1';
       else
          req14<=req4;
        end if;
     end if;
end process p24;
p25:process(clock)
     begin
     if clock'event and clock='1' then      
     if reset='0' then
        req15<='1';
       else
          req15<=req5;
        end if;
     end if;
end process p25;


END a;
发表于 2007-4-18 13:34:34 | 显示全部楼层
你在多个process中对同一信号进行操作,多源驱动。VHDL不能直接支持。
 楼主| 发表于 2007-4-18 14:09:10 | 显示全部楼层
能帮我看看应该怎么编吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-6-29 18:33 , Processed in 0.151782 second(s), 8 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表