Error (10028): Can't resol…
2014-03-24 12:33
417 查看
原文地址:(10028): Can't resolve multiple constant drivers for net "out2" at shiyan.v(14)解决办法">Error (10028): Can't resolve multiple constant drivers for net "out2" at shiyan.v(14)解决办法作者:老实的娃娃module shiyan(c1,c2,out1,out2);
input c1,c2;
output out1,out2;
reg out1,out2;
always @(posedge c1)
begin
out1<=0;
out2<=0;
end
always@(posedge c2)
begin
out1<=0;
out2<=1;
end
endmodule
上面的代码在quartusII里面就会出现题目的错误提示,器原因就是在两个always语句里面都对out1,out2信号赋值了,而两个always是并行快,所以提示出现多重驱动的情况。。。
解决办法:
将两个always合并为一个
module shiyan(c1,c2,out1,out2);
input c1,c2;
output out1,out2;
reg out1,out2;
always @(posedge c1 or posedge c2)
if(c1==1)
begin
out1<=0;
out2<=0;
end
else
begin
out1<=0;
out2<=1;
end
endmodule
ok!
打完收工!!
input c1,c2;
output out1,out2;
reg out1,out2;
always @(posedge c1)
begin
out1<=0;
out2<=0;
end
always@(posedge c2)
begin
out1<=0;
out2<=1;
end
endmodule
上面的代码在quartusII里面就会出现题目的错误提示,器原因就是在两个always语句里面都对out1,out2信号赋值了,而两个always是并行快,所以提示出现多重驱动的情况。。。
解决办法:
将两个always合并为一个
module shiyan(c1,c2,out1,out2);
input c1,c2;
output out1,out2;
reg out1,out2;
always @(posedge c1 or posedge c2)
if(c1==1)
begin
out1<=0;
out2<=0;
end
else
begin
out1<=0;
out2<=1;
end
endmodule
ok!
打完收工!!
相关文章推荐
- q2&nbsp;编译出现&nbsp;Can&#039;t&nbsp;place&nbsp;multiple…
- can&#039;t&nbsp;lanch&nbsp;the&nbsp;Modelsim-Altera&nbsp;…
- can&#039;t&nbsp;call&nbsp;a&nbsp;non&nbsp;static&nbsp;method&nbsp;f…
- error&nbsp;C2065:&nbsp;&#039;priority_queue&#039;&nbsp;:&nbsp;…
- SQL&nbsp;Error&nbsp;(1130):&nbsp;Host&nbsp;&#039;192.168.…
- 补充:can&#039;t&nbsp;call&nbsp;a&nbsp;non&nbsp;static&nbsp;me…
- TypeError: 'module&#03…
- PHP提示 Fatal error: Class 'DOMD…
- quartusII综合报错(Error (10028): Can't resolve multiple constant drivers for net "txd_cnt[3]")
- configure: error: C co
- mongodb error(MongoError:&n…
- 关于error&nbsp;inflating&nbsp;class
- syntax error near&nbsp…
- UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
- Error&nbsp;retrieving&nbsp;paren…
- ERROR 1062 (23000):&nb…
- UnicodeDecodeError: 'ascii' codec can't decode byte 0xb3 in position 4: ordinal not in range(128)
- Error: Can&#39;t access JTAG chain 错误情况讨论
- Invalid property &#039…
- 错误:Run-time erro '339' 在WIND…