Error (10028): Can't resolve multiple constant drivers for net "out2" at shiyan.v(14)解决办法

时间:2023-03-09 17:04:42
Error (10028): Can't resolve multiple constant drivers for net "out2" at shiyan.v(14)解决办法

//Error(10028):Can't resolve multiple constant drivers for net “ ” at **.v


//两个进程里都有同一个条件判断的话,会产生并行信号冲突的问题。


//同一个信号不允许在多个进程中赋值,否则则为多驱动。

//进程的并行性决定了多进程不同能对同一个对象进行赋值。


 1 module test(c1,c2,out1,out2);

 input c1,c2;
output out1,out2; reg out1,out2; always @(posedge c1)
begin
out1<=;
out2<=;
end always@(posedge c2)
begin
out1<=;
out2<=;
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==)
begin
out1<=;
out2<=;
end else
begin
out1<=;
out2<=;
end
endmodule

摘自网络:

http://blog.sina.com.cn/s/blog_5c5263cf0100qd2q.html

http://www.cnblogs.com/woshitianma/archive/2013/01/12/2858051.html