Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

These verilog codes are robust enough?

Status
Not open for further replies.

malfunction

Newbie level 6
Newbie level 6
Joined
Sep 30, 2004
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
110
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
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top