要求根据out_enable控制out的输出高低电平,
reg out_enable;
reg out;
always @(negedge clk_50ms or negedge reset_n or posedge sw_rst)
begin
if ((reset_n == 1'b0) || (sw_rst == 1'b1))
begin
out <= 1'b0;
end
else
if (out_enable ==1'b1)
begin
out<= 1'b0 ;
end
else
begin
out <=1'b1 ;
end
end
为什么执行结果是out不会发生变化? |