[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ethmac]about clock



I do not see anything wrong. Divider2 and SlotTimer are only used to 
support PauseTimer:

always @ (posedge MRxClk or posedge RxReset)
begin
  if(RxReset)
    PauseTimer[15:0] <= #Tp 16'h0;
  else
  if(SetPauseTimer)
    PauseTimer[15:0] <= #Tp LatchedTimerValue[15:0];
  else
  if(DecrementPauseTimer)
    PauseTimer[15:0] <= #Tp PauseTimer[15:0] - 1'b1;
end

assign PauseTimerEq0 = ~(|PauseTimer[15:0]);

PauseTimer is set from MRxClk domain, and PauseTimerEq0 is passed into 
MTxClk domain. Why should PauseTimer itself be in MTxClk domain? Is it 
important to consider cases where the 2 clocks are at different 
frequencies or one of them is stopped?

Jeff

----- Original Message ----- 
From: "XiaYun" <xiayun@m... > 
To: <ethmac@o... > 
Date: Wed, 30 Oct 2002 13:52:20 +0800 
Subject: [ethmac]about clock 

> Hello, 
> 
>  In file eth_receivecontrol.v, I think the following block should 
> use MTxClk in stead of MRxClk, an I right? 
> 
> 
> 
> // Divider2 is used for incrementing the Slot timer every other 
> clock 
> 
> always @ (posedge MRxClk or posedge RxReset) 
> 
> begin 
> 
>  if(RxReset) 
> 
>  Divider2 <= #Tp 1'b0; 
> 
>  else 
> 
>  if(|PauseTimer[15:0] & RxFlow) 
> 
>  Divider2 <= #Tp ~Divider2; 
> 
>  else 
> 
>  Divider2 <= #Tp 1'b0; 
> 
> end 
> 
> 
> 
> // SlotTimer 
> 
> always @ (posedge MRxClk or posedge RxReset) 
> 
> begin 
> 
>  if(RxReset) 
> 
>  SlotTimer[5:0] <= #Tp 6'h0; 
> 
>  else 
> 
>  if(ResetSlotTimer) 
> 
>  SlotTimer[5:0] <= #Tp 6'h0; 
> 
>  else 
> 
>  if(IncrementSlotTimer) 
> 
>  SlotTimer[5:0] <= #Tp SlotTimer[5:0] + 1'b1; 
> 
> End 
> 
> 
> 
> Thanks in advance, 
> 
> 
> 
> Regards, 
> 
> 
> 
> XiaYun 
> 
> 
> 
--
To unsubscribe from ethmac mailing list please visit http://www.opencores.org/mailinglists.shtml