|

楼主 |
发表于 2011-11-2 16:30:52
|
显示全部楼层
回复 12# pdali
??可以讲的详细一些吗? 不太清楚的,
我举个例子啊,
module mux2_1( clk, rst ,a1,a2,c ,out1,out2) ;
input clk ,rst ;
input a1,a2 ,c;
output out1,out2 ;
reg out1 ;
wire out2;
always @(posedge clk or posedge rst)
if (rst)
out1 <= 1'b0 ;
else if (c)
out1 <= a1 ;
else
out1 <= a2 ;
assign out2 = c ? a1 : a2 ;
endmodule
可以讲一下 什么时候用out1 什么时候用OUT2吗?
谢谢了 |
|