//Error(10028):Can‘t resolve multiple constant drivers for net “ ” at **.v
//两个进程里都有同一个条件判断的话,会产生并行信号冲突的问题。
//同一个信号不允许在多个进程中赋值,否则则为多驱动。
//进程的并行性决定了多进程不同能对同一个对象进行赋值。
1 module test(c1,c2,out1,out2); 2 3 input c1,c2; 4 output out1,out2; 5 6 reg out1,out2; 7 8 always @(posedge c1) 9 begin 10 out1<=0; 11 out2<=0; 12 end 13 14 [email protected](posedge c2) 15 begin 16 out1<=0; 17 out2<=1; 18 end 19 20 endmodule
上面的代码在quartusII里面就会出现题目的错误提示,器原因就是在两个always语句里面都对out1,out2信号赋值了,而两个always是并行快,所以提示出现多重驱动的情况。。。
解决办法:
将两个always合并为一个
1 module shiyan(c1,c2,out1,out2); 2 input c1,c2; 3 output out1,out2; 4 5 reg out1,out2; 6 7 always @(posedge c1 or posedge c2) 8 if(c1==1) 9 begin 10 out1<=0; 11 out2<=0; 12 end 13 14 else 15 begin 16 out1<=0; 17 out2<=1; 18 end 19 endmodule
摘自网络:
http://blog.sina.com.cn/s/blog_5c5263cf0100qd2q.html
http://www.cnblogs.com/woshitianma/archive/2013/01/12/2858051.html
Error (10028): Can't resolve multiple constant drivers for net "out2" at shiyan.v(14)解决办法
时间: 2024-11-08 18:27:08