Board logo

标题: 这是什么问题? [打印本页]

作者: topzyb    时间: 2006-7-26 17:33     标题: 这是什么问题?

Error: Can't resolve multiple constant drivers for net "readyflag1" at SPIControl.vhd(159)


作者: topzyb    时间: 2006-7-26 17:36

-------------------------------------------------------------------
-------------输出LCD控制数据或读取LCD值----------------------------
-------------------------------------------------------------------
process(sck,spincs,dbflag,lcdflag)

begin
if(lcdflag = '1')then
if(spincs'event and spincs = '1')then
reset <= dtemp (13);
e <= dtemp (12);
csa <= dtemp (11);
rw <= dtemp (10);
di <= dtemp (9);
csb <= dtemp (8);
db <= dtemp(7 downto 0);
db<=db; --delay time
db<=db; --delay time
db<=db; --delay time
db<=db; --delay time
dbo <=db; --取回LCD数据
readyflag<='1';
end if;
elsif(dbflag = '1')then
if(spincs'event and spincs = '1')then
reset <= dtemp (13);
e <= dtemp (12);
csa <= dtemp (11);
rw <= dtemp (10);
di <= dtemp (9);
csb <= dtemp (8);
db <= dtemp(7 downto 0);
end if;
end if;
end process;
-------------------------------------------------------------------
-------------返回SPI读取数据---------------------------------------
-------------------------------------------------------------------
process(sck,readyflag)
begin
if (readyflag='1') then
if(sck'event and sck = '0')then
if(count = "0000")then
spiso <= dbo(7);
elsif(count = "0001")then
spiso <= dbo(6);
elsif(count = "0010")then
spiso <= dbo(5);
elsif(count = "0011")then
spiso <= dbo(4);
elsif(count = "0100")then
spiso <= dbo(3);
elsif(count = "0101")then
spiso <= dbo(2);
elsif(count = "0111")then
spiso <= dbo(1);
elsif(count = "1000")then
spiso <= dbo(0);
readyflag<='0';
else
spiso <= '0';
end if;
end if;
end if;
end process;
end behav;
作者: topzyb    时间: 2006-7-26 17:41

我是想用readyflag做为一个标志位,当发出LCD读取命令后,把readyflag=1,而当发送完数据后,把readyflag=0;但在这个程序中出现上面的问题,不知道怎么解决?
作者: bemoon    时间: 2006-7-26 17:53

错误提示的意思是readyflag1这个信号被1个以上的信号驱动了。检查一下程序吧,看看是不是有不同的process影响readyflag1。




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0