Synchronous vs. Asynchronous
Synchronous Preset & Clear Asynchronous Clear
module sync (d,clk, clr, pre, q);
input d, clk, clr, pre ;
output q ;
reg q ;
always @(posedge clk)
begin
if (clr)
q <= 1’b0 ;
else if (pre)
q <= 1’b1 ;
else
q <= d ;
end
endmodule
module async (d,clk, clr, q);
input d, clk, clr ;
output q ;
reg q ;
always @(posedge clk or posedge clr)
begin
if (clr)
q <= 1’b0 ;
else
q <= d ;
end
endmodule
이전 슬라이드
다음 슬라이드
첫 슬라이드로 이동
그래픽 버전 보기