malfunction
Newbie level 6
Hi all,
I have some problem about asynchronization
I want to know if the signal LatchedRxStartFrm in the below codes will work well.
Many thanks
always @ (posedge MRxClk or negedge hresetn)
begin
if(hresetn == 1'b0)
LatchedRxStartFrm <=#Tp 0;
else
//Here, RxStartFrm is triggered by MRxClk and SyncRxStartFrm_q is triggered by hclk
if(RxStartFrm & ~SyncRxStartFrm_q)
LatchedRxStartFrm <=#Tp 1;
else
if(SyncRxStartFrm_q)
LatchedRxStartFrm <=#Tp 0;
end
always @ (posedge hclk or negedge hresetn)
begin
if(hresetn == 1'b0)
SyncRxStartFrm <=#Tp 0;
else
if(LatchedRxStartFrm)
SyncRxStartFrm <=#Tp 1;
else
SyncRxStartFrm <=#Tp 0;
end
always @ (posedge hclk or negedge hresetn)
begin
if(hresetn == 1'b0)
SyncRxStartFrm_q <=#Tp 0;
else
SyncRxStartFrm_q <=#Tp SyncRxStartFrm;
end
always @ (posedge hclk or negedge hresetn)
begin
if(hresetn == 1'b0)
SyncRxStartFrm_q2 <=#Tp 0;
else
SyncRxStartFrm_q2 <=#Tp SyncRxStartFrm_q;
end
I have some problem about asynchronization
I want to know if the signal LatchedRxStartFrm in the below codes will work well.
Many thanks
always @ (posedge MRxClk or negedge hresetn)
begin
if(hresetn == 1'b0)
LatchedRxStartFrm <=#Tp 0;
else
//Here, RxStartFrm is triggered by MRxClk and SyncRxStartFrm_q is triggered by hclk
if(RxStartFrm & ~SyncRxStartFrm_q)
LatchedRxStartFrm <=#Tp 1;
else
if(SyncRxStartFrm_q)
LatchedRxStartFrm <=#Tp 0;
end
always @ (posedge hclk or negedge hresetn)
begin
if(hresetn == 1'b0)
SyncRxStartFrm <=#Tp 0;
else
if(LatchedRxStartFrm)
SyncRxStartFrm <=#Tp 1;
else
SyncRxStartFrm <=#Tp 0;
end
always @ (posedge hclk or negedge hresetn)
begin
if(hresetn == 1'b0)
SyncRxStartFrm_q <=#Tp 0;
else
SyncRxStartFrm_q <=#Tp SyncRxStartFrm;
end
always @ (posedge hclk or negedge hresetn)
begin
if(hresetn == 1'b0)
SyncRxStartFrm_q2 <=#Tp 0;
else
SyncRxStartFrm_q2 <=#Tp SyncRxStartFrm_q;
end